/* =====================================================
   VIROWATCH 3a HOME UI  (rail + header + hero + grid)
   Loaded after the theme stylesheets — layout lives here,
   theme files keep styling the movie list + player modal.
   ===================================================== */

:root {
    --vw-bg: #121212;
    --vw-bg-rgb: 18, 18, 18;
    --vw-panel: #1a1a1a;
    --vw-panel-2: #0e0e0e;
    --vw-text: #eaeaea;
    --vw-text-strong: #ffffff;
    --vw-icon: rgba(255, 255, 255, 0.6);
    --vw-muted: rgba(255, 255, 255, 0.45);
    --vw-muted-2: rgba(255, 255, 255, 0.35);
    --vw-faint: rgba(255, 255, 255, 0.3);
    --vw-border: rgba(255, 255, 255, 0.08);
    --vw-border-strong: rgba(255, 255, 255, 0.15);
    --vw-hover: rgba(255, 255, 255, 0.1);
    --vw-hover-strong: rgba(255, 255, 255, 0.14);
    --vw-active-border: rgba(255, 255, 255, 0.2);
    --vw-chip-bg: rgba(255, 255, 255, 0.08);
    --vw-chip-border: rgba(255, 255, 255, 0.16);
    --vw-input-bg: rgba(255, 255, 255, 0.07);
    --vw-input-border: rgba(255, 255, 255, 0.1);
    --vw-input-border-focus: rgba(255, 255, 255, 0.3);
    --vw-accent-bg: #ffffff;
    --vw-accent-fg: #111111;
    --vw-glow: rgba(255, 255, 255, 0.18);
    --vw-glow-strong: rgba(255, 255, 255, 0.3);
    --rail-w: 68px;
    --rail-w-open: 216px;
    --vw-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Light themes (desktop-light / mobile-light / custom *light* css) */
html[data-vw-theme*="light"] {
    --vw-bg: #f5f5f5;
    --vw-bg-rgb: 245, 245, 245;
    --vw-panel: #ffffff;
    --vw-panel-2: #ececec;
    --vw-text: #1a1a1a;
    --vw-text-strong: #000000;
    --vw-icon: rgba(0, 0, 0, 0.55);
    --vw-muted: rgba(0, 0, 0, 0.45);
    --vw-muted-2: rgba(0, 0, 0, 0.4);
    --vw-faint: rgba(0, 0, 0, 0.3);
    --vw-border: rgba(0, 0, 0, 0.09);
    --vw-border-strong: rgba(0, 0, 0, 0.18);
    --vw-hover: rgba(0, 0, 0, 0.07);
    --vw-hover-strong: rgba(0, 0, 0, 0.1);
    --vw-active-border: rgba(0, 0, 0, 0.22);
    --vw-chip-bg: rgba(0, 0, 0, 0.06);
    --vw-chip-border: rgba(0, 0, 0, 0.16);
    --vw-input-bg: rgba(0, 0, 0, 0.05);
    --vw-input-border: rgba(0, 0, 0, 0.12);
    --vw-input-border-focus: rgba(0, 0, 0, 0.35);
    --vw-accent-bg: #161616;
    --vw-accent-fg: #ffffff;
    --vw-glow: rgba(0, 0, 0, 0.14);
    --vw-glow-strong: rgba(0, 0, 0, 0.24);
}

/* ── Page frame ──────────────────────────────────────── */
body {
    display: flex;
    min-height: 100vh;
}
.main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    /* Rail is fixed/overlaid (not a flex sibling), so this reserves its
       collapsed width instead — expanding the rail on hover then overlays
       content rather than reflowing/pushing it (was causing motion
       sickness for a user when the whole page shifted on every hover). */
    margin-left: var(--rail-w);
}

