/* Font Face Definitions */
@font-face {
    font-family: 'Roboto';
    src: url('../fonts/Roboto-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Roboto';
    src: url('../fonts/Roboto-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
}

:root {
    --primary-color: #5ac8fa;
    --primary-hover: #1da2e0;
    --text-color: #e8ecf3;
    --subtext-color: #c5ced9;
    --glass-bg: rgba(17, 28, 47, 0.58);
    --glass-border: rgba(255, 255, 255, 0.07);
    --input-bg: rgba(255, 255, 255, 0.08);
    --page-bg: #0b1526;
}

body.theme-light {
    --primary-color: #0052d4;
    --primary-hover: #003c9e;
    --text-color: #1e2a3a;
    --subtext-color: #4a5568;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(0, 0, 0, 0.08);
    --input-bg: rgba(255, 255, 255, 0.9);
    --page-bg: #eef3fb;
}

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

body {
    font-family: 'Roboto', sans-serif;
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--page-bg);
    color: var(--text-color);
    transition: background 0.4s ease, color 0.3s ease;
}

/* Background with "Eye" theme using CSS gradients */
.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background:
        linear-gradient(135deg, rgba(8, 12, 24, 0.95) 0%, rgba(12, 18, 36, 0.92) 50%, rgba(8, 21, 44, 0.9) 100%),
        radial-gradient(circle at 18% 20%, rgba(94, 234, 212, 0.08), transparent 38%),
        radial-gradient(circle at 82% 5%, rgba(120, 94, 234, 0.1), transparent 32%),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.02) 0, rgba(255, 255, 255, 0.02) 1px, transparent 1px, transparent 24px),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.02) 0, rgba(255, 255, 255, 0.02) 1px, transparent 1px, transparent 24px);
    overflow: hidden;
    transition: background 0.5s ease;
    z-index: 0;
}

/* Abstract Eye / Vision elements */
.background-overlay::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80vw;
    height: 80vw;
    max-width: 600px;
    max-height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 198, 255, 0.1) 0%, transparent 70%);
    box-shadow: 0 0 100px rgba(0, 198, 255, 0.2);
    animation: pulse-glow 5s infinite ease-in-out;
}

.background-overlay::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 35%;
    transform: translate(-40%, -50%);
    width: 58vw;
    height: 58vw;
    max-width: 420px;
    max-height: 420px;
    border: 2px solid rgba(255, 255, 255, 0.12);
    clip-path: polygon(25% 5%, 75% 5%, 95% 50%, 75% 95%, 25% 95%, 5% 50%);
    box-shadow: 0 0 18px rgba(0, 198, 255, 0.25);
    animation: rotate-ring 22s linear infinite;
}

.login-container {
    width: 100%;
    max-width: 560px;
    padding: 20px 20px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    margin-top: 60px;
}

.glass-panel {
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    text-align: center;
    position: relative;
    overflow: visible;
    /* Changed to visible for settings icon positioning */
}

