body {
    background: #2b2b2b;
    font-family: "Montserrat", arial, sans-serif;
    padding: 0;
    margin: 0;
    position: relative;
}
#newNav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #000000;
    padding: 5px 20px;
    width: 100%;
}
#lpod_logo {
    height: 69px;
    /* NEW: remove banner for more viewport space (desktop & tablet) */
    display: none;
}
#onDemandContainer ::-webkit-scrollbar {
    width: 18px;
    height: 18px;
}
#onDemandContainer ::-webkit-scrollbar-button {
    width: 0px;
    height: 0px;
}
#onDemandContainer ::-webkit-scrollbar-thumb {
    background: #363636;
    border: 2px solid #101010;
    border-radius: 0px;
}
#onDemandContainer ::-webkit-scrollbar-thumb:hover {
    background: #363636;
}
#onDemandContainer ::-webkit-scrollbar-thumb:active {
    background: #363636;
}
#onDemandContainer ::-webkit-scrollbar-track {
    background: #101010;
    border: 0px none #ffffff;
    border-radius: 0px;
}
#onDemandContainer ::-webkit-scrollbar-corner {
    background: transparent;
}
#onDemandContainer * {
    font-family: "Montserrat", "Helvetica", sans-serif;
}
#onDemandContainer {
    display: inline-flex;
    flex-wrap: wrap;
    box-sizing: border-box;
    width: 100%;
}
#onDemandContainer .hidden {
    display: none !important;
}
#onDemandContainer .headerText {
    font-family: "Montserrat", "Helvetica", sans-serif;
    font-size: 28px;
    color: white;
    width: 100%;
    text-align: left;
}
#onDemandContainer #viewSwitcher {
    display: flex;
    margin: 5px auto;
    justify-content: center;
    text-align: center;
    align-items: center;
}
#onDemandContainer .viewChoice {
    border: 2px solid white;
    background: transparent;
    color: white;
    font-weight: bold;
    display: inline-block;
    font-size: 14px;
    width: 133px;
    padding: 8px 16px;
    cursor: pointer;
}
#onDemandContainer .viewChoice.selectedView {
    border: 2px solid white;
    background: white;
    color: #161616;
    cursor: default;
}
#onDemandContainer #bigScreenView {
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-wrap: wrap;
    max-width: 1400px;
    margin: 0px auto 100px auto;
    align-items: stretch;
    box-sizing: border-box;
    padding: 15px;
}
@media only screen and (max-width: 991px) {
    #onDemandContainer #bigScreenView {
        padding: 15px;
    }
}
#onDemandContainer .bigScreenHeader {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
}
#onDemandContainer .sidebar_head {
    color: white;
    font-weight: bold;
    display: flex;
    cursor: pointer;
}
#onDemandContainer #videoInfo {
    padding: 10px 0;
    box-sizing: border-box;
}
#onDemandContainer #videoInfo .video_title {
    font-size: 36px;
    color: white;
}
#onDemandContainer .video_container_container {
    width: 58%;
}
#onDemandContainer .video_container {
    position: relative;
    display: block;
    height: 0;
    padding: 0;
    overflow: hidden;
    padding-bottom: 56.25%;
    background: #333333;
}
#onDemandContainer #bigScreenFeature {
    max-width: 100%;
    width: 100vw;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    height: 100%;
    border: 0;
}
#onDemandContainer .sidebarSection {
    position: relative;
    width: 15%;
    color: white;
    box-sizing: border-box;
    margin-right: 1%;
    background: #000000;
    overflow: auto;
    max-height: 463px;
}
#onDemandContainer .sidebar_head {
    display: flex;
    align-items: center;
    padding: 6px;
}
#onDemandContainer .sidebar_label {
    display: inline-block;
    font-style: italic;
    font-size: 12px;
}
#onDemandContainer .sidebar_btn {
    font-size: 20px;
    line-height: 0.45;
    padding: 0 5px;
}
#onDemandContainer .video_selection_thumbnail {
    width: 100%;
}
#onDemandContainer #live_selection_container {
    display: block;
    box-sizing: border-box;
    padding: 12px 20px;
}
#onDemandContainer #highlighted_selection_container {
    display: flex;
    background: #000;
    min-width: 100%;
    color: white;
    margin-top: 1%;
    justify-content: space-evenly;
    flex-wrap: wrap;
    box-sizing: border-box;
    padding: 15px 15px;
}
#onDemandContainer .hightlighted_videos_section {
    width: 100%;
    overflow-x: hidden;
    order: 5;
}
#onDemandContainer .video_selection {
    cursor: pointer;
    width: 100%;
    display: inline-block;
    box-sizing: border-box;
    position: relative;
    max-width: 225px;
    padding: 8px;
}
#onDemandContainer .play_icon {
    opacity: 0;
    position: absolute;
    width: 20px;
    left: 50%;
    top: 42%;
    margin-left: -10px;
    margin-top: -10px;
    z-index: 11;
    transition: all 0.15s;
}
#onDemandContainer #highlighted_selection_container .play_icon {
    top: 36%;
}
#onDemandContainer .video_selection:hover .play_icon,
#onDemandContainer .current_playing .play_icon {
    opacity: 1;
    transition: all 0.15s;
}
#onDemandContainer .video_selection:after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    transition: all 0.15s;
    z-index: 10;
}
#onDemandContainer .video_selection:hover:after,
#onDemandContainer .video_selection.current_playing:after {
    background: rgba(0, 0, 0, 0.33);
    transition: all 0.15s;
}
#onDemandContainer .thumbnail_title {
    font-size: 13px;
    font-weight: bold;
    margin-top: -5px;
    margin-bottom: 5px;
}
#onDemandContainer .thumbnail_description {
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-height: 1.2em;
    min-height: calc(2.6em + 10px);
    max-height: calc(2.6em + 10px);
    color: #dddddd;
}
#onDemandContainer .chatSection {
    width: 25%;
    margin-left: 1%;
}
.chat_header {
    background: #000;
    padding: 0 7px;
    height: 8%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.video_chat_link img {
    width: 32px;
    cursor: pointer;
    margin-bottom: -4px;
    background: #151515;
    box-sizing: border-box;
    padding: 8px 5px;
}
.video_chat_link img:hover {
    background: #272727;
}
a.video_chat_link {
    margin-top: -3px;
}
.chat_header.linked #select_linked {
    display: block;
}
.chat_header.linked #selected_unlinked {
    display: none;
}
.chat_header.unlinked #selected_unlinked {
    display: block;
}
#onDemandContainer .chat_header.unlinked #select_linked {
    display: none;
}
#onDemandContainer .chat_header.linked select.videoDropDown {
    opacity: 0.67;
    cursor: default;
    pointer-events: none;
}
#onDemandContainer .chat_header option.option_video {
    display: none;
}
#onDemandContainer .hideSidebar .sidebarSection {
    width: 0%;
    margin-right: 1%;
    opacity: 0;
}
#onDemandContainer .hideSidebar .video_container_container {
    width: 72%;
}
#onDemandContainer .onDemand_section_title {
    width: 100%;
    display: flex;
    justify-content: space-between;
    font-size: 15px;
    font-weight: bold;
}
#onDemandContainer .onDemand_link {
    color: white;
    text-decoration: none;
    font-weight: normal;
    font-size: 12px;
}
#onDemandContainer .hideChat .chatSection {
    width: 0%;
    margin-left: 1%;
    opacity: 0;
}
#onDemandContainer .hideChat #closeChat .sidebar_btn,
#onDemandContainer .hideSidebar #closeSidebar .sidebar_btn {
    transform: rotate(180deg);
}
#onDemandContainer .hideChat .video_container_container {
    width: 83%;
}
#onDemandContainer .hideChat .sidebarSection {
    max-height: unset;
}
#onDemandContainer .hideChat.hideSidebar .video_container_container {
    width: 98%;
}
#onDemandContainer #chatFeature {
    width: 100%;
    height: 92%;
}
@media only screen and (max-width: 1250px) {
    #onDemandContainer .hide_tablet_size {
        display: none !important;
    }
    #onDemandContainer #live_selection_container {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
    #onDemandContainer .video_container_container {
        width: 67%;
    }
    #onDemandContainer .sidebarSection {
        order: 2;
        width: 100%;
        overflow-x: auto;
        margin-top: 1%;
        margin-right: 0;
        max-height: unset;
    }
    #onDemandContainer .chatSection {
        width: 31%;
    }
    #onDemandContainer .video_selection {
        width: 20%;
        max-width: unset;
    }
}
@media only screen and (max-width: 970px) {
    #onDemandContainer .hide_small_tablet_size {
        display: none !important;
    }
    #onDemandContainer .chatSection {
        order: 4;
        width: 48%;
        margin-top: 1%;
    }
    #onDemandContainer .video_container_container {
        width: 100%;
    }
    #onDemandContainer .sidebarSection {
        width: 50%;
    }
    #onDemandContainer #live_selection_container,
    #onDemandContainer #highlighted_selection_container {
        display: block;
    }
    #onDemandContainer .video_selection {
        width: 50%;
    }
