:root {
    --bg: #000000;
    --panel: rgba(9, 9, 13, 0.72);
    --panel-strong: rgba(10, 10, 16, 0.88);
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(139, 92, 246, 0.45);
    --text: #f7f7fb;
    --muted: #a4a7b5;
    --accent: #8b5cf6;
    --accent-soft: rgba(139, 92, 246, 0.18);
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
    --starfield:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='800' height='800' viewBox='0 0 800 800'%3E%3Cg fill='white'%3E%3Ccircle cx='44' cy='77' r='1'/%3E%3Ccircle cx='138' cy='211' r='1.2'/%3E%3Ccircle cx='244' cy='121' r='0.8'/%3E%3Ccircle cx='321' cy='312' r='1'/%3E%3Ccircle cx='402' cy='96' r='1.1'/%3E%3Ccircle cx='488' cy='228' r='0.9'/%3E%3Ccircle cx='566' cy='148' r='1.1'/%3E%3Ccircle cx='642' cy='294' r='0.8'/%3E%3Ccircle cx='738' cy='118' r='1'/%3E%3Ccircle cx='95' cy='468' r='1.1'/%3E%3Ccircle cx='192' cy='522' r='0.8'/%3E%3Ccircle cx='280' cy='438' r='1.2'/%3E%3Ccircle cx='374' cy='566' r='0.9'/%3E%3Ccircle cx='456' cy='484' r='1.1'/%3E%3Ccircle cx='548' cy='620' r='0.8'/%3E%3Ccircle cx='652' cy='510' r='1.1'/%3E%3Ccircle cx='744' cy='614' r='1'/%3E%3Ccircle cx='58' cy='714' r='1.2'/%3E%3Ccircle cx='168' cy='688' r='0.8'/%3E%3Ccircle cx='266' cy='742' r='1.1'/%3E%3Ccircle cx='364' cy='704' r='0.9'/%3E%3Ccircle cx='472' cy='746' r='1.1'/%3E%3Ccircle cx='586' cy='692' r='0.9'/%3E%3Ccircle cx='694' cy='730' r='1.1'/%3E%3C/g%3E%3C/svg%3E");
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top, rgba(139, 92, 246, 0.14), transparent 34rem),
        radial-gradient(circle at 80% 10%, rgba(139, 92, 246, 0.08), transparent 24rem),
        var(--bg);
    color: var(--text);
    font-family: "Inter", sans-serif;
    overflow-x: hidden;
}

a,
button,
input,
select {
    transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease, opacity 180ms ease, filter 180ms ease;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid rgba(139, 92, 246, 0.9);
    outline-offset: 3px;
}

.bg-stars {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: var(--starfield);
    background-size: 56rem 56rem;
    background-repeat: repeat;
    opacity: 0.1;
}

.hero,
main,
.player-modal,
.details-modal {
    position: relative;
    z-index: 1;
}

.hero {
    min-height: min(88vh, 56rem);
    overflow: hidden;
}

.hero-backdrop,
.hero-backdrop-image,
.hero-backdrop-fallback,
.hero-backdrop-mask,
.hero-grain {
    position: absolute;
    inset: 0;
}

.hero-backdrop-image,
.hero-backdrop-fallback {
    width: 100%;
    height: 100%;
}

.hero-backdrop-image {
    object-fit: cover;
    object-position: center 24%;
    filter: saturate(0.92) brightness(0.75);
}

.hero-backdrop-fallback {
    display: grid;
    place-items: center;
    font-family: "Lexend", sans-serif;
    font-size: clamp(4rem, 12vw, 10rem);
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.92);
    background:
        radial-gradient(circle at 50% 20%, rgba(139, 92, 246, 0.45), transparent 28rem),
        linear-gradient(180deg, rgba(24, 18, 40, 0.9), rgba(0, 0, 0, 0.98));
}