/* ── Slim rail (hover to expand) ─────────────────────── */
.rail {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: var(--rail-w);
    transition: width 0.32s var(--vw-ease);
    flex-shrink: 0;
    background: var(--vw-panel-2);
    border-right: 1px solid var(--vw-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 12px;
    gap: 6px;
    overflow: hidden;
    z-index: 50;
}
.rail:hover {
    width: var(--rail-w-open);
}
.rail-brand {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    margin-bottom: 14px;
    padding: 0 4px;
    cursor: pointer;
}
.rail-brand img {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}
.rail-brand .rail-label {
    position: absolute;
    left: 52px;
    font-weight: 300;
    font-size: 20px;
    color: var(--vw-text-strong);
    white-space: nowrap;
}
.rail-label {
    opacity: 0;
    transition: opacity 0.22s ease 0.06s;
    pointer-events: none;
    white-space: nowrap;
}
.rail:hover .rail-label {
    opacity: 1;
}
.rail-item {
    position: relative;
    width: 44px;
    height: 44px;
    min-height: 44px;
    border-radius: 12px;
    transition:
        width 0.32s var(--vw-ease),
        background 0.18s ease,
        color 0.18s ease;
    display: flex;
    align-items: center;
    padding: 0 14px;
    color: var(--vw-icon);
    border: 1px solid transparent;
    cursor: pointer;
    background: transparent;
    font-size: inherit;
}
.rail:hover .rail-item {
    width: 100%;
}
.rail-item:hover {
    background: var(--vw-hover);
    color: var(--vw-text-strong);
}
.rail-item.active {
    background: var(--vw-hover-strong);
    color: var(--vw-text-strong);
    border-color: var(--vw-active-border);
}
.rail-item .icon {
    font-size: 16px;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
    white-space: nowrap;
}
.rail-item .rail-label {
    position: absolute;
    left: 41px;
    font-size: 13.5px;
    font-weight: 300;
}
.rail-spacer {
    flex: 1;
}

/* continue watching inside the rail */
.rail-cw {
    width: 100%;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--vw-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.rail-cw-head {
    position: relative;
    width: 100%;
    height: 15px;
    margin-bottom: 2px;
}
.rail-cw-head .rail-label {
    position: absolute;
    left: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--vw-muted-2);
}
.rail-cw-head .collapsed-icon {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    color: var(--vw-faint);
    transition: opacity 0.18s ease;
}
.rail:hover .rail-cw-head .collapsed-icon {
    opacity: 0;
}
.rail-cw-items {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    /* User can raise the count in Settings — scroll instead of pushing
       the AniList/Settings buttons off-screen on short windows */
    max-height: calc(100vh - 440px);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
}
.rail-cw-items::-webkit-scrollbar {
    display: none;
}
.cw-item {
    position: relative;
    width: 44px;
    height: 48px;
    border-radius: 12px;
    transition:
        width 0.32s var(--vw-ease),
        background 0.18s ease;
    display: flex;
    align-items: center;
    padding: 0 4px;
    cursor: pointer;
    background: transparent;
    border: none;
    /* buttons default to text-align:center — keeps title/meta left-flush */
    text-align: left;
}
.rail:hover .cw-item {
    width: 100%;
}
.cw-item:hover {
    background: var(--vw-hover);
}
.cw-thumb {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    flex-shrink: 0;
    overflow: hidden;
    border: 1px solid var(--vw-border-strong);
    background: var(--vw-panel);
}
.cw-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cw-thumb i {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    display: block;
    z-index: 2;
    background: var(--vw-accent-bg);
    box-shadow: 0 0 6px var(--vw-glow-strong);
}
.cw-text {
    position: absolute;
    left: 50px;
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    opacity: 0;
    transition: opacity 0.22s ease 0.06s;
    pointer-events: none;
    max-width: calc(var(--rail-w-open) - 62px);
}
.rail:hover .cw-text {
    opacity: 1;
}
.cw-text .t {
    font-size: 12.5px;
    font-weight: 400;
    color: var(--vw-text-strong);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cw-text .m {
    font-size: 10.5px;
    font-weight: 300;
    color: var(--vw-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Sticky header (overrides theme `header` tag rules) ─ */
.main .header {
    position: sticky;
    top: 0;
    z-index: 45;
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 0;
    padding: 14px 32px;
    background: rgba(var(--vw-bg-rgb), 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--vw-border);
    text-align: left;
}
.header .brand {
    font-weight: 300;
    font-size: 28px;
    color: var(--vw-text-strong);
    cursor: pointer;
    transition: opacity 0.2s ease;
    white-space: nowrap;
    line-height: 1.2;
}
/* Hover-capable devices only, and only while the rail is a left sidebar:
   expanding it shows its own "Virowatch" label, so the header one fades
   to avoid the double. On touch (sticky :hover after tap) and at ≤560px
   (rail is a label-less bottom bar) nothing replaces the title — it would
   just vanish — so it stays put there. */
@media (hover: hover) and (pointer: fine) and (min-width: 561px) {
    body:has(.rail:hover) .header .brand {
        opacity: 0;
    }
}
.search-area {
    flex: 1;
    display: flex;
    justify-content: center;
}
.search-field {
    position: relative;
    width: 100%;
    max-width: 520px;
}
.search-field input {
    width: 100%;
    background: var(--vw-input-bg);
    border: 1px solid var(--vw-input-border);
    color: var(--vw-text-strong);
    padding: 11px 40px 11px 42px;
    border-radius: 99px;
    font-size: 14.5px;
    font-weight: 300;
    outline: none;
    transition:
        border-color 0.18s ease,
        background 0.18s ease;
}
.search-field input:focus {
    border-color: var(--vw-input-border-focus);
    background: var(--vw-hover);
}
.search-field input::placeholder {
    color: var(--vw-muted-2);
}
.search-field .glass {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--vw-muted-2);
    font-size: 15px;
    pointer-events: none;
}
.search-field .search-clear-btn {
    display: none; /* content.js switches to block while typing */
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--vw-faint);
    font-size: 18px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0 2px;
    line-height: 1;
}
.search-field .search-clear-btn:hover {
    color: var(--vw-text-strong);
}

/* ── Home container (#hero holds banner + newest + sports) */
#hero {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    margin-bottom: 0;
    width: auto;
    min-width: 0;
}

/* hero banner */
.hero {
    position: relative;
    height: 420px;
    overflow: hidden;
}
.hero-art {
    /* No blur: art renders sharp at 1:1 (the old -24px inset + 1.08 scale
       only existed to hide blur edge bleed) */
    position: absolute;
    inset: 0;
    background-color: var(--vw-panel);
    background-size: cover;
    background-position: center 25%;
}
.hero-art::before {
    content: "";
    position: absolute;
    inset: 0;
    background: inherit;
    filter: brightness(0.85) saturate(1.1);
}
html[data-vw-theme*="light"] .hero-art::before {
    filter: brightness(1.02) saturate(1.05);
}
.hero-scrim {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            to right,
            rgba(var(--vw-bg-rgb), 0.96) 0%,
            rgba(var(--vw-bg-rgb), 0.75) 34%,
            rgba(var(--vw-bg-rgb), 0.1) 70%
        ),
        linear-gradient(to top, rgb(var(--vw-bg-rgb)) 0%, transparent 40%);
}
.hero-content {
    position: relative;
    height: 100%;
    max-width: 600px;
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
    animation: vw-rise 0.6s var(--vw-ease) both;
}
.hero-kicker {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--vw-muted);
}
.hero-title {
    font-size: 50px;
    font-weight: 300;
    line-height: 1.05;
    color: var(--vw-text-strong);
    margin: 0;
}
.hero-tags {
    display: flex;
    gap: 8px;
}
.hero-tags .tag {
    padding: 4px 12px;
    border-radius: 99px;
    border: 1px solid var(--vw-chip-border);
    font-size: 12px;
    color: var(--vw-text);
}
.hero-actions {
    display: flex;
    gap: 12px;
    margin-top: 4px;
    flex-wrap: wrap;
}
.btn-primary {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 12px 26px;
    border-radius: 99px;
    background: var(--vw-accent-bg);
    color: var(--vw-accent-fg);
    border: none;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 0 24px var(--vw-glow);
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 34px var(--vw-glow-strong);
}
.btn-ghost {
    padding: 12px 22px;
    border-radius: 99px;
    background: var(--vw-chip-bg);
    color: var(--vw-text);
    border: 1px solid var(--vw-chip-border);
    font-size: 15px;
    font-weight: 300;
    cursor: pointer;
    transition:
        background 0.18s ease,
        border-color 0.18s ease;
}
.btn-ghost:hover {
    background: var(--vw-hover-strong);
    border-color: var(--vw-active-border);
}

