/* ==============================================================================
   Player im Stil des Schaufenster-Videos (schaufenster.py)
   ==============================================================================
   Alle Masse sind Pixel einer festen 1920x1080-Buehne (#stage); player.js
   skaliert die Buehne passend auf den Bildschirm. Werte/Farben 1:1 aus
   schaufenster.json bzw. schaufenster.py uebernommen. */

@font-face { font-family: 'Poppins'; src: url("fonts/Poppins-Bold.92934d92f57e.ttf") format('truetype'); font-weight: 700; }
/* Regular/Light liegen nicht vor -> Medium wird fuer alle duenneren Schnitte verwendet */
@font-face { font-family: 'Poppins'; src: url("fonts/Poppins-Medium.20aaac2ef92c.ttf") format('truetype'); font-weight: 100 600; }
@font-face { font-family: 'Lora'; src: url("fonts/Lora-Italic-Variable.0d467aed0347.ttf") format('truetype'); font-style: italic; font-weight: 400 700; }

:root {
    --purple: #351e73;
    --purple-dark: #1a0f40;
    --red: #d62823;
    --white: #ffffff;
    --soft: #e6e0fa;
    --muted: #d7d0f0;
    --dot: rgb(150, 135, 200);

    /* Easing-Kurven aus schaufenster.py */
    --e-out: cubic-bezier(0.33, 1, 0.68, 1);      /* e_out  (kubisch)   */
    --e-in: cubic-bezier(0.32, 0, 0.67, 0);       /* e_in   (kubisch)   */
    --e-io: cubic-bezier(0.65, 0, 0.35, 1);       /* e_io   (kubisch)   */
    --e-back: cubic-bezier(0.34, 1.4, 0.64, 1);   /* e_back (Ueberschwingen) */
}

body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    cursor: none; /* Hide cursor for kiosk mode */
}

/* Hintergrund fuellt das ganze Fenster - auch wenn der Bildschirm nicht
   genau 16:9 ist, gibt es keine dunklen Raender neben der Buehne. */
body {
    background: var(--purple-dark) url("brand/background.26b75ce0b86a.jpg") center / cover no-repeat;
}

#stage {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 1920px;
    height: 1080px;
    margin: -540px 0 0 -960px;
    overflow: visible;
    font-family: 'Poppins', 'Segoe UI', Tahoma, sans-serif;
    color: var(--white);
}

#pages, .page {
    position: absolute;
    inset: 0;
}

/* Logo oben rechts (Position/Skalierung wie logo_pose im Video: 1620/108, 0.436) */
#logo {
    position: absolute;
    left: 0;
    top: 0;
    width: 1124px;
    height: 305px;
    transform: translate(1620px, 108px) translate(-50%, -50%) scale(0.436);
    z-index: 50;
    pointer-events: none;
}

/* ------------------------------------------------------------------ Kopfzeile */
.header-bar {
    position: absolute;
    left: 100px;
    top: 56px;
    width: 14px;
    height: 104px;
    background: var(--red);
    transform-origin: top;
}

.header-clip {
    position: absolute;
    left: 130px;
    top: 30px;
    width: 1270px;
    height: 120px;
    overflow: hidden;
}

.clock-on .header-clip { width: 1030px; }

.header-text {
    position: absolute;
    left: 10px;
    top: 10px;
    display: flex;
    align-items: baseline;
    gap: 40px;
    white-space: nowrap;
}

.header-title {
    font-weight: 700;
    font-size: 76px;
    line-height: 1.4;
}

.header-sub {
    font-family: 'Lora', serif;
    font-style: italic;
    font-variation-settings: 'wght' 500;
    font-size: 46px;
    color: var(--soft);
}

/* ------------------------------------------------------------------ Karten */
.card {
    position: absolute;
    border-radius: 26px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 10px 36px rgba(10, 5, 40, 0.59);
}

.card img, .card video, .card iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: cover;
}

.card video { object-fit: contain; }