.hero-backdrop-mask {
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.48) 35%, rgba(0, 0, 0, 0.68) 100%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.2) 54%, rgba(0, 0, 0, 1) 100%);
    -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 70%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 0%, #000 70%, transparent 100%);
}

.hero-grain {
    opacity: 0.18;
    background-image:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.14) 0 0.6px, transparent 1px),
        radial-gradient(circle at 80% 30%, rgba(255, 255, 255, 0.1) 0 0.7px, transparent 1px),
        radial-gradient(circle at 50% 80%, rgba(255, 255, 255, 0.12) 0 0.5px, transparent 1px);
    background-size: 10px 10px, 12px 12px, 8px 8px;
    mix-blend-mode: soft-light;
}

.hero-content,
main {
    width: min(1380px, calc(100% - 2rem));
    margin: 0 auto;
}

.hero-content {
    min-height: inherit;
    display: grid;
    grid-template-columns: minmax(0, 34rem) minmax(18rem, 24rem);
    align-items: end;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 4rem 0 3rem;
}

.hero-glass,
.hero-stats,
.controls,
.catalog-shell,
.details-panel,
.player-panel,
.ad-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015)), var(--panel);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    backdrop-filter: blur(24px);
}

.hero-glass {
    border-radius: 1.6rem;
    padding: 1.8rem;
}

.hero-glass-layout {
    display: grid;
    grid-template-columns: minmax(7rem, 8.5rem) minmax(0, 1fr);
    gap: 1.1rem;
    align-items: start;
}

.hero-glass-copy {
    display: grid;
    gap: 0.8rem;
}