.settings-modal {
    display: none;
    position: fixed;
    inset: 0;
    padding: 40px;
    background: radial-gradient(circle at 15% 20%, rgba(90, 200, 250, 0.06), transparent 35%),
        radial-gradient(circle at 80% 10%, rgba(255, 255, 255, 0.05), transparent 30%),
        rgba(6, 10, 20, 0.7);
    backdrop-filter: blur(10px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.settings-modal.active {
    display: flex;
    animation: fadeIn 0.25s ease;
}

.modal-content {
    width: 1000px;
    max-width: 95vw;
    max-height: min(82vh, 780px);
    background: #ffffff;
    border-radius: 22px;
    padding: 28px 28px 24px;
    border: 1px solid rgba(15, 23, 42, 0.05);
    box-shadow: 0 22px 65px rgba(0, 0, 0, 0.35);
    text-align: left;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 18px;
    position: relative;
    isolation: isolate;
}

.modal-content h3 {
    margin: 0;
    color: #0f172a;
    font-size: 1.35rem;
    letter-spacing: 0.5px;
}

.modal-content::after {
    content: '';
    position: absolute;
    inset: 8px;
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.05);
    pointer-events: none;
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.modal-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.modal-eyebrow {
    text-transform: uppercase;
    letter-spacing: 1.6px;
    font-size: 0.75rem;
    color: #2563eb;
    font-weight: 700;
}

.modal-subtext {
    margin: 0;
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.4;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin: 0;
    max-height: 450px;
    overflow-y: auto;
    padding-right: 6px;
}

.bg-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 10px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
    object-fit: cover;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.bg-thumb:hover,
.bg-thumb.active {
    border-color: var(--primary-color);
    box-shadow: 0 12px 30px rgba(0, 82, 212, 0.4);
    transform: translateY(-3px);
}

.modal-hint {
    margin: 0;
    color: #475569;
    font-size: 0.85rem;
}

.close-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(15, 23, 42, 0.04);
    color: #0f172a;
    display: grid;
    place-items: center;
    font-size: 1.3rem;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, color 0.18s ease;
}

.close-icon:hover {
    background: rgba(37, 99, 235, 0.12);
    border-color: #2563eb;
    color: #2563eb;
    transform: translateY(-1px);
}

.close-btn {
    align-self: flex-end;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    color: #0f172a;
    transition: background 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.98);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Logo Section */
.logo-section {
    margin-bottom: 30px;
}

.logo-img {
    width: 100px;
    /* Adjust based on actual image aspect ratio */
    height: auto;
    margin-bottom: 15px;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.logo-text h1 {
    color: var(--text-color);
    font-size: 2.2rem;
    margin-bottom: 5px;
    letter-spacing: 2px;
    font-weight: 700;
}

.logo-text h2 {
    color: var(--subtext-color);
    font-size: 1.1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Form Styles */
.login-form {
    text-align: left;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--subtext-color);
    font-size: 0.9rem;
    font-weight: 600;
}

.input-group label::before {
    content: '* ';
    color: #ff4d4f;
}

.input-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    background: var(--input-bg);
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.1);
}

.password-wrapper {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    opacity: 0.5;
    font-size: 1.2rem;
    transition: opacity 0.2s;
}

.toggle-password:hover {
    opacity: 1;
}

.form-footer {
    text-align: right;
    margin-bottom: 25px;
    font-size: 0.85rem;
    color: var(--subtext-color);
}

.form-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.form-footer a:hover {
    text-decoration: underline;
}

.login-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(to right, #0052d4, #4364f7, #6fb1fc);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    box-shadow: 0 4px 15px rgba(0, 82, 212, 0.3);
    margin-top: 16px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 82, 212, 0.4);
}

.login-btn:active {
    transform: translateY(0);
}

/* Footer */
.main-footer {
    margin-top: 20px;
    color: var(--subtext-color);
    font-size: 0.8rem;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

@keyframes pulse-glow {

    0%,
    100% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

@keyframes rotate-ring {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .glass-panel {
        padding: 30px 20px;
    }

    .logo-text h1 {
        font-size: 1.8rem;
    }
}

/* Top navigation */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 22px;
    background: transparent;
    z-index: 5;
    color: var(--text-color);
}

.nav-brand {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-weight: 700;
    letter-spacing: 0.8px;
}

.brand-mark {
    padding: 6px 10px;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
}

.brand-tagline {
    font-size: 0.9rem;
    color: var(--subtext-color);
}

.nav-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.05);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    cursor: pointer;
    transition: transform 0.2s ease, color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.icon-btn:hover {
    transform: translateY(-2px);
    color: var(--primary-color);
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.1);
}

