:root {
    color-scheme: dark;
    --font-main: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --bg-base: #101827;
    --text: #fffaf0;
    --muted: rgba(255, 250, 240, 0.76);
    --subtle: rgba(255, 250, 240, 0.58);
    --surface: rgba(14, 22, 38, 0.66);
    --surface-strong: rgba(14, 22, 38, 0.82);
    --line: rgba(255, 255, 255, 0.20);
    --accent: #f7c948;
    --accent-2: #38d8c8;
    --accent-3: #ff7b7b;
    --shadow: 0 26px 70px rgba(0, 0, 0, 0.36);
    --radius: 8px;
    --bg-overlay-opacity: 0.58;
    --bg-blur: 0px;
    --bg-saturation: 105;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg-base);
}

body {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    color: var(--text);
    font-family: var(--font-main);
    background: var(--bg-base);
    letter-spacing: 0;
}

button,
input {
    font: inherit;
}

button {
    color: inherit;
}

a {
    color: inherit;
}

.theme-light {
    color-scheme: light;
    --bg-base: #f8fbff;
    --text: #132033;
    --muted: rgba(19, 32, 51, 0.74);
    --subtle: rgba(19, 32, 51, 0.58);
    --surface: rgba(255, 255, 255, 0.72);
    --surface-strong: rgba(255, 255, 255, 0.88);
    --line: rgba(19, 32, 51, 0.16);
    --shadow: 0 24px 64px rgba(31, 45, 71, 0.20);
    --bg-overlay-opacity: 0.32;
}

.palette-aurora {
    --accent: #f7c948;
    --accent-2: #38d8c8;
    --accent-3: #f06d76;
}

.palette-amanecer {
    --accent: #ffcf66;
    --accent-2: #5bd3a4;
    --accent-3: #f47758;
}

.palette-oceano {
    --accent: #72d6ff;
    --accent-2: #ffe066;
    --accent-3: #9b8cff;
}

.palette-coral {
    --accent: #ff8a7a;
    --accent-2: #7de2d1;
    --accent-3: #ffd166;
}

.palette-luz {
    --accent: #ffe45e;
    --accent-2: #4cc9a7;
    --accent-3: #ff9f6e;
}

.palette-bruma {
    --accent: #b8f2e6;
    --accent-2: #f7c948;
    --accent-3: #8ea8c3;
}

.palette-uva {
    --accent: #d9a5ff;
    --accent-2: #d8f36a;
    --accent-3: #ff8fa3;
}

.palette-selva {
    --accent: #9ee493;
    --accent-2: #ffd166;
    --accent-3: #61d2d6;
}

.palette-grafito {
    --accent: #f2c14e;
    --accent-2: #8bd3dd;
    --accent-3: #d8dee9;
}

.background-stage {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 22% 18%, color-mix(in srgb, var(--accent) 32%, transparent), transparent 32%),
        linear-gradient(135deg, var(--bg-base), #17213a 55%, #231a2f);
}

.background-layer,
.background-overlay {
    position: absolute;
    inset: 0;
}

.background-layer {
    opacity: 0;
    background-position: center;
    background-size: cover;
    filter: blur(var(--bg-blur)) saturate(var(--bg-saturation));
    transform: scale(1.02);
    transition: opacity 1000ms ease, transform 1100ms ease;
}

.background-layer.is-active {
    opacity: 1;
    transform: scale(1);
}

.transition-slide .background-layer {
    transform: translateX(22px) scale(1.02);
}

.transition-slide .background-layer.is-active {
    transform: translateX(0) scale(1);
}

.transition-zoom .background-layer {
    transform: scale(1.12);
}

.transition-zoom .background-layer.is-active {
    transform: scale(1.02);
}

.background-overlay {
    z-index: 1;
    background:
        linear-gradient(110deg, rgba(5, 9, 18, var(--bg-overlay-opacity)), rgba(5, 9, 18, calc(var(--bg-overlay-opacity) * 0.72))),
        radial-gradient(circle at 50% 120%, color-mix(in srgb, var(--accent-2) 22%, transparent), transparent 42%);
}