/* ── Home sections ───────────────────────────────────── */
.home-section {
    padding: 24px 32px 0;
}
.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 14px;
}
.section-head h2 {
    font-size: 19px;
    font-weight: 500;
    color: var(--vw-text-strong);
    margin: 0;
}
.section-head .more {
    font-size: 12px;
    font-weight: 300;
    color: var(--vw-muted);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}
.section-head .more:hover {
    color: var(--vw-text-strong);
}

/* ── Newest-added poster row ────────────────────────── */
/* Single horizontally-scrollable row (desktop + mobile) */
.poster-grid {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 12px;
    padding-bottom: 8px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--vw-border-strong) transparent;
}
.poster-grid::-webkit-scrollbar {
    height: 5px;
}
.poster-grid::-webkit-scrollbar-thumb {
    background: var(--vw-border-strong);
    border-radius: 3px;
}
.poster-grid::-webkit-scrollbar-track {
    background: transparent;
}
.poster {
    position: relative;
    flex: 0 0 148px;
    width: 148px;
    scroll-snap-align: start;
    aspect-ratio: 2 / 3;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--vw-border);
    background: var(--vw-panel);
    cursor: pointer;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
    animation: vw-rise 0.5s var(--vw-ease) both;
}
.poster:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px var(--vw-glow);
    border-color: var(--vw-active-border);
}
.poster img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.poster .badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    font-size: 10.5px;
    font-weight: 500;
    color: #fff;
    z-index: 2;
}
/* Poster +/✓ watchlist button = the shared .vwl-add-btn from
   watchlist.js (same look as the movie grid); no local style. */
