@font-face {
    font-family: "Oswald DemiBold";
    src: url("../fonts/oswald-demi-bold.woff2") format("woff2");
    font-style: normal;
    font-weight: 600;
    font-display: swap;
}

:root {
    --agora-blue: #03356a;
    --agora-orange: #f0420e;
    --agora-white: #fff;
    --shell-width: 720px;
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

html,
body {
    min-height: 100%;
    margin: 0;
    background: var(--agora-blue);
}

body {
    min-height: 100svh;
    min-height: 100dvh;
    color: var(--agora-white);
    font-family: "Arial Rounded MT Bold", "Trebuchet MS", Arial, sans-serif;
    overflow-x: hidden;
}

body.is-layer-open {
    overflow: hidden;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

.player-page {
    width: min(100%, var(--shell-width));
    min-height: 100svh;
    min-height: 100dvh;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: env(safe-area-inset-top, 0px);
    background: var(--agora-blue);
    overflow: hidden;
    isolation: isolate;
}

.live-header {
    width: 100%;
    min-height: clamp(34px, 9.44vw, 68px);
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr) max-content;
    align-items: stretch;
    background: #022f61;
    flex: 0 0 auto;
}

.live-label {
    min-width: clamp(87px, 24.17vw, 174px);
    display: grid;
    place-items: center;
    padding: clamp(4px, 1.1vw, 8px) clamp(8px, 2.22vw, 16px);
    background: var(--agora-orange);
    color: white;
    font-family: "Oswald DemiBold", "Arial Narrow", sans-serif;
    font-weight: 600;
    font-size: clamp(20px, 5.42vw, 39px);
    letter-spacing: .01em;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}

.current-program {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: clamp(7px, 1.8vw, 13px);
    padding: clamp(4px, 1.25vw, 9px) clamp(6px, 1.67vw, 12px) clamp(4px, 1.25vw, 9px) clamp(10px, 2.8vw, 20px);
    overflow: hidden;
    color: white;
    font-family: "Oswald DemiBold", "Arial Narrow", sans-serif;
    font-size: clamp(17px, 4.72vw, 34px);
    font-weight: 600;
    letter-spacing: .025em;
    line-height: 1;
    text-transform: uppercase;
}

.program-marquee {
    min-width: 0;
    width: 100%;
    overflow: hidden;
}

.program-marquee-track {
    display: flex;
    width: max-content;
    align-items: center;
    will-change: transform;
    animation: program-scroll var(--program-duration, 10s) linear infinite;
}

.current-program-name {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    padding-right: clamp(32px, 8vw, 58px);
    white-space: nowrap;
}

.live-pulse {
    width: clamp(7px, 1.8vw, 13px);
    height: clamp(7px, 1.8vw, 13px);
    flex: 0 0 auto;
    border-radius: 50%;
    background: #ff2a35;
    box-shadow: 0 0 0 0 rgba(255, 42, 53, .7);
    animation: live-pulse 1.25s ease-out infinite;
}

.menu-toggle {
    width: clamp(28px, 7.8vw, 44px);
    height: clamp(28px, 7.8vw, 44px);
    align-self: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(3px, .84vw, 5px);
    margin-right: clamp(7px, 1.8vw, 13px);
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: white;
    cursor: pointer;
    transition: transform .2s ease, background-color .2s ease;
}

.menu-toggle span {
    display: block;
    width: 58%;
    height: clamp(2px, .55vw, 4px);
    border-radius: 99px;
    background: currentColor;
}

.menu-toggle:hover { transform: scale(1.05); background: rgba(255, 255, 255, .08); }
.menu-toggle:focus-visible { outline: 3px solid white; outline-offset: 2px; }

.sponsor-stage {
    position: relative;
    width: 100%;
    height: clamp(100px, 27.78vw, 200px);
    margin: 0;
    border: 0;
    overflow: hidden;
    flex: 0 0 auto;
}

.sponsor-empty,
.sponsor-slide {
    position: absolute;
    inset: 0;
}

.sponsor-empty {
    display: grid;
    place-items: center;
    background: white;
    color: var(--agora-blue);
    font: 800 14px Tahoma, Arial, sans-serif;
}

.sponsor-slide {
    display: grid;
    place-items: center;
    padding: 0;
    background: transparent;
    opacity: 0;
    visibility: hidden;
    transform: scale(1.025);
    transition: opacity .9s ease, transform 1.1s ease, visibility .9s;
}

.sponsor-slide.is-active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    z-index: 2;
}