@media only screen and (max-width: 700px) {
        #onDemandContainer .hide_mobile_size {
            display: none !important;
        }
        #onDemandContainer .sidebarSection {
            width: 100%;
            margin-right: 0;
        }
    }
    #onDemandContainer #multiScreenView {
        -webkit-transform: scale(0);
        transform: scale(0);}
@media only screen and (max-width: 500px) {
        #onDemandContainer .video_selection {
            width: 100%;
            }
        }
}
#onDemandContainer #multiScreenView {
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-wrap: wrap;
    max-width: 1400px;
    margin: 0px auto 100px auto;
    align-items: flex-start;
}
#onDemandContainer .multiScreenContainer {
    width: 50%;
    padding: 8px;
    box-sizing: border-box;
}
#onDemandContainer .multiScreenContainer iframe {
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    border: 0;
}
#onDemandContainer select.videoDropDown {
    font-size: 12px;
    padding: 4px 16px 4px 8px;
    margin: 0px;
    font-weight: bold;
    border-radius: 3px 3px 0px 0px;
    cursor: pointer;
    background: #000;
    border-color: #333333;
    color: white;
}
#onDemandContainer .more_videos_section {
    display: flex;
    order: 10;
    width: 100%;
}
#onDemandContainer .live_stream_label {
    background: #cd342b;
    padding: 2px 10px;
    border-radius: 30px;
}
.scale-out-center {
    -webkit-animation: scale-out-center 0.35s cubic-bezier(0.55, 0.085, 0.68, 0.53) both;
    animation: scale-out-center 0.35s cubic-bezier(0.55, 0.085, 0.68, 0.53) both;
}
@-webkit-keyframes scale-out-center {0% {-webkit-transform: scale(1);transform: scale(1);opacity: 1;}100% {-webkit-transform: scale(0);transform: scale(0);opacity: 1;}}
@keyframes scale-out-center {0% {-webkit-transform: scale(1);transform: scale(1);opacity: 1;}100% {-webkit-transform: scale(0);transform: scale(0);opacity: 1;}}
.scale-in-center {
    -webkit-animation: scale-in-center 0.4s cubic-bezier(0.785, 0.135, 0.15, 0.86) both;
    animation: scale-in-center 0.4s cubic-bezier(0.785, 0.135, 0.15, 0.86) both;
}
@-webkit-keyframes scale-in-center {0% {-webkit-transform: scale(0);transform: scale(0);opacity: 1;}100% {-webkit-transform: scale(1);transform: scale(1);opacity: 1;}}
@keyframes scale-in-center {0% {-webkit-transform: scale(0);transform: scale(0);opacity: 1;}100% {-webkit-transform: scale(1);transform: scale(1);opacity: 1;}}