.poster .title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 22px 9px 8px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.92), transparent);
    font-size: 12px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    z-index: 1;
}

/* AniList avatar inside the rail button (anilist.js swaps it in) */
.rail-item .rail-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

/* ── Live sports strip (PitSport) ─────────────────────── */
.sports {
    margin: 22px 32px 24px;
    border-radius: 14px;
    background: var(--vw-panel);
    border: 1px solid var(--vw-border);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 18px;
    overflow-x: auto;
    scrollbar-width: thin;
}
.sports-head {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-shrink: 0;
    padding-right: 16px;
    border-right: 1px solid var(--vw-border-strong);
}
.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--vw-accent-bg);
    box-shadow: 0 0 10px var(--vw-glow-strong);
    animation: vw-pulse 2s ease infinite;
    flex-shrink: 0;
}
.sports-head b {
    font-size: 15px;
    font-weight: 500;
    color: var(--vw-text-strong);
    white-space: nowrap;
}
.sport {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}
.sport:hover {
    opacity: 0.8;
}
.sport .sbadge {
    padding: 2px 8px;
    border-radius: 5px;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    border: 1px solid var(--vw-chip-border);
    white-space: nowrap;
}
.sbadge.live {
    background: var(--vw-accent-bg);
    color: var(--vw-accent-fg);
    border-color: transparent;
}
.sbadge.soon {
    background: var(--vw-chip-bg);
    color: var(--vw-muted);
}
.sport .st {
    font-size: 13px;
    font-weight: 300;
    color: var(--vw-text);
    white-space: nowrap;
}
.sports .more {
    margin-left: auto;
    font-size: 12px;
    font-weight: 300;
    color: var(--vw-muted);
    flex-shrink: 0;
    cursor: pointer;
    white-space: nowrap;
}
.sports .more:hover {
    color: var(--vw-text-strong);
}

