/**
 * QuizTreff Halloween: Premium-Nacht nach der freigegebenen Vorschau vom
 * 05.10.2026. Aktiv über data-theme="halloween" auf <html> (includes/season.php).
 *
 * Die Marke bleibt: Pink und Violett sind weiter die Bedienfarben. Die Saison
 * bringt die gemalte Nacht in den Hero der Startseite, den Boden der Nacht in
 * den Fußbereich, dunkles Glas für Navigation und Karten und warmes Kürbislicht.
 * Die feste Ebene hinter der Seite (Nacht, Nebel, Funken, Fledermaus) steht in
 * season-layer.css.
 */

html[data-theme="halloween"] {
    color-scheme: dark;

    --hw-bg-0: #06060c;
    --hw-bg-1: #0b0916;
    --hw-bg-2: #120e22;
    --hw-violet: #7c3aed;
    --hw-magenta: #ff4fd8;
    --hw-pumpkin: #ff8a2a;
    --hw-ember: #ffb066;
    --hw-gold: #f6c453;
    --hw-moon: #b8ccff;
    --hw-glass: rgba(18, 13, 32, 0.72);
    --hw-line: rgba(190, 170, 255, 0.14);
    --hw-line-warm: rgba(255, 166, 90, 0.22);

    /* Saison-Tokens, die andere Dateien lesen */
    --season-accent: var(--hw-pumpkin);
    --season-glow: rgba(255, 138, 42, 0.28);
    --season-border: var(--hw-line-warm);

    overflow-x: clip;
}

html[data-theme="halloween"] body {
    background:
        radial-gradient(1100px 700px at 15% 40%, rgba(124, 58, 237, 0.10), transparent 70%),
        radial-gradient(900px 600px at 85% 60%, rgba(255, 79, 216, 0.06), transparent 70%),
        linear-gradient(180deg, var(--hw-bg-0) 0%, var(--hw-bg-1) 30%, var(--hw-bg-2) 70%, var(--hw-bg-1) 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

/* Navigation: dunkleres Glas und eine feine Lichtkante, links mondkalt,
   rechts kürbiswarm */
html[data-theme="halloween"] body > header {
    background: rgba(8, 7, 15, 0.72) !important;
    border-bottom-color: rgba(255, 255, 255, 0.06) !important;
    box-shadow: 0 1px 0 rgba(255, 138, 42, 0.12), 0 10px 30px rgba(0, 0, 0, 0.35);
}

html[data-theme="halloween"] body > header::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 1px;
    pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(184, 204, 255, 0.35) 25%, rgba(160, 107, 255, 0.35) 50%, rgba(255, 138, 42, 0.45) 75%, transparent);
}