/* --------------------------- */
/* Admin Page (unchanged)      */
/* --------------------------- */

#admin_page * { font-family: 'Source Sans Pro', 'Helvetica', sans-serif; }
/* ... (Admin styles remain unchanged as in original) ... */
#login_screen { position: absolute; width: 100%; left: 0; top: 0; height: 100vh; background:url('./images/star-sky.jpg'); display: flex; flex-wrap: wrap; justify-content: center; background-position: center; }
.login_logo { width: 90%; max-width: 250px; }
.login_section { width: 100%; display: flex; justify-content: center; }
#login_form { max-width: 500px; width: 100%; }
#login_form input { display: block; width:100%; padding: 10px 22px; font-size: 18px; margin: 15px 0; box-sizing: border-box; border-radius: 30px; border: 0; text-align: center; }
#login_form input[type="submit"] { background:#58a8d6; color: white; font-weight: bold; }
#admin_page #admin_header { display: flex; justify-content: center; width: 100%; }
#admin_page .logo_container { display: inline-block; padding: 15px; }
#admin_page .logo_container svg { width: 100%; max-width: 300px; }
.input_container h3 { color: white; margin: 5px 0; }
.admin_main_section { display: flex; justify-content: center; }
.form_container { width: 100%; max-width: 700px; box-sizing: border-box; padding: 5px 30px; background: #000; margin-bottom: 50px; }
.input_container { margin: 15px 0; }
.input_container input[type="text"] { width: 100%; padding: 4px 6px; font-size: 16px; box-sizing: border-box; margin-bottom: 5px; }
.input_container textarea { margin: 0px; height: 42px; width: 100%; box-sizing: border-box; }
button.submit_btn { border: none; background: #58a9d7; color: white; border-radius: 30px; font-size: 20px; padding: 6px 25px 9px 25px; margin: 15px 0 30px 0; cursor: pointer; }
button.submit_btn:hover { background: #4090bd; }
.slide-in-right{-webkit-animation:slide-in-right .5s cubic-bezier(.39,.575,.565,1.000) both;animation:slide-in-right .5s cubic-bezier(.39,.575,.565,1.000) both}
@-webkit-keyframes slide-in-right{0%{-webkit-transform:translateX(1000px);transform:translateX(1000px);opacity:0}100%{-webkit-transform:translateX(0);transform:translateX(0);opacity:1}}@keyframes slide-in-right{0%{-webkit-transform:translateX(1000px);transform:translateX(1000px);opacity:0}100%{-webkit-transform:translateX(0);transform:translateX(0);opacity:1}}
.slide-in-left{-webkit-animation:slide-in-left .5s cubic-bezier(.39,.575,.565,1.000) both;animation:slide-in-left .5s cubic-bezier(.39,.575,.565,1.000) both}
@-webkit-keyframes slide-in-left{0%{-webkit-transform:translateX(-1000px);transform:translateX(-1000px);opacity:0}100%{-webkit-transform:translateX(0);transform:translateX(0);opacity:1}}@keyframes slide-in-left{0%{-webkit-transform:translateX(-1000px);transform:translateX(-1000px);opacity:0}100%{-webkit-transform:translateX(0);transform:translateX(0);opacity:1}}

/* --------------------------- */
/* NEW: Mobile 3x stack (full-width iframes) */
/* --------------------------- */

@media only screen and (max-width: 700px) {
    /* Desktop-Views ausblenden */
    #bigScreenView,
    #multiScreenView,
    #viewSwitcher {
        display: none !important;
    }

    /* Container für mobile Ansicht */
    #mobileThreeStack {
        display: block !important;
        width: 100%;
        padding: 0;
        margin: 0;
        box-sizing: border-box;
    }

    /* Jeder Stream-Block */
    #mobileThreeStack .mobileStream {
        width: 100%;
        margin: 0;
        padding: 0;
    }

    /* IFrame-Container: volle Breite, keine Aspect-Ratio via padding */
    #mobileThreeStack .mobileStream .video_container {
        position: relative;
        width: 100%;
        height: 33vh; /* ≈ ein Drittel des Viewports */
        padding: 0;
        background: #000;
        overflow: hidden;
    }

    /* IFrames füllen Container komplett */
    #mobileThreeStack .mobileStream iframe {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border: none;
    }

    /* Dropdown-Bereich unten */
    #mobileDropdowns {
        width: 100%;
        margin-top: 8px;
        padding: 10px;
        background: #000;
        box-sizing: border-box;
        border-top: 1px solid #333;
    }

    #mobileDropdowns .mobileDropdownRow {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin: 6px 0;
        gap: 10px;
    }

    #mobileDropdowns label {
        color: #fff;
        font-size: 13px;
        white-space: nowrap;
        min-width: 70px;
    }

    #mobileDropdowns select {
        flex: 1;
        background: #000;
        color: #fff;
        border: 1px solid #333;
        padding: 6px 8px;
        border-radius: 4px;
    }
}