/* ── Airing soon strip (AniList, airing.js) ───────────── */
.sports.airing {
    overflow: hidden; /* the viewport scrolls, not the section */
}
.air-viewport {
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.air-viewport::-webkit-scrollbar {
    display: none;
}
/* Fade the edges only while the ticker loops */
.air-viewport.scrolling {
    -webkit-mask-image: linear-gradient(
        90deg,
        transparent,
        #000 24px,
        #000 calc(100% - 24px),
        transparent
    );
    mask-image: linear-gradient(
        90deg,
        transparent,
        #000 24px,
        #000 calc(100% - 24px),
        transparent
    );
}
.air-track {
    display: flex;
    align-items: center;
    gap: 26px;
    width: max-content;
}
.sbadge.new {
    background: var(--vw-accent-bg);
    color: var(--vw-accent-fg);
    border-color: transparent;
}
.sbadge.time {
    background: var(--vw-chip-bg);
    color: var(--vw-text-strong);
    border-color: var(--vw-border-strong);
    letter-spacing: 0.02em;
    font-variant-numeric: tabular-nums;
}
.air-track .ep {
    font-size: 11.5px;
    font-weight: 300;
    color: var(--vw-muted);
    white-space: nowrap;
}

/* ── Browse views inherit the main-column padding ────── */
#categoryNavBar {
    padding: 14px 32px 0;
}
.movie-list-wrapper {
    padding: 0 32px;
}
#anikoto-sep,
#anikoto-section {
    margin-left: 32px;
    margin-right: 32px;
}

/* ── Watchlist sort/group toolbar ─────────────────────── */
.wl-toolbar {
    display: none; /* shown only while the Watchlist view is open */
    justify-content: flex-end;
    position: relative;
    padding: 14px 32px 0;
}
.wl-sort-toggle {
    background: var(--vw-chip-bg);
    border: 1px solid var(--vw-chip-border);
    color: var(--vw-text);
    font-family: "Kanit", sans-serif;
    font-size: 0.82rem;
    padding: 8px 16px;
    border-radius: 99px;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease;
}
.wl-sort-toggle:hover {
    background: var(--vw-hover-strong);
    border-color: var(--vw-active-border);
}
.wl-sort-panel {
    position: absolute;
    top: calc(100% + 6px);
    right: 32px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 240px;
    padding: 16px;
    background: var(--vw-panel);
    border: 1px solid var(--vw-border-strong);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 0.2s var(--vw-ease), transform 0.2s var(--vw-ease);
    z-index: 20;
}
.wl-sort-panel.wl-sort-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.wl-sort-panel label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-family: "Kanit", sans-serif;
    font-size: 0.78rem;
    color: var(--vw-muted);
}
.wl-sort-panel select {
    background: var(--vw-input-bg);
    border: 1px solid var(--vw-input-border);
    color: var(--vw-text);
    font-family: "Kanit", sans-serif;
    font-size: 0.85rem;
    padding: 8px 10px;
    border-radius: 8px;
}
.wl-sort-panel select:focus {
    outline: none;
    border-color: var(--vw-input-border-focus);
}
.wl-group-check {
    flex-direction: row !important;
    align-items: center;
    gap: 8px !important;
    color: var(--vw-text) !important;
    font-size: 0.85rem !important;
    cursor: pointer;
}
.wl-group-check input {
    width: 16px;
    height: 16px;
    accent-color: var(--vw-accent-bg);
    cursor: pointer;
}
.wl-group-header {
    grid-column: 1 / -1;
    font-family: "Kanit", sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--vw-muted);
    padding: 18px 2px 8px;
    border-bottom: 1px solid var(--vw-border);
    margin-bottom: 6px;
}
.wl-group-header:first-child {
    padding-top: 2px;
}

/* ── Watch-status pill + menu — Virowatch glass language ─
   (same look as the watch-party card: dark glass, blur(18px),
   hairline border, radius 16, uppercase micro-label) */
/* Pill = same ghost style as the +/✓ watchlist button: bare 22px round
   control, translucent dark only while the card is hovered. Status reads
   from the dot color; the label lives in the tooltip + menu. */
