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

body {
    font-family: 'Space Mono', monospace;
    background: #fafafa;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #1a1a1a;
}

header p {
    font-size: 1.1rem;
    color: #666;
}

.upload-area {
    border: 2px dashed #ccc;
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    position: relative;
}

.upload-area:hover {
    border-color: #007bff;
    background: #f8f9ff;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.1);
}

.upload-area.drag-over {
    border-color: #007bff;
    background: #f0f8ff;
    box-shadow: 0 0 20px rgba(0, 123, 255, 0.2);
}

.upload-content {
    pointer-events: none;
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.upload-area p {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.upload-subtext {
    font-size: 0.9rem;
    color: #888;
}

.file-info {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.file-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #1a1a1a;
}

.palette-container {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-top: 2rem;
}

.palette-grid {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
}

.color-swatch {
    aspect-ratio: 1;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.color-swatch:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.color-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem;
    font-size: 0.75rem;
    line-height: 1.2;
    transform: translateY(100%);
    transition: transform 0.2s ease;
}

.color-swatch:hover .color-info {
    transform: translateY(0);
}

.palette-controls {
    display: flex;
    gap: 2rem;
    align-items: center;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
    flex-wrap: wrap;
}

.palette-controls label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
}

.palette-controls input[type="checkbox"] {
    transform: scale(1.2);
}

#exportBtn {
    background: #007bff;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    transition: background 0.2s ease;
    margin-left: auto;
}

#exportBtn:hover {
    background: #0056b3;
}

.error-message {
    background: #fee;
    color: #c33;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid #fcc;
    margin-top: 1rem;
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .palette-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 0.5rem;
    }
    
    .palette-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    #exportBtn {
        margin-left: 0;
    }
}