.feature-poster-mini-shell {
    position: relative;
    overflow: hidden;
    min-height: 12.5rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.feature-poster-mini,
.feature-poster-mini-fallback {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.feature-poster-mini {
    object-fit: cover;
}

.feature-poster-mini-fallback {
    display: grid;
    place-items: center;
    font-family: "Lexend", sans-serif;
    font-size: 2rem;
    background:
        radial-gradient(circle at 50% 24%, rgba(139, 92, 246, 0.45), transparent 10rem),
        linear-gradient(180deg, rgba(32, 22, 57, 0.95), rgba(8, 8, 12, 1));
}

.feature-kicker,
.section-kicker,
.search span,
.sort span,
.eyebrow,
.highlight-label,
.stat .label {
    margin: 0;
    color: #d6c9ff;
    font-size: 0.76rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero h1,
.catalog-head h2,
.details-copy h2,
.player-head h2,
.title {
    margin: 0;
    font-family: "Lexend", sans-serif;
}

.hero h1 {
    margin-top: 0.7rem;
    font-size: clamp(2.9rem, 6vw, 5.5rem);
    line-height: 0.94;
}

.feature-meta,
.feature-summary,
.meta,
.summary,
.meta-text,
.catalog-count,
.toolbar-user,
.empty-state p,
.details-summary {
    color: var(--muted);
    line-height: 1.6;
}

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

.feature-highlights {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin: 1.1rem 0 0.4rem;
}

.highlight-card,
.stat {
    min-width: 8.5rem;
    padding: 0.85rem 1rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.highlight-card strong,
.stat strong {
    display: block;
    margin-top: 0.4rem;
    color: var(--text);
    font-family: "Lexend", sans-serif;
    font-size: 1.45rem;
}

.genre-row,
.feature-actions,
.toolbar-auth,
.rating-actions,
.player-actions,
.filters,
.episode-list {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
    align-items: center;
}

.genre-pill,
.pill,
.filter-chip,
.episode-chip {
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
}

.genre-pill,
.pill {
    padding: 0.36rem 0.68rem;
    font-size: 0.76rem;
}

.source-badge {
    padding: 0.36rem 0.68rem;
    border-radius: 999px;
    font-size: 0.76rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.source-badge.is-enabled {
    border-color: rgba(139, 92, 246, 0.45);
    color: #e4dbff;
}

.source-badge.is-disabled {
    color: var(--muted);
}

.request-status-badge.is-new {
    border-color: rgba(34, 211, 238, 0.45);
    color: #a5f3fc;
}

.request-status-badge.is-approved {
    border-color: rgba(134, 239, 172, 0.45);
    color: #bbf7d0;
}

.request-status-badge.is-filled {
    border-color: rgba(139, 92, 246, 0.45);
    color: #e4dbff;
}

.request-status-badge.is-declined {
    color: var(--muted);
}

.hero-link,
.ghost-link,
.ghost-button,
.more-button,
.thumb-button,
.cast-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font: inherit;
    text-decoration: none;
    cursor: pointer;
}

.hero-link {
    padding: 0.9rem 1.2rem;
    border: 1px solid rgba(139, 92, 246, 0.55);
    background: linear-gradient(135deg, #a78bfa, var(--accent));
    color: white;
    font-weight: 700;
    box-shadow: 0 0 24px rgba(139, 92, 246, 0.28);
}

.hero-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 34px rgba(139, 92, 246, 0.38);
}

.ghost-link,
.ghost-button,
.more-button,
.thumb-button,
.cast-button,
.sort select,
.search input,
.episode-chip {
    padding: 0.85rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.09);
    background: rgba(0, 0, 0, 0.42);
    color: var(--text);
}

.ghost-link:hover,
.ghost-button:hover,
.more-button:hover,
.thumb-button:hover,
.cast-button:hover,
.episode-chip:hover,
.filter-chip:hover {
    transform: translateY(-1px);
    border-color: rgba(139, 92, 246, 0.38);
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
    border-radius: 1.4rem;
    padding: 1rem;
    align-self: end;
}

main {
    padding: 0 0 4rem;
}

.controls {
    position: sticky;
    top: 1rem;
    z-index: 5;
    display: grid;
    gap: 0.9rem;
    margin-top: -2.8rem;
    padding: 1rem;
    border-radius: 1.35rem;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(28px);
}

.toolbar-main,
.toolbar-sub,
.catalog-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1rem;
    flex-wrap: wrap;
}

.search {
    flex: 1 1 24rem;
    display: grid;
    gap: 0.4rem;
}

.sort {
    display: grid;
    gap: 0.4rem;
}

.search input,
.sort select {
    width: 100%;
    border-radius: 999px;
    font: inherit;
}

.search input::placeholder {
    color: #85889a;
}

.search input:focus,
.sort select:focus {
    border-color: rgba(139, 92, 246, 0.7);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15), 0 0 24px rgba(139, 92, 246, 0.18);
}

.filters {
    gap: 0.55rem;
}

.filter-chip {
    padding: 0.78rem 1rem;
    font: inherit;
    cursor: pointer;
}

.filter-chip.is-active {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.26), rgba(139, 92, 246, 0.16));
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.18);
}

.ad-banner-slot,
.catalog-shell {
    margin-top: 1.25rem;
}

.catalog-shell {
    padding: 1.35rem;
    border-radius: 1.5rem;
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.15rem;
}

.ribbon-row {
    display: grid;
    gap: 0.65rem;
    margin-top: 1.1rem;
    content-visibility: auto;
    contain-intrinsic-size: 26rem;
}

.ribbon-label {
    margin: 0;
    font-family: "Lexend", sans-serif;
    font-size: 1rem;
    color: #f7f7fb;
}

.ribbon-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(10.75rem, 12rem);
    gap: 1rem;
    min-height: 25rem;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding: 0.15rem 0.15rem 0.8rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(139, 92, 246, 0.55) rgba(255, 255, 255, 0.06);
}

.ribbon-track .card {
    scroll-snap-align: start;
}

.ribbon-track.is-deferred {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.025), transparent 44%);
    border-radius: 0.75rem;
}

#catalog-grid {
    display: grid;
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.15rem;
    min-height: 0;
    overflow: visible;
    padding: 0;
}

.card {
    position: relative;
    overflow: hidden;
    min-height: 25rem;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(22, 22, 28, 0.72), rgba(7, 7, 10, 0.92));
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
    transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.card:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.3);
    filter: brightness(1.05);
}