.wl-status-pill {
    position: absolute;
    top: 5px;
    right: 5px;
    z-index: 10;
    width: 22px;
    height: 22px;
    padding: 0;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    cursor: pointer;
    transition:
        background 0.18s ease,
        transform 0.15s ease;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.75));
}
.movie-item:hover .wl-status-pill {
    background: rgba(0, 0, 0, 0.52);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.wl-status-pill:hover {
    transform: scale(1.18);
}
.wl-status-pill::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
    box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.3);
}
.wl-status-pill.wl-st-watching::before {
    background: #fff;
    box-shadow: 0 0 7px rgba(255, 255, 255, 0.9);
}
.wl-status-pill.wl-st-watched::before {
    background: #000;
    box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.45);
}
.wl-status-menu {
    position: fixed;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 160px;
    padding: 6px;
    background: rgba(13, 13, 16, 0.86);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateY(-6px) scale(0.97);
    pointer-events: none;
    transition:
        opacity 0.18s var(--vw-ease, ease),
        transform 0.18s var(--vw-ease, ease);
}
.wl-status-menu.open {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}
.wl-status-menu-label {
    padding: 6px 10px 4px;
    font-family: "Kanit", sans-serif;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
}
.wl-status-opt {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: rgba(255, 255, 255, 0.85);
    font-family: "Kanit", sans-serif;
    font-size: 0.8rem;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease;
}
.wl-status-opt::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.3);
}
.wl-status-opt[data-st="watching"]::before {
    background: #fff;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
}
.wl-status-opt[data-st="watched"]::before {
    background: #000;
    box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.45);
}
.wl-status-opt:hover {
    background: rgba(255, 255, 255, 0.08);
}
.wl-status-opt.active {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}
/* Mobile: the menu becomes a bottom sheet that slides up */
@media (max-width: 560px) {
    .wl-status-menu {
        left: 0 !important;
        right: 0;
        top: auto !important;
        bottom: 0;
        min-width: 0;
        border-radius: 18px 18px 0 0;
        border-left: none;
        border-right: none;
        border-bottom: none;
        padding: 10px 14px calc(14px + env(safe-area-inset-bottom, 0px));
        box-shadow: 0 -18px 60px rgba(0, 0, 0, 0.6);
        opacity: 1;
        transform: translateY(100%);
        transition: transform 0.28s var(--vw-ease, ease);
    }
    .wl-status-menu.open {
        transform: none;
    }
    .wl-status-opt {
        padding: 13px 12px;
        font-size: 0.95rem;
    }
    .wl-status-menu-label {
        font-size: 0.62rem;
    }
}

/* ── Footer ──────────────────────────────────────────── */
.main .footer {
    padding: 28px 32px 22px;
    margin-top: auto;
    text-align: center;
    font-size: 12px;
    font-weight: 300;
    color: var(--vw-muted-2);
    line-height: 1.6;
}

@keyframes vw-rise {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}
@keyframes vw-pulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.4;
    }
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 820px) {
    .hero {
        height: 340px;
    }
    .hero-title {
        font-size: 38px;
    }
    .header .brand {
        font-size: 22px;
    }
}
/* Mobile: same row, smaller posters */
@media (max-width: 768px) {
    .poster-grid {
        gap: 10px;
    }
    .poster {
        flex: 0 0 116px;
        width: 116px;
    }
}

@media (max-width: 560px) {
    .main {
        margin-left: 0; /* rail becomes a bottom bar below, not a left sidebar */
    }
    .rail {
        position: fixed;
        bottom: 0;
        top: auto;
        height: auto;
        width: 100%;
        flex-direction: row;
        justify-content: space-around;
        padding: 8px 10px;
        border-right: none;
        border-top: 1px solid var(--vw-border);
    }
    .rail:hover {
        width: 100%;
    }
    .rail-brand,
    .rail-spacer,
    .rail-label,
    .rail-cw {
        display: none;
    }
    .rail-item,
    .rail:hover .rail-item {
        width: 44px;
        justify-content: center;
        padding: 0;
    }
    body {
        padding-bottom: 64px;
    }
    .main {
        width: 100%;
    }
    .main .header {
        padding: 12px 16px;
        gap: 12px;
    }
    .home-section {
        padding: 20px 16px 0;
    }
    .sports {
        margin: 20px 16px 20px;
    }
    #categoryNavBar {
        padding: 12px 16px 0;
    }
    .movie-list-wrapper {
        padding: 0 16px;
    }
    #anikoto-sep,
    #anikoto-section {
        margin-left: 16px;
        margin-right: 16px;
    }
    .hero {
        height: 300px;
    }
    .hero-content {
        padding: 24px;
    }
    .hero-title {
        font-size: 32px;
    }
    .main .footer {
        padding: 24px 16px 18px;
    }
}

