/* ============================================================
   CanToothFlixter — Premium Dark Editorial Platform
   Fonts: Syne (display) + DM Sans (body)
   ============================================================ */

:root {
    --accent: #e8334a;
    --accent-dim: rgba(232, 51, 74, 0.12);
    --accent-glow: rgba(232, 51, 74, 0.35);
    --blue: #3b82f6;
    --gold: #f59e0b;
    --orange: #fb923c;
    --bg-base: #0a0a0c;
    --bg-surface: #111114;
    --bg-elevated: #1a1a1f;
    --bg-hover: #222228;
    --border: rgba(255, 255, 255, 0.06);
    --border-light: rgba(255, 255, 255, 0.1);
    --text-primary: #eeeef2;
    --text-secondary: #8b8b99;
    --text-muted: #4a4a56;
    --sidebar-w: 248px;
    --topbar-h: 60px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-modal: 0 24px 80px rgba(0, 0, 0, 0.85);
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', -apple-system, sans-serif;
    background: var(--bg-base);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
}

/* ── Top Accent Line ─────────────────────────────────────── */
.top-accent-line {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #e8334a, #f59e0b, #3b82f6, #a855f7, #e8334a);
    background-size: 300% 100%;
    animation: accentShift 6s linear infinite;
    z-index: 9999;
}

@keyframes accentShift {
    0% {
        background-position: 0% 0;
    }

    100% {
        background-position: 300% 0;
    }
}

/* ── Ambient Background ──────────────────────────────────── */
.ambient-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(232, 51, 74, 0.15), transparent 70%);
    top: -10%;
    left: -5%;
    animation: orbFloat1 25s ease-in-out infinite alternate;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1), transparent 70%);
    bottom: -10%;
    right: -5%;
    animation: orbFloat2 30s ease-in-out infinite alternate;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.08), transparent 70%);
    top: 40%;
    left: 50%;
    animation: orbFloat3 20s ease-in-out infinite alternate;
}

@keyframes orbFloat1 {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(80px, 60px);
    }
}

@keyframes orbFloat2 {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(-60px, -80px);
    }
}

@keyframes orbFloat3 {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(-40px, 50px);
    }
}

/* ── Topbar ──────────────────────────────────────────────── */
.topbar {
    position: fixed;
    top: 2px;
    left: 0;
    right: 0;
    height: var(--topbar-h);
    background: rgba(10, 10, 12, 0.88);
    backdrop-filter: blur(28px) saturate(1.5);
    -webkit-backdrop-filter: blur(28px) saturate(1.5);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.25rem;
    gap: 1rem;
    z-index: 900;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-shrink: 0;
}

.topbar-center {
    flex: 1;
    max-width: 560px;
    margin: 0 auto;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.4rem 0.55rem;
    border-radius: var(--radius-sm);
    transition: color 0.2s, background 0.2s;
}

.sidebar-toggle:hover {
    color: var(--text-primary);
    background: var(--bg-elevated);
}

.logo {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    white-space: nowrap;
}

.logo-icon {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, #e8334a 0%, #c92a3e 100%);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: #fff;
    box-shadow: 0 0 20px var(--accent-glow), 0 2px 8px rgba(0, 0, 0, 0.4);
}

.logo-text {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.logo-text em {
    color: var(--accent);
    font-style: normal;
}

/* Search */
.search-bar {
    display: flex;
    align-items: center;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 0 0.5rem 0 1rem;
    gap: 0.5rem;
    transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}

.search-bar:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim), 0 4px 20px rgba(0, 0, 0, 0.3);
    background: var(--bg-hover);
}

.search-bar>i {
    color: var(--text-muted);
    font-size: 0.85rem;
    flex-shrink: 0;
}

.search-bar input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    padding: 0.55rem 0;
}

.search-bar input::placeholder {
    color: var(--text-muted);
}

.search-bar button {
    background: var(--accent);
    border: none;
    border-radius: 50px;
    width: 32px;
    height: 32px;
    color: #fff;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.search-bar button:hover {
    background: #d63047;
    transform: scale(1.08);
    box-shadow: 0 2px 12px var(--accent-glow);
}

.age-pill {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    color: var(--accent);
    border: 1px solid rgba(232, 51, 74, 0.5);
    padding: 0.25rem 0.7rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--accent-dim);
}