.sponsor-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.broadcast-stage {
    width: 100%;
    min-height: 0;
    display: flex;
    flex: 1 0 auto;
    flex-direction: column;
    align-items: center;
}

.brand-stage {
    width: 100%;
    display: grid;
    place-items: center;
    margin-top: clamp(34px, 8vw, 58px);
    padding-inline: 3%;
    flex: 0 0 auto;
}

.brand-logo {
    display: block;
    width: 70%;
    max-height: none;
    object-fit: contain;
}

.media-stage {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: auto;
    margin-bottom: auto;
    padding-block: clamp(24px, 5.6vw, 40px);
    gap: clamp(18px, 4.45vw, 32px);
    flex: 0 0 auto;
}

.audio-stage,
.video-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 0 0 auto;
}

.visualizer-wrap {
    position: relative;
    width: clamp(78px, 23vw, 166px);
    height: clamp(78px, 23vw, 166px);
    display: grid;
    place-items: center;
}

#audio-visualizer {
    position: absolute;
    inset: -27%;
    width: 154%;
    height: 154%;
    pointer-events: none;
}

.play-toggle {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--agora-orange);
    color: white;
    cursor: pointer;
    box-shadow: 0 0 0 0 rgba(255, 255, 255, .25);
    transition: transform .2s ease, box-shadow .3s ease;
}

.play-toggle:hover {
    transform: scale(1.025);
}

.play-toggle:focus-visible {
    outline: 4px solid white;
    outline-offset: 5px;
}

.play-toggle:active {
    transform: scale(.965);
}

.play-icon {
    width: 0;
    height: 0;
    margin-left: 8%;
    border-top: clamp(17px, 3.15vw, 25px) solid transparent;
    border-bottom: clamp(17px, 3.15vw, 25px) solid transparent;
    border-left: clamp(28px, 5vw, 40px) solid white;
}

.pause-icon {
    display: none;
    align-items: center;
    gap: clamp(9px, 1.8vw, 15px);
    height: 44%;
}

.pause-icon i {
    display: block;
    width: clamp(8px, 1.45vw, 12px);
    height: 100%;
    border-radius: 2px;
    background: white;
}

.play-toggle.is-playing .play-icon {
    display: none;
}

.play-toggle.is-playing .pause-icon {
    display: flex;
}

.player-status {
    min-height: 14px;
    margin: clamp(12px, 3.2vw, 23px) 0 0;
    color: rgba(255, 255, 255, .78);
    font-size: clamp(10px, 1.94vw, 14px);
    font-weight: 800;
    letter-spacing: .3em;
    text-align: center;
    text-transform: uppercase;
}

.player-status.is-error {
    max-width: 270px;
    color: #ffd4c8;
    letter-spacing: .06em;
    line-height: 1.35;
}

.player-status:empty {
    visibility: hidden;
}

.youtube-live-toggle {
    width: clamp(78px, 23vw, 166px);
    height: clamp(55px, 16.17vw, 117px);
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: white;
    cursor: pointer;
    filter: drop-shadow(0 7px 15px rgba(0, 0, 0, .16));
    transition: transform .2s ease, filter .2s ease;
}

.youtube-live-toggle svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.youtube-live-toggle:hover { transform: scale(1.035); filter: drop-shadow(0 9px 18px rgba(0, 0, 0, .24)); }
.youtube-live-toggle:active { transform: scale(.965); }
.youtube-live-toggle:focus-visible { outline: 4px solid white; outline-offset: 5px; border-radius: 12px; }

.video-status {
    min-height: 14px;
    margin: clamp(12px, 3.2vw, 23px) 0 0;
    color: rgba(255, 255, 255, .78);
    font-size: clamp(10px, 1.94vw, 14px);
    font-weight: 800;
    letter-spacing: .3em;
    text-align: center;
    text-transform: uppercase;
}