.poster-shell,
.poster,
.poster-fallback,
.poster-shimmer {
    position: absolute;
    inset: 0;
}

.poster-shell {
    overflow: hidden;
    background: linear-gradient(180deg, rgba(24, 24, 30, 0.9), rgba(8, 8, 12, 1));
}

.poster-shell::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 58%;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.94));
    pointer-events: none;
}

.poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 220ms ease;
}

.card.is-loaded .poster {
    opacity: 1;
}

.poster-shimmer {
    background: linear-gradient(90deg, rgba(25, 25, 32, 0.95) 0%, rgba(46, 46, 60, 0.95) 50%, rgba(25, 25, 32, 0.95) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s linear infinite;
}

.card.is-loaded .poster-shimmer,
.card.has-fallback .poster-shimmer {
    opacity: 0;
    pointer-events: none;
}

.poster-fallback {
    display: none;
    place-items: center;
    font-family: "Lexend", sans-serif;
    font-size: 2.4rem;
    background:
        radial-gradient(circle at 50% 24%, rgba(139, 92, 246, 0.45), transparent 12rem),
        linear-gradient(180deg, rgba(32, 22, 57, 0.95), rgba(8, 8, 12, 1));
}

.card.has-fallback .poster-fallback {
    display: grid;
}

.pill-row {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 1;
}

.card-body {
    position: absolute;
    inset: auto 0 0;
    z-index: 1;
    display: grid;
    gap: 0.7rem;
    padding: 8.6rem 0.95rem 0.95rem;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.78) 38%, rgba(0, 0, 0, 0.96) 100%);
}

.card-head {
    display: grid;
    gap: 0.3rem;
}

.title {
    font-size: 1.06rem;
    line-height: 1.2;
    color: #ffffff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.85);
}

.meta,
.summary {
    margin: 0;
    font-size: 0.9rem;
    color: #e8eaf3;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.summary {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-actions {
    display: flex;
    justify-content: space-between;
    gap: 0.65rem;
    align-items: center;
}

.thumb-button {
    width: 2.7rem;
    height: 2.7rem;
    padding: 0;
    opacity: 0.62;
}

.thumb-button.is-active {
    opacity: 1;
    border-color: rgba(139, 92, 246, 0.6);
    box-shadow: 0 0 18px rgba(139, 92, 246, 0.2);
}

.more-button {
    font-weight: 600;
}

.inline-ad-slot {
    grid-column: 1 / -1;
}

.ad-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.15rem;
    border-radius: 1.25rem;
}

.ad-copy h3,
.ad-copy p,
.ad-label,
.empty-state h2 {
    margin: 0;
}

.empty-state {
    padding: 3.5rem 1rem;
    text-align: center;
}

.player-modal,
.details-modal {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.player-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(28px);
}

.player-panel,
.details-panel {
    position: relative;
    z-index: 1;
    width: min(1180px, 100%);
    border-radius: 1.5rem;
    padding: 1.2rem;
}

.player-panel {
    max-height: calc(100vh - 2rem);
}

.player-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: start;
    margin-bottom: 1rem;
}

.player-head h2 {
    font-size: clamp(1.7rem, 4vw, 2.4rem);
}

#player-video {
    width: 100%;
    max-height: 70vh;
    border-radius: 1rem;
    background: black;
}

.details-panel {
    display: grid;
    grid-template-columns: minmax(14rem, 20rem) minmax(0, 1fr);
    gap: 1.2rem;
}

.details-poster-shell {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    min-height: 28rem;
    background: rgba(255, 255, 255, 0.05);
}

