/* Konservatives CSS fuer altes MAG-WebKit (04 Abschnitte 22/23):
   kein Grid, kein modernes Flexbox-Verhalten, feste/prozentuale Layouts,
   grosse Schrift, hoher Kontrast, Sicherheitsabstand zum Bildschirmrand
   (Overscan). Ziel-Aufloesungen: 1280x720 und 1920x1080.

   Farbwelt "On Air" (IPTV-076, Blau per Owner-Wunsch):
     Ink    #0A0D12  Scrims und Flaechen (nie reines Schwarz ueber Video)
     Paper  #F2EFE9  Primaertext (warmes Off-White, kein Blooming auf TVs)
     Azure  #6FB3E0  Fokus und aktive Zustaende (Eisblau, TV-sicher entsaettigt)
     Slate  #94A0B0  Sekundaertext, Metadaten
     Moss   #7FB069  Status "laeuft" / verfuegbar
     Rust   #C4553B  Status "nicht verfuegbar" / Fehler */

html, body {
    margin: 0;
    padding: 0;
    background-color: #0A0D12;
    color: #F2EFE9;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 28px;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Video-Ebene: liegt hinter allen Screens */
#player-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000000;
    z-index: 0;
}

#player-container video {
    width: 100%;
    height: 100%;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #0A0D12;
    z-index: 1;
}

/* Die Kanalliste ist ein Overlay: das Video scheint durch.
   ID-Selektor gewinnt gegen .screen, weil showScreen() className ueberschreibt. */
#screen-channels {
    background-color: transparent;
}

.hidden {
    display: none;
}

/* ---------- Lade- und Fehlerbild ---------- */

.center-box {
    position: absolute;
    top: 38%;
    left: 10%;
    width: 80%;
    text-align: center;
}

.center-box p {
    margin: 0 0 18px 0;
}

.big {
    font-size: 46px;
    font-weight: bold;
    letter-spacing: -1px;
}

.rule {
    width: 64px;
    margin: 0 auto 24px auto;
    border-top: 4px solid #6FB3E0;
}

.rule-rust {
    border-top-color: #C4553B;
}

#loading-message,
#error-hint {
    color: #94A0B0;
    font-size: 30px;
}

/* ---------- Linkes Panel: Kanalliste ueber Scrim ---------- */

.panel-eyebrow {
    margin: 0;
    font-size: 22px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #94A0B0;
}

#list-panel {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 46%;
    /* Fallback ohne Gradient-Support: harte, aber lesbare Kante */
    background-color: rgba(10, 13, 18, 0.92);
    background: -webkit-linear-gradient(left,
        rgba(10, 13, 18, 0.96) 0%,
        rgba(10, 13, 18, 0.90) 60%,
        rgba(10, 13, 18, 0.0) 100%);
    background: linear-gradient(to right,
        rgba(10, 13, 18, 0.96) 0%,
        rgba(10, 13, 18, 0.90) 60%,
        rgba(10, 13, 18, 0.0) 100%);
}

#list-panel .panel-eyebrow {
    margin: 52px 0 18px 84px;
}

#channel-list {
    list-style: none;
    margin: 0 0 0 60px;
    padding: 0;
}

#channel-list li {
    padding: 9px 20px;
    margin: 1px 0;
    border-left: 5px solid transparent;
    font-size: 30px;
    line-height: 32px;
    color: #F2EFE9;
}

#channel-list li.focused {
    border-left-color: #6FB3E0;
    background-color: rgba(111, 179, 224, 0.16);
}

#channel-list li.unavailable {
    color: #94A0B0;
}

#channel-list li.focused.unavailable {
    color: #C8D0DA;
}

#channel-list li.empty {
    border-left: none;
    text-align: center;
    padding-top: 200px;
    font-size: 34px;
    color: #94A0B0;
}

.channel-number {
    display: inline-block;
    width: 96px;
    font-weight: bold;
    color: #94A0B0;
}

#channel-list li.focused .channel-number {
    color: #6FB3E0;
}

.channel-state {
    float: right;
    font-size: 22px;
    color: #C4553B;
    padding-top: 5px;
}

#list-position {
    position: absolute;
    left: 84px;
    bottom: 96px;
    margin: 0;
    font-size: 22px;
    letter-spacing: 1px;
    color: #94A0B0;
}

#key-hints {
    position: absolute;
    left: 84px;
    bottom: 56px;
    margin: 0;
    font-size: 22px;
    color: #5C6672;
}

/* ---------- Info-Karte rechts: Monument-Nummer ---------- */

.info-panel {
    position: absolute;
    right: 64px;
    bottom: 110px;
    width: 27%;
    min-width: 300px;
    padding: 30px 38px 30px 34px;
    background-color: rgba(10, 13, 18, 0.88);
    border-left: 5px solid #6FB3E0;
}

.info-panel .panel-eyebrow {
    margin: 0 0 6px 0;
}

#info-number {
    margin: 0;
    font-size: 120px;
    line-height: 1.02;
    font-weight: bold;
    letter-spacing: -5px;
    color: #F2EFE9;
}

#info-name {
    margin: 14px 0 0 0;
    padding-top: 14px;
    font-size: 34px;
    color: #F2EFE9;
    border-top: 1px solid rgba(148, 160, 176, 0.35);
    word-wrap: break-word;
}

.info-status {
    margin: 18px 0 0 0;
    font-size: 24px;
    color: #94A0B0;
}

.dot {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 12px;
    background-color: #94A0B0;
    -webkit-border-radius: 8px;
    border-radius: 8px;
}

.dot.moss {
    background-color: #7FB069;
}

