/* ===================================================================
   start.css — Splash "Schalter umlegen, Musik geht an"
   ===================================================================
   Aufbau (Reihenfolge):
     1. Pacifico-Font (fuer Neon-Schriftzug der Buttons)
     2. Layout-Reset (volle Hoehe, kein Scrollbar)
     3. Szenen-Bilder (aus/an) mit Crossfade ueber body.is-lit
     4. Vignette
     5. Lichtschalter (rechts an der Wand)
     6. Flash-Effekt beim Einschalten
     7. Neon-Buttons (zwei, links/rechts der Jukebox)
     8. Jukebox-Klickflaeche (sekundaerer Login-Trigger)
     9. Auth-Modal (recycelt aus bar-modal-Konvention)
    10. Footer
    11. Responsive (max-width 768px)
    12. Reduced Motion
*/

@import url('https://fonts.googleapis.com/css2?family=Pacifico&display=swap');

:root {
    --gold:        #f2b71b;
    --gold-bright: #ffd766;
    --red:         #c8231a;
    --red-deep:    #6a0d08;
    --orange:      #ff8a1f;
    --cream:       #f5e7c2;
    --cream-soft:  #d8c29a;
}

/* === Layout-Reset === */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #000;
    color: var(--cream);
    font-family: "Helvetica Neue", Arial, sans-serif;
}
.app-container {
    position: relative;
    min-height: 100%;
}

/* === Szenen-Layer === */
.splash-szene {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    user-select: none;
    pointer-events: none;
    z-index: 1;
}
.splash-szene--aus { opacity: 1; transition: opacity 1.6s ease; }
.splash-szene--an  { opacity: 0; transition: opacity 1.6s ease; }
body.is-lit .splash-szene--aus { opacity: 0; }
body.is-lit .splash-szene--an  { opacity: 1; }

/* === Vignette === */
.splash-vignette {
    position: fixed;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background:
        radial-gradient(ellipse at 50% 100%, transparent 30%, rgba(0,0,0,0.5) 100%),
        radial-gradient(ellipse at 50% 0%,   transparent 50%, rgba(0,0,0,0.35) 100%);
}

/* === Lichtschalter === */
.splash-switch-wrap {
    position: fixed;
    top: 50%;
    right: 5%;
    transform: translateY(-50%);
    z-index: 30;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    transition: top 1.2s ease 0.4s, bottom 1.2s ease 0.4s,
                right 1.2s ease 0.4s, transform 1.2s ease 0.4s;
}
body.is-lit .splash-switch-wrap {
    top: auto;
    bottom: 24px;
    right: 24px;
    transform: scale(0.7);
}

.splash-switch {
    position: relative;
    width: 88px;
    height: 144px;
    border: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
    transform-origin: center;
    transition: filter 0.4s ease, transform 0.2s ease;
    filter: drop-shadow(0 0 18px rgba(255, 70, 30, 0.8));
    animation: splash-switch-glow 2.4s ease-in-out infinite;
}
.splash-switch:hover { transform: scale(1.05); }
body.is-lit .splash-switch {
    filter: drop-shadow(0 0 12px rgba(255, 200, 80, 0.45));
    animation: none;
}

.splash-switch-plate {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, #2a1c12 0%, #1a0f08 100%);
    border-radius: 8px;
    box-shadow:
        0 4px 14px rgba(0,0,0,0.7),
        inset 0 1px 0 rgba(255,200,120,0.15),
        inset 0 -2px 4px rgba(0,0,0,0.6);
}
.splash-switch-plate::before,
.splash-switch-plate::after {
    content: "";
    position: absolute;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: radial-gradient(circle, #5a4530 0%, #1a0e05 80%);
    left: 50%;
    transform: translateX(-50%);
}
.splash-switch-plate::before { top: 8px; }
.splash-switch-plate::after  { bottom: 8px; }

.splash-switch-well {
    position: absolute;
    top: 26px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 92px;
    background: #0a0402;
    border-radius: 6px;
    box-shadow:
        inset 0 4px 10px rgba(0,0,0,0.85),
        inset 0 -1px 2px rgba(255,180,100,0.05);
}

.splash-switch-toggle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 28px;
    height: 56px;
    transform: translate(-50%, 8%) rotate(0deg);
    transform-origin: center top;
    background: linear-gradient(180deg, #f0e2c0 0%, #d4be88 50%, #a89060 100%);
    border-radius: 14px 14px 6px 6px;
    box-shadow:
        0 4px 8px rgba(0,0,0,0.7),
        inset 0 1px 2px rgba(255,255,255,0.4),
        inset 0 -2px 4px rgba(0,0,0,0.3);
    transition: transform 0.35s cubic-bezier(0.5, 1.4, 0.5, 1),
                background 0.35s ease;
}
.splash-switch-toggle::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 6px;
    background: #0a0402;
    border-radius: 50%;
}
body.is-lit .splash-switch-toggle {
    transform: translate(-50%, -108%) rotate(180deg);
    background: linear-gradient(180deg, #fff1c4 0%, #ffd766 50%, #d4a020 100%);
}

.splash-switch-led {
    position: absolute;
    top: 132px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--red);
    box-shadow: 0 0 10px #ff3a1a, 0 0 20px rgba(255,40,20,0.7);
    animation: splash-switch-led-pulse 1.4s ease-in-out infinite;
}
body.is-lit .splash-switch-led {
    background: #4ade80;
    box-shadow: 0 0 10px #4ade80, 0 0 20px rgba(74,222,128,0.6);
    animation: none;
}

