:root {
    --brand-sky: #0ea5e9;
    --brand-sky-soft: #7dd3fc;
    --glass-panel: rgba(15, 23, 42, 0.75);
    --glass-soft: rgba(15, 23, 42, 0.48);
    --bg: #020617;
    --line: rgba(255,255,255,.08);
    --line-soft: rgba(148,163,184,.12);
    --text: #f8fafc;
    --muted: #64748b;
    --muted-bright: #94a3b8;
}

* { box-sizing: border-box; }

html {
    color-scheme: dark;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    background-image: radial-gradient(circle at 50% -20%, #1e293b 0%, #020617 80%);
    color: var(--text);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: .025;
    background-image: repeating-linear-gradient(
        to bottom,
        rgba(255,255,255,.18) 0,
        rgba(255,255,255,.18) 1px,
        transparent 1px,
        transparent 4px
    );
    mix-blend-mode: soft-light;
}

h1, h2, h3 {
    font-family: 'Plus Jakarta Sans', sans-serif;
}

button, input, select {
    font: inherit;
}

a {
    color: inherit;
}

#starfield {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: .55;
}

.glass {
    background: var(--glass-panel);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--line);
    box-shadow: 0 25px 50px -12px rgba(0,0,0,.5);
}

.archive-shell {
    position: relative;
    z-index: 10;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 40px 0 48px;
}

.site-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 44px;
}

.brand-lockup {
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
}

.brand-logo {
    width: auto;
    height: 48px;
    filter: drop-shadow(0 0 18px rgba(14,165,233,.14));
    transition: transform .35s cubic-bezier(.16,1,.3,1), filter .35s ease;
}

.brand-lockup:hover .brand-logo {
    transform: translateY(-2px) scale(1.02);
    filter: drop-shadow(0 0 25px rgba(14,165,233,.28));
}

.brand-copy h1 {
    margin: 0;
    font-size: 24px;
    line-height: 1.08;
    font-weight: 700;
    letter-spacing: -.03em;
}

.brand-copy p {
    margin: 6px 0 0;
    color: var(--brand-sky);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .11em;
}

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

.network-nav a {
    padding: 8px 11px;
    border: 1px solid rgba(148,163,184,.1);
    border-radius: 10px;
    background: rgba(15,23,42,.38);
    color: #64748b;
    text-decoration: none;
    font-size: 11px;
    font-weight: 700;
    transition: .25s ease;
}

.network-nav a:hover {
    color: #cbd5e1;
    border-color: rgba(14,165,233,.28);
    background: rgba(14,165,233,.05);
    transform: translateY(-1px);
}

.archive-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0,1fr);
    gap: 32px;
    align-items: end;
    overflow: hidden;
    isolation: isolate;
    border-radius: 28px;
    padding: clamp(28px, 5vw, 50px);
}

.archive-hero::after {
    content: "";
    position: absolute;
    inset: -1px;
    z-index: -1;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(
        110deg,
        transparent 0%,
        rgba(14,165,233,.06) 35%,
        rgba(255,255,255,.04) 50%,
        transparent 70%
    );
    transform: translateX(-115%);
    transition: transform 1s cubic-bezier(.16,1,.3,1);
}

.archive-hero:hover::after {
    transform: translateX(115%);
}

.hero-glow {
    position: absolute;
    top: -190px;
    right: -150px;
    z-index: -2;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(14,165,233,.15), transparent 70%);
    animation: driftGlow 9s ease-in-out infinite alternate;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    color: var(--brand-sky);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .15em;
}

.eyebrow::before,
.section-kicker::before {
    content: "";
    width: 28px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--brand-sky));
}

.hero-copy h2 {
    margin: 14px 0 0;
    max-width: 700px;
    font-size: clamp(40px, 6.5vw, 68px);
    line-height: .99;
    font-weight: 700;
    letter-spacing: -.055em;
}