.details-poster,
.details-fallback {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.details-poster {
    object-fit: cover;
}

.details-fallback {
    display: grid;
    place-items: center;
    font-family: "Lexend", sans-serif;
    font-size: 2.4rem;
    background:
        radial-gradient(circle at 50% 24%, rgba(139, 92, 246, 0.45), transparent 12rem),
        linear-gradient(180deg, rgba(32, 22, 57, 0.95), rgba(8, 8, 12, 1));
}

.details-copy {
    display: grid;
    align-content: start;
    gap: 0.9rem;
}

.cast-button {
    display: none;
}

.cast-button.is-available {
    display: inline-flex;
}

.auth-shell,
.admin-shell {
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 2rem 0;
}

.auth-hero-bg,
.auth-hero-img,
.auth-hero-overlay,
.bg-nebula,
.bg-orb {
    position: fixed;
    inset: 0;
    pointer-events: none;
}

.auth-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.auth-hero-overlay {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.88));
}

.bg-nebula {
    background: radial-gradient(circle at 20% 20%, rgba(139, 92, 246, 0.08), transparent 18rem);
    filter: blur(30px);
}

.bg-orb {
    inset: auto;
    width: 18rem;
    height: 18rem;
    border-radius: 50%;
    opacity: 0.2;
    filter: blur(90px);
    background: rgba(139, 92, 246, 0.45);
}

.orb-1 {
    top: 6rem;
    left: -4rem;
}

.orb-2 {
    right: -4rem;
    top: 14rem;
}

.auth-panel,
.admin-hero,
.admin-panel,
.status-strip {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015)), var(--panel);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    backdrop-filter: blur(24px);
    border-radius: 1.4rem;
}

.auth-panel {
    width: min(34rem, 100%);
    padding: 1.5rem;
}

.auth-head,
.provider-list,
.admin-grid,
.metric-grid,
.source-list,
.auth-form {
    display: grid;
    gap: 1rem;
}

.auth-form label {
    display: grid;
    gap: 0.45rem;
    color: var(--muted);
}

.auth-form input {
    width: 100%;
    border-radius: 0.95rem;
}

.primary-button,
.provider-button,
.tab-link,
#admin-rescan-button,
.source-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(139, 92, 246, 0.45);
    background: linear-gradient(135deg, #a78bfa, var(--accent));
    color: white;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.tab-link,
.source-toggle.is-off {
    background: rgba(0, 0, 0, 0.42);
    border-color: rgba(255, 255, 255, 0.09);
    color: var(--text);
    font-weight: 600;
}

.auth-toggle,
.admin-actions {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.divider {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--muted);
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
}

.admin-shell {
    display: grid;
    gap: 1rem;
    padding: 2rem 0 3rem;
}

.admin-hero,
.status-strip,
.admin-panel {
    padding: 1.25rem;
}

.admin-grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(18rem, 0.8fr);
}

.request-admin-panel {
    grid-column: 1 / -1;
}

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

.source-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.source-head {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 1rem;
}

.request-list {
    display: grid;
    gap: 1rem;
}

.request-card {
    align-items: stretch;
}

.request-card-body {
    display: grid;
    gap: 0.7rem;
    min-width: 0;
}

.request-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.request-actions button {
    min-height: 2.3rem;
    padding-inline: 0.8rem;
    text-transform: capitalize;
}

.path-text,
.status-copy {
    color: var(--muted);
}

.hidden {
    display: none !important;
}

@keyframes shimmer {
    from {
        background-position: 200% 0;
    }
    to {
        background-position: -200% 0;
    }
}

@media (max-width: 960px) {
    .hero-content,
    .details-panel,
    .admin-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: 42rem;
    }

    .hero-stats {
        max-width: 32rem;
    }

    .controls {
        top: 0.5rem;
        margin-top: -1.6rem;
    }
}