.theme-light .background-overlay {
    background:
        linear-gradient(110deg, rgba(248, 251, 255, var(--bg-overlay-opacity)), rgba(248, 251, 255, calc(var(--bg-overlay-opacity) * 0.72))),
        radial-gradient(circle at 50% 120%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 42%);
}

.install-button {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 20;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--text);
    background: color-mix(in srgb, var(--surface-strong) 86%, transparent);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.18);
    cursor: pointer;
    backdrop-filter: blur(18px);
}

.install-button:hover {
    border-color: color-mix(in srgb, var(--accent) 52%, var(--line));
}

.app-shell {
    position: relative;
    z-index: 1;
    min-height: calc(100vh - 116px);
    display: grid;
    place-items: center;
    padding: 92px 24px 34px;
}

.radio-experience {
    width: min(1040px, 100%);
    display: grid;
    gap: 28px;
}

.width-compact .radio-experience {
    width: min(820px, 100%);
}

.width-wide .radio-experience {
    width: min(1240px, 100%);
}

.brand-block {
    display: grid;
    justify-items: center;
    gap: 18px;
    text-align: center;
}

.brand-logo {
    width: 148px;
    max-width: 48vw;
    max-height: 148px;
    object-fit: contain;
    filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.28));
}

.brand-compact .brand-logo {
    width: 108px;
    max-height: 108px;
}

.brand-large .brand-logo {
    width: 184px;
    max-height: 184px;
}

.brand-mark,
.player-brand span {
    display: grid;
    place-items: center;
    width: 116px;
    height: 116px;
    border-radius: 50%;
    color: #101827;
    font-size: 2.35rem;
    font-weight: 800;
    background:
        radial-gradient(circle at 35% 28%, #fff8d8, var(--accent) 58%, var(--accent-2));
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.28);
}

.brand-compact .brand-mark {
    width: 88px;
    height: 88px;
    font-size: 1.8rem;
}

.brand-large .brand-mark {
    width: 144px;
    height: 144px;
    font-size: 2.8rem;
}

.live-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px;
    color: var(--accent);
    font-size: 0.86rem;
    font-weight: 800;
    text-transform: uppercase;
}

.live-kicker span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #ff4f58;
    box-shadow: 0 0 0 6px rgba(255, 79, 88, 0.16);
}

.brand-copy h1 {
    margin: 0;
    font-size: 4rem;
    line-height: 1;
}

.brand-compact .brand-copy h1 {
    font-size: 3.1rem;
}

.brand-large .brand-copy h1 {
    font-size: 4.75rem;
}

.align-left .brand-block {
    justify-items: start;
    text-align: left;
}

.align-left .description {
    margin-left: 0;
}

.slogan {
    margin: 14px 0 0;
    font-size: 1.28rem;
    font-weight: 700;
}

.description {
    max-width: 660px;
    margin: 12px auto 0;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.6;
}

.player-card {
    width: min(520px, 100%);
    min-height: 410px;
    justify-self: center;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 22px;
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        linear-gradient(145deg, color-mix(in srgb, var(--surface-strong) 92%, transparent), color-mix(in srgb, var(--surface) 82%, transparent)),
        linear-gradient(120deg, color-mix(in srgb, var(--accent) 14%, transparent), color-mix(in srgb, var(--accent-2) 12%, transparent));
    box-shadow: var(--shadow);
    backdrop-filter: blur(24px);
}

.glass-transparent {
    --surface: rgba(14, 22, 38, 0.44);
    --surface-strong: rgba(14, 22, 38, 0.56);
}

.theme-light.glass-transparent {
    --surface: rgba(255, 255, 255, 0.46);
    --surface-strong: rgba(255, 255, 255, 0.62);
}

.glass-solid {
    --surface: rgba(14, 22, 38, 0.94);
    --surface-strong: rgba(14, 22, 38, 0.98);
}

.theme-light.glass-solid {
    --surface: rgba(255, 255, 255, 0.94);
    --surface-strong: rgba(255, 255, 255, 0.98);
}

.player-brand img {
    width: 108px;
    max-height: 108px;
    object-fit: contain;
}

.logo-inside .brand-block {
    display: none;
}

.logo-hidden .brand-logo,
.logo-hidden .brand-mark {
    display: none;
}

.logo-inside .app-shell {
    padding-top: 72px;
}