/* --- MOBILE FIX: Full-width iframes, compact stacked dropdowns --- */
@media (max-width: 700px) {
  html, body {
    overflow-x: hidden;            /* verhindert horizontales Scrollen durch breite Controls */
  }

  /* Video-Container wirklich auf volle Breite */
  #mobileThreeStack .mobileStream {
    width: 100%;
    padding: 0;                    /* kein seitlicher Abstand */
  }
  #mobileThreeStack .mobileStream .video_container {
    width: 100%;
    margin: 0;                     /* keine äußeren Ränder */
    background: #000;
  }
  #mobileThreeStack .mobileStream .video_container iframe {
    width: 100%;
    height: 100%;
    display: block;
  }

  /* Dropdown-Bereich: unter den Videos, platzsparend, spaltenweise */
  #mobileDropdowns {
    width: 100%;
    padding: 8px 10px;
    margin: 8px 0 0 0;
    background: #000;
    border-top: 1px solid #333;
    box-sizing: border-box;
  }

  /* Jede Zeile wird zu einer Spalte: Label oben, Select darunter */
  #mobileDropdowns .mobileDropdownRow {
    display: block;                /* statt flex row */
    width: 100%;
    margin: 8px 0;
  }

  #mobileDropdowns label {
    display: block;
    color: #fff;
    font-size: 13px;
    margin-bottom: 6px;            /* Abstand über dem Select */
    white-space: normal;           /* kein Platzbedarf neben dem Select */
  }

  /* Selects immer 100 % breit und ohne Außenabstände, damit nichts „übersteht“ */
  #mobileDropdowns select,
  #onDemandContainer select.videoDropDown.mobileDropDown {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 8px;                  /* kompakter, aber gut bedienbar */
    border: 1px solid #333;
    border-radius: 4px;
    background: #000;
    color: #fff;
    box-sizing: border-box;        /* Padding zählt zur Gesamtbreite */
  }

  /* Falls das globale Select-Design zu breit ist: hier übersteuern */
  #onDemandContainer select.videoDropDown {
    width: 100%;
    max-width: 100%;
    margin: 0;
    border-color: #333;
    background: #000;
  }

  /* Sicherheitsnetz: Desktop-Ansichten halten wir hart aus dem Layout raus */
  #bigScreenView,
  #multiScreenView,
  #viewSwitcher {
    display: none !important;
  }

  /* Container selbst darf nie breiter als die Viewport-Breite werden */
  #onDemandContainer {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }
}