@media (max-width: 720px) {
    .hero-content,
    main {
        width: min(100%, calc(100% - 1rem));
    }

    .hero-content {
        padding: 3rem 0 2rem;
    }

    .hero-glass-layout {
        grid-template-columns: 1fr;
    }

    .feature-poster-mini-shell {
        max-width: 9rem;
        min-height: 13rem;
    }

    .hero-glass,
    .hero-stats,
    .controls,
    .catalog-shell,
    .player-panel,
    .details-panel {
        border-radius: 1.1rem;
    }

    .catalog-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.9rem;
    }

    .ribbon-track {
        grid-auto-columns: minmax(9.25rem, 10.25rem);
        min-height: 22rem;
        gap: 0.8rem;
    }

    #catalog-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.9rem;
    }

    .card {
        min-height: 22rem;
    }

    .card-body {
        padding-top: 7rem;
    }

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

    .player-head,
    .toolbar-main,
    .toolbar-sub,
    .catalog-head {
        align-items: stretch;
    }
}

/* --- Upload + featured-strip (added 2026-06-12) --------------------------- */

.nav-upload {
    background: linear-gradient(135deg, var(--accent), #6d28d9);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 0.5rem 1rem;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.nav-upload:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.5);
}

.nav-request {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.5rem 1rem;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.nav-request:hover {
    background: rgba(255, 255, 255, 0.13);
    border-color: var(--line-strong);
}

.feature-strip {
    display: flex;
    gap: 0.6rem;
    margin: 0.9rem 0 0.2rem;
    flex-wrap: wrap;
}

.feature-strip-thumb {
    width: 132px;
    height: 74px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--line);
    cursor: pointer;
    opacity: 0.78;
    transition: opacity 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.feature-strip-thumb:hover {
    opacity: 1;
    transform: translateY(-2px);
    border-color: var(--line-strong);
}

.request-modal,
.upload-modal {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.request-modal.hidden,
.upload-modal.hidden {
    display: none;
}

.request-panel,
.upload-panel {
    position: relative;
    z-index: 2;
    width: min(560px, 100%);
    background: var(--panel-strong);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 1.6rem;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.request-form {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 1rem;
    margin-top: 1rem;
}

.request-field {
    display: grid;
    gap: 0.4rem;
    color: var(--muted);
    font-size: 0.88rem;
}

.request-field-full,
.request-status,
.request-form .player-actions {
    grid-column: 1 / -1;
}

.request-field input,
.request-field select,
.request-field textarea {
    width: 100%;
    border-radius: 0.9rem;
    font: inherit;
}

.request-field textarea {
    resize: vertical;
    min-height: 6.5rem;
}

.request-status {
    min-height: 1.5rem;
    margin: 0;
    color: var(--muted);
}

.request-status.is-success {
    color: #86efac;
}

.request-status.is-error {
    color: #fca5a5;
}

.upload-drop {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 120px;
    margin: 1rem 0;
    padding: 1rem;
    border: 2px dashed var(--line-strong);
    border-radius: 14px;
    color: var(--muted);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.upload-drop:hover,
.upload-drop.is-dragover {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--text);
}

.upload-override {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
}

.upload-override.hidden {
    display: none;
}

.upload-progress {
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
    margin-bottom: 0.7rem;
}

.upload-progress.hidden {
    display: none;
}

.upload-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), #22d3ee);
    transition: width 0.2s ease;
}

.upload-status {
    min-height: 1.2rem;
    margin: 0 0 0.8rem;
    font-size: 0.92rem;
    color: var(--muted);
}

.upload-status.is-success {
    color: #4ade80;
}

.upload-status.is-error {
    color: #f87171;
}

/* Fire TV cast button — always shown (unlike the Google Cast button) */
.sendtv-button {
    display: inline-flex;
    position: relative;
    gap: 0.4rem;
    font-weight: 600;
}

.sendtv-button::before {
    content: "";
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 2px;
    background: #ff9900; /* Fire TV orange */
}

.sendtv-button[data-state="busy"] {
    opacity: 0.7;
    cursor: progress;
}

.sendtv-button[data-state="ok"] {
    border-color: rgba(52, 211, 153, 0.5);
    color: #34d399;
}

.sendtv-button[data-state="error"] {
    border-color: rgba(248, 113, 113, 0.5);
    color: #f87171;
}
