:root {
    --primary-bg: #f8f9fa;
    --secondary-bg: #ffffff;
    --text-color: #333333;
    --border-color: #e0e0e0;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.12);
    --radius: 12px;
    --radius-small: 8px;
    --transition: all 0.3s ease;
    --primary-accent: #6c63ff;
    --primary-accent-hover: #5a52d8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

@supports (font-variation-settings: normal) {
    * {
        font-family: 'Inter var', -apple-system, BlinkMacSystemFont, sans-serif;
    }
}

body {
    background-color: var(--primary-bg);
    color: var(--text-color);
    line-height: 1.6;
    padding: 24px;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 48px;
}

h1 {
    font-weight: 700;
    font-size: 2.5rem;
    margin-bottom: 12px;
    color: #222;
    letter-spacing: -0.5px;
}

.subtitle {
    color: #666;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    font-weight: 400;
}

.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
    margin-bottom: 40px;
    background: var(--secondary-bg);
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.control-group {
    display: flex;
    flex-direction: column;
    min-width: 240px;
}

label {
    font-size: 0.95rem;
    margin-bottom: 10px;
    font-weight: 500;
    color: #555;
}

select, input {
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-small);
    background: var(--secondary-bg);
    font-size: 1rem;
    transition: var(--transition);
    width: 100%;
}

input[type="color"] {
    padding: 4px;
    height: 48px;
    width: 100%;
    border-radius: var(--radius-small);
    cursor: pointer;
}

input[type="range"] {
    -webkit-appearance: none;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    margin-top: 8px;
    padding: 0;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary-accent);
    border-radius: 50%;
    cursor: pointer;
}

select:focus, input:focus {
    outline: none;
    border-color: var(--primary-accent);
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.2);
}

button {
    background: var(--primary-accent);
    color: white;
    border: none;
    cursor: pointer;
    font-weight: 500;
    padding: 12px 24px;
    border-radius: var(--radius-small);
    font-size: 1rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

button:hover {
    background: var(--primary-accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

button:active {
    transform: translateY(0);
}

.export-btn {
    background: transparent;
    color: var(--primary-accent);
    border: 1px solid var(--primary-accent);
}

.export-btn:hover {
    background: rgba(108, 99, 255, 0.1);
}

.palettes-container {
    display: flex;
    flex-direction: column;
    gap: 32px;
    margin-bottom: 40px;
}

.palette {
    background: var(--secondary-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.palette:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.palette-title {
    padding: 16px 20px;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.02);
}

.palette-colors {
    display: flex;
    overflow-x: auto;
    padding: 8px;
}

.color-card {
    min-width: 18.7%;
    margin: 8px;
    border-radius: var(--radius-small);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}

.color-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.color-display {
    height: 100px;
    width: 100%;
    position: relative;
}

.color-info {
    padding: 14px 16px;
    background: var(--secondary-bg);
}

.color-value {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.9rem;
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
}

.color-name {
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.copy-notification {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius-small);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    font-size: 0.95rem;
}

.copy-notification.show {
    opacity: 1;
}

.export-options {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 40px;
    flex-wrap: wrap;
}

.palette-type-tag {
    display: inline-block;
    background: rgba(108, 99, 255, 0.1);
    color: var(--primary-accent);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-left: 8px;
    font-weight: 500;
}

/* Scrollbar Styling */
.palette-colors::-webkit-scrollbar {
    height: 8px;
}

.palette-colors::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.palette-colors::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.palette-colors::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

@media (max-width: 768px) {
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    h1 {
        font-size: 2rem;
    }

    .color-card {
        min-width: 180px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 16px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .controls {
        padding: 20px 16px;
    }

    .color-card {
        min-width: 160px;
    }
}