.splash-switch-hint {
    color: rgba(255, 220, 140, 0.85);
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 600;
    text-shadow: 0 0 8px rgba(255, 70, 30, 0.6);
    animation: splash-switch-hint-pulse 2s ease-in-out infinite;
    text-align: center;
    line-height: 1.4;
    white-space: nowrap;
}
.splash-switch-arrow {
    display: block;
    font-size: 1.4rem;
    margin-top: 4px;
    color: var(--orange);
    animation: splash-switch-arrow-bob 1.6s ease-in-out infinite;
}
body.is-lit .splash-switch-hint { display: none; }

@keyframes splash-switch-glow {
    0%, 100% { filter: drop-shadow(0 0 14px rgba(255, 70, 30, 0.5)); }
    50%      { filter: drop-shadow(0 0 28px rgba(255, 90, 40, 0.95)); }
}
@keyframes splash-switch-led-pulse {
    0%, 100% { opacity: 0.6; }
    50%      { opacity: 1; }
}
@keyframes splash-switch-hint-pulse {
    0%, 100% { opacity: 0.6; transform: translateY(0); }
    50%      { opacity: 1; transform: translateY(-2px); }
}
@keyframes splash-switch-arrow-bob {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(4px); }
}

/* === Flash beim Einschalten === */
.splash-flash {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 95% 50%,
        rgba(255,250,220,0.85), rgba(255,180,80,0.25) 30%, transparent 70%);
    z-index: 25;
    opacity: 0;
    pointer-events: none;
}
body.is-flashing .splash-flash {
    animation: splash-flash-anim 0.8s ease-out forwards;
}
@keyframes splash-flash-anim {
    0%   { opacity: 0; }
    10%  { opacity: 1; }
    100% { opacity: 0; }
}

/* === Neon-Buttons (zwei, mittig links/rechts der Jukebox) === */
.splash-choice {
    position: fixed;
    top: 48%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 20;
    display: flex;
    gap: clamp(180px, 28vw, 360px);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.8s ease 1.0s;
}
body.is-lit .splash-choice {
    opacity: 1;
    pointer-events: auto;
}

.splash-neon-btn {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    color: #fff5d6;
    font-family: "Pacifico", "Brush Script MT", "Lucida Handwriting", cursive;
    font-size: clamp(1.1rem, 2.2vw, 1.7rem);
    line-height: 1.05;
    text-align: center;
    padding: 18px 26px;
    min-width: 140px;
    border-radius: 14px;
    background: rgba(10, 4, 2, 0.4);
    border: 2px solid rgba(255, 138, 31, 0.65);
    text-shadow:
        0 0 4px #fff,
        0 0 10px var(--gold-bright),
        0 0 20px var(--orange),
        0 0 36px var(--red);
    box-shadow:
        0 0 18px rgba(255, 138, 31, 0.55),
        inset 0 0 12px rgba(255, 138, 31, 0.25);
    transition: transform 0.2s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    user-select: none;
    animation: splash-neon-breathe 4s ease-in-out infinite;
}
.splash-neon-btn:hover,
.splash-neon-btn:focus-visible {
    transform: translateY(-2px) scale(1.04);
    border-color: var(--gold-bright);
    box-shadow:
        0 0 28px rgba(255, 138, 31, 0.9),
        inset 0 0 18px rgba(255, 138, 31, 0.4);
    color: #fff;
    text-decoration: none;
    outline: 0;
}
.splash-neon-btn-icon {
    font-size: 1.4em;
    line-height: 1;
    filter: drop-shadow(0 0 6px rgba(255,193,7,0.6));
    font-family: "Helvetica Neue", Arial, sans-serif;
}
.splash-neon-btn-text {
    font-weight: 400;
    letter-spacing: 0.02em;
}

