:root {
    --bg: #08111f;
    --bg-soft: #101b2e;
    --card: rgba(255, 255, 255, 0.08);
    --card-strong: rgba(255, 255, 255, 0.13);
    --text: #f7fbff;
    --muted: #a9b8ca;
    --primary: #22d3ee;
    --primary-dark: #0e7490;
    --accent: #f97316;
    --success: #22c55e;
    --danger: #ef4444;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
    --radius: 26px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.20), transparent 30%),
        radial-gradient(circle at 85% 15%, rgba(249, 115, 22, 0.14), transparent 28%),
        linear-gradient(135deg, #07101d 0%, #0b1627 45%, #111827 100%);
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

.site-header {
    padding: 26px 5vw 42px;
    position: relative;
    overflow: hidden;
}

.site-header::after {
    content: '';
    position: absolute;
    inset: auto -10% -42% 50%;
    width: 560px;
    height: 560px;
    border-radius: 50%;
    background: rgba(34, 211, 238, 0.09);
    filter: blur(4px);
    pointer-events: none;
}

.topbar {
    max-width: 1220px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    position: relative;
    z-index: 1;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon,
.login-logo {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #06101f;
    display: grid;
    place-items: center;
    font-weight: 900;
    letter-spacing: -1px;
    box-shadow: 0 15px 45px rgba(34, 211, 238, 0.20);
}

.brand strong {
    display: block;
    font-size: 1.08rem;
}

.brand small {
    display: block;
    color: var(--muted);
    margin-top: 2px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.time-pill,
.admin-link,
.badge,
.order-chip,
.mini-chip {
    border: 1px solid rgba(255, 255, 255, 0.13);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    border-radius: 999px;
    padding: 10px 14px;
    color: var(--muted);
    font-size: 0.88rem;
}

.admin-link {
    color: var(--text);
    transition: 0.2s ease;
}

.admin-link:hover {
    background: rgba(34, 211, 238, 0.16);
    transform: translateY(-1px);
}

.hero {
    max-width: 1220px;
    margin: 70px auto 0;
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) 360px;
    gap: 28px;
    align-items: end;
    position: relative;
    z-index: 1;
}

.badge {
    display: inline-flex;
    color: #bae6fd;
    border-color: rgba(34, 211, 238, 0.25);
    background: rgba(34, 211, 238, 0.08);
    margin-bottom: 20px;
}

.hero h1 {
    font-size: clamp(2.2rem, 5vw, 5.2rem);
    line-height: 0.97;
    margin: 0;
    letter-spacing: -0.065em;
    max-width: 850px;
}

.hero p {
    color: var(--muted);
    font-size: 1.08rem;
    line-height: 1.7;
    max-width: 650px;
    margin: 24px 0 0;
}

.hero-card {
    padding: 28px;
    border-radius: var(--radius);
    background: var(--card);
    border: 1px solid rgba(255, 255, 255, 0.13);
    box-shadow: var(--shadow);
}

.hero-card span {
    display: block;
    color: var(--muted);
    margin-bottom: 10px;
}

.hero-card strong {
    font-size: 1.5rem;
    line-height: 1.2;
}

.container {
    max-width: 1220px;
    margin: 0 auto;
    padding: 0 5vw 40px;
}

.player-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) 390px;
    gap: 26px;
    align-items: start;
}

.player-panel,
.schedule-panel,
.info-strip article,
.install-card {
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.075);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.player-panel {
    overflow: hidden;
    scroll-margin-top: 24px;
}

.live-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.live-row small {
    margin-left: auto;
    color: var(--muted);
}

.live-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--danger);
    box-shadow: 0 0 0 8px rgba(239, 68, 68, 0.12);
    animation: pulse 1.6s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(0.78); opacity: 0.6; }
}

.video-shell {
    background: #020617;
    aspect-ratio: 16 / 9;
}

.video-shell video,
.video-shell iframe {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border: 0;
}

.source-chip {
    margin-left: 8px;
    color: #bae6fd;
    border-color: rgba(34, 211, 238, 0.25);
    background: rgba(34, 211, 238, 0.10);
}

.video-info {
    padding: 26px;
}

.order-chip {
    display: inline-flex;
    padding: 8px 12px;
    color: #fed7aa;
    border-color: rgba(249, 115, 22, 0.25);
    background: rgba(249, 115, 22, 0.10);
}

.video-info h2 {
    font-size: clamp(1.6rem, 3vw, 2.5rem);
    margin: 16px 0 10px;
    letter-spacing: -0.04em;
}

.video-info p,
.empty-state p,
.info-strip span,
.schedule-item p,
.install-card p,
.muted {
    color: var(--muted);
    line-height: 1.65;
}

.schedule-panel {
    padding: 24px;
    position: sticky;
    top: 20px;
}

.section-title span {
    color: var(--primary);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 700;
}

.section-title h2 {
    margin: 8px 0 18px;
    font-size: 1.65rem;
    letter-spacing: -0.04em;
}

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