.icon-btn svg {
    width: 22px;
    height: 22px;
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
    position: absolute;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.theme-toggle {
    position: relative;
}

.theme-toggle.is-light .icon-sun {
    opacity: 1;
}

.theme-toggle:not(.is-light) .icon-moon {
    opacity: 1;
}

/* Background mode toggle icons */
.bg-mode-toggle .icon-palette,
.bg-mode-toggle .icon-image {
    position: absolute;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.bg-mode-toggle {
    position: relative;
}

.bg-mode-toggle.is-image .icon-image {
    opacity: 1;
}

.bg-mode-toggle:not(.is-image) .icon-palette {
    opacity: 1;
}

/* Animated CSS Backgrounds - 20 Comfortable Themes */

/* 1. Midnight Stars - Deep navy with twinkling stars */
.css-bg-1 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    overflow: hidden;
}

.css-bg-1::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background-image:
        radial-gradient(2px 2px at 20px 30px, rgba(255, 255, 255, 0.6), transparent),
        radial-gradient(2px 2px at 60px 70px, rgba(255, 255, 255, 0.5), transparent),
        radial-gradient(1px 1px at 50px 50px, rgba(255, 255, 255, 0.7), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255, 255, 255, 0.4), transparent),
        radial-gradient(2px 2px at 90px 10px, rgba(255, 255, 255, 0.6), transparent);
    background-size: 200px 200px;
    animation: stars-move 120s linear infinite;
}

.css-bg-1::after {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background-image:
        radial-gradient(1px 1px at 40px 60px, rgba(255, 255, 255, 0.5), transparent),
        radial-gradient(1px 1px at 110px 90px, rgba(255, 255, 255, 0.6), transparent);
    background-size: 150px 150px;
    animation: stars-move 80s linear infinite reverse;
}

/* 2. Gentle Waves - Soft purple to teal */
.css-bg-2 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(270deg, #667eea 0%, #764ba2 50%, #5f72bd 100%);
    background-size: 600% 600%;
    animation: gradient-wave 18s ease infinite;
}

/* 3. Twilight Sky - Deep blue with subtle meteors */
.css-bg-3 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, #1e3c72 0%, #2a5298 100%);
    overflow: hidden;
}

.css-bg-3::before,
.css-bg-3::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 60px;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: shooting-star 4s linear infinite;
}

.css-bg-3::before {
    top: -100px;
    left: 25%;
    animation-delay: 0s;
}

.css-bg-3::after {
    top: -100px;
    left: 65%;
    animation-delay: 2s;
}

/* 4. Soft Lavender - Muted purple with floating orbs */
.css-bg-4 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #c9a0dc 0%, #d4a5a5 100%);
    overflow: hidden;
}

.css-bg-4::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(200, 180, 200, 0.3) 0%, transparent 40%),
        radial-gradient(circle at 50% 80%, rgba(180, 150, 200, 0.25) 0%, transparent 45%);
    animation: bokeh-float 22s ease-in-out infinite;
}

/* 5. Rose Mist - Soft pink with glass texture */
.css-bg-5 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #d4a5a5 0%, #e8c4c4 100%);
    overflow: hidden;
}

.css-bg-5::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(45deg,
            rgba(255, 255, 255, 0.08) 0px,
            rgba(255, 255, 255, 0.08) 10px,
            transparent 10px,
            transparent 20px);
    animation: glass-wave 28s linear infinite;
}

/* 6. Ocean Breeze - Calm teal with floating shapes */
.css-bg-6 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, #4ca1af 0%, #2c3e50 100%);
    overflow: hidden;
}

.css-bg-6::before,
.css-bg-6::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
    animation: tri-travel 12s linear infinite;
}

.css-bg-6::before {
    border-width: 0 40px 69.3px 40px;
    border-color: transparent transparent rgba(255, 255, 255, 0.15) transparent;
    top: -100px;
    left: 15%;
}

.css-bg-6::after {
    border-width: 0 35px 60.6px 35px;
    border-color: transparent transparent rgba(255, 255, 255, 0.12) transparent;
    top: -80px;
    left: 65%;
    animation-delay: 4s;
}

