:root {
    color-scheme: dark;
    --bg-1: #07111f;
    --bg-2: #0e1a2b;
    --panel: rgba(11, 19, 33, 0.84);
    --border: rgba(255, 255, 255, 0.1);
    --text: #eef4ff;
    --muted: #9aa8be;
    --accent: #5aa3ff;
    --success: #3dd598;
    --warning: #ffcc66;
    --danger: #ff6b7a;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 14px;

    --font-heading: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
    --font-body:
        "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
        "Segoe UI", sans-serif;
    --font-mono:
        "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas,
        monospace;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background:
        radial-gradient(
            circle at top left,
            rgba(90, 163, 255, 0.18),
            transparent 28%
        ),
        radial-gradient(
            circle at top right,
            rgba(61, 213, 152, 0.12),
            transparent 24%
        ),
        linear-gradient(180deg, var(--bg-2), var(--bg-1));
    color: var(--text);
}

body {
    padding: 28px;
}

/* Global Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
}

button,
.btn {
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* button,
input {
    font: inherit;
} */

.eyebrow,
.toolbar-kicker,
.quality-badge-label,
.viewer-badge-label,
.sky-schedule-kicker,
.sky-schedule-label,
.not-live-text,
th {
    font-family: var(--font-heading);
    font-weight: 700;
}

.app-shell {
    width: min(1180px, 100%);
    margin: 0 auto;
    display: grid;
    gap: 20px;
}

.hero {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: linear-gradient(
        180deg,
        rgba(16, 27, 46, 0.92),
        rgba(8, 15, 27, 0.92)
    );
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
    align-items: center;
    flex-wrap: wrap;
}

.hero-title-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
}

.hero-logo {
    height: 42px;
    width: auto;
    display: block;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #dbe7ff;
    font-size: 13px;
    letter-spacing: 0.02em;
    margin-bottom: 14px;
}

.pulse {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--danger);
    box-shadow: 0 0 0 0 rgba(255, 107, 122, 0.8);
    animation: pulse 1.8s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 107, 122, 0.8);
    }
    70% {
        box-shadow: 0 0 0 14px rgba(255, 107, 122, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 107, 122, 0);
    }
}

.hero h1 {
    margin: 0 0 10px;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.hero p {
    margin: 0;
    color: var(--muted);
    max-width: 760px;
    font-size: 15px;
    line-height: 1.6;
}

.panel {
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
    overflow: hidden;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
}

.panel-title {
    margin: 0;
    font-size: 18px;
}

.panel-subtitle {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.player-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #000;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

#not-live-message.show {
    display: flex;
}

#not-live-message {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background:
        radial-gradient(
            circle at top,
            rgba(255, 70, 70, 0.12),
            transparent 34%
        ),
        linear-gradient(135deg, #050505, #0e0e10);
    border-radius: 0;
    gap: 16px;
    padding: 20px;
    display: none;
}

.not-live-text {
    font-family: var(--font-heading);
    font-size: clamp(1.75rem, 6vw, 3rem);
    font-weight: 800;
    color: #ff4646;
    text-transform: uppercase;
    letter-spacing: clamp(0.08em, 0.35vw, 0.16em);
    line-height: 1.05;
    text-shadow:
        0 0 20px rgba(255, 70, 70, 0.6),
        0 0 40px rgba(255, 70, 70, 0.4);
    text-align: center;
    overflow-wrap: anywhere;
}

.not-live-subtext {
    font-size: 0.95rem;
    color: #adadb8;
    text-align: center;
    max-width: 400px;
    line-height: 1.5;
    padding: 0 20px;
}

#jwplayer {
    width: 100%;
    height: 100%;
}

.player-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 16px;
    padding: 20px;
    padding-top: 0;
}

.toolbar-chips,
.button-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.button-row .btn {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #d9e6ff;
    font-size: 14px;
}

.quality-badge,
.viewer-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: #dfe9ff;
    line-height: 1;
    white-space: nowrap;
    align-self: center;
}

.quality-badge-label,
.viewer-badge-label {
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.quality-badge-value,
.viewer-badge-value {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--text);
}

.quality-badge.is-fallback {
    background: rgba(255, 204, 102, 0.1);
    border-color: rgba(255, 204, 102, 0.26);
}

.quality-badge.is-fallback .quality-badge-value {
    color: #ffdc8a;
}

.quality-badge.is-offline,
.viewer-badge.is-offline {
    opacity: 0.7;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--warning);
    box-shadow: 0 0 16px rgba(255, 204, 102, 0.55);
}

.status-dot.is-online {
    background: var(--success);
    box-shadow: 0 0 16px rgba(61, 213, 152, 0.55);
}