.schedule-item {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 14px;
    padding: 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.schedule-item.featured {
    border-color: rgba(34, 211, 238, 0.35);
    background: rgba(34, 211, 238, 0.08);
}

.schedule-time strong,
.schedule-time small {
    display: block;
}

.schedule-time strong {
    font-size: 1.15rem;
}

.schedule-time small {
    color: var(--muted);
    margin-top: 5px;
}

.mini-chip {
    display: inline-flex;
    padding: 5px 8px;
    font-size: 0.74rem;
    margin: 0 4px 8px 0;
}

.mini-chip.onair {
    color: #bbf7d0;
    border-color: rgba(34, 197, 94, 0.25);
    background: rgba(34, 197, 94, 0.12);
}

.mini-chip.playing {
    color: #cffafe;
    border-color: rgba(34, 211, 238, 0.25);
    background: rgba(34, 211, 238, 0.12);
}

.schedule-item h3 {
    margin: 0 0 6px;
    font-size: 1rem;
}

.schedule-item p {
    margin: 0;
    font-size: 0.9rem;
}

.info-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-top: 26px;
}

.info-strip article {
    padding: 22px;
}

.info-strip strong,
.info-strip span {
    display: block;
}

.info-strip strong {
    margin-bottom: 8px;
}

.footer {
    text-align: center;
    padding: 28px 5vw 42px;
    color: var(--muted);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 14px;
    padding: 12px 18px;
    cursor: pointer;
    font-weight: 800;
    transition: 0.2s ease;
}

.btn.primary {
    color: #05121f;
    background: linear-gradient(135deg, var(--primary), #67e8f9);
    box-shadow: 0 14px 32px rgba(34, 211, 238, 0.18);
}

.btn:hover {
    transform: translateY(-1px);
}

.empty-state {
    padding: 42px;
    text-align: center;
}

.install-body {
    display: grid;
    place-items: center;
    padding: 30px;
}

.install-card {
    max-width: 560px;
    padding: 34px;
}

.alert {
    padding: 14px 16px;
    border-radius: 16px;
    margin: 16px 0;
    border: 1px solid rgba(255,255,255,.12);
}

.alert.success {
    background: rgba(34,197,94,.12);
    color: #bbf7d0;
}

.alert.error {
    background: rgba(239,68,68,.12);
    color: #fecaca;
}

@media (max-width: 980px) {
    .hero,
    .player-grid,
    .info-strip {
        grid-template-columns: 1fr;
    }

    .schedule-panel {
        position: static;
    }
}

@media (max-width: 640px) {
    .topbar,
    .nav-actions,
    .live-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .live-row small {
        margin-left: 0;
    }

    .hero {
        margin-top: 44px;
    }

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

.hero-card small {
    display: block;
    color: var(--muted);
    margin-top: 12px;
    line-height: 1.5;
}

.live-row.ad-mode .live-dot {
    background: var(--accent);
    box-shadow: 0 0 0 8px rgba(249, 115, 22, 0.13);
}

.ad-chip {
    color: #fde68a;
    border-color: rgba(245, 158, 11, 0.30);
    background: rgba(245, 158, 11, 0.12);
}

.ad-notice {
    display: grid;
    gap: 6px;
    padding: 14px 16px;
    margin-bottom: 16px;
    border-radius: 18px;
    border: 1px solid rgba(245, 158, 11, 0.22);
    background: rgba(245, 158, 11, 0.10);
}

.ad-notice strong {
    color: #fde68a;
}

.ad-notice span {
    color: var(--muted);
    line-height: 1.55;
    font-size: 0.92rem;
}

.ad-notice code {
    color: #fff7ed;
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 6px;
    border-radius: 8px;
}

.mini-chip.next {
    color: #fde68a;
    border-color: rgba(245, 158, 11, 0.25);
    background: rgba(245, 158, 11, 0.12);
}

.waiting-state {
    min-height: 420px;
    display: grid;
    align-content: center;
    justify-items: center;
    background:
        radial-gradient(circle at center, rgba(34, 211, 238, 0.10), transparent 42%),
        #020617;
}

.waiting-icon {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    border-radius: 26px;
    margin-bottom: 18px;
    font-size: 2rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.next-time {
    margin-top: 4px;
}

.clean-video-ui {
    position: relative;
    overflow: hidden;
}

.clean-video-ui video,
.clean-video-ui .youtube-frame {
    pointer-events: none;
}

.custom-player-controls {
    position: absolute;
    left: 50%;
    bottom: 16px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 9px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(2, 6, 23, 0.78);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(14px);
    transform: translateX(-50%) translateY(10px);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
}

.clean-video-ui:hover .custom-player-controls,
.clean-video-ui:focus-within .custom-player-controls,
.custom-player-controls:hover {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.player-control {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 46px;
    height: 42px;
    padding: 0 13px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.10);
    color: #ffffff;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 850;
    cursor: pointer;
    transition: 0.18s ease;
}

.player-control:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.18);
}

.player-control.audio-on {
    color: #bbf7d0;
    border-color: rgba(34, 197, 94, 0.32);
    background: rgba(34, 197, 94, 0.14);
}

@media (max-width: 700px) {
    .custom-player-controls {
        left: 12px;
        right: 12px;
        bottom: 12px;
        flex-wrap: wrap;
        transform: translateY(10px);
        border-radius: 22px;
    }

    .clean-video-ui:hover .custom-player-controls,
    .clean-video-ui:focus-within .custom-player-controls,
    .custom-player-controls:hover {
        transform: translateY(0);
    }

    .player-control {
        flex: 1 1 calc(50% - 8px);
        min-width: 0;
        height: 40px;
        padding: 0 10px;
        font-size: 0.84rem;
    }
}