/* 7. Peachy Sunset - Warm coral tones */
.css-bg-7 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #d4a373 0%, #c98d7a 100%);
    overflow: hidden;
}

.css-bg-7::before,
.css-bg-7::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    animation: pulse-orb 5s ease-in-out infinite;
}

.css-bg-7::before {
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2), transparent);
    top: 25%;
    left: 25%;
}

.css-bg-7::after {
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15), transparent);
    bottom: 25%;
    right: 25%;
    animation-delay: 2.5s;
}

/* 8. Deep Teal - Dark cyan with light rays */
.css-bg-8 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, #2c5f6f 0%, #1a3a52 100%);
    overflow: hidden;
}

.css-bg-8::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: repeating-conic-gradient(from 0deg at 50% 50%,
            transparent 0deg,
            rgba(255, 255, 255, 0.06) 5deg,
            transparent 10deg);
    animation: rotate-rays 35s linear infinite;
}

/* 9. Indigo Dream - Soft purple with particles */
.css-bg-9 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #7b8cde 0%, #4a5f8c 100%);
    overflow: hidden;
}

.css-bg-9::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, 0.2) 1px, transparent 1px),
        radial-gradient(circle, rgba(255, 255, 255, 0.15) 1px, transparent 1px);
    background-size: 50px 50px, 80px 80px;
    background-position: 0 0, 40px 40px;
    animation: particles-float 18s linear infinite;
}

/* 10. Blush Pink - Gentle pink gradient */
.css-bg-10 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #d4a5a5 0%, #c9a0a0 100%);
    background-size: 400% 400%;
    animation: liquid-move 14s ease infinite;
}

/* 11. Sage Green - Muted green with subtle lines */
.css-bg-11 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #8b9d83 0%, #a8b5a0 100%);
    overflow: hidden;
}

.css-bg-11::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(0deg,
            rgba(255, 255, 255, 0.025) 0px,
            rgba(255, 255, 255, 0.025) 1px,
            transparent 1px,
            transparent 4px);
    animation: matrix-fall 10s linear infinite;
}

/* 12. Forest Dusk - Deep green tones */
.css-bg-12 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, #5a7d5f 0%, #6b8e6f 100%);
    overflow: hidden;
}

.css-bg-12::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.15),
            transparent);
    animation: aurora-wave 10s ease-in-out infinite;
}

/* 13. Dusty Rose - Muted pink-blue */
.css-bg-13 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, #7b8cde 0%, #c9a0a0 100%);
    overflow: hidden;
}

.css-bg-13::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(ellipse at 30% 40%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 60%, rgba(255, 255, 255, 0.12) 0%, transparent 50%);
    animation: cosmic-drift 24s ease-in-out infinite;
}

/* 14. Warm Ember - Soft orange-brown */
.css-bg-14 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #b8734d 0%, #a86f4f 100%);
    overflow: hidden;
}

.css-bg-14::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle, rgba(255, 200, 150, 0.3) 2px, transparent 2px),
        radial-gradient(circle, rgba(255, 180, 120, 0.2) 1px, transparent 1px);
    background-size: 60px 60px, 40px 40px;
    animation: embers-rise 12s linear infinite;
}

/* 15. Seafoam - Soft teal-green */
.css-bg-15 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, #5a8f8f 0%, #7ba89f 100%);
    animation: neon-pulse 4s ease-in-out infinite;
}

/* 16. Mauve Mist - Soft purple-gray */
.css-bg-16 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, #9d8ca1 0%, #b5a8b0 100%);
    overflow: hidden;
}

.css-bg-16::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg,
            rgba(255, 255, 255, 0.08),
            transparent,
            rgba(255, 255, 255, 0.08),
            transparent);
    animation: kaleidoscope-spin 18s linear infinite;
}