/* ── App Shell ───────────────────────────────────────────── */
.app-shell {
    display: flex;
    padding-top: calc(var(--topbar-h) + 2px);
    min-height: 100vh;
}

/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar {
    position: fixed;
    top: calc(var(--topbar-h) + 2px);
    left: 0;
    bottom: 0;
    width: var(--sidebar-w);
    background: rgba(17, 17, 20, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 800;
    transition: transform 0.35s cubic-bezier(.4, 0, .2, 1);
    scrollbar-width: none;
}

.sidebar::-webkit-scrollbar {
    display: none;
}

.sidebar.collapsed {
    transform: translateX(calc(-1 * var(--sidebar-w)));
}

.sidebar-nav {
    padding: 0.75rem 0 2rem;
}

.nav-section-label {
    padding: 1.1rem 1.2rem 0.35rem;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.nav-group {
    padding: 0 0.55rem;
}

.nav-item {
    width: 100%;
    background: none;
    border: none;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.58rem 0.7rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.84rem;
    font-weight: 500;
    transition: all 0.18s ease;
    position: relative;
    text-align: left;
    margin-bottom: 1px;
}

.nav-item i {
    width: 18px;
    text-align: center;
    font-size: 0.85rem;
    flex-shrink: 0;
    transition: color 0.18s;
}

.nav-item span {
    flex: 1;
}

.nav-item .nav-dot {
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.2s;
}

.nav-item:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.nav-item.active {
    color: var(--text-primary);
    background: var(--accent-dim);
}

.nav-item.active i {
    color: var(--accent);
}

.nav-item.active .nav-dot {
    opacity: 1;
}

/* Genre items compact */
.nav-genres .nav-item {
    padding: 0.48rem 0.7rem;
    font-size: 0.8rem;
}

.sidebar-legal {
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-legal a {
    display: block;
    padding: 0.4rem 0.7rem;
    color: var(--text-muted);
    font-size: 0.76rem;
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: color 0.2s;
}

.sidebar-legal a:hover {
    color: var(--text-secondary);
}

/* Mobile sidebar overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 799;
    backdrop-filter: blur(4px);
}

.sidebar-overlay.show {
    display: block;
}

/* ── Main Content ────────────────────────────────────────── */
.main-content {
    margin-left: var(--sidebar-w);
    flex: 1;
    padding: 1.75rem 2rem 4rem;
    transition: margin-left 0.35s cubic-bezier(.4, 0, .2, 1);
    min-width: 0;
}

.main-content.expanded {
    margin-left: 0;
}

.content-section {
    display: none;
    animation: fadeUp 0.45s ease;
}

.content-section.active {
    display: block;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Section Hero */
.section-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}

.section-hero-text {
    flex: 1;
}

.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.4rem;
}

.section-hero h1 {
    font-family: 'Syne', sans-serif;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    line-height: 1.15;
    background: linear-gradient(135deg, var(--text-primary) 0%, rgba(240, 240, 244, 0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-hero p {
    color: var(--text-secondary);
    font-size: 0.88rem;
    margin-top: 0.3rem;
}

.section-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ── Category Chips Bar ──────────────────────────────────── */
.chips-bar {
    display: flex;
    gap: 0.4rem;
    overflow-x: auto;
    padding: 0.75rem 0 1.25rem;
    margin: 0 -0.5rem;
    padding-left: 0.5rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.chips-bar::-webkit-scrollbar {
    display: none;
}

.chip {
    flex-shrink: 0;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    padding: 0.38rem 0.8rem;
    border-radius: 50px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.chip::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--accent), transparent);
    opacity: 0;
    transition: opacity 0.25s;
}

.chip:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border-light);
    transform: translateY(-1px);
}

.chip.active {
    background: var(--accent-dim);
    color: var(--accent);
    border-color: rgba(232, 51, 74, 0.4);
    box-shadow: 0 0 16px rgba(232, 51, 74, 0.12);
}

.chip.active::before {
    opacity: 0.06;
}

/* ── Featured Spotlight ──────────────────────────────────── */
.featured-spotlight {
    margin-bottom: 1.75rem;
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    aspect-ratio: 21 / 8;
    cursor: pointer;
    border: 1px solid var(--border);
    transition: border-color 0.3s, box-shadow 0.3s;
    animation: spotlightIn 0.6s 0.15s ease both;
}

@keyframes spotlightIn {
    from {
        opacity: 0;
        transform: scale(0.98);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.featured-spotlight:hover {
    border-color: rgba(232, 51, 74, 0.4);
    box-shadow: 0 0 60px rgba(232, 51, 74, 0.12), var(--shadow-card);
}

.featured-inner {
    position: relative;
    width: 100%;
    height: 100%;
}

.featured-thumb {
    position: absolute;
    inset: 0;
}

.featured-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 6s ease;
}

.featured-spotlight:hover .featured-thumb img {
    transform: scale(1.04);
}

.featured-gradient {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to right, rgba(10, 10, 12, 0.97) 0%, rgba(10, 10, 12, 0.8) 35%, rgba(10, 10, 12, 0.2) 65%, transparent 80%),
        linear-gradient(to top, rgba(10, 10, 12, 0.9) 0%, transparent 40%);
}

.featured-light-sweep {
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.03) 45%, transparent 50%);
    transition: none;
}