.hero-copy h2 span {
    color: transparent;
    background: linear-gradient(135deg, #f8fafc, #7dd3fc 58%, #0ea5e9);
    -webkit-background-clip: text;
    background-clip: text;
}

.hero-description {
    max-width: 650px;
    margin: 20px 0 0;
    color: var(--muted-bright);
    font-size: 14px;
    line-height: 1.72;
}

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

.stat-card {
    min-width: 0;
    padding: 14px;
    border: 1px solid rgba(148,163,184,.1);
    border-radius: 15px;
    background: rgba(2,6,23,.42);
}

.stat-card span {
    display: block;
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .11em;
}

.stat-card strong {
    display: block;
    margin-top: 7px;
    color: #e2e8f0;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(18px, 3vw, 25px);
    letter-spacing: -.03em;
}

.archive-controls {
    padding: 58px 2px 22px;
}

.collection-heading {
    display: grid;
    grid-template-columns: minmax(0,1fr);
    gap: 20px;
    align-items: end;
}

.collection-heading h2 {
    margin: 9px 0 0;
    font-size: clamp(27px, 4vw, 38px);
    line-height: 1.06;
    letter-spacing: -.04em;
}

.collection-heading p:last-child {
    margin: 9px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.search-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    border: 1px solid rgba(148,163,184,.12);
    border-radius: 14px;
    background: rgba(15,23,42,.52);
    padding: 0 14px;
    transition: .25s ease;
}

.search-wrap:focus-within {
    border-color: rgba(14,165,233,.65);
    box-shadow: 0 0 0 4px rgba(14,165,233,.08);
}

.search-wrap svg {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    color: #475569;
}

.search-wrap input {
    width: 100%;
    min-height: 50px;
    border: 0;
    outline: 0;
    background: transparent;
    color: #e2e8f0;
    font-size: 13px;
}

.search-wrap input::placeholder {
    color: #475569;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 11px;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid rgba(148,163,184,.07);
}

.filter-bar label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: #475569;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .11em;
}

.filter-bar select {
    min-height: 40px;
    border: 1px solid rgba(148,163,184,.11);
    border-radius: 10px;
    outline: 0;
    background: #0f172a;
    color: #cbd5e1;
    padding: 0 34px 0 11px;
    font-size: 11px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: normal;
}

.filter-bar select:focus {
    border-color: rgba(14,165,233,.6);
    box-shadow: 0 0 0 3px rgba(14,165,233,.08);
}

.archive-status {
    flex: 1;
    min-width: 180px;
    margin: 0 0 10px auto;
    color: #475569;
    font-size: 11px;
    text-align: right;
}

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

.media-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(148,163,184,.1);
    border-radius: 18px;
    background: rgba(15,23,42,.52);
    box-shadow: 0 18px 34px rgba(0,0,0,.15);
    cursor: pointer;
    transition: transform .4s cubic-bezier(.4,0,.2,1), border-color .35s ease, background .35s ease, box-shadow .35s ease;
}

.media-card::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(110deg, transparent 20%, rgba(255,255,255,.04) 50%, transparent 80%);
    transform: translateX(-130%);
    transition: transform .7s ease;
}

.media-card:hover {
    transform: translateY(-5px);
    border-color: rgba(14,165,233,.7);
    background: rgba(14,165,233,.045);
    box-shadow: 0 22px 40px rgba(0,0,0,.22), 0 0 28px rgba(14,165,233,.055);
}

.media-card:hover::after {
    transform: translateX(130%);
}

.thumbnail-container {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #020617;
}

.thumbnail-img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    opacity: .9;
    transition: transform .55s cubic-bezier(.16,1,.3,1), opacity .35s ease;
}

.media-card:hover .thumbnail-img {
    transform: scale(1.035);
    opacity: 1;
}

.thumbnail-fallback {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #334155;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
}

.duration-badge {
    position: absolute;
    right: 10px;
    bottom: 10px;
    z-index: 3;
    padding: 4px 7px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 7px;
    background: rgba(2,6,23,.84);
    color: #cbd5e1;
    font-size: 10px;
    font-weight: 700;
    backdrop-filter: blur(10px);
}

.card-download {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 4;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(14,165,233,.25);
    border-radius: 10px;
    background: rgba(2,6,23,.78);
    color: var(--brand-sky-soft);
    opacity: 0;
    transform: translateY(-5px);
    transition: .25s ease;
    backdrop-filter: blur(10px);
}

.card-download svg {
    width: 16px;
    height: 16px;
}

.media-card:hover .card-download,
.card-download:focus-visible {
    opacity: 1;
    transform: translateY(0);
}

