:root {
    color-scheme: dark;
    --accent: #f5b342;
    --accent-soft: rgba(245, 179, 66, 0.16);
    --panel: rgba(7, 13, 20, 0.82);
    --panel-strong: rgba(7, 13, 20, 0.94);
    --surface: rgba(255, 255, 255, 0.075);
    --surface-strong: rgba(255, 255, 255, 0.12);
    --line: rgba(255, 255, 255, 0.16);
    --text: #fff7e8;
    --muted: #c9d5df;
    --danger: #ff7777;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    background: #07101a;
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.bg {
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(2, 10, 18, 0.46), rgba(0, 0, 0, 0.82)),
        url("../img/background.jpeg") center / cover no-repeat;
}

.bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("../img/background.jpeg") center top / min(100vw, 1120px) auto no-repeat;
    filter: saturate(1.05);
}

.bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.55) 58%, rgba(0, 0, 0, 0.82)),
        rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(1px);
}

a {
    color: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(245, 179, 66, 0.36);
    outline-offset: 3px;
}

.site-ticker {
    position: sticky;
    top: 0;
    z-index: 12;
    overflow: hidden;
    border-bottom: 1px solid rgba(245, 179, 66, 0.32);
    background: rgba(5, 9, 14, 0.94);
    color: var(--accent);
    font-weight: 900;
}

.site-ticker div {
    overflow: hidden;
    white-space: nowrap;
}

.site-ticker span {
    display: inline-block;
    min-width: 100%;
    padding: 9px 0;
    animation: site-ticker-scroll 24s linear infinite;
}

@keyframes site-ticker-scroll {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

.topbar {
    position: sticky;
    top: 37px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px clamp(16px, 4vw, 48px);
    background: rgba(4, 10, 16, 0.78);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    min-width: 0;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--accent);
    color: #211200;
    font-weight: 900;
}

.brand strong,
.brand small {
    display: block;
}

.brand small {
    color: var(--muted);
    max-width: 52ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.nav a,
.button,
.contact-links a,
.admin-top a {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    text-decoration: none;
    background: var(--surface);
    color: var(--text);
    font-weight: 700;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.nav a:hover,
.button:hover,
.admin-top a:hover {
    transform: translateY(-1px);
    border-color: rgba(245, 179, 66, 0.42);
    background: var(--surface-strong);
}

.nav a.admin-icon-link {
    width: 42px;
    padding: 0;
    flex: 0 0 42px;
    border-color: rgba(245, 179, 66, 0.36);
}

.admin-icon-link span {
    display: grid;
    place-items: center;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: var(--accent);
    color: #1d1200;
    font-size: 0.88rem;
    font-weight: 900;
}

.button.primary {
    background: var(--accent);
    border-color: transparent;
    color: #1d1200;
}

.button.ghost {
    background: rgba(255, 255, 255, 0.1);
}

.button.danger {
    border-color: rgba(255, 119, 119, 0.55);
    background: rgba(255, 119, 119, 0.12);
    color: #ffd2d2;
}

main {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.hero {
    min-height: calc(100vh - 110px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
    align-items: end;
    gap: clamp(20px, 4vw, 44px);
    padding: clamp(46px, 8vw, 92px) 0 34px;
}

.hero-copy {
    max-width: 710px;
    padding-bottom: 16px;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.9);
}

.eyebrow {
    color: var(--accent);
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
    font-size: 0.78rem;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 18px;
    font-size: clamp(2.8rem, 7vw, 6.4rem);
    line-height: 0.95;
}

h2 {
    margin-bottom: 12px;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
}

p {
    color: var(--muted);
    line-height: 1.65;
}

.hero-copy p {
    max-width: 62ch;
    font-size: 1.15rem;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.live-banner {
    display: inline-grid;
    grid-template-columns: auto auto;
    align-items: center;
    gap: 6px 10px;
    margin: 4px 0 20px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.5);
}

.live-banner span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #8d98a5;
}

.live-banner small {
    grid-column: 2;
    color: var(--muted);
}

.live-banner.is-live span {
    background: #39e381;
    box-shadow: 0 0 0 7px rgba(57, 227, 129, 0.14);
}

.live-banner.is-offline span {
    background: #ffbd59;
    box-shadow: 0 0 0 7px rgba(255, 189, 89, 0.14);
}

.player-shell,
.info-card,
.schedule-section,
.login-panel,
.admin-section,
.success,
.alert {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(16px);
}

.player-shell {
    padding: 22px;
}

.player-status {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-weight: 700;
}

.live-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #39e381;
    box-shadow: 0 0 0 7px rgba(57, 227, 129, 0.14);
}

.now-playing {
    display: grid;
    gap: 5px;
    margin: 24px 0;
}

.now-playing span,
.now-playing small,
.volume-wrap label,
.schedule-row small {
    color: var(--muted);
}

.now-playing strong {
    display: inline-block;
    font-size: 1.55rem;
    line-height: 1.2;
    white-space: nowrap;
}

.metadata-marquee {
    position: relative;
    overflow: hidden;
    min-height: 34px;
}

.metadata-marquee strong.is-scrolling {
    min-width: 100%;
    animation: metadata-scroll 14s linear infinite;
}

@keyframes metadata-scroll {
    0% {
        transform: translateX(100%);
    }
    12% {
        transform: translateX(0);
    }
    55% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 18px;
}

.play-button {
    width: 66px;
    height: 66px;
    border: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    background: var(--accent);
    cursor: pointer;
}

.play-button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.icon-play {
    width: 0;
    height: 0;
    margin-left: 4px;
    border-top: 13px solid transparent;
    border-bottom: 13px solid transparent;
    border-left: 20px solid #1d1200;
}

.play-button.is-playing .icon-play {
    width: 22px;
    height: 25px;
    margin-left: 0;
    border: 0;
    border-left: 7px solid #1d1200;
    border-right: 7px solid #1d1200;
}

.volume-wrap {
    display: grid;
    gap: 8px;
    width: 100%;
}

input[type="range"] {
    width: 100%;
    accent-color: var(--accent);
}

.widget-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    padding: 22px 0;
}