.featured-spotlight:hover .featured-light-sweep {
    animation: sweep 1.5s ease-in-out;
}

@keyframes sweep {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(200%);
    }
}

.featured-content {
    position: absolute;
    bottom: 0;
    left: 0;
    padding: 2.5rem;
    max-width: 480px;
    z-index: 2;
}

.featured-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: linear-gradient(135deg, #e8334a, #c92a3e);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.3rem 0.75rem;
    border-radius: 50px;
    margin-bottom: 0.75rem;
    box-shadow: 0 2px 12px rgba(232, 51, 74, 0.4);
}

.featured-title {
    font-family: 'Syne', sans-serif;
    font-size: clamp(1.1rem, 2.5vw, 1.6rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.featured-meta {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 1.25rem;
    display: flex;
    gap: 1rem;
}

.featured-play-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
    font-family: 'Syne', sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    padding: 0.65rem 1.4rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.featured-play-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 4px 24px var(--accent-glow);
    transform: translateX(4px);
}

.featured-play-btn i {
    font-size: 0.75rem;
}

/* ── Video Grid ──────────────────────────────────────────── */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.15rem;
}

/* Skeleton */
.skeleton-grid {
    display: contents;
}

.skeleton-card {
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    aspect-ratio: 16/10;
    position: relative;
    overflow: hidden;
}

.skeleton-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.04) 50%, transparent 100%);
    animation: skeletonWave 1.8s ease-in-out infinite;
}

@keyframes skeletonWave {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* Video Card */
.video-card {
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--border);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
    animation: cardFadeIn 0.45s ease both;
    will-change: transform;
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.video-card:hover {
    box-shadow: var(--shadow-card), 0 0 0 1px var(--border-light);
    border-color: var(--border-light);
    z-index: 2;
}

.video-card:hover .card-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.video-card:hover .thumb img {
    transform: scale(1.08);
}

.video-card:hover .thumb .card-light {
    animation: cardSweep 0.8s ease;
}

.thumb {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--bg-elevated);
}

.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(.25, .46, .45, .94);
    display: block;
}

/* Light sweep on hover */
.card-light {
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.06) 45%, transparent 50%);
    pointer-events: none;
}

@keyframes cardSweep {
    0% {
        transform: translateX(-150%);
    }

    100% {
        transform: translateX(250%);
    }
}

/* Play overlay */
.card-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 46px;
    height: 46px;
    background: rgba(232, 51, 74, 0.92);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.85rem;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s cubic-bezier(.34, 1.56, .64, 1);
    pointer-events: none;
    padding-left: 3px;
    box-shadow: 0 4px 20px rgba(232, 51, 74, 0.5);
    backdrop-filter: blur(8px);
}

.card-badge {
    position: absolute;
    bottom: 0.4rem;
    right: 0.4rem;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(8px);
    color: var(--text-primary);
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    letter-spacing: 0.02em;
}