.player-footer {
    width: min(94%, 680px);
    display: grid;
    gap: 2px;
    margin: 0 auto clamp(10px, 3.33vw, 24px);
    padding-top: 0;
    text-align: center;
    flex: 0 0 auto;
}

.player-footer p {
    margin: 0;
    font: 700 11px/1.3 Tahoma, Arial, sans-serif;
    white-space: nowrap;
}

.news-ticker {
    width: 100%;
    flex: 0 0 auto;
}

.ticker-toolbar {
    width: 100%;
    min-height: clamp(28px, 7.5vw, 54px);
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
}

.ticker-badge-wrap {
    width: 36.8%;
    height: clamp(28px, 7.4vw, 54px);
    display: flex;
    align-items: stretch;
    background: white;
    overflow: hidden;
}

.install-area { position: relative; display: flex; align-items: center; justify-content: flex-end; min-width: 0; padding: 0 12px 7px 0; }
.install-app { min-height: 35px; padding: 8px 15px; border: 1px solid rgba(255,255,255,.32); border-radius: 999px; background: white; color: var(--agora-blue); box-shadow: 0 8px 22px rgba(0,0,0,.16); cursor: pointer; font: 700 12px/1 Tahoma, Arial, sans-serif; white-space: nowrap; transition: transform .18s ease, box-shadow .18s ease; }
.install-app:hover { transform: translateY(-1px); box-shadow: 0 10px 25px rgba(0,0,0,.22); }
.install-app:focus-visible { outline: 3px solid var(--agora-orange); outline-offset: 2px; }
.install-app[hidden] { display: none; }
.install-message { position: absolute; right: 12px; bottom: 48px; width: max-content; max-width: calc(100vw - 24px); margin: 0; padding: 8px 11px; border-radius: 8px; background: rgba(1,31,62,.96); color: white; box-shadow: 0 8px 24px rgba(0,0,0,.2); font: 700 10px/1.1 Tahoma, Arial, sans-serif; white-space: nowrap; }
.install-message[hidden] { display: none; }

.ticker-badge-wrap img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.ticker-strip {
    width: 100%;
    height: calc(clamp(58px, 16.1vw, 116px) + env(safe-area-inset-bottom, 0px));
    display: flex;
    align-items: center;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    overflow: hidden;
    background: var(--agora-orange);
}

.ticker-track {
    display: flex;
    width: max-content;
    align-items: center;
    white-space: nowrap;
    will-change: transform;
    animation: ticker-scroll var(--ticker-duration, 18s) linear infinite;
}

.ticker-track.is-loading {
    opacity: .75;
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    padding-right: clamp(44px, 8vw, 72px);
    color: white;
    font-family: "Oswald DemiBold", "Arial Narrow", sans-serif;
    font-size: clamp(20px, 5vw, 36px);
    font-weight: 600;
    line-height: 1.15;
    text-transform: uppercase;
}

.ticker-item strong {
    margin-right: .35em;
    color: var(--agora-blue);
}

.navigation-menu {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: calc(env(safe-area-inset-top, 0px) + 58px) 16px calc(env(safe-area-inset-bottom, 0px) + 16px);
}

.menu-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgba(0, 18, 38, .76);
    backdrop-filter: blur(7px);
    cursor: default;
}

.menu-panel {
    position: relative;
    z-index: 1;
    width: min(100%, 480px);
    max-height: 100%;
    overflow-y: auto;
    padding: clamp(18px, 4.5vw, 28px);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 20px;
    background: #022f61;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .38);
}

.menu-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.menu-panel-header h2 {
    margin: 0;
    color: white;
    font: 600 clamp(20px, 5vw, 30px)/1 "Oswald DemiBold", "Arial Narrow", sans-serif;
    letter-spacing: .04em;
}

.menu-close,
.youtube-live-close {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    padding: 0 0 4px;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    color: white;
    cursor: pointer;
    font: 400 32px/1 Arial, sans-serif;
}

.menu-close:focus-visible,
.youtube-live-close:focus-visible,
.menu-card:focus-visible {
    outline: 3px solid white;
    outline-offset: 2px;
}