.signal-visual {
    display: flex;
    align-items: end;
    justify-content: center;
    gap: 7px;
    width: 186px;
    height: 44px;
    color: var(--accent);
}

.signal-visual span {
    width: 10px;
    height: 14px;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.62;
    transform-origin: bottom;
}

.is-playing .signal-visual span,
.visual-live .signal-visual span {
    animation: signal 920ms ease-in-out infinite;
}

.is-playing .signal-visual span:nth-child(2) {
    animation-delay: 100ms;
}

.is-playing .signal-visual span:nth-child(3) {
    animation-delay: 200ms;
}

.is-playing .signal-visual span:nth-child(4) {
    animation-delay: 320ms;
}

.is-playing .signal-visual span:nth-child(5) {
    animation-delay: 440ms;
}

.is-playing .signal-visual span:nth-child(6) {
    animation-delay: 560ms;
}

@keyframes signal {
    0%, 100% {
        height: 14px;
        opacity: 0.54;
    }
    50% {
        height: 42px;
        opacity: 1;
    }
}

.visual-calm .signal-visual span {
    height: 20px;
    animation: none;
}

.signal-hidden .signal-visual {
    display: none;
}

.desc-hidden .description,
.reload-hidden #reload-stream {
    display: none;
}

.play-button {
    width: 98px;
    height: 98px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: #101827;
    background:
        radial-gradient(circle at 35% 30%, #fff9d7, var(--accent) 58%, var(--accent-2));
    box-shadow: 0 18px 46px color-mix(in srgb, var(--accent) 30%, transparent);
    cursor: pointer;
}

.play-button svg {
    width: 38px;
    height: 38px;
}

.pause-icon {
    display: none;
}

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

.is-playing .pause-icon {
    display: block;
}

.player-meta {
    text-align: center;
}

.player-meta p,
.player-meta h2 {
    margin: 0;
}

.now-label {
    color: var(--accent-2);
    font-size: 0.88rem;
    font-weight: 800;
    text-transform: uppercase;
}

.player-meta h2 {
    margin-top: 7px;
    font-size: 1.5rem;
}

#player-status {
    min-height: 1.5rem;
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.96rem;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 330px;
}

.volume-control {
    min-height: 44px;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.08);
}

.theme-light .volume-control {
    background: rgba(19, 32, 51, 0.06);
}

.volume-control input {
    width: 100%;
    accent-color: var(--accent);
}

.icon-button {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

.icon-button:hover,
.contact-list a:hover {
    border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
    color: var(--accent);
}

.layout-split .radio-experience,
.logo-left .radio-experience {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 480px);
    align-items: center;
}

.layout-split .brand-block,
.logo-left .brand-block {
    justify-items: start;
    text-align: left;
}

.layout-split .description,
.logo-left .description {
    margin-left: 0;
}

.layout-compact .player-card {
    min-height: 320px;
    max-width: 430px;
    padding: 28px;
}

.layout-focus .player-card {
    width: min(620px, 100%);
    min-height: 500px;
    gap: 26px;
    padding: 42px;
}

.layout-focus .play-button {
    width: 116px;
    height: 116px;
}

.layout-broadcast .player-card {
    width: min(680px, 100%);
    min-height: 300px;
    grid-template-columns: auto minmax(0, 1fr);
    justify-items: start;
    text-align: left;
}

.layout-broadcast .signal-visual,
.layout-broadcast .player-controls {
    grid-column: 1 / -1;
    width: 100%;
    max-width: none;
}

.layout-broadcast .player-meta {
    text-align: left;
}

.layout-compact .signal-visual {
    height: 30px;
}

.layout-compact .play-button {
    width: 82px;
    height: 82px;
}

.layout-dock .radio-experience {
    min-height: calc(100vh - 220px);
    align-items: end;
}

.layout-dock .player-card {
    width: min(760px, 100%);
    min-height: 180px;
    grid-template-columns: auto auto minmax(190px, 1fr);
    justify-items: start;
    align-items: center;
    padding: 24px;
}

.layout-dock .signal-visual {
    width: 110px;
}

.layout-dock .player-meta {
    text-align: left;
}

