/*
 * Themes der Zuschauerseite (für Smartphones optimiert).
 * Nur Systemschriften – keine externen Schriftdienste (DSGVO-freundlich, lädt sofort).
 * --sy (Scrollposition in px, ohne Einheit) setzt effects.js für Parallax-Effekte.
 */

/* =====================================================================
   MYSTISCH – Nachthimmel, funkelnde Sterne, Gold
   ===================================================================== */
.theme-mystisch {
    --bg: #0b0820;
    --text: #e4ddff;
    --accent: #f5c66b;
    --glow: rgba(150, 100, 255, .65);
    --spark: #ffe39a;
    --font: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
    --head-font: Didot, 'Bodoni 72', 'Bodoni MT', 'Playfair Display', Georgia, serif;
}
.theme-mystisch .bg-1 {
    display: block;
    background:
        radial-gradient(60% 40% at 85% 25%, rgba(70, 160, 200, .18), transparent 70%),
        radial-gradient(70% 45% at 10% 60%, rgba(150, 60, 200, .22), transparent 70%),
        radial-gradient(130% 70% at 50% 0%, #3b1f73 0%, #1a1040 42%, #0b0820 78%);
}
.theme-mystisch .bg-2,
.theme-mystisch .bg-3 { display: block; will-change: transform; }
.theme-mystisch .bg-2 {
    background-image:
        radial-gradient(1.4px 1.4px at 22px 34px, #fff, transparent),
        radial-gradient(1px 1px at 96px 128px, #fff, transparent),
        radial-gradient(1.2px 1.2px at 150px 60px, #fff, transparent),
        radial-gradient(1px 1px at 60px 180px, #fff, transparent),
        radial-gradient(1.6px 1.6px at 170px 170px, #ffe9b8, transparent);
    background-size: 190px 210px;
    transform: translateY(calc(var(--sy, 0) * -0.06px));
    animation: twinkle 3.5s ease-in-out infinite alternate;
}
.theme-mystisch .bg-3 {
    background-image:
        radial-gradient(2px 2px at 40px 80px, #fff, transparent),
        radial-gradient(1.6px 1.6px at 230px 40px, #d9c8ff, transparent),
        radial-gradient(2.2px 2.2px at 180px 260px, #fff, transparent),
        radial-gradient(1.4px 1.4px at 90px 300px, #ffe9b8, transparent);
    background-size: 280px 340px;
    transform: translateY(calc(var(--sy, 0) * -0.16px));
    animation: twinkle 5s ease-in-out 1s infinite alternate-reverse;
}
@keyframes twinkle { from { opacity: .45; } to { opacity: 1; } }

.theme-mystisch .intro h1 {
    font-size: clamp(42px, 13vw, 76px);
    font-weight: 400;
    letter-spacing: .02em;
    line-height: 1.05;
    background: linear-gradient(100deg, #b8862b 0%, #ffe7a3 30%, #c9973a 50%, #fff3c9 70%, #b8862b 100%);
    background-size: 220% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: shimmer 7s linear infinite;
    filter: drop-shadow(0 2px 18px rgba(245, 198, 107, .25));
}
@keyframes shimmer { to { background-position: -220% 0; } }
.theme-mystisch .intro .sub {
    text-transform: uppercase;
    letter-spacing: .4em;
    font-size: .78em;
    color: var(--accent);
    opacity: .9;
    margin-top: .6em;
    padding-left: .4em;
}
.theme-mystisch .ornament {
    display: block;
    width: 160px; height: 20px; margin: 1.2em auto 0;
    background: linear-gradient(90deg, transparent, rgba(245, 198, 107, .7) 35%, transparent 45%, transparent 55%, rgba(245, 198, 107, .7) 65%, transparent) center / 100% 1px no-repeat;
    color: var(--accent); text-align: center; line-height: 20px; font-size: 14px;
}
.theme-mystisch .ornament::before { content: '✦'; }
.theme-mystisch .text p { color: #ddd5fb; }
.theme-mystisch .text:not(.after) p:first-child::first-letter {
    float: left;
    font-family: var(--head-font);
    font-size: 3.3em;
    line-height: .82;
    padding: .06em .1em 0 0;
    color: var(--accent);
}
.theme-mystisch .hero figcaption { color: var(--accent); font-style: italic; }
.theme-mystisch .footer { color: #a99fd0; }

/* =====================================================================
   BÜHNE – Vorhang, Scheinwerfer, Show
   ===================================================================== */
.theme-buehne {
    --bg: #0a0807;
    --text: #f3e9da;
    --accent: #e8b75a;
    --glow: rgba(255, 228, 160, .6);
    --spark: #fff1c2;
    --font: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
    --head-font: 'Bodoni 72', Didot, 'Bodoni MT', Georgia, serif;
}
.theme-buehne .bg-1 {
    display: block;
    background:
        radial-gradient(55% 38% at 50% 34%, rgba(255, 236, 190, .17), transparent 72%),
        radial-gradient(90% 30% at 50% 100%, rgba(120, 60, 20, .35), transparent 70%),
        linear-gradient(#120d0b, #0a0807 60%, #150c08);
}
/* Volant oben */
.theme-buehne .bg-1::before {
    content: '';
    position: absolute; left: 0; right: 0; top: 15vh; height: 46px;
    background:
        radial-gradient(circle at 50% 0, #b3132a 68%, #6d0814 70%, transparent 72%) 0 8px / 54px 40px repeat-x,
        linear-gradient(#5f0711, #a3122a) top / 100% 18px no-repeat;
    filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .6));
}
/* Vorhänge links/rechts – öffnen sich beim Scrollen */
.theme-buehne .bg-2,
.theme-buehne .bg-3 {
    display: block;
    width: 15vw;
    background: repeating-linear-gradient(90deg, #4c050d 0, #8c0d1d 9px, #c42139 15px, #8c0d1d 22px, #4c050d 30px);
    box-shadow: inset 0 0 40px rgba(0, 0, 0, .7);
    will-change: transform;
}
.theme-buehne .bg-2 { right: auto; transform: translateX(max(-11vw, calc(var(--sy, 0) * -0.035px))); }
.theme-buehne .bg-3 { left: auto; transform: translateX(min(11vw, calc(var(--sy, 0) * 0.035px))); }
.theme-buehne .page { padding-left: calc(15vw + 6px); padding-right: calc(15vw + 6px); padding-top: calc(env(safe-area-inset-top) + 70px); }
@media (min-width: 700px) { .theme-buehne .page { padding-left: 22px; padding-right: 22px; } }

.theme-buehne .intro h1 {
    font-size: clamp(34px, 10.5vw, 64px);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #fff6e0;
    text-shadow: 0 0 24px rgba(255, 215, 140, .45), 0 2px 0 #6b4a12;
}
.theme-buehne .intro .sub { font-style: italic; color: var(--accent); font-size: 1.25em; }
.theme-buehne .intro .sub::before, .theme-buehne .intro .sub::after { content: ' ★ '; font-style: normal; font-size: .6em; vertical-align: middle; opacity: .8; }
.theme-buehne .ornament { display: block; width: 70%; height: 2px; margin: 1.3em auto 0; background: linear-gradient(90deg, transparent, var(--accent), transparent); }
.theme-buehne .text { font-size: .95em; }
.theme-buehne .card-stage::after {
    content: '';
    position: absolute; left: 0; right: 0; bottom: -36px; height: 40px;
    background: radial-gradient(closest-side, rgba(0, 0, 0, .85), transparent);
    z-index: -1;
}
.theme-buehne .hero figcaption { font-family: var(--head-font); text-transform: uppercase; letter-spacing: .15em; color: var(--accent); margin-top: 2.2em; }

/* =====================================================================
   NEON – Leuchtschrift, Synthwave-Gitter
   ===================================================================== */
.theme-neon {
    --bg: #07031a;
    --text: #d7efff;
    --accent: #00f0ff;
    --glow: rgba(255, 43, 214, .55);
    --spark: #7ff9ff;
    --font: 'Avenir Next', Avenir, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --head-font: Futura, 'Avenir Next Condensed', 'Trebuchet MS', 'Arial Narrow', sans-serif;
}
.theme-neon .bg-1 {
    display: block;
    background:
        radial-gradient(circle at 50% 74%, rgba(255, 90, 180, .55) 0, rgba(255, 140, 60, .25) 14%, transparent 34%),
        linear-gradient(#07031a 0%, #150638 45%, #3a0a5a 72%, #07031a 100%);
}
.theme-neon .bg-2 {
    display: block;
    top: auto; bottom: 0; height: 42vh;
    background-image:
        linear-gradient(rgba(255, 43, 214, .75) 1.5px, transparent 1.5px),
        linear-gradient(90deg, rgba(255, 43, 214, .75) 1.5px, transparent 1.5px);
    background-size: 46px 46px;
    background-position: center 0;
    transform: perspective(260px) rotateX(62deg);
    transform-origin: 50% 100%;
    -webkit-mask-image: linear-gradient(transparent, #000 55%);
    mask-image: linear-gradient(transparent, #000 55%);
    animation: grid 2.4s linear infinite;
    opacity: .75;
}
@keyframes grid { to { background-position: center 46px; } }

.theme-neon .intro h1 {
    font-size: clamp(40px, 13vw, 78px);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    line-height: 1.02;
    color: #fff;
    text-shadow: 0 0 4px #fff, 0 0 12px #ff2bd6, 0 0 26px #ff2bd6, 0 0 52px #ff2bd6;
    animation: flicker 6s infinite;
}
@keyframes flicker {
    0%, 18%, 22%, 25%, 53%, 57%, 100% { opacity: 1; }
    20%, 24%, 55% { opacity: .55; }
}
.theme-neon .intro .sub {
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: .45em;
    font-size: .85em;
    margin-top: .8em;
    padding-left: .45em;
    text-shadow: 0 0 8px var(--accent), 0 0 22px var(--accent);
}
.theme-neon .text {
    background: rgba(18, 6, 46, .6);
    border: 1px solid rgba(0, 240, 255, .28);
    border-radius: 18px;
    padding: 1.1em 1.1em .1em;
    box-shadow: 0 0 24px rgba(0, 240, 255, .1), inset 0 0 30px rgba(255, 43, 214, .07);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
.theme-neon .text.after { margin-top: 1.5em; }
.theme-neon .card {
    filter: drop-shadow(0 0 8px rgba(0, 240, 255, .85)) drop-shadow(0 0 26px rgba(255, 43, 214, .6));
}
.theme-neon .hero figcaption { color: #ff7be6; text-shadow: 0 0 10px #ff2bd6; text-transform: uppercase; letter-spacing: .2em; font-size: .9em; }
.theme-neon .footer { color: #9bb6d6; }
.theme-neon .chevron span { filter: drop-shadow(0 0 6px var(--accent)); }

/* =====================================================================
   VINTAGE – Papier, Ornamente, Zauberbuch
   ===================================================================== */
.theme-vintage {
    --bg: #f1e6cc;
    --text: #3b2a1a;
    --accent: #8a2b1d;
    --glow: rgba(255, 245, 210, .9);
    --spark: #b8862b;
    --font: 'Iowan Old Style', Palatino, 'Palatino Linotype', 'Book Antiqua', Georgia, serif;
    --head-font: Baskerville, 'Hoefler Text', 'Baskerville Old Face', Georgia, serif;
}
.theme-vintage .bg-1 {
    display: block;
    background-color: #f1e6cc;
    background-image:
        radial-gradient(circle at 20% 15%, rgba(255, 255, 255, .55), transparent 45%),
        radial-gradient(circle at 85% 65%, rgba(160, 110, 50, .14), transparent 50%),
        radial-gradient(circle at 10% 90%, rgba(140, 90, 40, .12), transparent 40%),
        repeating-radial-gradient(circle at 30% 40%, rgba(120, 80, 30, .03) 0 1px, transparent 1px 4px);
}
.theme-vintage .bg-2 { display: block; background: radial-gradient(ellipse at center, transparent 50%, rgba(90, 55, 20, .32) 100%); }
.theme-vintage .page::before {
    content: '';
    position: fixed; inset: calc(env(safe-area-inset-top) + 10px) 10px calc(env(safe-area-inset-bottom) + 10px);
    border: 1px solid rgba(90, 55, 20, .35);
    outline: 1px solid rgba(90, 55, 20, .2); outline-offset: 4px;
    pointer-events: none;
}
.theme-vintage .intro h1 {
    font-size: clamp(38px, 12vw, 70px);
    font-weight: 400;
    font-variant: small-caps;
    letter-spacing: .04em;
    color: #2a1c10;
}
.theme-vintage .intro .sub { font-style: italic; color: var(--accent); font-size: 1.3em; opacity: 1; }
.theme-vintage .ornament {
    display: block;
    width: 220px; height: 30px; margin: 1em auto 0;
    background: linear-gradient(90deg, transparent, rgba(138, 43, 29, .6) 20%, rgba(138, 43, 29, .6) 40%, transparent 40%, transparent 60%, rgba(138, 43, 29, .6) 60%, rgba(138, 43, 29, .6) 80%, transparent) center / 100% 1px no-repeat;
    color: var(--accent); text-align: center; font-size: 26px; line-height: 30px;
}
.theme-vintage .ornament::before { content: '❦'; }
.theme-vintage .text { text-align: justify; -webkit-hyphens: auto; hyphens: auto; }
.theme-vintage .text:not(.after) p:first-child::first-letter {
    float: left;
    font-family: var(--head-font);
    font-size: 3.4em;
    line-height: .8;
    padding: .05em .1em 0 0;
    color: var(--accent);
}
.theme-vintage .card { filter: sepia(.12) drop-shadow(0 12px 16px rgba(60, 35, 10, .35)); }
.theme-vintage.fx-rise .card-stage.shown .card-flip { transform: rotate(-2.5deg); }
.theme-vintage .hero figcaption { font-style: italic; }
.theme-vintage .footer { font-style: italic; }

/* =====================================================================
   MODERN – hell, große Typografie, weiche Verläufe
   ===================================================================== */
.theme-modern {
    --bg: #f6f5f2;
    --text: #18181b;
    --accent: #7c5cff;
    --glow: rgba(124, 92, 255, .35);
    --spark: #7c5cff;
    --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --head-font: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}
.theme-modern .bg-1 {
    display: block;
    background:
        radial-gradient(38% 28% at 12% 18%, rgba(124, 92, 255, .38), transparent 70%),
        radial-gradient(34% 26% at 92% 40%, rgba(255, 140, 90, .32), transparent 70%),
        radial-gradient(44% 30% at 40% 88%, rgba(60, 200, 255, .28), transparent 70%);
    filter: blur(24px);
    transform: translateY(calc(var(--sy, 0) * -0.12px));
    will-change: transform;
}
.theme-modern .intro { text-align: left; align-items: flex-start; }
.theme-modern .intro h1 {
    font-size: clamp(46px, 15vw, 92px);
    font-weight: 800;
    letter-spacing: -.045em;
    line-height: .95;
    padding-bottom: .1em;
    background: linear-gradient(120deg, #18181b 30%, var(--accent) 75%, #ff7a59);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.theme-modern .intro .sub {
    display: inline-block;
    margin-top: 1em;
    padding: .35em 1em;
    border-radius: 999px;
    background: #18181b;
    color: #fff;
    font-size: .8em;
    font-weight: 600;
    opacity: 1;
}
.theme-modern.hero-full .intro-chevron { left: 22px; margin-left: 0; }
.theme-modern .text { font-size: 1.02em; }
.theme-modern .text:not(.after) p:first-child { font-size: 1.22em; font-weight: 600; line-height: 1.4; letter-spacing: -.01em; }
.theme-modern .card { filter: drop-shadow(0 28px 36px rgba(30, 20, 70, .28)); }
.theme-modern .hero figcaption { font-weight: 600; }
.theme-modern .footer { opacity: .6; }

/* Leuchten hinter der Karte in allen gestalteten Themes */
body:not(.theme-klassisch) .card-glow { display: block; }