.card-badge.hd {
    background: linear-gradient(135deg, var(--blue), #2563eb);
    color: #fff;
    left: 0.4rem;
    right: auto;
    font-size: 0.6rem;
    letter-spacing: 0.06em;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

.card-body {
    padding: 0.8rem 0.85rem 0.85rem;
}

.card-title {
    font-size: 0.83rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.45rem;
    transition: color 0.2s;
}

.video-card:hover .card-title {
    color: #fff;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.card-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.card-meta .rating {
    color: var(--gold);
}

.card-meta .views {
    color: var(--text-muted);
}

/* ── Pagination ──────────────────────────────────────────── */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 2.5rem;
    padding: 1rem 0 0.5rem;
    animation: fadeUp 0.35s ease;
}

.pagination-info {
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 0.25rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.page-btn {
    min-width: 36px;
    height: 36px;
    border: none;
    background: none;
    color: var(--text-secondary);
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    font-family: 'DM Sans', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0 0.25rem;
}

.page-btn:hover:not(:disabled):not(.active) {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.page-btn.active {
    background: linear-gradient(135deg, #e8334a, #c92a3e);
    color: #fff;
    box-shadow: 0 2px 14px var(--accent-glow);
}

.page-btn:disabled {
    opacity: 0.25;
    cursor: not-allowed;
}

.page-btn.arrow {
    font-size: 0.75rem;
    padding: 0;
    width: 36px;
}

.page-ellipsis {
    color: var(--text-muted);
    font-size: 0.82rem;
    padding: 0 0.35rem;
    user-select: none;
}

/* ── Watch Modal ─────────────────────────────────────────── */
.watch-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
}

.watch-modal.open {
    display: flex;
}

.watch-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(8px);
    cursor: pointer;
}

.watch-container {
    position: relative;
    display: flex;
    gap: 0;
    width: 100%;
    height: 100%;
    max-width: 1600px;
    margin: 0 auto;
    background: var(--bg-surface);
    animation: modalSlide 0.4s cubic-bezier(.4, 0, .2, 1);
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.watch-player-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--bg-elevated) transparent;
}

.player-wrap {
    position: relative;
    background: #000;
    aspect-ratio: 16/9;
    flex-shrink: 0;
}

#videoPlayer,
#videoPlayer iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.player-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 38px;
    height: 38px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    font-size: 0.9rem;
    z-index: 10;
    transition: background 0.2s, transform 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.player-close:hover {
    background: var(--accent);
    transform: rotate(90deg) scale(1.1);
    border-color: transparent;
}

.player-info {
    padding: 1.5rem;
    border-top: 1px solid var(--border);
    flex: 1;
}

.player-title-row {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.player-title-row h2 {
    flex: 1;
    font-family: 'Syne', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.3;
    color: var(--text-primary);
}

.player-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.action-btn {
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: 50px;
    color: var(--text-secondary);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    padding: 0.4rem 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s;
}

.action-btn:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
    border-color: var(--border-light);
    transform: translateY(-1px);
}

.action-btn.fav {
    padding: 0.4rem 0.75rem;
}

.action-btn.fav.liked {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-dim);
    animation: heartPop 0.35s ease;
}

@keyframes heartPop {
    0% {
        transform: scale(1);
    }

    40% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

.player-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.stat-label {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.stat-value {
    font-family: 'Syne', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-value.accent {
    color: var(--accent);
}

.stat-value.gold {
    color: var(--gold);
}

.rating-bar-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rating-bar {
    width: 80px;
    height: 4px;
    background: var(--bg-elevated);
    border-radius: 4px;
    overflow: hidden;
}

.rating-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold), var(--orange));
    border-radius: 4px;
    transition: width 0.8s cubic-bezier(.4, 0, .2, 1);
}

.player-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 1rem;
}

.player-tag {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.7rem;
    padding: 0.22rem 0.55rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.18s;
}

.player-tag:hover {
    background: var(--accent-dim);
    color: var(--accent);
    border-color: rgba(232, 51, 74, 0.3);
}

.player-description p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.65;
}

/* Related sidebar */
.watch-sidebar-col {
    width: 340px;
    flex-shrink: 0;
    border-left: 1px solid var(--border);
    background: var(--bg-base);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--bg-elevated) transparent;
}

.related-header {
    padding: 1rem 1.25rem;
    font-family: 'Syne', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--bg-base);
    z-index: 1;
}