@keyframes splash-neon-breathe {
    0%, 100% { box-shadow:
        0 0 14px rgba(255, 138, 31, 0.45),
        inset 0 0 10px rgba(255, 138, 31, 0.2); }
    50%      { box-shadow:
        0 0 22px rgba(255, 138, 31, 0.75),
        inset 0 0 14px rgba(255, 138, 31, 0.35); }
}

/* === Jukebox-Klickbereich (sekundaerer Login-Trigger, mittig im Bild) === */
.splash-jukebox-trigger {
    position: fixed;
    left: 50%;
    top: 62%;
    transform: translate(-50%, -50%);
    width: 11vw;
    height: 22vw;
    min-width: 120px;
    min-height: 240px;
    max-width: 220px;
    max-height: 440px;
    border: 0;
    background: transparent;
    cursor: pointer;
    z-index: 12;
    opacity: 0;
    transition: opacity 0.6s ease 1.6s;
    border-radius: 50% 50% 8% 8% / 30% 30% 5% 5%;
}
body.is-lit .splash-jukebox-trigger { opacity: 1; }
.splash-jukebox-trigger::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 0 rgba(255, 220, 120, 0);
    transition: box-shadow 0.3s ease;
}
.splash-jukebox-trigger:hover::after {
    box-shadow: inset 0 0 80px 4px rgba(255, 220, 120, 0.15);
}

/* === Auth-Modal (recycelt bar-modal aus dem alten Konzept) === */
.bar-modal {
    position: fixed;
    inset: 0;
    background: rgba(5, 2, 0, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}
.bar-modal.is-open {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0s linear 0s;
}
.bar-modal-karte {
    position: relative;
    width: min(420px, 92vw);
    background: linear-gradient(165deg, #2a1006 0%, #15070a 100%);
    border: 2px solid var(--gold);
    border-radius: 16px;
    padding: 32px 28px 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.7), 0 0 30px rgba(255, 193, 7, 0.3);
    color: var(--cream);
}
.bar-modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: 0;
    background: transparent;
    color: var(--cream);
    font-size: 1.6rem;
    cursor: pointer;
    line-height: 1;
}
.bar-modal-close:hover { color: var(--gold-bright); }
.bar-modal-kopf {
    text-align: center;
    margin-bottom: 16px;
}
.bar-modal-titel {
    margin: 0;
    color: var(--gold-bright);
    font-family: "Georgia", serif;
    letter-spacing: 0.06em;
}
.auth-tabs .nav-link {
    background: linear-gradient(180deg, #1a0805, #0a0402);
    color: var(--cream-soft);
    border: 1px solid rgba(255,193,7,0.3);
    padding: 6px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.auth-tabs .nav-link.active {
    background: linear-gradient(180deg, #c8231a, #6a0d08);
    color: #fff;
    border-color: var(--gold-bright);
    box-shadow: 0 0 10px rgba(255,193,7,0.4);
}

/* === Footer === */
.splash-footer {
    position: fixed;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 8;
    display: flex;
    gap: 18px;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(245, 231, 194, 0.55);
    opacity: 0;
    transition: opacity 1s ease 1.6s;
}
body.is-lit .splash-footer { opacity: 0.7; }
.splash-footer a { color: inherit; text-decoration: none; }
.splash-footer a:hover { color: var(--gold-bright); }

/* === Responsive === */
@media (max-width: 768px) {
    .splash-switch-wrap { right: 4%; }
    .splash-switch { width: 64px; height: 110px; }
    .splash-switch-led { top: 100px; }
    .splash-choice {
        flex-direction: column;
        gap: 18px;
        width: min(360px, 80vw);
    }
    .splash-neon-btn {
        font-size: 1.1rem;
        padding: 14px 20px;
    }
}

/* === FX-Schicht (GSAP, progressive enhancement via start.fx.js) === */
/* Greift nur, wenn start.fx.js erfolgreich startet und body.fx-on setzt.   */
/* GSAP haelt scale/translate als Inline-Transform; hier nur Performance.    */
body.fx-on .splash-szene {
    will-change: transform;
    backface-visibility: hidden;
}
/* Bei FX uebernimmt GSAP das Einblenden der Buttons -> CSS-Fade abschalten,  */
/* damit sich Container-Opacity und GSAP-autoAlpha nicht ueberlagern.         */
body.fx-on .splash-choice {
    opacity: 1;
    transition: none;
}

/* === Reduced Motion === */
@media (prefers-reduced-motion: reduce) {
    .splash-switch, .splash-switch-led, .splash-switch-hint,
    .splash-switch-arrow, .splash-neon-btn {
        animation: none !important;
    }
    .splash-szene--aus, .splash-szene--an,
    .splash-switch-wrap, .splash-choice, .splash-footer,
    .splash-jukebox-trigger {
        transition-duration: 0.4s !important;
    }
}
