* {
    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, #f8fafc 0%, #e2e8f0 100%);
    min-height: 100vh;
    padding: 1rem;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 2rem;
}

.header-title {
    font-size: 3rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.header-subtitle {
    color: #64748b;
    font-size: 1.1rem;
}

/* Main Grid Layout */
.main-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .main-grid {
        grid-template-columns: 380px 1fr;
    }
}

/* Control Panel */
.controls-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.control-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.control-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.control-title i {
    width: 20px;
    height: 20px;
}

/* Theme Buttons */
.theme-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.theme-btn {
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 0.75rem;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    background: #f1f5f9;
    color: #475569;
    transition: all 0.2s;
}

.theme-btn:hover {
    background: #e2e8f0;
}

.theme-btn.active {
    background: #6366f1;
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.3);
}

/* Search Input */
.search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.75rem;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    transition: border-color 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: #6366f1;
}

/* Icon Categories */
.icon-categories {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.category-btn {
    padding: 0.4rem 0.75rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    cursor: pointer;
    background: #f1f5f9;
    color: #475569;
    transition: all 0.2s;
    font-weight: 500;
}

.category-btn:hover {
    background: #e2e8f0;
}

.category-btn.active {
    background: #6366f1;
    color: white;
}

/* Icon Grid */
.icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(45px, 1fr));
    gap: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
    padding: 0.5rem;
    border: 2px solid #f1f5f9;
    border-radius: 0.75rem;
}

.icon-grid::-webkit-scrollbar {
    width: 8px;
}

.icon-grid::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.icon-grid::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.icon-grid::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.icon-item {
    padding: 0.75rem;
    border: none;
    border-radius: 0.75rem;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-item:hover {
    background: #e2e8f0;
    transform: scale(1.05);
}

.icon-item.active {
    background: #6366f1;
    transform: scale(1.1);
    box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.3);
}

.icon-item svg {
    width: 24px;
    height: 24px;
    color: #475569;
}

.icon-item.active svg {
    color: white;
}

/* Fill Type Buttons */
.fill-type-buttons {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.fill-btn {
    flex: 1;
    padding: 0.6rem 1rem;
    border: none;
    border-radius: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    background: #f1f5f9;
    color: #475569;
    transition: all 0.2s;
}

.fill-btn:hover {
    background: #e2e8f0;
}

.fill-btn.active {
    background: #6366f1;
    color: white;
}

/* Color Controls */
.color-controls {
    margin-bottom: 1rem;
}

.color-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: #475569;
    margin-bottom: 0.5rem;
    margin-top: 0.75rem;
}

.color-picker {
    width: 100%;
    height: 50px;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
}

/* Sliders */
.slider-container {
    margin-top: 0.75rem;
}

.slider-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: #475569;
    margin-bottom: 0.5rem;
}

.slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e2e8f0;
    outline: none;
    -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #6366f1;
    cursor: pointer;
}

.slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #6366f1;
    cursor: pointer;
    border: none;
}

/* Color Palettes */
.color-palettes {
    margin-top: 1rem;
}

.palette {
    margin-bottom: 0.75rem;
}

.palette-name {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 0.4rem;
    text-transform: capitalize;
}

.palette-colors {
    display: flex;
    gap: 0.5rem;
}

.palette-color {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: transform 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.palette-color:hover {
    transform: scale(1.1);
}

/* Text Input */
.text-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.75rem;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    transition: border-color 0.2s;
}

.text-input:focus {
    outline: none;
    border-color: #6366f1;
}

/* Preview Panel */
.preview-panel {
    display: flex;
    flex-direction: column;
}

.preview-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.preview-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1.5rem;
}

.canvas-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

#logoCanvas {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Download Section */
.download-section {
    margin-top: 1.5rem;
}

.download-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.download-title i {
    width: 20px;
    height: 20px;
}

.download-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.download-btn {
    padding: 0.9rem 1.5rem;
    border: none;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    background: #6366f1;
    color: white;
    transition: all 0.2s;
    box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.3);
}

.download-btn:hover {
    background: #4f46e5;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px -1px rgba(99, 102, 241, 0.4);
}

.download-info {
    text-align: center;
    font-size: 0.9rem;
    color: #64748b;
}

/* Responsive */
@media (max-width: 768px) {
    .header-title {
        font-size: 2rem;
    }
    
    .theme-buttons {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .download-buttons {
        grid-template-columns: 1fr;
    }
}