@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --bg-dark: #0f172a;
    --bg-card: rgba(255, 255, 255, 0.08);
    --glass: rgba(255, 255, 255, 0.12);
    --border: rgba(255, 255, 255, 0.18);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --accent: #7c3aed;
    --accent-2: #06b6d4;
    --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: radial-gradient(circle at top left, #7c3aed33, transparent 30%),
        radial-gradient(circle at bottom right, #06b6d433, transparent 30%),
        linear-gradient(135deg, #020617 0%, #0f172a 45%, #111827 100%);
    color: var(--text);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 7rem 1.5rem 2rem;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
}

/* ===== HEADER ===== */

header {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 1250px;
    padding: 1rem 1.5rem;
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: var(--shadow);
    z-index: 1000;
}

header h1 {
    color: white;
    margin: 0;
    text-align: center;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

header a {
    position: absolute;
    top: 50%;
    right: 24px;
    transform: translateY(-50%);
    text-decoration: none;
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    transition: all 0.25s ease;
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.35);
}

header a:hover {
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 12px 24px rgba(124, 58, 237, 0.5);
}

/* ===== MAIN CONTAINERS ===== */

.container {
    width: 100%;
    max-width: 1200px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    background: var(--glass);
    backdrop-filter: blur(24px);
    border-radius: 28px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.mixer-container {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
    padding: 1.5rem;
    border-radius: 24px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.06);
}

/* ===== COLOR CONTROL ===== */

.color-control {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    width: 280px;
    padding: 1.2rem;
    border-radius: 20px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.06);
    transition: all 0.3s ease;
}

.color-control:hover {
    transform: translateY(-4px);
    background: rgba(255,255,255,0.08);
}

/* ===== RANGE SLIDERS ===== */

input[type="range"] {
    width: 100%;
    height: 14px;
    appearance: none;
    border-radius: 999px;
    background: linear-gradient(to right, rgba(255,255,255,0.15), var(--track-color));
    outline: none;
    overflow: hidden;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.4);
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: white;
    border: 4px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    cursor: pointer;
    box-shadow: 0 0 0 6px rgba(255,255,255,0.08),
        0 8px 18px rgba(0,0,0,0.3);
    transition: all 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.12);
}

/* ===== RESULT ===== */

.result-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 2rem 0 1rem;
}

.result {
    width: 360px;
    height: 110px;
    border-radius: 28px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 20px 40px rgba(0,0,0,0.35),
        inset 0 1px 1px rgba(255,255,255,0.15);
    transition: all 0.35s ease;
}

.result::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
            135deg,
            rgba(255,255,255,0.22),
            rgba(255,255,255,0)
        );
}

.result:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 28px 50px rgba(0,0,0,0.45),
        inset 0 1px 1px rgba(255,255,255,0.15);
}

/* ===== HEX VALUE ===== */

.hex-value {
    margin-top: 1.5rem;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 1rem 1.8rem;
    border-radius: 18px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(12px);
    color: white;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    box-shadow: 0 10px 24px rgba(0,0,0,0.25);
}

.hex-value:hover {
    transform: translateY(-2px);
    background: rgba(255,255,255,0.12);
}

.hex-value.copied::after {
    content: 'Copied!';
    position: absolute;
    top: -46px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: white;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    opacity: 0;
    animation: fade 2s;
    white-space: nowrap;
}

/* ===== PALETTE ===== */

.palette-container {
    margin-top: 2rem;
    width: 100%;
}

.palette-title {
    text-align: center;
    margin-bottom: 1.2rem;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.palette {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.palette-color {
    min-height: 90px;
    max-width: 360px;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0.8rem 1.2rem;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 18px 30px rgba(0,0,0,0.25),
        inset 0 1px 1px rgba(255,255,255,0.15);
}

.palette-color::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
            145deg,
            rgba(255,255,255,0.25),
            rgba(255,255,255,0)
        );
    pointer-events: none;
}

.palette-color:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 28px 50px rgba(0,0,0,0.4),
        inset 0 1px 1px rgba(255,255,255,0.15);
}

.palette-color-name {
    font-weight: 700;
    font-size: 1.1rem;
    z-index: 2;
}

.palette-color-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    opacity: 0.95;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
    z-index: 2;
}

/* ===== INPUTS ===== */

.color-input {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.color-input input[type="number"] {
    width: 70px;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.08);
    color: white;
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    outline: none;
    transition: all 0.2s ease;
}

.color-input input[type="number"]:focus {
    border-color: var(--accent-2);
    box-shadow: 0 0 0 4px rgba(6,182,212,0.15);
}

/* ===== TOOLTIP ===== */

.tooltip {
    position: absolute;
    top: -42px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15,23,42,0.95);
    color: white;
    padding: 8px 14px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    opacity: 0;
    transition: all 0.25s ease;
    pointer-events: none;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.08);
}

.palette-color:hover .tooltip {
    opacity: 1;
    top: -48px;
}

/* ===== FOOTER ===== */

.footer {
    margin-top: 1rem;
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
    text-align: center;
}

/* ===== ANIMATIONS ===== */

@keyframes fade {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
}

/* ===== RESPONSIVE ===== */

@media (max-width: 768px) {
    body {
        padding-top: 8rem;
    }

    header {
        padding: 1rem;
    }

    header h1 {
        font-size: 1.2rem;
    }

    header a {
        position: static;
        display: block;
        margin: 1rem auto 0;
        width: fit-content;
        transform: none;
    }

    .container {
        padding: 1.2rem;
    }

    .result {
        width: 100%;
        max-width: 280px;
    }
}
```