.info-card {
    padding: 22px;
}

.info-card h2 {
    font-size: 1.25rem;
}

.schedule-section {
    padding: clamp(22px, 4vw, 34px);
    margin: 18px 0;
}

.page-hero {
    max-width: 760px;
    padding: clamp(48px, 8vw, 96px) 0 18px;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.9);
}

.request-section {
    padding: clamp(22px, 4vw, 34px);
    margin: 18px 0;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(16px);
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}

.section-head p {
    max-width: 44ch;
    margin-bottom: 0;
}

.next-card {
    display: grid;
    gap: 3px;
    min-width: 230px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.07);
}

.next-card span,
.next-card small {
    color: var(--muted);
}

.next-card strong {
    color: var(--accent);
    font-size: 1.15rem;
}

.schedule-list {
    display: grid;
    gap: 10px;
}

.schedule-row {
    display: grid;
    grid-template-columns: 130px minmax(150px, 1fr) 150px minmax(120px, 0.7fr);
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.07);
}

.schedule-row em {
    font-style: normal;
    color: var(--accent);
    font-weight: 800;
}

.whatsapp-card {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.07);
}

.whatsapp-card .button {
    min-width: min(100%, 280px);
}

.contact-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-body {
    min-height: 100vh;
    background: radial-gradient(circle at top left, rgba(245, 179, 66, 0.12), transparent 34%), #07101a;
}

.admin-body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background: linear-gradient(rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.82)), url("../img/background.jpeg") center / cover no-repeat;
}

.login-panel {
    width: min(460px, calc(100% - 32px));
    margin: 10vh auto;
    padding: 30px;
    background:
        linear-gradient(145deg, rgba(245, 179, 66, 0.09), rgba(255, 255, 255, 0.035) 38%),
        rgba(7, 13, 20, 0.94);
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 26px;
}

.login-brand span {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent);
    color: #1d1200;
    font-weight: 900;
}

.login-brand strong,
.login-brand small {
    display: block;
}

.login-brand small,
.login-intro {
    color: var(--muted);
}

.login-panel h1 {
    margin: 6px 0 10px;
    font-size: clamp(2.2rem, 6vw, 3.5rem);
    line-height: 0.98;
}