.related-list {
    padding: 0.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.related-card {
    display: flex;
    gap: 0.7rem;
    padding: 0.55rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.15s;
    align-items: flex-start;
}

.related-card:hover {
    background: var(--bg-surface);
}

.related-thumb {
    width: 118px;
    aspect-ratio: 16/9;
    border-radius: 6px;
    overflow: hidden;
    background: var(--bg-elevated);
    flex-shrink: 0;
}

.related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.related-card:hover .related-thumb img {
    transform: scale(1.06);
}

.related-info {
    flex: 1;
    min-width: 0;
}

.related-title {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.25rem;
    transition: color 0.15s;
}

.related-card:hover .related-title {
    color: #fff;
}

.related-meta {
    font-size: 0.68rem;
    color: var(--text-muted);
    display: flex;
    gap: 0.5rem;
}

.skeleton-related {
    height: 70px;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    position: relative;
    overflow: hidden;
}

.skeleton-related::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.04) 50%, transparent 100%);
    animation: skeletonWave 1.8s ease-in-out infinite;
}

/* ── Scroll To Top ───────────────────────────────────────── */
.scroll-top-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px var(--accent-glow);
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.3s, transform 0.3s, box-shadow 0.2s;
    z-index: 500;
    pointer-events: none;
}

.scroll-top-btn.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.scroll-top-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 28px var(--accent-glow);
}

/* ── Empty State ─────────────────────────────────────────── */
.empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    gap: 0.75rem;
    color: var(--text-muted);
    text-align: center;
}

.empty-state i {
    font-size: 2.5rem;
    color: var(--bg-elevated);
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 0.9rem;
}

/* ── Grid Fade Transition ────────────────────────────────── */
.video-grid.fading {
    opacity: 0.3;
    transform: translateY(6px);
    transition: all 0.2s ease;
}

.video-grid:not(.fading) {
    transition: opacity 0.35s ease, transform 0.35s ease;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1200px) {
    .featured-spotlight {
        aspect-ratio: 16/7;
    }
}

@media (max-width: 1024px) {
    .watch-sidebar-col {
        width: 280px;
    }

    .featured-spotlight {
        aspect-ratio: 16/8;
    }
}

@media (max-width: 900px) {
    .watch-container {
        flex-direction: column;
    }

    .watch-sidebar-col {
        width: 100%;
        border-left: none;
        border-top: 1px solid var(--border);
        max-height: 280px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(calc(-1 * var(--sidebar-w)));
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0 !important;
        padding: 1.25rem 1rem 3rem;
    }

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

    .topbar-right {
        display: none;
    }

    .section-hero {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .featured-spotlight {
        aspect-ratio: 16/9;
    }

    .featured-content {
        padding: 1.5rem;
        max-width: 100%;
    }

    .featured-title {
        font-size: 1rem;
    }

    .featured-play-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    .pagination {
        flex-direction: column;
        gap: 0.75rem;
    }
}

@media (max-width: 520px) {

    /* FIX: keep search visible, hide logo text to make room */
    .logo-text {
        display: none;
    }

    .topbar-left {
        gap: 0.5rem;
    }

    .topbar-center {
        max-width: none;
    }

    .search-bar input {
        font-size: 0.84rem;
        padding: 0.5rem 0;
    }

    .search-bar {
        padding: 0 0.4rem 0 0.75rem;
    }

    .search-bar button {
        width: 30px;
        height: 30px;
        font-size: 0.72rem;
    }

    .video-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.65rem;
    }

    .card-body {
        padding: 0.6rem;
    }

    .card-title {
        font-size: 0.76rem;
    }

    .card-meta {
        font-size: 0.64rem;
        gap: 0.4rem;
    }

    .player-title-row {
        flex-direction: column;
    }

    .player-actions {
        align-self: flex-start;
    }

    .featured-spotlight {
        aspect-ratio: 16/10;
        border-radius: var(--radius-md);
    }

    .featured-content {
        padding: 1rem;
    }

    .featured-badge {
        font-size: 0.6rem;
    }

    .featured-title {
        font-size: 0.9rem;
        -webkit-line-clamp: 1;
    }

    .featured-meta {
        font-size: 0.7rem;
        gap: 0.5rem;
    }
}

/* ── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--bg-elevated);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--bg-hover);
}

/* ── Selection ───────────────────────────────────────────── */
::selection {
    background: var(--accent-dim);
    color: var(--accent);
}