/* 17. Golden Hour - Warm amber */
.css-bg-17 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #c9a86a 0%, #b8976a 100%);
    overflow: hidden;
}

.css-bg-17::before {
    content: '';
    position: absolute;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.25), transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: solar-flare 7s ease-in-out infinite;
}

/* 18. Coral Reef - Soft coral tones */
.css-bg-18 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, #c98d7a 0%, #d4a89f 100%);
    overflow: hidden;
}

.css-bg-18::before,
.css-bg-18::after {
    content: '';
    position: absolute;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    animation: ripple-expand 5s ease-out infinite;
}

.css-bg-18::before {
    width: 100px;
    height: 100px;
    top: 35%;
    left: 35%;
}

.css-bg-18::after {
    width: 100px;
    height: 100px;
    bottom: 35%;
    right: 35%;
    animation-delay: 2.5s;
}

/* 19. Olive Grove - Muted olive green */
.css-bg-19 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #7a8450 0%, #8d9b6a 100%);
    overflow: hidden;
}

.css-bg-19::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(30deg, rgba(255, 255, 255, 0.08) 12%, transparent 12.5%, transparent 87%, rgba(255, 255, 255, 0.08) 87.5%),
        linear-gradient(150deg, rgba(255, 255, 255, 0.08) 12%, transparent 12.5%, transparent 87%, rgba(255, 255, 255, 0.08) 87.5%),
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.08) 75%);
    background-size: 80px 140px;
    animation: hexagon-shift 24s linear infinite;
}

/* 20. Plum Twilight - Deep purple blend */
.css-bg-20 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, #5f5f8d 0%, #6d5f7d 50%, #7d6f8d 100%);
    background-size: 200% 200%;
    overflow: hidden;
    animation: nebula-swirl 22s ease infinite;
}

.css-bg-20::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at 30% 50%, rgba(255, 255, 255, 0.15), transparent 50%);
    animation: nebula-pulse 9s ease-in-out infinite;
}

/* Keyframe Animations */
@keyframes stars-move {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-200px);
    }
}

@keyframes gradient-wave {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes shooting-star {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 1;
    }

    70% {
        opacity: 1;
    }

    100% {
        transform: translateY(100vh) translateX(100px);
        opacity: 0;
    }
}

@keyframes bokeh-float {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-30px) scale(1.1);
    }
}

@keyframes glass-wave {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

@keyframes tri-travel {
    0% {
        transform: translateY(0);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

@keyframes pulse-orb {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.6;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

@keyframes rotate-rays {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes particles-float {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-100px);
    }
}

@keyframes liquid-move {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes matrix-fall {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(100px);
    }
}

@keyframes aurora-wave {

    0%,
    100% {
        transform: translateX(-50%);
    }

    50% {
        transform: translateX(0%);
    }
}

@keyframes cosmic-drift {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(30px, -30px);
    }
}

@keyframes embers-rise {
    from {
        transform: translateY(0);
        opacity: 1;
    }

    to {
        transform: translateY(-100%);
        opacity: 0;
    }
}

@keyframes neon-pulse {

    0%,
    100% {
        filter: brightness(1);
    }

    50% {
        filter: brightness(1.3);
    }
}

@keyframes kaleidoscope-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes solar-flare {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.4;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 0.6;
    }
}

@keyframes ripple-expand {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
    }

    100% {
        width: 300px;
        height: 300px;
        opacity: 0;
    }
}

@keyframes hexagon-shift {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 80px 140px;
    }
}

@keyframes nebula-swirl {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes nebula-pulse {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.6;
    }
}

/* Color thumbnail for CSS backgrounds */
.color-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 10px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    position: relative;
    overflow: hidden;
}

.color-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: inherit;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.color-thumb:hover,
.color-thumb.active {
    border-color: var(--primary-color);
    box-shadow: 0 12px 30px rgba(0, 82, 212, 0.4);
    transform: translateY(-3px);
}