.login-intro {
    margin-bottom: 22px;
    line-height: 1.55;
}

.stack-form,
.admin-form,
.form-grid {
    display: grid;
    gap: 16px;
}

label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-weight: 700;
}

input,
textarea {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    font: inherit;
    transition: border-color 160ms ease, background 160ms ease;
}

input:hover,
textarea:hover,
input:focus,
textarea:focus {
    border-color: rgba(245, 179, 66, 0.38);
    background: rgba(255, 255, 255, 0.105);
}

textarea {
    resize: vertical;
}

.admin-link {
    display: inline-block;
    margin-top: 18px;
    color: var(--muted);
    text-decoration: none;
}

.admin-link:hover {
    color: var(--accent);
}

.alert {
    border-color: rgba(255, 100, 100, 0.45);
    padding: 12px;
    color: #ffd2d2;
}

.success {
    padding: 14px;
    color: #d7ffe5;
}

.admin-top {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 14px clamp(16px, 4vw, 44px);
    background: rgba(7, 13, 20, 0.9);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.admin-top strong {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-top strong span {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--accent);
    color: #1d1200;
    font-weight: 900;
}

.admin-top nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-layout {
    width: min(1180px, calc(100% - 32px));
    padding: 24px 0 60px;
}

.admin-section {
    padding: clamp(18px, 3vw, 28px);
}

.admin-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.85fr);
    gap: 18px;
    align-items: stretch;
    margin-bottom: 18px;
    padding: clamp(22px, 4vw, 34px);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(245, 179, 66, 0.12), rgba(7, 13, 20, 0.88) 38%), var(--panel);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(16px);
}

.admin-hero.compact {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.45fr);
}

.admin-hero h1 {
    margin-bottom: 10px;
    font-size: clamp(1.9rem, 4vw, 3.4rem);
    line-height: 1.02;
}

.admin-hero p,
.admin-section-head p {
    margin-bottom: 0;
    color: var(--muted);
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.admin-hero.compact .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stat-card {
    display: grid;
    gap: 8px;
    min-height: 96px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.07);
    text-decoration: none;
}

.stat-card span {
    color: var(--muted);
    font-size: 0.9rem;
}

.stat-card strong {
    color: var(--accent);
    font-size: clamp(1.5rem, 3vw, 2.2rem);
}

.admin-section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 18px;
    margin-bottom: 18px;
}

.admin-section-head h2 {
    margin-bottom: 0;
}

.form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid.single {
    grid-template-columns: 1fr;
}

.admin-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
    gap: 12px;
    align-items: end;
    margin-top: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.045);
}

.admin-section:nth-of-type(3) .admin-row {
    grid-template-columns: 1fr 2fr auto;
}

.admin-list {
    display: grid;
    gap: 14px;
}

.status-pill {
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 900;
}

.empty-state {
    padding: 18px;
    border: 1px dashed rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.045);
}

.admin-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.checkline {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
}

.checkline input {
    width: auto;
    min-height: auto;
}

.savebar {
    position: sticky;
    bottom: 0;
    display: flex;
    justify-content: flex-end;
    padding: 14px 0;
    background: linear-gradient(transparent, rgba(7, 16, 26, 0.96) 32%);
}

@media (max-width: 860px) {
    .bg {
        background:
            linear-gradient(180deg, rgba(0, 0, 0, 0.32), rgba(0, 0, 0, 0.48) 48%, rgba(0, 0, 0, 0.82)),
            url("../img/background.jpeg") center top / auto 58vh no-repeat,
            #07101a;
    }

    .bg::before {
        inset: 86px 0 auto;
        height: 48vh;
        background-size: contain;
        background-position: center top;
    }

    .bg::after {
        backdrop-filter: none;
    }

    .topbar,
    .admin-top {
        align-items: flex-start;
        flex-direction: column;
    }

    .hero {
        min-height: auto;
        grid-template-columns: 1fr;
        padding-top: 34px;
    }

    h1 {
        font-size: clamp(2.5rem, 16vw, 4.5rem);
    }

    .widget-grid,
    .form-grid,
    .admin-row,
    .admin-section:nth-of-type(3) .admin-row {
        grid-template-columns: 1fr;
    }

    .schedule-row {
        grid-template-columns: 1fr;
    }

    .section-head {
        align-items: stretch;
        flex-direction: column;
    }

    .whatsapp-card {
        align-items: stretch;
        flex-direction: column;
    }

    .next-card {
        min-width: 0;
    }

    .admin-hero,
    .admin-hero.compact {
        grid-template-columns: 1fr;
    }

    .stat-grid,
    .admin-hero.compact .stat-grid {
        grid-template-columns: 1fr;
    }

    .admin-section-head {
        align-items: stretch;
        flex-direction: column;
    }
}