.dot.accent {
    background-color: #6FB3E0;
}

.dot.rust {
    background-color: #C4553B;
}

.dot.slate {
    background-color: #94A0B0;
}

.pulse {
    -webkit-animation: portal-pulse 1.4s infinite;
    animation: portal-pulse 1.4s infinite;
}

@-webkit-keyframes portal-pulse {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

@keyframes portal-pulse {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

/* Jetzt/Danach-Programm (IPTV-080) */
#info-epg {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(148, 160, 176, 0.35);
}

#info-epg.hidden {
    display: none;
}

.epg-label {
    margin: 0;
    font-size: 20px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #6FB3E0;
}

.epg-title {
    margin: 4px 0 14px 0;
    font-size: 26px;
    color: #F2EFE9;
    word-wrap: break-word;
}

.epg-title.epg-next {
    margin-bottom: 0;
    color: #94A0B0;
}

#info-hint {
    margin: 10px 0 0 0;
    font-size: 22px;
    color: #5C6672;
}

/* ---------- Overlays liegen ueber den Screens ---------- */

.overlay {
    z-index: 2;
}

/* ---------- EPG-Overlay (IPTV-085): rechte Programmtafel ---------- */

#epg-overlay {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 56%;
    /* Fallback ohne Gradient-Support: harte, aber lesbare Kante */
    background-color: rgba(10, 13, 18, 0.94);
    background: -webkit-linear-gradient(right,
        rgba(10, 13, 18, 0.97) 0%,
        rgba(10, 13, 18, 0.92) 60%,
        rgba(10, 13, 18, 0.0) 100%);
    background: linear-gradient(to left,
        rgba(10, 13, 18, 0.97) 0%,
        rgba(10, 13, 18, 0.92) 60%,
        rgba(10, 13, 18, 0.0) 100%);
}

#epg-overlay .panel-eyebrow {
    margin: 48px 84px 6px 25%;
    text-align: left;
}

#epg-ov-channel {
    margin: 0 84px 18px 25%;
    font-size: 40px;
    color: #F2EFE9;
}

#epg-ov-number {
    font-weight: bold;
    color: #6FB3E0;
    margin-right: 20px;
}

#epg-ov-list {
    list-style: none;
    margin: 0 64px 0 25%;
    padding: 0;
}

#epg-ov-list li {
    padding: 8px 16px;
    margin: 1px 0;
    border-left: 5px solid transparent;
    font-size: 26px;
    line-height: 30px;
    color: #F2EFE9;
}

#epg-ov-list li.focused {
    border-left-color: #6FB3E0;
    background-color: rgba(111, 179, 224, 0.16);
}

#epg-ov-list li.empty {
    border-left: none;
    padding-top: 60px;
    color: #94A0B0;
    font-size: 28px;
}

.epg-ov-time {
    display: inline-block;
    width: 240px;
    color: #94A0B0;
}

#epg-ov-list li.running .epg-ov-time {
    color: #7FB069;
}

#epg-ov-detail {
    position: absolute;
    left: 25%;
    right: 84px;
    bottom: 110px;
    border-top: 1px solid rgba(148, 160, 176, 0.35);
    padding-top: 14px;
}

#epg-ov-detail.hidden {
    display: none;
}

#epg-ov-detail-text {
    margin: 6px 0 0 0;
    font-size: 24px;
    line-height: 32px;
    color: #94A0B0;
    max-height: 96px;
    overflow: hidden;
}

#epg-ov-hint {
    position: absolute;
    left: 25%;
    bottom: 48px;
    margin: 0;
    font-size: 22px;
    color: #5C6672;
}

#numeric-overlay {
    position: absolute;
    top: 56px;
    right: 64px;
    padding: 14px 34px;
    background-color: rgba(10, 13, 18, 0.88);
    border-left: 5px solid #6FB3E0;
    font-size: 64px;
    font-weight: bold;
    letter-spacing: -2px;
    color: #F2EFE9;
}

#playback-overlay {
    position: absolute;
    left: 64px;
    bottom: 96px;
    padding: 20px 36px 22px 30px;
    background-color: rgba(10, 13, 18, 0.88);
    border-left: 5px solid #6FB3E0;
}

#overlay-number {
    font-size: 56px;
    font-weight: bold;
    letter-spacing: -2px;
    color: #6FB3E0;
    margin-right: 24px;
}

#overlay-name {
    font-size: 38px;
    color: #F2EFE9;
}

#overlay-status {
    font-size: 26px;
    color: #94A0B0;
    margin-left: 20px;
}

.toast {
    position: absolute;
    left: 22%;
    right: 22%;
    /* unterhalb der Info-Karte (bottom: 110px), nie ueberlappend */
    bottom: 24px;
    padding: 16px 24px;
    background-color: rgba(10, 13, 18, 0.92);
    border-left: 5px solid #C4553B;
    text-align: center;
    font-size: 28px;
    z-index: 3;
}

/* ---------- Diagnose-Screen (04 Abschnitt 24) ---------- */

.diag-title {
    margin: 52px 84px 12px 84px;
    font-size: 38px;
    letter-spacing: 1px;
    color: #6FB3E0;
}

#diag-list {
    margin: 0 84px;
    font-size: 24px;
}

#diag-list dt {
    font-weight: bold;
    color: #94A0B0;
    margin-top: 14px;
}

#diag-list dd {
    margin: 2px 0 0 0;
    word-wrap: break-word;
    color: #F2EFE9;
}

.diag-hint {
    margin: 24px 84px;
    color: #5C6672;
    font-size: 22px;
}