/* --- MOBILE FIX: restore visible iframes + blue dividers --- */
@media (max-width: 700px) {

  /* Streams: kompakt + blaue Trennlinie */
  #mobileThreeStack .mobileStream {
    margin: 0;
    padding: 0;
    border-bottom: 1px solid #007BFF;
  }
  #mobileThreeStack .mobileStream:last-child {
    border-bottom: none;
  }

  /* Ratio-Wrapper: 16:9 via padding-bottom, dadurch sichere Höhe */
  #mobileThreeStack .mobileStream .video_container {
    position: relative;
    width: 100%;
    height: 0;                 /* wichtig: Wrapper-Höhe aus dem Padding */
    padding: 0 0 56.25%;       /* 16:9 */
    margin: 0;
    background: #000;
    overflow: hidden;          /* verhindert Artefakte */
  }

  /* IFrame füllt den Wrapper */
  #mobileThreeStack .mobileStream .video_container iframe {
    position: absolute;
    inset: 0;                  /* top:0; right:0; bottom:0; left:0; */
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
    margin: 0;
  }
}

/* --- MOBILE TOP-GAP FIX: remove space above first iframe --- */
@media (max-width: 700px) {
  /* Navbar oben ohne extra Abstand */
  #newNav { 
    padding: 0 !important;       /* vorher 5px 20px */
    margin: 0 !important;
    border: 0 !important;
  }

  /* Der gesamte Stack direkt unter die Navbar */
  #mobileThreeStack {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  /* Erster Stream: keine obere Linie / kein Abstand */
  #mobileThreeStack .mobileStream:first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
    border-top: none !important;
  }

  /* Sicherheitsnetz: alle iframes ohne äußere Ränder */
  #mobileThreeStack .mobileStream .video_container iframe {
    margin: 0 !important;
    border: 0 !important;
    display: block;
  }
}