.menu-card-list,
.sites-submenu {
    display: grid;
    gap: 10px;
}

.menu-card {
    width: 100%;
    min-height: 58px;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 13px;
    background: rgba(255, 255, 255, .07);
    color: white;
    cursor: pointer;
    text-align: left;
    text-decoration: none;
    font: 600 clamp(14px, 3.6vw, 18px)/1.25 "Oswald DemiBold", "Arial Narrow", sans-serif;
    letter-spacing: .025em;
    transition: background-color .18s ease, border-color .18s ease, transform .18s ease;
}

.menu-card:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, .3);
    background: rgba(255, 255, 255, .12);
}

.menu-card-icon {
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, .1);
    color: white;
}

.menu-card-icon svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.sites-toggle {
    justify-content: space-between;
    color: var(--agora-orange);
}

.sites-toggle svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    transition: transform .2s ease;
}

.sites-toggle[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

.sites-submenu {
    padding: 0 0 0 18px;
}

.submenu-card {
    min-height: 50px;
    font-size: clamp(13px, 3.3vw, 16px);
}

.youtube-live-modal {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    background: #000;
}

.youtube-live-panel,
.youtube-live-frame-wrap {
    position: relative;
    width: 100%;
    height: 100%;
    background: #000;
}

.youtube-live-frame {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: #000;
}

.youtube-live-close {
    position: absolute;
    top: calc(env(safe-area-inset-top, 0px) + 12px);
    right: calc(env(safe-area-inset-right, 0px) + 12px);
    z-index: 5;
    background: rgba(0, 0, 0, .68);
}

.youtube-live-message {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 60px 24px;
    color: white;
    text-align: center;
}

.youtube-live-message > svg {
    width: min(112px, 24vw);
    fill: white;
}

.youtube-live-message p {
    max-width: 540px;
    margin: 0;
    font: 600 clamp(17px, 3.2vw, 25px)/1.35 "Oswald DemiBold", "Arial Narrow", sans-serif;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.youtube-live-message a {
    padding: 12px 18px;
    border: 1px solid white;
    border-radius: 999px;
    color: white;
    text-decoration: none;
    font: 700 12px/1 Tahoma, Arial, sans-serif;
}

.loading-ring {
    width: 54px;
    height: 54px;
    border: 5px solid rgba(255, 255, 255, .25);
    border-top-color: var(--agora-orange);
    border-radius: 50%;
    animation: loading-spin .8s linear infinite;
}

@keyframes ticker-scroll {
    from { transform: translate3d(var(--ticker-start, 720px), 0, 0); }
    to { transform: translate3d(-100%, 0, 0); }
}

@keyframes program-scroll {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(var(--program-distance, -240px), 0, 0); }
}

@keyframes live-pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 42, 53, .7); opacity: 1; }
    70% { box-shadow: 0 0 0 7px rgba(255, 42, 53, 0); opacity: .72; }
    100% { box-shadow: 0 0 0 0 rgba(255, 42, 53, 0); opacity: 1; }
}

@keyframes loading-spin {
    to { transform: rotate(360deg); }
}

@media (min-width: 721px) {
    body {
        background: #022b56;
    }

    .player-page {
        box-shadow: 0 0 80px rgba(0, 0, 0, .24);
    }
}

@media (max-width: 560px) {
    .live-header { grid-template-columns: max-content minmax(0, 1fr) max-content; }
    .current-program { padding-inline: 8px; }
    .menu-toggle { justify-content: center; }
    .ticker-badge-wrap { width: 38%; }
    .install-area { padding-right: 8px; }
    .install-app { min-height: 26px; padding: 6px 9px; font-size: 9px; }
    .install-message { right: 8px; }
}

@media (prefers-reduced-motion: reduce) {
    .sponsor-slide { transition-duration: .01ms; }
    .ticker-track { animation-duration: calc(var(--ticker-duration, 18s) * 1.7); }
    .program-marquee-track { animation-duration: calc(var(--program-duration, 10s) * 1.7); }
    .live-pulse { animation: none; }
    .loading-ring { animation-duration: 1.5s; }
}