.card-copy {
    padding: 16px;
}

.card-copy h3 {
    margin: 0;
    color: #e2e8f0;
    font-size: 14px;
    line-height: 1.35;
    font-weight: 700;
    letter-spacing: -.015em;
}

.card-date {
    margin: 8px 0 0;
    color: var(--brand-sky);
    font-size: 10px;
    font-weight: 700;
}

.loading-zone {
    display: flex;
    justify-content: center;
    min-height: 88px;
    padding: 28px 0;
}

.loader {
    width: 34px;
    height: 34px;
    border: 3px solid rgba(14,165,233,.09);
    border-left-color: var(--brand-sky);
    border-radius: 50%;
    animation: spin .85s linear infinite;
}

.loader.hidden {
    display: none;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    overflow-y: auto;
    background: rgba(0,0,0,.84);
    backdrop-filter: blur(14px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .35s ease, visibility .35s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.player-panel {
    width: min(1050px, 100%);
    max-height: calc(100vh - 36px);
    margin: auto;
    overflow-y: auto;
    border-radius: 24px;
    transform: translateY(16px) scale(.985);
    transition: transform .45s cubic-bezier(.16,1,.3,1);
}

.modal-overlay.active .player-panel {
    transform: translateY(0) scale(1);
}

.player-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 24px;
    border-bottom: 1px solid rgba(148,163,184,.08);
    background: linear-gradient(to bottom, rgba(255,255,255,.025), transparent);
}

.player-title-wrap {
    min-width: 0;
}

.player-kicker {
    margin: 0;
    color: var(--brand-sky);
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .14em;
}

.player-header h2 {
    margin: 7px 0 0;
    overflow: hidden;
    color: #fff;
    font-size: clamp(19px, 3vw, 28px);
    font-weight: 700;
    letter-spacing: -.03em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#modal-video-date {
    margin: 7px 0 0;
    color: #64748b;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.icon-button,
.control-button {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 0;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    transition: color .2s ease, transform .2s ease;
}

.icon-button:hover,
.control-button:hover {
    color: var(--brand-sky-soft);
    transform: scale(1.05);
}

.icon-button svg {
    width: 23px;
    height: 23px;
}

.video-stage {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #000;
}

.video-stage video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

.video-controls {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 42px 16px 14px;
    background: linear-gradient(to top, rgba(0,0,0,.92), transparent);
    opacity: 0;
    transition: opacity .25s ease;
}

.video-stage:hover .video-controls,
.video-controls:focus-within {
    opacity: 1;
}

.control-button {
    width: 30px;
    height: 30px;
}

.control-button svg {
    width: 19px;
    height: 19px;
}

.control-button.active {
    color: var(--brand-sky);
}

.progress-track {
    position: relative;
    flex: 1;
    height: 5px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255,255,255,.18);
    cursor: pointer;
}

.progress-fill {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: var(--brand-sky);
    box-shadow: 0 0 8px rgba(14,165,233,.7);
}

.time-display {
    min-width: 82px;
    color: #cbd5e1;
    font-size: 10px;
    font-variant-numeric: tabular-nums;
}

.volume-slider {
    width: 62px;
    accent-color: var(--brand-sky);
}

.player-loading {
    position: absolute;
    inset: 0;
    z-index: 8;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: rgba(2,6,23,.65);
    color: #94a3b8;
    font-size: 11px;
    backdrop-filter: blur(5px);
}

.player-loading.hidden {
    display: none;
}

.player-details {
    display: grid;
    grid-template-columns: minmax(0,1fr);
    gap: 20px;
    align-items: start;
    padding: 22px 24px 25px;
}

#modal-video-desc {
    margin: 0;
    color: #94a3b8;
    font-size: 12px;
    line-height: 1.7;
    white-space: pre-wrap;
}

.caption-state {
    margin-top: 12px;
    color: #475569;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.download-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 46px;
    padding: 0 16px;
    border-radius: 12px;
    background: var(--brand-sky);
    color: #020617;
    text-decoration: none;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .07em;
    box-shadow: 0 14px 32px rgba(14,165,233,.16);
    transition: transform .25s ease, box-shadow .25s ease;
}

.download-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 38px rgba(14,165,233,.25);
}

.download-action svg {
    width: 17px;
    height: 17px;
}