.poster {
    position: absolute;
    left: 0;
    top: 0;
    transform-origin: center;
}

.poster-img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 22px;
    object-fit: cover;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.67);
}

/* Hochformat einzeln (ohne Nahansicht): ganzes Plakat zeigen */
.poster-card img { object-fit: contain; }

/* ------------------------------------------------------------------ Text-Seite */

.text-center {
    position: absolute;
    left: 160px;
    top: 0;
    width: 1600px;
    height: 1080px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.text-center-title {
    font-weight: 700;
    font-size: 110px;
    line-height: 1.15;
    max-width: 100%;
}

.text-center-line {
    width: 380px;
    height: 6px;
    margin-top: 44px;
    background: var(--red);
}

.text-center.with-body {
    top: 170px;
    height: 860px;
    overflow: hidden;
}

.text-center.with-body .text-center-title { font-size: 92px; }
.text-center.with-body .text-center-line { margin-top: 34px; }

.text-center-body {
    margin-top: 40px;
    font-weight: 500;
    font-size: 52px;
    line-height: 1.4;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    max-width: 100%;
}

/* ------------------------------------------------------------------ Termin-Name fliegt in die Kopfzeile */
.fly-title {
    position: absolute;
    left: 0;
    top: 0;
    font-weight: 700;
    line-height: 1.4;
    white-space: nowrap;
    transform-origin: 0 0;
    z-index: 45;
    pointer-events: none;
}

.fly-layer { z-index: 5; }

.wp-row { transition: background-color 0.4s, box-shadow 0.4s; }
.wp-row.wp-row-active {
    background: rgba(214, 40, 35, 0.35);
    box-shadow: 0 0 0 3px var(--red);
}

/* ------------------------------------------------------------------ Plakat-Nahansicht: Textspalte */
.panel {
    position: absolute;
    left: 1010px;
    top: 215px;
    width: 800px;
    height: 730px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.panel > * { opacity: 0; }

.panel-tag {
    height: 62px;
    padding: 0 30px;
    border-radius: 31px;
    background: var(--red);
    font-weight: 500;
    font-size: 28px;
    letter-spacing: 3px;
    line-height: 62px;
    margin-bottom: 44px;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.panel-title {
    font-weight: 700;
    font-size: 116px;
    line-height: 1.14;
    max-width: 100%;
}


.panel-sub {
    margin-top: 8px;
    font-family: 'Lora', serif;
    font-style: italic;
    font-variation-settings: 'wght' 500;
    font-size: 48px;
    line-height: 64px;
    color: var(--soft);
}

.panel-line {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-top: 26px;
    font-weight: 500;
    font-size: 50px;
    line-height: 56px;
}

.panel-sub + .panel-line, .panel-title + .panel-line { margin-top: 62px; }

.panel-icon {
    flex: 0 0 76px;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
}

/* ------------------------------------------------------------------ Intro (Logo gross in der Mitte + Zeile darunter) */
.intro-line {
    position: absolute;
    left: 770px;
    top: 715px;
    width: 380px;
    height: 6px;
    background: var(--red);
    transform-origin: center;
}

.intro-tagline {
    position: absolute;
    left: 0;
    top: 730px;
    width: 1920px;
    text-align: center;
    font-family: 'Lora', serif;
    font-style: italic;
    font-variation-settings: 'wght' 500;
    font-size: 76px;
    line-height: 1.3;
    color: var(--soft);
}

/* ------------------------------------------------------------------ Wochenplan */
.wp-day, .wp-row {
    position: absolute;
    height: 96px;
    border-radius: 22px;
}

.wp-day {
    left: 100px;
    width: 270px;
    padding: 0 12px;
    box-sizing: border-box;
    overflow: hidden;
    white-space: nowrap;
    background: var(--red);
    font-weight: 700;
    font-size: 36px;
    line-height: 96px;
    text-align: center;
}

.wp-row {
    left: 395px;
    width: 1425px;
    background: rgba(20, 10, 60, 0.59);
}

.wp-name {
    position: absolute;
    left: 35px;
    top: 0;
    width: 760px;
    height: 96px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-weight: 500;
    font-size: 38px;
    line-height: 1.2;
    white-space: nowrap;
}

.wp-name-text, .wp-hint {
    display: block;
    max-width: 100%;
}

/* Name darf auf zwei Zeilen umbrechen, der Hinweis bleibt einzeilig.
   flex-shrink: 0, sonst drueckt der Browser die Zeilen zusammen und schneidet ab. */
.wp-name-text, .wp-hint { flex-shrink: 0; }
.wp-name-text { white-space: normal; line-height: 1.15; }
.wp-hint { overflow: hidden; }
.wp-hint { white-space: nowrap; }

.wp-hint {
    font-size: 27px;
    color: var(--muted);
    margin-left: 2px;
}

.wp-place {
    position: absolute;
    left: 815px;
    top: 0;
    width: 360px;
    height: 96px;
    display: flex;
    align-items: center;
    font-size: 32px;
    line-height: 1.15;
    color: var(--soft);
    overflow: hidden;
}

.wp-time {
    position: absolute;
    right: 25px;
    top: 18px;
    min-width: 200px;
    max-width: 300px;
    overflow: hidden;
    height: 60px;
    padding: 0 18px;
    box-sizing: border-box;
    border-radius: 30px;
    background: var(--red);
    font-weight: 700;
    font-size: 34px;
    line-height: 60px;
    text-align: center;
    white-space: nowrap;
}

/* ------------------------------------------------------------------ Social Media */
.so-card {
    position: absolute;
    top: 205px;
    width: 571px;
    height: 800px;
    border-radius: 26px;
    background: rgba(20, 10, 60, 0.84);
    box-shadow: 0 10px 36px rgba(10, 5, 40, 0.59);
}

.so-avatar {
    position: absolute;
    left: 172px;
    top: 62px;
    width: 226px;
    height: 226px;
    border-radius: 50%;
    background: #fff;
    padding: 8px;
    box-sizing: border-box;
}

.so-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

/* Position (Mitte bei 365/255 in der Karte) setzt player.js je nach Groesse */
.so-badge {
    position: absolute;
    display: block;
}

.so-count {
    position: absolute;
    left: 0;
    top: 285px;
    width: 100%;
    text-align: center;
    font-weight: 700;
    font-size: 150px;
    line-height: 1.4;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: hidden;
    padding: 0 20px;
    box-sizing: border-box;
}

.so-label {
    position: absolute;
    left: 0;
    top: 480px;
    width: 100%;
    text-align: center;
    font-size: 48px;
    line-height: 1.4;
    color: var(--soft);
    white-space: nowrap;
    overflow: hidden;
    padding: 0 20px;
    box-sizing: border-box;
}

.so-handle {
    position: absolute;
    left: 50%;
    top: 640px;
    transform: translateX(-50%);
    height: 80px;
    padding: 0 38px;
    border-radius: 40px;
    background: var(--red);
    font-weight: 500;
    font-size: 38px;
    line-height: 80px;
    white-space: nowrap;
    max-width: 531px;
    overflow: hidden;
    box-sizing: border-box;
}

/* ------------------------------------------------------------------ Seiten-Punkte, Fortschritt, Uhr, Ticker */
.dots {
    position: absolute;
    right: 90px;
    top: 1014px;
    height: 14px;
    display: flex;
    gap: 26px;
    opacity: 0;
    transition: opacity 0.5s var(--e-out), transform 0.4s var(--e-out);
    z-index: 40;
}

.dots.visible { opacity: 1; }

.dots span {
    width: 18px;
    height: 14px;
    background: var(--dot);
    transition: width 0.45s var(--e-out), background-color 0.45s;
}

.dots span.active { width: 62px; background: var(--red); }

.progress {
    position: absolute;
    left: calc(-1 * var(--bleed-x, 0px));
    bottom: calc(-1 * var(--bleed-y, 0px));
    width: calc(1920px + 2 * var(--bleed-x, 0px));
    height: 8px;
    background: var(--red);
    transform-origin: left;
    transform: scaleX(0);
    z-index: 60;
}

.clock {
    position: absolute;
    right: 560px;
    top: 62px;
    height: 84px;
    padding: 0 34px;
    border-radius: 42px;
    background: rgba(20, 10, 60, 0.84);
    font-weight: 700;
    font-size: 48px;
    line-height: 84px;
    display: none;
    z-index: 50;
}

.ticker-container {
    position: absolute;
    left: calc(-1 * var(--bleed-x, 0px));
    bottom: calc(8px - var(--bleed-y, 0px));
    width: calc(1920px + 2 * var(--bleed-x, 0px));
    height: 72px;
    background: rgba(20, 10, 60, 0.92);
    overflow: hidden;
    display: none;
    align-items: center;
    z-index: 55;
}

.ticker-on .dots { transform: translateY(-80px); }

.ticker-text {
    white-space: nowrap;
    font-weight: 500;
    font-size: 38px;
    padding-left: 100%;
    animation: ticker-move linear infinite;
}

@keyframes ticker-move {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

/* ------------------------------------------------------------------ Animationen (wie die Element-Engine im Video) */
.a-grow-y   { animation: grow-y 0.6s var(--e-out) both; }
.a-shrink-y { animation: shrink-y 0.5s var(--e-in) both; }
.a-up-in    { animation: up-in 0.8s var(--e-out) both; }
.a-up-out   { animation: up-out 0.55s var(--e-in) both; }
.a-zoom     { animation: zoom-in 0.9s var(--e-out) both; }
.a-slide-l  { animation: slide-l 0.6s var(--e-in) both; }
.a-slide-r  { animation: slide-r-in 0.7s var(--e-out) both; }
.a-panel-out { animation: panel-out 0.6s var(--e-io) both; }

@keyframes grow-y   { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes shrink-y { from { transform: scaleY(1); } to { transform: scaleY(0); } }
@keyframes up-in    { from { transform: translateY(100px); opacity: 0; } 40% { opacity: 1; } to { transform: none; opacity: 1; } }
@keyframes up-out   { from { transform: none; opacity: 1; } 62% { opacity: 0; } to { transform: translateY(-100px); opacity: 0; } }
@keyframes zoom-in  { from { transform: scale(0.88); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes slide-l  { from { translate: 0; opacity: 1; } to { translate: -380px; opacity: 0; } }
@keyframes slide-r-in { from { transform: translateX(70px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes panel-out { from { transform: none; opacity: 1; } 70% { opacity: 0; } to { transform: translateX(-300px); opacity: 0; } }
.a-pop      { animation: pop 0.6s var(--e-back) both; }
.a-rise     { animation: rise 0.8s var(--e-out) both; }
.a-slide-in-r { animation: slide-in-r 0.7s var(--e-out) both; }

@keyframes pop      { from { transform: scale(0.55); opacity: 0; } 33% { opacity: 1; } to { transform: none; opacity: 1; } }
@keyframes rise     { from { transform: translateY(150px); opacity: 0; } 60% { opacity: 1; } to { transform: none; opacity: 1; } }
@keyframes slide-in-r { from { transform: translateX(260px); opacity: 0; } 60% { opacity: 1; } to { transform: none; opacity: 1; } }
@keyframes ken-burns { from { transform: scale(1); } to { transform: scale(1.03); } }
@keyframes bob { from { translate: 0 -5px; } to { translate: 0 5px; } }

/* Impressum/Datenschutz: unsichtbar, erscheint beim Darüberfahren */
.rechtliches { position: fixed; right: 8px; bottom: 6px; z-index: 9999; font: 11px sans-serif; opacity: 0; transition: opacity .2s; }
.rechtliches:hover, .rechtliches:focus-within { opacity: .8; }
.rechtliches a { color: #fff; }
