* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    width: 100%;
    max-width: 900px;
}

header {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.generator-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 40px;
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.input-group input,
.input-group select,
.input-group textarea {
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
    outline: none;
    border-color: #4CAF50;
}

.input-group textarea {
    resize: vertical;
    min-height: 60px;
    font-family: inherit;
}

.input-group input[type="color"] {
    width: 60px;
    height: 45px;
    padding: 2px;
    cursor: pointer;
}

.input-group input[type="range"] {
    cursor: pointer;
}

#font-size-value {
    font-weight: 600;
    color: #666;
    font-size: 0.9rem;
}

#generate-btn {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 10px;
}

#generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

#generate-btn:active {
    transform: translateY(0);
}

.preview-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.canvas-container {
    border: 3px solid #e1e5e9;
    border-radius: 12px;
    padding: 20px;
    background: #f8f9fa;
    display: flex;
    justify-content: center;
    align-items: center;
}

#emoji-canvas {
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
}

#download-btn {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(33, 150, 243, 0.4);
}

#download-btn:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .generator-section {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 30px 20px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    header p {
        font-size: 1rem;
    }
    
    .preview-section {
        order: -1;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    header {
        padding: 20px;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    .generator-section {
        padding: 20px 15px;
    }
}