.hidden {
    display: none !important;
}

.site-footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
    justify-content: space-between;
    margin-top: 26px;
    padding: 22px 2px 0;
    border-top: 1px solid rgba(148,163,184,.06);
    color: #334155;
    font-size: 10px;
}

.site-footer div {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.site-footer strong {
    color: #475569;
    font-size: 11px;
}

.site-footer p {
    margin: 0;
}

@keyframes pulse {
    0% { transform: scale(.9); opacity: .6; }
    50% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(.9); opacity: .6; }
}

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

@keyframes driftGlow {
    from { transform: translate3d(-12px,-8px,0) scale(.96); opacity: .75; }
    to { transform: translate3d(22px,18px,0) scale(1.06); opacity: 1; }
}

@media (min-width: 600px) {
    .video-grid {
        grid-template-columns: repeat(2, minmax(0,1fr));
    }

    .player-details {
        grid-template-columns: minmax(0,1fr) auto;
    }

    .site-footer {
        flex-direction: row;
        align-items: flex-end;
    }
}

@media (min-width: 760px) {
    .site-header {
        flex-direction: row;
        align-items: center;
    }

    .collection-heading {
        grid-template-columns: minmax(0,1fr) minmax(280px, 410px);
    }
}

@media (min-width: 900px) {
    .archive-hero {
        grid-template-columns: minmax(0,1.4fr) minmax(300px,.6fr);
    }

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

@media (min-width: 1180px) {
    .video-grid {
        grid-template-columns: repeat(4, minmax(0,1fr));
    }
}

@media (max-width: 680px) {
    .archive-shell {
        width: min(100% - 24px, 1280px);
        padding-top: 24px;
    }

    .site-header {
        margin-bottom: 30px;
    }

    .brand-logo {
        height: 42px;
    }

    .brand-copy h1 {
        font-size: 21px;
    }

    .archive-hero {
        border-radius: 22px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .stat-card strong {
        margin-top: 0;
    }

    .archive-status {
        flex-basis: 100%;
        margin: 4px 0 0;
        text-align: left;
    }

    .video-controls {
        gap: 6px;
        padding-left: 9px;
        padding-right: 9px;
    }

    .time-display {
        display: none;
    }

    .volume-slider {
        display: none;
    }

    .player-header,
    .player-details {
        padding-left: 17px;
        padding-right: 17px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}


.source-note {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-top: 18px;
    padding: 14px 15px;
    border: 1px solid rgba(14,165,233,.12);
    border-radius: 14px;
    background: rgba(14,165,233,.035);
}
.source-note-label {
    display: block;
    margin-bottom: 5px;
    color: #7dd3fc;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .12em;
}
.source-note p {
    margin: 0;
    color: #64748b;
    font-size: 10px;
    line-height: 1.55;
}
.source-note a {
    color: #94a3b8;
    text-decoration: none;
    border-bottom: 1px solid rgba(148,163,184,.25);
}
.source-note a:hover {
    color: #7dd3fc;
    border-color: rgba(125,211,252,.55);
}
.source-domain {
    flex: 0 0 auto;
    color: #334155;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .1em;
}
.cc-control {
    min-width: 32px;
    padding: 0 4px;
    font-family: 'Inter', sans-serif;
}
.cc-control span {
    display: block;
    padding: 2px 3px;
    border: 1px solid currentColor;
    border-radius: 3px;
    font-size: 8px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: .02em;
}
.cc-control:disabled {
    color: #334155;
    cursor: not-allowed;
    opacity: .55;
    transform: none;
}
.cc-control.active {
    color: #020617;
    background: #0ea5e9;
    border-radius: 7px;
}
.card-cc-badge {
    position: absolute;
    left: 10px;
    bottom: 10px;
    z-index: 3;
    padding: 4px 6px;
    border: 1px solid rgba(14,165,233,.2);
    border-radius: 6px;
    background: rgba(2,6,23,.82);
    color: #7dd3fc;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .03em;
    backdrop-filter: blur(10px);
}
.empty-state {
    grid-column: 1 / -1;
    padding: 30px;
    border-radius: 18px;
    color: #64748b;
}
@media (max-width: 680px) {
    .source-note {
        flex-direction: column;
        gap: 9px;
    }
}