/* --- MOBILE TOP STRIP FIX: remove residual gray bar above first iframe --- */
@media (max-width: 700px) {

  html, body {
    margin: 0 !important;
    padding: 0 !important;
    background: #000 !important;    /* durchgängig schwarzer Hintergrund */
  }

  /* Navbar oben komplett unsichtbar oder schwarz einfärben */
  #newNav {
    background: #000 !important;    /* statt Grau oder Verlauf */
    border: none !important;
    box-shadow: none !important;
  }

  /* Falls ein Logo- oder Header-Bereich existiert: kein Raum, keine Farbe */
  #newNav .headerText,
  #lpod_logo {
    display: none !important;       /* entfernt mögliche leere Fläche */
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
  }

  /* Sicherheitsnetz gegen Restabstände */
  #onDemandContainer {
    margin-top: 0 !important;
    padding-top: 0 !important;
    background: #000 !important;
  }
}

/* --- MOBILE: kill top bar + any residual top gap above first iframe --- */
@media (max-width: 700px) {
  /* Nav-Leiste auf Mobil vollständig ausblenden */
  #newNav { 
    display: none !important;
  }

  /* Body/Container ohne jeden Außen-/Innenabstand */
  html, body, #onDemandContainer, #mobileThreeStack {
    margin: 0 !important;
    padding: 0 !important;
    background: #000 !important;
  }

  /* Erster Stream: wirklich bündig oben, keine Linie, kein Gap */
  #mobileThreeStack .mobileStream:first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
    border-top: none !important;
  }

  /* Ratio-Wrapper unverändert, aber ohne jeden oberen Rand */
  #mobileThreeStack .mobileStream:first-child .video_container {
    margin-top: 0 !important;
    padding-top: 0 !important;
    border-top: 0 !important;
  }

  /* iOS/Safari Subpixel-Gap absichern */
  #mobileThreeStack .mobileStream:first-child .video_container iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
    margin: 0;
    transform: translateZ(0);     /* verhindert 1-px-Riss bei Subpixel-Rounding */
    -webkit-transform: translateZ(0);
  }
}