.status-dot.is-error {
    background: var(--danger);
    box-shadow: 0 0 16px rgba(255, 107, 122, 0.55);
}

.btn {
    border: 0;
    cursor: pointer;
    border-radius: 12px;
    padding: 12px 16px;
    font-weight: 600;
    transition:
        transform 0.15s ease,
        background 0.15s ease,
        box-shadow 0.15s ease,
        opacity 0.15s ease;
}

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

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(180deg, #5aa3ff, #3579ff);
    color: white;
    box-shadow: 0 10px 24px rgba(53, 121, 255, 0.35);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

#jwplayer .jw-video::cue,
#jwplayer .jw-text-track-cue {
    text-shadow:
        rgb(0, 0, 0) -2px 0 1px,
        rgb(0, 0, 0) 2px 0 1px,
        rgb(0, 0, 0) 0 -2px 1px,
        rgb(0, 0, 0) 0 2px 1px,
        rgb(0, 0, 0) -1px 1px 1px,
        rgb(0, 0, 0) 1px 1px 1px,
        rgb(0, 0, 0) 1px -1px 1px;
}

.sky-schedule-card {
    margin-top: 16px;
    padding: 18px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.035),
        rgba(255, 255, 255, 0.02)
    );
}

.sky-schedule-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.sky-schedule-title-stack {
    min-width: 0;
}

.sky-schedule-header-right {
    margin-left: auto;
    display: grid;
    gap: 10px;
    justify-items: end;
}

.sky-schedule-kicker {
    margin: 0 0 6px;
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sky-schedule-heading {
    margin: 0;
    font-size: 18px;
    color: var(--text);
}

.sky-schedule-view-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.sky-schedule-view-btn {
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    border-radius: 999px;
    padding: 8px 12px;
    font-weight: 600;
    line-height: 1;
    transition:
        background 0.15s ease,
        color 0.15s ease,
        box-shadow 0.15s ease,
        opacity 0.15s ease;
}

.sky-schedule-view-btn.is-active {
    background: rgba(90, 163, 255, 0.18);
    color: var(--text);
    box-shadow: inset 0 0 0 1px rgba(90, 163, 255, 0.22);
}

.sky-schedule-status {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    text-align: right;
}

.sky-schedule-view {
    min-width: 0;
}

.sky-schedule-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.sky-schedule-item {
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    min-width: 0;
}

.sky-schedule-label {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sky-schedule-item-title {
    margin: 0;
    font-size: 17px;
    line-height: 1.35;
    color: var(--text);
}

.sky-schedule-item-subtitle {
    margin: 8px 0 0;
    color: #d9e6ff;
    font-size: 13px;
    line-height: 1.45;
}

.sky-schedule-item-meta {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.sky-guide-shell {
    width: 100%;
    min-width: 0;
}

.sky-guide-scroll {
    width: 100%;
    min-width: 0;
    overflow: visible;
}

.sky-guide-timeline {
    width: 100%;
    min-width: 0;
}

.sky-guide-grid {
    display: grid;
    gap: 8px;
    width: 100%;
    min-width: 0;
}

.sky-guide-track {
    position: relative;
    display: grid;
    gap: 4px;
    width: 100%;
    min-width: 0;
    padding-top: 18px;
}

.sky-guide-now-marker {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 0;
    border-left: 2px solid rgba(255, 255, 255, 0.82);
    transform: translateX(-1px);
    z-index: 3;
    pointer-events: none;
}

.sky-guide-now-pill {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    padding: 2px 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #07111f;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.sky-guide-time-row {
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
}

.sky-guide-time-segment {
    min-width: 0;
    padding-right: 6px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sky-guide-time-segment.is-current {
    color: #dfe9ff;
    font-weight: 600;
}

.sky-guide-bar-row {
    display: flex;
    width: 100%;
    min-width: 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.035);
}

.sky-guide-bar-segment {
    position: relative;
    min-width: 0;
    min-height: 42px;
    border: 0;
    padding: 0 10px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    cursor: pointer;
    overflow: hidden;
}

.sky-guide-bar-segment + .sky-guide-bar-segment {
    box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.08);
}

.sky-guide-bar-segment::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--segment-progress, 0%);
    background: linear-gradient(
        90deg,
        rgba(61, 213, 152, 0.96),
        rgba(90, 163, 255, 0.86)
    );
    z-index: 0;
}

.sky-guide-bar-segment.is-current {
    background: rgba(61, 213, 152, 0.08);
}

.sky-guide-bar-segment.is-selected {
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.18),
        inset 1px 0 0 rgba(255, 255, 255, 0.08);
}

.sky-guide-bar-segment.is-compact .sky-guide-bar-label {
    font-size: 11px;
}