/* ── Anime hover info card (hover-info.js) ─────────────────────────── */
#vwHoverCard {
    position: fixed;
    z-index: 900;
    width: 340px;
    border-radius: 14px;
    overflow: hidden;
    background: var(--vw-panel-2, #141417);
    border: 1px solid var(--vw-border-strong, rgba(255, 255, 255, 0.14));
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
    opacity: 0;
    transform: translateY(6px) scale(0.98);
    pointer-events: none;
    transition:
        opacity 0.18s ease,
        transform 0.18s ease;
}
#vwHoverCard.vwh-show {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}
.vwh-banner {
    height: 130px;
    background-size: cover;
    background-position: center 30%;
    background-color: var(--vw-panel, #101013);
}
.vwh-body {
    padding: 14px 16px 16px;
}
.vwh-title {
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.3;
    color: var(--vw-text-strong, #fff);
    margin-bottom: 8px;
}
.vwh-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}
.vwh-tag {
    padding: 3px 10px;
    border-radius: 99px;
    font-size: 0.68rem;
    letter-spacing: 0.02em;
    background: var(--vw-chip-bg, rgba(255, 255, 255, 0.08));
    border: 1px solid var(--vw-chip-border, rgba(255, 255, 255, 0.16));
    color: var(--vw-text, #eaeaea);
    cursor: pointer;
    transition: background 0.15s ease;
}
.vwh-tag:hover {
    background: var(--vw-hover-strong, rgba(255, 255, 255, 0.14));
}
/* TMDB genres aren't searchable tags — chip is a plain label */
.vwh-tag--static,
.vwh-tag--static:hover {
    cursor: default;
    background: var(--vw-chip-bg, rgba(255, 255, 255, 0.08));
}
.vwh-desc {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.5;
    color: var(--vw-muted, rgba(255, 255, 255, 0.6));
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Airing-soon modal (airing.js — shell classes come from stylegui) ── */
.air-head {
    cursor: pointer;
}
.air-head .air-all {
    margin-left: 6px;
    font-size: 0.72rem;
    color: var(--vw-muted, rgba(255, 255, 255, 0.55));
    transition: color 0.15s ease;
}
.air-head:hover .air-all {
    color: var(--vw-text-strong, #fff);
}
.vwair-modal {
    width: min(560px, 100%);
}
.vwair-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px 12px 14px;
    scrollbar-width: thin;
    scrollbar-color: var(--vw-border-strong, rgba(255, 255, 255, 0.15))
        transparent;
}
.vwair-list::-webkit-scrollbar {
    width: 4px;
}
.vwair-list::-webkit-scrollbar-thumb {
    background: var(--vw-border-strong, rgba(255, 255, 255, 0.15));
    border-radius: 2px;
}
.vwair-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 12px;
    background: transparent;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease;
}
.vwair-row:hover {
    background: var(--vw-hover, rgba(255, 255, 255, 0.06));
}
.vwair-img {
    width: 56px;
    height: 76px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--vw-panel-2, #141417);
    border: 1px solid var(--vw-border, rgba(255, 255, 255, 0.08));
}
.vwair-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.vwair-title {
    font-size: 0.92rem;
    line-height: 1.3;
    color: var(--vw-text-strong, #fff);
}
.vwair-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    color: var(--vw-muted-2, rgba(255, 255, 255, 0.35));
}
.vwair-meta .sbadge {
    position: static;
    flex-shrink: 0;
}
.vwair-desc {
    font-size: 0.75rem;
    line-height: 1.45;
    color: var(--vw-muted, rgba(255, 255, 255, 0.6));
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Search type-filter chips (content.js search results) ──────────── */
.search-filter-bar {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 2px 2px 10px;
}
.search-filter-bar button {
    padding: 6px 16px;
    border-radius: 99px;
    font-size: 0.78rem;
    background: var(--vw-chip-bg, rgba(255, 255, 255, 0.08));
    border: 1px solid var(--vw-chip-border, rgba(255, 255, 255, 0.16));
    color: var(--vw-text, #eaeaea);
    cursor: pointer;
    transition:
        background 0.15s ease,
        border-color 0.15s ease;
}
.search-filter-bar button.active {
    background: var(--vw-accent-bg, #e5e7eb);
    color: var(--vw-accent-fg, #111);
    border-color: transparent;
}
