:root {
    --primary: #4361ee;
    --secondary: #3f37c9;
    --light: #f8f9fa;
    --dark: #212529;
    --success: #4cc9f0;
    --warning: #f72585;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: #f0f2f5;
    color: var(--dark);
    line-height: 1.6;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    padding: 30px 0;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 10px;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.hidden {
    display: none !important;
}

/* Upload Section */
.upload-section {
    text-align: center;
    margin-bottom: 30px;
}

.upload-btn {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.upload-btn:hover {
    background: var(--secondary);
    transform: translateY(-2px);
}

#fileInfo {
    margin-top: 10px;
    color: #666;
}

/* Canvas Container */
.canvas-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    overflow: hidden;
    position: relative;
}

#editorCanvas {
    max-width: 100%;
    display: block;
    margin: 0 auto;
}

/* Controls */
.controls {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.control-group {
    margin-bottom: 25px;
}

.control-group h3 {
    margin-bottom: 15px;
    color: var(--primary);
}

.text-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 10px;
}

#textInput {
    flex: 1;
    min-width: 200px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

select, input[type="color"], input[type="range"] {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

button {
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

#addTextBtn {
    background: var(--primary);
    color: white;
}

#addTextBtn:hover {
    background: var(--secondary);
}

/* Stickers */
.sticker-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
}

.sticker {
    font-size: 24px;
    text-align: center;
    padding: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 4px;
    background: #f5f5f5;
}

.sticker:hover {
    background: #e0e0e0;
    transform: scale(1.1);
}

/* Download Section */
.download-section {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.download-btn {
    background: var(--success);
    color: white;
    flex: 1;
}

.reset-btn {
    background: var(--warning);
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    .sticker-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .text-options {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 480px) {
    .sticker-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .download-section {
        flex-direction: column;
    }
}