/* Karten: dunkles Glas mit warmem Lichtsaum */
html[data-theme="halloween"] main .rounded-2xl[class*="border"],
html[data-theme="halloween"] main .rounded-xl[class*="border"] {
    border-color: var(--hw-line);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

html[data-theme="halloween"] main .rounded-2xl[class*="border"]:hover,
html[data-theme="halloween"] main .rounded-xl[class*="border"]:hover {
    border-color: rgba(255, 176, 102, 0.35);
}

/* Hauptschaltflächen: Markenverlauf bleibt, dazu Kürbisglühen */
html[data-theme="halloween"] .qt-btn-primary,
html[data-theme="halloween"] .qt-cta-primary,
html[data-theme="halloween"] [class*="from-qtPink"][class*="to-qtPurple"] {
    box-shadow: 0 8px 26px rgba(255, 79, 216, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

html[data-theme="halloween"] .qt-btn-primary:hover,
html[data-theme="halloween"] .qt-cta-primary:hover,
html[data-theme="halloween"] [class*="from-qtPink"][class*="to-qtPurple"]:hover {
    box-shadow: 0 10px 34px rgba(255, 79, 216, 0.38), 0 0 0 1px rgba(255, 176, 102, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

html[data-theme="halloween"] :focus-visible {
    outline: 2px solid var(--hw-ember);
    outline-offset: 2px;
}

html[data-theme="halloween"] main h1 {
    text-shadow: 0 0 28px rgba(255, 138, 42, 0.18);
}

html[data-theme="halloween"] ::selection {
    background: rgba(255, 138, 42, 0.35);
    color: #fff;
}

/* ---------- Startseite: die gemalte Nacht im Hero ---------- */

/* Szene und Lesbarkeitsverlauf liegen zusammen im ::before. Unten blendet die
   Maske weich aus, darunter liegt die feste Hintergrundszene. Ein Verlauf auf
   eine Volltonfarbe gab dort eine harte Kante. */
html[data-theme="halloween"] .landing-hero::before {
    background:
        linear-gradient(90deg, rgba(6, 6, 12, 0.88) 0%, rgba(6, 6, 12, 0.66) 32%, rgba(6, 6, 12, 0.15) 62%, rgba(6, 6, 12, 0.05) 100%),
        linear-gradient(180deg, rgba(6, 6, 12, 0.35) 0%, transparent 25%),
        url("../../assets/seasons/halloween/v2/night-960.webp") 62% 8% / cover no-repeat,
        #0b0a1a;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 55%, transparent 100%);
            mask-image: linear-gradient(180deg, #000 0%, #000 55%, transparent 100%);
    animation: qt-hw-breathe 30s ease-in-out infinite alternate;
}

@media (min-width: 1200px) {
    html[data-theme="halloween"] .landing-hero::before {
        background:
            linear-gradient(90deg, rgba(6, 6, 12, 0.88) 0%, rgba(6, 6, 12, 0.66) 32%, rgba(6, 6, 12, 0.15) 62%, rgba(6, 6, 12, 0.05) 100%),
            linear-gradient(180deg, rgba(6, 6, 12, 0.35) 0%, transparent 25%),
            url("../../assets/seasons/halloween/v2/night-1920.webp") 62% 8% / cover no-repeat,
            #0b0a1a;
    }
}

/* Schmale Bildschirme: Text steht mittig über der Szene, also von oben
   nach unten abdunkeln statt von links */
@media (max-width: 1023px) {
    html[data-theme="halloween"] .landing-hero::before {
        background:
            linear-gradient(180deg, rgba(6, 6, 12, 0.5) 0%, rgba(6, 6, 12, 0.72) 45%, rgba(6, 6, 12, 0.6) 80%, transparent 100%),
            url("../../assets/seasons/halloween/v2/night-960.webp") 72% 35% / cover no-repeat,
            #0b0a1a;
        animation: none;
    }
}

@keyframes qt-hw-breathe {
    from { background-position: 0 0, 0 0, 62% 8%, 0 0; }
    to { background-position: 0 0, 0 0, 62% 4%, 0 0; }
}

/* Der Geist am Schloss, nur auf breiten Bildschirmen */
@media (min-width: 1024px) {
    html[data-theme="halloween"] .landing-hero::after {
        content: "";
        position: absolute;
        z-index: 0;
        right: 13%;
        top: 46%;
        width: 54px;
        height: 114px;
        pointer-events: none;
        background: url("../../assets/seasons/halloween/v2/ghost-mist.webp") center / contain no-repeat;
        opacity: 0.38;
        filter: drop-shadow(0 0 18px rgba(184, 204, 255, 0.35));
        animation: qt-hw-ghost 16s ease-in-out infinite;
    }
}

@keyframes qt-hw-ghost {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-14px, -12px); }
}

/* ---------- Fußbereich: der Boden der Halloween-Nacht ---------- */
html[data-theme="halloween"] #qt-footer {
    position: relative;
    isolation: isolate;
    padding-top: 220px;
    padding-bottom: 28px;
    background: transparent;
    border-top-color: transparent;
}

html[data-theme="halloween"] #qt-footer::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        linear-gradient(180deg, transparent 0%, rgba(11, 9, 22, 0.25) 26%, rgba(6, 6, 12, 0.05) 52%, rgba(6, 6, 12, 0.45) 82%, rgba(6, 6, 12, 0.8) 100%),
        url("../../assets/seasons/halloween/v2/ground-960.webp") 50% 80% / cover no-repeat;
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 30%);
            mask-image: linear-gradient(180deg, transparent 0%, #000 30%);
}

@media (min-width: 1200px) {
    html[data-theme="halloween"] #qt-footer::before {
        background:
            linear-gradient(180deg, transparent 0%, rgba(11, 9, 22, 0.25) 26%, rgba(6, 6, 12, 0.05) 52%, rgba(6, 6, 12, 0.45) 82%, rgba(6, 6, 12, 0.8) 100%),
            url("../../assets/seasons/halloween/v2/ground-1920.webp") 50% 80% / cover no-repeat;
    }
}

/* Der Inhalt des Fußbereichs steht auf dunklem Glas über dem Boden */
html[data-theme="halloween"] #qt-footer > div {
    background: rgba(8, 7, 15, 0.62);
    border: 1px solid var(--hw-line);
    border-radius: 18px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

@media (max-width: 640px) {
    html[data-theme="halloween"] #qt-footer { padding-top: 160px; }
    html[data-theme="halloween"] #qt-footer > div { margin-left: 12px; margin-right: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    html[data-theme="halloween"] .landing-hero::before,
    html[data-theme="halloween"] .landing-hero::after {
        animation: none !important;
    }
}