@media (max-width: 520px) {
    .bg {
        background:
            linear-gradient(180deg, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.42) 48%, rgba(0, 0, 0, 0.82)),
            url("../img/background.jpeg") center top / auto 52vh no-repeat,
            #07101a;
    }

    .bg::before {
        inset: 76px 0 auto;
        height: 44vh;
        background-size: contain;
        background-position: center top;
        opacity: 1;
    }

    .bg::after {
        background:
            linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.38) 42%, rgba(0, 0, 0, 0.86)),
            rgba(0, 0, 0, 0.05);
        backdrop-filter: none;
    }

    main,
    .admin-layout {
        width: min(100% - 20px, 1180px);
    }

    .brand small {
        white-space: normal;
    }

    .nav a,
    .button,
    .contact-links a,
    .admin-top a {
        width: 100%;
    }

    .nav a.admin-icon-link {
        width: 42px;
        flex-basis: 42px;
    }

    .nav,
    .hero-actions,
    .contact-links {
        width: 100%;
    }

    .player-controls {
        align-items: center;
        flex-direction: row;
    }

    body {
        padding-bottom: 148px;
    }

    .site-ticker span {
        animation-duration: 18s;
    }

    .player-shell {
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: 10px;
        z-index: 30;
        padding: 12px;
        background: rgba(7, 13, 20, 0.94);
    }

    .player-shell .now-playing {
        margin: 10px 0;
    }

    .player-status {
        font-size: 0.86rem;
    }

    .now-playing strong {
        font-size: 1rem;
    }

    .metadata-marquee {
        min-height: 22px;
    }

    .play-button {
        width: 52px;
        height: 52px;
    }

.volume-wrap label {
        display: none;
    }
}

/* Admin polish overrides */
.admin-body::before {
    background:
        radial-gradient(circle at 18% 0%, rgba(245, 179, 66, 0.13), transparent 34%),
        linear-gradient(135deg, rgba(6, 12, 20, 0.98), rgba(10, 20, 31, 0.96));
}

.admin-layout {
    display: grid;
    gap: 18px;
}

.admin-hero {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.72fr);
    align-items: center;
    padding: 24px;
    min-height: auto;
    background:
        linear-gradient(135deg, rgba(245, 179, 66, 0.13), rgba(255, 255, 255, 0.035) 42%),
        rgba(7, 13, 20, 0.92);
}

.admin-hero.compact {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.45fr);
}

.admin-hero h1 {
    max-width: 760px;
    margin: 4px 0 8px;
    font-size: clamp(2rem, 4.2vw, 3.25rem);
    line-height: 1.03;
}

.admin-hero.compact h1 {
    font-size: clamp(1.9rem, 3.2vw, 2.7rem);
}

.admin-hero p {
    max-width: 720px;
    font-size: 1rem;
}

.stat-grid {
    align-content: stretch;
}

.stat-card {
    min-height: 104px;
    background: rgba(255, 255, 255, 0.085);
}

.stat-card:hover {
    border-color: rgba(245, 179, 66, 0.36);
    background: rgba(255, 255, 255, 0.12);
}

.admin-section {
    background: rgba(7, 13, 20, 0.9);
}

.admin-section-head {
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.admin-section-head p {
    max-width: 430px;
}

@media (max-width: 860px) {
    .admin-hero,
    .admin-hero.compact {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .admin-hero h1,
    .admin-hero.compact h1 {
        font-size: clamp(1.9rem, 9vw, 2.8rem);
    }
}