.sky-guide-bar-segment.is-empty .sky-guide-bar-label {
    display: none;
}

.sky-guide-bar-label {
    position: relative;
    z-index: 1;
    min-width: 0;
    width: 100%;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
}

.sky-guide-detail {
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.sky-guide-detail.is-live {
    background: linear-gradient(
        180deg,
        rgba(61, 213, 152, 0.07),
        rgba(255, 255, 255, 0.03)
    );
    border-color: rgba(61, 213, 152, 0.2);
}

.sky-guide-detail-title,
.sky-guide-detail-subtitle,
.sky-guide-detail-meta {
    margin: 0;
    min-width: 0;
}

.sky-guide-detail-title {
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
}

.sky-guide-detail-subtitle {
    color: #d9e6ff;
    font-size: 12px;
    line-height: 1.35;
}

.sky-guide-detail-meta {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}

.sky-guide-empty {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--muted);
    font-size: 13px;
}

@media (max-width: 640px) {
    .sky-schedule-card {
        margin-top: 12px;
        padding: 12px;
        border-radius: 14px;
    }

    .sky-schedule-header {
        gap: 8px;
        margin-bottom: 8px;
    }

    .sky-schedule-kicker {
        display: none;
    }

    .sky-schedule-heading {
        font-size: 14px;
    }

    .sky-schedule-header-right {
        width: 100%;
        justify-items: stretch;
        gap: 8px;
        margin-left: 0;
    }

    .sky-schedule-view-toggle {
        width: 100%;
    }

    .sky-schedule-view-btn {
        flex: 1 1 0;
        padding: 7px 10px;
        font-size: 12px;
        text-align: center;
    }

    .sky-schedule-status {
        display: none;
    }

    .sky-schedule-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .sky-schedule-item {
        display: grid;
        grid-template-columns: 54px minmax(0, 1fr);
        grid-template-areas:
            "label title"
            ". subtitle"
            ". meta";
        align-items: start;
        column-gap: 8px;
        row-gap: 3px;
        padding: 9px 10px;
        border-radius: 12px;
    }

    .sky-schedule-label {
        grid-area: label;
        margin: 2px 0 0;
        font-size: 10px;
        letter-spacing: 0.06em;
    }

    .sky-schedule-item-title {
        grid-area: title;
        margin: 0;
        font-size: 13px;
        line-height: 1.25;
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
        word-break: break-word;
    }

    .sky-schedule-item-subtitle {
        grid-area: subtitle;
        display: block;
        margin: 0;
        font-size: 11px;
        line-height: 1.3;
        color: #d9e6ff;
    }

    .sky-schedule-item-meta {
        grid-area: meta;
        margin: 0;
        font-size: 11px;
        line-height: 1.2;
        white-space: normal;
        color: var(--muted);
    }

    .sky-guide-grid {
        gap: 6px;
    }

    .sky-guide-track {
        gap: 3px;
        padding-top: 16px;
    }

    .sky-guide-now-pill {
        top: 0;
        font-size: 9px;
        padding: 2px 5px;
    }

    .sky-guide-time-segment {
        font-size: 10px;
        padding-right: 4px;
    }

    .sky-guide-bar-row {
        border-radius: 10px;
    }

    .sky-guide-bar-segment {
        min-height: 38px;
        padding: 0 8px;
    }

    .sky-guide-bar-segment.is-compact .sky-guide-bar-label,
    .sky-guide-bar-label {
        font-size: 11px;
    }

    .sky-guide-detail {
        padding: 8px 10px;
        border-radius: 10px;
    }

    .sky-guide-detail-title {
        font-size: 12px;
    }

    .sky-guide-detail-subtitle,
    .sky-guide-detail-meta {
        font-size: 11px;
    }
}

@media (max-width: 980px) {
    body {
        padding: 18px;
    }
}

@media (max-width: 640px) {
    .panel-header {
        padding: 16px;
    }

    .player-toolbar {
        align-items: stretch;
        gap: 12px;
    }

    .toolbar-chips {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        align-items: stretch;
    }

    .status-chip {
        grid-column: 1 / -1;
        min-width: 0;
        width: 100%;
        justify-content: flex-start;
    }

    .quality-badge,
    .viewer-badge {
        min-width: 0;
        width: 100%;
        min-height: 40px;
        padding: 8px 10px;
        border-radius: 10px;
        justify-content: space-between;
    }

    .quality-badge-label,
    .viewer-badge-label {
        font-size: 10px;
    }

    .quality-badge-value,
    .viewer-badge-value {
        font-size: 14px;
    }

    .button-row {
        width: 100%;
    }

    .button-row .btn {
        flex: 1;
    }
}

[hidden] {
    display: none !important;
}