.layout-dock .player-controls {
    grid-column: 1 / -1;
    max-width: none;
}

.media-zone {
    width: 100%;
    display: grid;
    justify-items: center;
    gap: 18px;
}

.video-side {
    width: min(1120px, 100%);
    grid-template-columns: minmax(340px, 520px) minmax(320px, 1fr);
    align-items: center;
    justify-content: center;
}

.video-side .player-card {
    justify-self: stretch;
}

.video-below .live-video {
    width: min(760px, 100%);
}

.live-video {
    width: 100%;
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(145deg, color-mix(in srgb, var(--surface-strong) 94%, transparent), color-mix(in srgb, var(--surface) 86%, transparent));
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
}

.live-video header {
    display: grid;
    gap: 4px;
}

.live-video span {
    color: var(--accent-2);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.live-video h2 {
    margin: 0;
    font-size: 1.1rem;
}

.video-frame {
    overflow: hidden;
    border-radius: var(--radius);
    background: #050914;
    aspect-ratio: 16 / 9;
}

.aspect-4x3 .video-frame {
    aspect-ratio: 4 / 3;
}

.aspect-vertical .video-frame {
    aspect-ratio: 9 / 16;
}

.video-frame iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.site-footer {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 16px;
    justify-items: center;
    padding: 20px 24px 26px;
    color: var(--subtle);
}

.contact-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.contact-list a {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--text);
    background: color-mix(in srgb, var(--surface-strong) 76%, transparent);
    text-decoration: none;
    backdrop-filter: blur(14px);
}

.footer-copy {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 14px;
    text-align: center;
    font-size: 0.9rem;
}

.footer-copy a {
    color: var(--accent);
    text-decoration: none;
}

.install-dialog {
    width: min(430px, calc(100% - 32px));
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--text);
    background: var(--surface-strong);
    box-shadow: var(--shadow);
}

.install-dialog::backdrop {
    background: rgba(0, 0, 0, 0.58);
    backdrop-filter: blur(8px);
}

.install-dialog form {
    position: relative;
    display: grid;
    gap: 14px;
    padding: 28px;
}

.install-dialog h2,
.install-dialog p {
    margin: 0;
}

.install-dialog p {
    color: var(--muted);
    line-height: 1.55;
}

.dialog-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: var(--radius);
    background: transparent;
    cursor: pointer;
}

.dialog-action {
    min-height: 44px;
    border: 0;
    border-radius: var(--radius);
    color: #101827;
    background: var(--accent);
    font-weight: 800;
    cursor: pointer;
}

.offline-screen {
    min-height: 100vh;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 14px;
    padding: 24px;
    text-align: center;
}

.offline-screen h1,
.offline-screen p {
    margin: 0;
}

@media (max-width: 780px) {
    .install-button {
        top: auto;
        right: 14px;
        bottom: 14px;
        left: 14px;
        justify-content: center;
    }

    .app-shell {
        min-height: calc(100vh - 162px);
        padding: 42px 16px 22px;
    }

    .layout-split .radio-experience,
    .logo-left .radio-experience,
    .video-side {
        grid-template-columns: 1fr;
    }

    .layout-split .brand-block,
    .logo-left .brand-block {
        justify-items: center;
        text-align: center;
    }

    .layout-split .description,
    .logo-left .description {
        margin-left: auto;
    }

    .brand-copy h1 {
        font-size: 2.9rem;
    }

    .slogan {
        font-size: 1.08rem;
    }

    .player-card {
        min-height: 365px;
        padding: 26px 18px;
    }

    .layout-dock .player-card {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .layout-broadcast .player-card {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .layout-broadcast .player-meta {
        text-align: center;
    }

    .layout-dock .player-meta {
        text-align: center;
    }

    .site-footer {
        padding-bottom: 74px;
    }
}

@media (max-width: 420px) {
    .brand-copy h1 {
        font-size: 2.35rem;
    }

    .brand-large .brand-copy h1,
    .brand-compact .brand-copy h1 {
        font-size: 2.35rem;
    }

    .brand-logo,
    .brand-mark {
        width: 104px;
        height: 104px;
    }

    .player-controls {
        max-width: 100%;
    }

    .footer-copy {
        display: grid;
    }
}
