/* =========================================================================
   Anime-Sama — cinematic UI (enhanced)
   ========================================================================= */

:root {
    --bg: #07070c;
    --bg-soft: #0e0e16;
    --panel: rgba(20, 20, 30, 0.72);
    --panel-solid: #14141e;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);
    --text: #f4f4fb;
    --muted: #a2a2b6;
    --muted-2: #74748a;
    --accent: #7c5cff;
    --accent-2: #ff4d8d;
    --accent-3: #00d4ff;
    --accent-grad: linear-gradient(120deg, #7c5cff 0%, #b14bff 45%, #ff4d8d 100%);
    --accent-grad-2: linear-gradient(135deg, #7c5cff, #00d4ff);
    --glow: 0 10px 40px -10px rgba(124, 92, 255, 0.6);
    --glow-strong: 0 16px 60px -12px rgba(124, 92, 255, 0.8);
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.8);
    --shadow-lg: 0 40px 80px -20px rgba(0, 0, 0, 0.9), 0 0 60px -20px rgba(124, 92, 255, 0.2);
    --nav-h: 72px;
    --transition-spring: cubic-bezier(0.22, 1, 0.36, 1);
    --transition-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
/* Subtle film grain texture overlay */
body::after {
    content: "";
    position: fixed; inset: 0;
    z-index: 9999; pointer-events: none;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    mix-blend-mode: overlay;
}

h1, h2, h3, .brand__text { font-family: 'Sora', 'Inter', sans-serif; }

img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 20px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.22); }

/* ---- Animated cinematic backdrop ---------------------------------------- */
.bg-stage {
    position: fixed;
    inset: 0;
    z-index: -2;
    background-color: var(--bg);
    background-size: cover;
    background-position: center;
    filter: saturate(1.1);
    transition: opacity 1.2s ease;
}
.bg-stage::after {
    content: "";
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    animation: kenburns 20s ease-in-out infinite alternate;
}
.bg-stage.is-swapping { animation: kenburns 22s ease-in-out infinite alternate; }
@keyframes kenburns {
    from { transform: scale(1.05) translate(0, 0); }
    to   { transform: scale(1.18) translate(-2%, -2%); }
}
.bg-scrim {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(120% 90% at 75% 20%, rgba(7,7,12,0.1) 0%, rgba(7,7,12,0.7) 55%, var(--bg) 100%),
        linear-gradient(180deg, rgba(7,7,12,0.3) 0%, rgba(7,7,12,0.15) 30%, rgba(7,7,12,0.82) 75%, var(--bg) 100%),
        radial-gradient(50% 50% at 30% 80%, rgba(124,92,255,0.04) 0%, transparent 100%);
}

/* ---- Navigation --------------------------------------------------------- */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-h);
    z-index: 60;
    display: flex;
    align-items: center;
    transition: background 0.3s ease, backdrop-filter 0.3s ease, border-color 0.3s ease;
    border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
    background: rgba(7, 7, 12, 0.72);
    backdrop-filter: blur(20px) saturate(1.5);
    -webkit-backdrop-filter: blur(20px) saturate(1.5);
    border-bottom-color: var(--border);
    box-shadow: 0 4px 30px -8px rgba(0, 0, 0, 0.5);
}
.nav__inner {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 56px);
    display: flex;
    align-items: center;
    gap: 28px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand__mark {
    width: 38px; height: 38px;
    display: grid; place-items: center;
    border-radius: 11px;
    font-weight: 900; font-size: 20px;
    background: var(--accent-grad);
    background-size: 200% 200%;
    animation: gradientShift 4s ease infinite;
    box-shadow: var(--glow);
    font-family: 'Sora', sans-serif;
}
.brand__text { font-weight: 800; letter-spacing: 2px; font-size: 18px; }
.brand__text b { color: var(--accent); font-weight: 800; }

.nav__links { display: flex; gap: 6px; margin-left: 8px; }
.nav__link {
    padding: 8px 14px; border-radius: 999px;
    font-size: 14.5px; font-weight: 500; color: var(--muted);
    transition: color 0.2s, background 0.2s, transform 0.2s;
}
.nav__link:hover { color: var(--text); transform: translateY(-1px); }
.nav__link.is-active { color: var(--text); background: rgba(124, 92, 255, 0.12); border: 1px solid rgba(124, 92, 255, 0.2); }

.nav__right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.search {
    display: flex; align-items: center; gap: 8px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 9px 16px;
    transition: border-color 0.2s, background 0.2s, width 0.3s;
    width: 240px;
}
.search:focus-within { border-color: var(--border-strong); background: rgba(255, 255, 255, 0.12); }
.search__icon { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; flex: none; }
.search__input { background: none; border: none; outline: none; color: var(--text); width: 100%; font-size: 14px; }
.search__input::placeholder { color: var(--muted-2); }

/* ---- Buttons ------------------------------------------------------------ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    padding: 11px 22px; border-radius: 999px;
    font-size: 14.5px; font-weight: 600;
    transition: transform 0.2s var(--transition-spring), box-shadow 0.3s ease, background 0.2s ease, opacity 0.2s, filter 0.2s;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}
.btn::after {
    content: ""; position: absolute; inset: 0;
    background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(255,255,255,0.15), transparent 60%);
    opacity: 0; transition: opacity 0.3s;
}
.btn:hover::after { opacity: 1; }
.btn:active { transform: scale(0.94); }
.btn svg { width: 18px; height: 18px; position: relative; z-index: 1; }
.btn--primary { background: #fff; color: #111; }
.btn--primary:hover { box-shadow: 0 8px 30px -6px rgba(255,255,255,0.4); }
.btn--play { background: #fff; color: #0a0a12; padding: 13px 30px; font-size: 16px; box-shadow: 0 8px 30px -8px rgba(255,255,255,0.3); }
.btn--play:hover { background: #fff; box-shadow: 0 12px 40px -6px rgba(255,255,255,0.5); filter: brightness(1.02); }
.btn--ghost { background: rgba(120, 120, 140, 0.2); color: #fff; backdrop-filter: blur(8px); border: 1px solid var(--border-strong); }
.btn--ghost:hover { background: rgba(140, 140, 160, 0.35); border-color: rgba(255,255,255,0.25); box-shadow: 0 8px 24px -8px rgba(0,0,0,0.4); }
.btn--auth { background: var(--accent-grad); background-size: 200% 200%; animation: gradientShift 4s ease infinite; color: #fff; box-shadow: var(--glow); padding: 10px 20px; }
.btn--auth:hover { box-shadow: var(--glow-strong); filter: brightness(1.1); }
.btn--block { width: 100%; padding: 14px; font-size: 15px; }
.btn--icon { padding: 11px; width: 44px; height: 44px; border-radius: 50%; }

/* ---- Hero --------------------------------------------------------------- */
.hero {
    position: relative;
    min-height: min(92vh, 860px);
    display: flex;
    align-items: flex-end;
    padding: 0 clamp(16px, 4vw, 56px) clamp(40px, 7vw, 96px);
    max-width: 1600px;
    margin: 0 auto;
}
.hero__content { max-width: 640px; }
.hero__badge {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 12.5px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
    color: var(--accent-2);
    margin-bottom: 18px;
}
.hero__badge::before { content: ""; width: 26px; height: 3px; border-radius: 3px; background: var(--accent-grad); }
.hero__title {
    font-size: clamp(38px, 6.5vw, 82px);
    line-height: 1.02;
    font-weight: 800;
    letter-spacing: -1.5px;
    text-shadow: 0 6px 40px rgba(0,0,0,0.6), 0 0 80px rgba(124, 92, 255, 0.15);
    margin-bottom: 18px;
    background: linear-gradient(180deg, #fff 60%, rgba(255,255,255,0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero__meta { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.chip {
    font-size: 12.5px; font-weight: 600;
    padding: 5px 13px; border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border);
    color: #dcdce8;
}
.chip--lang { background: rgba(124, 92, 255, 0.18); border-color: rgba(124, 92, 255, 0.4); color: #cabfff; }
.hero__desc {
    font-size: clamp(14px, 1.4vw, 17px);
    line-height: 1.65;
    color: #d5d5e2;
    margin-bottom: 28px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 2px 20px rgba(0,0,0,0.6);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero__dots { position: absolute; bottom: clamp(24px, 5vw, 48px); right: clamp(16px, 4vw, 56px); display: flex; gap: 8px; }
.hero__dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,0.28); transition: all 0.4s var(--transition-spring); cursor: pointer; }
.hero__dot:hover { background: rgba(255,255,255,0.5); transform: scale(1.2); }
.hero__dot.is-active { width: 36px; border-radius: 6px; background: var(--accent-grad); background-size: 200% 200%; animation: gradientShift 3s ease infinite; box-shadow: 0 0 12px rgba(124,92,255,0.5); }

.hero__content.fade-in { animation: heroIn 0.9s var(--transition-spring); }
@keyframes heroIn {
    from { opacity: 0; transform: translateY(32px) scale(0.97); filter: blur(6px); }
    to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

/* ---- Rows / carousels --------------------------------------------------- */
.rows { position: relative; z-index: 2; padding: 8px 0 40px; margin-top: -40px; }
.row { margin: 34px 0; }
.row__head {
    display: flex; align-items: baseline; gap: 12px;
    padding: 0 clamp(16px, 4vw, 56px);
    margin-bottom: 14px;
}
.row__title { font-size: clamp(18px, 2vw, 24px); font-weight: 700; }
.row__count { font-size: 13px; color: var(--muted-2); }
.row__viewport { position: relative; }
.row__track {
    display: flex; gap: 16px;
    overflow-x: auto;
    padding: 6px clamp(16px, 4vw, 56px) 18px;
    scroll-behavior: smooth;
    scrollbar-width: none;
}
.row__track::-webkit-scrollbar { display: none; }
.row__arrow {
    position: absolute; top: 0; bottom: 18px;
    width: clamp(40px, 4vw, 60px);
    display: grid; place-items: center;
    z-index: 5; opacity: 0;
    transition: opacity 0.25s;
    background: linear-gradient(90deg, rgba(7,7,12,0.9), rgba(7,7,12,0));
}
.row__arrow svg { width: 28px; height: 28px; stroke: #fff; stroke-width: 2.4; fill: none; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.6)); }
.row__arrow--next { right: 0; transform: scaleX(-1); }
.row__viewport:hover .row__arrow { opacity: 1; }
.row__arrow:hover svg { stroke: var(--accent); }

/* ---- Cards -------------------------------------------------------------- */
.card {
    flex: 0 0 auto;
    width: clamp(230px, 26vw, 340px);
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    background: var(--bg-soft);
    cursor: pointer;
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s;
    border: 1px solid var(--border);
}
.card__poster { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; background: #1a1a26; transition: transform 0.4s; }
.card::after {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,0.9) 100%);
    opacity: 1; transition: opacity 0.28s;
}
.card__info {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 13px 13px 12px;
    z-index: 2;
    opacity: 1; transform: none;
    transition: opacity 0.28s, transform 0.28s;
}
.card__name { font-size: 14px; font-weight: 700; line-height: 1.25; margin-bottom: 7px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card__tags { display: flex; gap: 6px; flex-wrap: wrap; }
.card__tag { font-size: 10.5px; font-weight: 600; padding: 3px 8px; border-radius: 6px; background: rgba(255,255,255,0.16); }
.card__play {
    position: absolute; top: 12px; right: 12px; z-index: 3;
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(255,255,255,0.92); color: #111;
    display: grid; place-items: center;
    opacity: 0; transform: scale(0.6); transition: all 0.28s;
}
.card__play svg { width: 18px; height: 18px; fill: currentColor; }
.card:hover { transform: translateY(-8px) scale(1.04); box-shadow: var(--shadow); border-color: var(--border-strong); z-index: 4; }
.card:hover::after,
.card:hover .card__info,
.card:hover .card__play { opacity: 1; transform: translateY(0) scale(1); }
.card:hover .card__poster { transform: scale(1.06); }

.card__ph {
    position: absolute; inset: 0;
    display: grid; place-items: center;
    font-family: 'Sora'; font-weight: 800; font-size: 42px; color: rgba(255,255,255,0.12);
    background: linear-gradient(135deg, #171722, #23233a);
}

/* ---- Skeletons ---------------------------------------------------------- */
.sk { position: relative; overflow: hidden; background: #15151f; }
.sk::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
    animation: shimmer 1.3s infinite;
}
@keyframes shimmer { 100% { transform: translateX(100%); } }
.card.card--sk { pointer-events: none; }
.card--sk .card__poster { background: #15151f; }

/* ---- Modals ------------------------------------------------------------- */
.modal { position: fixed; inset: 0; z-index: 100; display: none; }
.modal.is-open { display: block; }
.modal__scrim { position: absolute; inset: 0; background: rgba(4,4,8,0.78); backdrop-filter: blur(12px) saturate(1.2); -webkit-backdrop-filter: blur(12px) saturate(1.2); animation: fade 0.35s; }
@keyframes fade { from { opacity: 0; } }
.modal__panel {
    position: absolute; left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    background: var(--panel-solid);
    border: 1px solid var(--border-strong);
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    animation: pop 0.4s var(--transition-spring);
    max-height: 92vh; overflow: hidden;
}
@keyframes pop { from { opacity: 0; transform: translate(-50%, -44%) scale(0.92); filter: blur(4px); } to { filter: blur(0); } }
.modal__close {
    position: absolute; top: 16px; right: 16px; z-index: 20;
    width: 42px; height: 42px; border-radius: 50%;
    background: rgba(0,0,0,0.55); color: #fff; font-size: 26px; line-height: 1;
    display: grid; place-items: center; backdrop-filter: blur(4px);
    transition: background 0.2s, transform 0.2s;
}
.modal__close:hover { background: rgba(0,0,0,0.85); transform: rotate(90deg); }

/* ---- Detail modal ------------------------------------------------------- */
.detail { width: min(940px, 94vw); overflow-y: auto; }
.detail__hero { position: relative; height: clamp(220px, 34vw, 420px); }
.detail__hero img { width: 100%; height: 100%; object-fit: cover; }
.detail__hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,20,30,0) 30%, var(--panel-solid) 98%), linear-gradient(90deg, rgba(20,20,30,0.6), transparent 60%); }
.detail__heroText { position: absolute; left: clamp(20px, 4vw, 44px); right: clamp(20px, 4vw, 44px); bottom: 22px; z-index: 2; }
.detail__hero-play {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    z-index: 4;
    width: 76px; height: 76px; border-radius: 50%;
    display: grid; place-items: center;
    background: rgba(255, 255, 255, 0.92); color: #0a0a12;
    box-shadow: 0 12px 40px -8px rgba(0, 0, 0, 0.7), var(--glow);
    transition: transform 0.2s ease, background 0.2s ease;
    animation: pulse-glow 3s infinite;
}
.detail__hero-play svg { width: 34px; height: 34px; fill: currentColor; margin-left: 3px; }
.detail__hero-play:hover { transform: translate(-50%, -50%) scale(1.08); background: #fff; animation: none; }
.detail__hero-play:active { transform: translate(-50%, -50%) scale(0.96); }

/* Trailer playing inside the detail hero — no YouTube chrome, custom controls */
.detail__hero-trailer { position: absolute; inset: 0; z-index: 3; background: #000; overflow: hidden; }
.detail__hero-trailer iframe {
    position: absolute; top: 50%; left: 50%;
    width: 100%; height: 100%; border: 0;
    /* Overscan so YouTube's startup title (top) & control bar (bottom) are cropped out */
    transform: translate(-50%, -50%) scale(1.6);
    transform-origin: center center;
    pointer-events: none; /* block all native YouTube UI (title, share, big play button) */
}
/* Opaque bars that physically hide YouTube's title bar (top) and controls (bottom) */
.detail__hero-trailer::before,
.detail__hero-trailer::after {
    content: ""; position: absolute; left: 0; right: 0; z-index: 4;
    height: 18%; background: #000; pointer-events: none;
}
.detail__hero-trailer::before { top: 0; background: linear-gradient(180deg, #000 30%, transparent 100%); }
.detail__hero-trailer::after { bottom: 0; background: linear-gradient(0deg, #000 30%, transparent 100%); }
.detail__hero-toggle {
    position: absolute; left: 16px; bottom: 16px; z-index: 6;
    width: 50px; height: 50px; border-radius: 50%;
    display: grid; place-items: center;
    background: rgba(0, 0, 0, 0.55); color: #fff;
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    transition: background 0.2s ease, transform 0.15s ease;
}
.detail__hero-toggle svg { width: 22px; height: 22px; fill: currentColor; }
.detail__hero-toggle:hover { background: rgba(0, 0, 0, 0.8); }
.detail__hero-toggle:active { transform: scale(0.92); }
.detail__title { font-size: clamp(26px, 4vw, 44px); font-weight: 800; letter-spacing: -0.5px; text-shadow: 0 4px 24px rgba(0,0,0,0.7); }
.detail__content { padding: 22px clamp(20px, 4vw, 44px) 40px; }
.detail__meta { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 18px; }
.detail__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.detail__synopsis { color: #cfcfdd; line-height: 1.7; font-size: 15px; margin-bottom: 26px; max-width: 720px; }
.detail__section-title { font-size: 18px; font-weight: 700; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.seasons { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.season-pill {
    padding: 9px 18px; border-radius: 999px; font-size: 14px; font-weight: 600;
    background: rgba(255,255,255,0.06); border: 1px solid var(--border); color: var(--muted);
    transition: all 0.2s;
}
.season-pill:hover { color: #fff; border-color: var(--border-strong); }
.season-pill.is-active { background: var(--accent-grad); color: #fff; border-color: transparent; box-shadow: var(--glow); }

.episodes { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }

/* ---- Language selector bar in detail ---- */
.detail__lang-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    padding: 14px 18px;
    background: rgba(124, 92, 255, 0.06);
    border: 1px solid rgba(124, 92, 255, 0.2);
    border-radius: 14px;
}
.detail__lang-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.lang-pill {
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 13.5px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border);
    color: var(--muted);
    cursor: pointer;
    transition: all 0.2s;
}
.lang-pill:hover { color: #fff; border-color: var(--border-strong); background: rgba(255, 255, 255, 0.14); }
.lang-pill.is-active { background: var(--accent-grad); color: #fff; border-color: transparent; box-shadow: var(--glow); }
.ep {
    display: flex; align-items: center; gap: 13px;
    padding: 12px 14px; border-radius: 12px;
    background: rgba(255,255,255,0.04); border: 1px solid var(--border);
    transition: all 0.2s; text-align: left; width: 100%;
}
.ep:hover { background: rgba(124,92,255,0.14); border-color: rgba(124,92,255,0.4); transform: translateY(-2px); }
.ep__num { flex: none; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
    font-weight: 800; font-size: 14px; background: var(--accent-grad); color: #fff; }
.ep__name { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep__langs { font-size: 11px; color: var(--muted-2); margin-top: 2px; }
.ep__play { margin-left: auto; opacity: 0.5; }
.ep__play svg { width: 18px; height: 18px; fill: currentColor; }
.ep:hover .ep__play { opacity: 1; }

/* ---- Player modal ------------------------------------------------------- */
.player { width: min(1100px, 96vw); max-height: 92vh; display: flex; flex-direction: column; overflow: hidden; }
.player__frame { position: relative; aspect-ratio: 16 / 9; background: #000; flex-shrink: 1; min-height: 0; max-height: calc(92vh - 80px); width: 100%; }
.player__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player__loader { position: absolute; inset: 0; display: grid; place-items: center; background: #000; z-index: 3; }
.player__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 16px 20px; background: var(--panel-solid); flex-shrink: 0; overflow-x: auto; }
.player__label { font-size: 13px; color: var(--muted); margin-right: 4px; }
.mirror {
    padding: 7px 14px; border-radius: 9px; font-size: 13px; font-weight: 600;
    background: rgba(255,255,255,0.06); border: 1px solid var(--border); color: var(--muted);
    transition: all 0.2s;
}
.mirror:hover { color: #fff; }
.mirror.is-active { background: var(--accent-grad); color: #fff; border-color: transparent; }
.player__title { font-weight: 700; margin-right: auto; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- Auth modal --------------------------------------------------------- */
.auth { width: min(440px, 94vw); padding: 36px clamp(24px, 5vw, 40px) 34px; }
.auth__brand { display: flex; align-items: center; gap: 10px; font-family: 'Sora'; font-weight: 800; letter-spacing: 2px; font-size: 17px; margin-bottom: 24px; justify-content: center; }
.auth__brand b { color: var(--accent); }
.auth__tabs { display: flex; background: rgba(255,255,255,0.05); border-radius: 12px; padding: 5px; margin-bottom: 24px; }
.auth__tab { flex: 1; padding: 11px; border-radius: 9px; font-weight: 600; font-size: 14px; color: var(--muted); transition: all 0.2s; }
.auth__tab.is-active { background: var(--accent-grad); color: #fff; box-shadow: var(--glow); }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 7px; }
.field input {
    width: 100%; padding: 13px 15px; border-radius: 11px;
    background: rgba(255,255,255,0.05); border: 1px solid var(--border); color: var(--text);
    font-size: 14.5px; outline: none; transition: border-color 0.2s, background 0.2s;
}
.field input:focus { border-color: var(--accent); background: rgba(124,92,255,0.08); }
.auth__error { color: #ff6b8b; font-size: 13.5px; margin-bottom: 14px; min-height: 18px; }
[data-only] { display: none; }
.auth.mode-register [data-only="register"] { display: block; }
.auth.mode-login [data-only="login"] { display: block; }

/* ---- User menu ---------------------------------------------------------- */
.usermenu { position: relative; }
.avatar {
    width: 42px; height: 42px; border-radius: 50%;
    background: var(--accent-grad); color: #fff;
    display: grid; place-items: center; font-weight: 800; font-size: 16px;
    box-shadow: var(--glow); border: 2px solid rgba(255,255,255,0.2);
}
.usermenu__pop {
    position: absolute; right: 0; top: 54px;
    background: var(--panel-solid); border: 1px solid var(--border);
    border-radius: 14px; padding: 8px; min-width: 200px;
    box-shadow: var(--shadow); display: none; animation: pop 0.2s;
}
.usermenu.is-open .usermenu__pop { display: block; }
.usermenu__name { padding: 10px 12px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.usermenu__name b { display: block; font-size: 14px; }
.usermenu__name span { font-size: 12px; color: var(--muted-2); }
.usermenu__item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 9px; font-size: 14px; color: var(--muted); text-align: left; transition: all 0.15s; }
.usermenu__item:hover { background: rgba(255,255,255,0.06); color: #fff; }

/* ---- Toasts ------------------------------------------------------------- */
.toasts { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.toast {
    background: var(--panel-solid); border: 1px solid var(--border-strong);
    padding: 13px 20px; border-radius: 12px; font-size: 14px; font-weight: 500;
    box-shadow: var(--shadow); animation: toastIn 0.3s; display: flex; align-items: center; gap: 10px;
}
.toast--ok { border-color: rgba(80, 220, 150, 0.5); }
.toast--err { border-color: rgba(255, 90, 120, 0.5); }
.toast__dot { width: 9px; height: 9px; border-radius: 50%; }
.toast--ok .toast__dot { background: #4fe0a0; }
.toast--err .toast__dot { background: #ff5a78; }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px); } }

/* ---- Loaders / states --------------------------------------------------- */
.spinner { width: 42px; height: 42px; border-radius: 50%; border: 3px solid rgba(255,255,255,0.15); border-top-color: var(--accent); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.center-state { display: grid; place-items: center; gap: 16px; padding: 60px 20px; color: var(--muted); text-align: center; }
.empty { padding: 50px clamp(16px, 4vw, 56px); color: var(--muted); font-size: 15px; }

/* ---- Responsive --------------------------------------------------------- */
@media (max-width: 900px) {
    .nav__links { display: none; }
    .search { width: auto; flex: 1; min-width: 120px; max-width: 220px; }
    .hero { min-height: 78vh; }
}
@media (max-width: 560px) {
    .brand__text { display: none; }
    .search { width: auto; flex: 1; min-width: 0; }
    .btn--auth { padding: 9px 14px; font-size: 13px; }
    .nav__inner { gap: 10px; }
    .nav__right { gap: 8px; }
    .hero__actions .btn { flex: 1; }
    .episodes { grid-template-columns: 1fr; }
    .player { width: 100vw; max-height: 100vh; border-radius: 0; }
    .player__frame { max-height: calc(100vh - 70px); }
    .player__bar { padding: 10px 12px; gap: 6px; }
    .player__title { font-size: 13px; }
    /* Cards: always show name on mobile (no hover) */
    .card::after { opacity: 1; }
    .card__info { opacity: 1; transform: none; }
    .card__play { display: none; }
    .card:hover { transform: none; box-shadow: none; }
    .card:hover::before { opacity: 0; }
    .card:active { transform: scale(0.97); }
    /* Trailer: extra overscan + thicker masks on mobile to hide YouTube chrome completely */
    .detail__hero-trailer iframe { transform: translate(-50%, -50%) scale(2); }
    .detail__hero-trailer::before,
    .detail__hero-trailer::after { height: 25%; }
    .detail__hero-trailer::before { background: linear-gradient(180deg, #000 50%, transparent 100%); }
    .detail__hero-trailer::after { background: linear-gradient(0deg, #000 50%, transparent 100%); }
    .bg-trailer iframe { width: 200vw; height: 112.5vw; min-height: 200vh; min-width: 356vh; }
    .bg-trailer::before { height: 25%; background: linear-gradient(180deg, var(--bg) 40%, transparent 100%); }
    .bg-trailer::after { height: 25%; background: linear-gradient(0deg, var(--bg) 40%, transparent 100%); }
}


/* ---- Crossfading background layers -------------------------------------- */
.bg-layer {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
    opacity: 0; transition: opacity 1.5s ease;
    will-change: opacity, transform;
}
.bg-layer.is-active { opacity: 1; animation: kenburns 28s ease-in-out infinite alternate; filter: saturate(1.15) brightness(0.95); }

/* ---- Wrapping grid view ------------------------------------------------- */
.view { padding-top: calc(var(--nav-h) + 24px); min-height: 70vh; }
.view__head { padding: 8px clamp(16px, 4vw, 56px) 4px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.view__title { font-size: clamp(24px, 3.4vw, 38px); font-weight: 800; letter-spacing: -0.5px; }
.view__sub { color: var(--muted-2); font-size: 14px; }
.view__sort { margin-left: auto; display: flex; gap: 6px; }
.sort-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 14px; border-radius: 999px;
    font-size: 12.5px; font-weight: 600;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    color: var(--muted);
    cursor: pointer;
    transition: all 0.2s;
}
.sort-btn:hover { color: var(--text); border-color: var(--border-strong); }
.sort-btn.is-active { background: var(--accent-grad); color: #fff; border-color: transparent; box-shadow: var(--glow); }
.sort-btn svg { flex-shrink: 0; }
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(clamp(220px, 24vw, 300px), 1fr));
    gap: 18px;
    padding: 22px clamp(16px, 4vw, 56px) 60px;
}
.grid .card { width: 100%; }


/* ---- Video trailer background ------------------------------------------- */
.bg-trailer {
    position: fixed; inset: 0; z-index: -2;
    overflow: hidden; pointer-events: none;
    opacity: 0; transition: opacity 2s ease;
}
.bg-trailer.is-on { opacity: 1; }
.bg-trailer iframe {
    position: absolute; top: 50%; left: 50%;
    width: 160vw; height: 90vw;                 /* 16:9, overscanned 1.6x */
    min-height: 160vh; min-width: 285vh;        /* cover the viewport + overscan */
    transform: translate(-50%, -50%);
    border: 0; pointer-events: none;
}
/* Masking bars to hide any YouTube UI that leaks through on mobile */
.bg-trailer::before,
.bg-trailer::after {
    content: ""; position: absolute; left: 0; right: 0; z-index: 1; pointer-events: none;
}
.bg-trailer::before { top: 0; height: 20%; background: linear-gradient(180deg, var(--bg) 20%, transparent 100%); }
.bg-trailer::after { bottom: 0; height: 20%; background: linear-gradient(0deg, var(--bg) 20%, transparent 100%); }


/* ---- Mobile bottom navigation ------------------------------------------- */
.tabbar { display: none; }

@media (max-width: 820px) {
    .tabbar {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        align-items: center;
        position: fixed;
        left: 0; right: 0; bottom: 0;
        z-index: 80;
        height: calc(62px + env(safe-area-inset-bottom, 0px));
        padding-bottom: env(safe-area-inset-bottom, 0px);
        background: rgba(9, 9, 15, 0.86);
        backdrop-filter: blur(22px) saturate(1.3);
        -webkit-backdrop-filter: blur(22px) saturate(1.3);
        border-top: 1px solid var(--border);
        box-shadow: 0 -12px 34px -18px rgba(0, 0, 0, 0.9);
    }
    /* keep content clear of the bar */
    #main { padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px)); }
    .footer { display: none; }
    .toasts { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
    .hero__dots { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
    .rows { margin-top: -20px; }
}

.tabbar__item {
    position: relative;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 4px; height: 100%;
    font-size: 10px; font-weight: 600; letter-spacing: 0.2px;
    color: var(--muted-2);
    transition: color 0.2s ease, transform 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}
.tabbar__item:active { transform: scale(0.92); }
.tabbar__item svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 2; }
.tabbar__item.is-active { color: #fff; }
.tabbar__item.is-active::before {
    content: ""; position: absolute; top: 6px; width: 5px; height: 5px; border-radius: 50%;
    background: var(--accent-grad); box-shadow: var(--glow);
}
.tabbar__item.is-active svg { stroke: #cbbcff; filter: drop-shadow(0 0 8px rgba(124, 92, 255, 0.7)); }

/* Central raised search button */
.tabbar__item--fab { color: transparent; }
.tabbar__fab {
    display: grid; place-items: center;
    width: 58px; height: 58px; border-radius: 50%;
    transform: translateY(-18px);
    background: var(--accent-grad);
    border: 4px solid var(--bg);
    box-shadow: 0 12px 30px -8px rgba(124, 92, 255, 0.7);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.tabbar__item--fab:active .tabbar__fab { transform: translateY(-18px) scale(0.9); }
.tabbar__fab svg { width: 26px; height: 26px; stroke: #fff; stroke-width: 2.3; }
.tabbar__item--fab.is-active::before { display: none; }



/* ---- Planning modal ----------------------------------------------------- */
.planning { width: min(800px, 96vw); max-height: 90vh; overflow-y: auto; padding: 36px clamp(20px, 4vw, 44px); }
.planning__title { font-size: clamp(22px, 4vw, 30px); font-weight: 800; margin-bottom: 6px; }
.planning__sub { color: var(--muted); font-size: 15px; margin-bottom: 28px; }
.planning__grid { display: grid; gap: 14px; }
.planning__day { background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: 14px; padding: 18px 22px; }
.planning__day-name { font-size: 17px; font-weight: 800; margin-bottom: 10px; color: var(--accent); letter-spacing: 0.3px; }
.planning__day-content { font-size: 14px; color: var(--muted); }
.planning__entry {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.planning__entry:last-child { border-bottom: none; }
.planning__thumb {
    width: 44px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    background: var(--bg-soft);
}
.planning__info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.planning__anime-name { font-size: 15px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.planning__time { font-size: 13px; font-weight: 700; color: var(--accent); }
.planning__note { font-size: 12.5px; color: var(--muted-2); }
.planning__empty { font-size: 14px; color: var(--muted-2); font-style: italic; padding: 6px 0; }

/* ---- Account modal ------------------------------------------------------ */
.account { width: min(480px, 94vw); max-height: 90vh; overflow-y: auto; padding: 30px clamp(16px, 4vw, 36px); }
.account__header { text-align: center; margin-bottom: 24px; }
.account__avatar { width: 80px; height: 80px; border-radius: 50%; background: var(--accent-grad); display: grid; place-items: center; margin: 0 auto 12px; font-size: 32px; font-weight: 800; color: #fff; overflow: hidden; box-shadow: var(--glow); }
.account__avatar img { width: 100%; height: 100%; object-fit: cover; }
.account__name { font-size: 20px; font-weight: 800; }
.account__email { font-size: 13px; color: var(--muted); }
.account__badge { display: inline-block; margin-top: 8px; padding: 4px 12px; border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; background: var(--accent-grad); color: #fff; }
.account__section { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.account__section h3 { font-size: 14px; font-weight: 700; margin-bottom: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.account__field { margin-bottom: 12px; }
.account__field label { display: block; font-size: 12px; color: var(--muted-2); margin-bottom: 5px; }
.account__field input, .account__field select { width: 100%; padding: 11px 14px; border-radius: 10px; background: rgba(255,255,255,0.05); border: 1px solid var(--border); color: var(--text); font-size: 14px; outline: none; transition: border-color 0.2s; }
.account__field input:focus, .account__field select:focus { border-color: var(--accent); }
.account__field select { appearance: none; cursor: pointer; }
.account__msg { text-align: center; font-size: 13px; margin-top: 12px; min-height: 18px; }

/* ---- History / Continue watching cards ---------------------------------- */
.card--history { min-width: clamp(230px, 26vw, 340px); }
.card__ph--history { font-size: 28px; background: linear-gradient(135deg, #1a1a2e, #2d2b55); }
.card__progress { position: absolute; bottom: 0; left: 0; right: 0; height: 4px; background: rgba(255,255,255,0.1); z-index: 5; }
.card__progress-bar { height: 100%; background: var(--accent-grad); border-radius: 2px; transition: width 0.3s; }
.card__info--visible { opacity: 1; transform: none; }
.card__ep { font-size: 11px; color: var(--muted-2); margin-top: 3px; }

/* ---- Infinite scroll sentinel ------------------------------------------- */
.scroll-sentinel { min-height: 60px; display: flex; align-items: center; justify-content: center; }

/* ---- More interactive card hover effects -------------------------------- */
.card { transition: transform 0.35s var(--transition-spring), box-shadow 0.35s, border-color 0.3s; }
.card:hover { transform: translateY(-12px) scale(1.06); box-shadow: 0 24px 60px -15px rgba(124,92,255,0.45), 0 10px 30px -10px rgba(0,0,0,0.6); border-color: rgba(124,92,255,0.5); }
.card:hover .card__poster { transform: scale(1.1); }
.card::before { content: ""; position: absolute; inset: -1px; border-radius: 15px; padding: 1px; background: var(--accent-grad); background-size: 300% 300%; animation: gradientShift 4s ease infinite; -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity 0.35s; z-index: 1; pointer-events: none; }
.card:hover::before { opacity: 1; }

/* ---- Pulse animation for active elements -------------------------------- */
@keyframes pulse-glow { 0%,100%{box-shadow:0 0 0 0 rgba(124,92,255,0.4);} 50%{box-shadow:0 0 20px 4px rgba(124,92,255,0.2);} }
@keyframes gradientShift { 0%{background-position:0% 50%;} 50%{background-position:100% 50%;} 100%{background-position:0% 50%;} }
.btn--play { animation: pulse-glow 3s infinite; }
.btn--play:hover { animation: none; }

/* ---- Smooth row entrance ------------------------------------------------ */
.row { animation: rowSlideIn 0.6s var(--transition-spring) both; }
@keyframes rowSlideIn { from { opacity: 0; transform: translateY(40px); filter: blur(4px); } to { opacity: 1; transform: translateY(0); filter: blur(0); } }
.row:nth-child(2) { animation-delay: 0.08s; }
.row:nth-child(3) { animation-delay: 0.16s; }
.row:nth-child(4) { animation-delay: 0.24s; }
.row:nth-child(5) { animation-delay: 0.32s; }
.row:nth-child(6) { animation-delay: 0.38s; }
.row:nth-child(7) { animation-delay: 0.44s; }
.row:nth-child(8) { animation-delay: 0.50s; }
.row:nth-child(9) { animation-delay: 0.54s; }



/* ---- Filter bar (catalogue, like anime-sama) ---------------------------- */
.filter-bar {
    padding: 0 clamp(16px, 4vw, 56px) 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.filter-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.filter-group__label {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--muted-2);
    padding: 8px 0;
    min-width: 60px;
}
.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.filter-chip {
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--muted);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.filter-chip:hover {
    color: var(--text);
    border-color: var(--border-strong);
    background: rgba(255, 255, 255, 0.1);
}
.filter-chip.is-active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 4px 14px -4px rgba(124, 92, 255, 0.5);
}
@media (max-width: 700px) {
    .filter-group { flex-direction: column; gap: 6px; width: 100%; }
    .filter-group__label { min-width: auto; padding: 0; }
    .filter-chips { width: 100%; min-width: 0; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
    .filter-chips::-webkit-scrollbar { display: none; }
}

/* ---- Catalogue / grid views responsive on mobile ------------------------ */
@media (max-width: 640px) {
    .view { padding-top: calc(var(--nav-h) + 6px); }
    .view__head { padding: 6px clamp(14px, 4vw, 20px) 2px; gap: 8px; }
    .view__sub { width: 100%; }
    .view__sort { margin-left: 0; width: 100%; }
    .filter-bar { padding: 0 clamp(14px, 4vw, 20px) 12px; gap: 10px; }
    .filter-chip { padding: 8px 13px; font-size: 12.5px; }
    .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        padding: 14px clamp(14px, 4vw, 20px) 90px;
    }
    .grid .card { width: 100%; }
    .grid .card__info { padding: 9px 10px 9px; }
    .grid .card__name { font-size: 12.5px; margin-bottom: 4px; }
    .grid .card__tags { display: none; }
}
@media (max-width: 380px) {
    .grid { grid-template-columns: 1fr; }
    .grid .card__tags { display: flex; }
}

/* ---- Content request box ------------------------------------------------ */
.request-box {
    max-width: 520px;
    margin: 40px auto;
    padding: 40px clamp(20px, 5vw, 40px);
    text-align: center;
    background: rgba(124, 92, 255, 0.04);
    border: 1px solid rgba(124, 92, 255, 0.2);
    border-radius: 20px;
}
.request-box__icon { margin-bottom: 16px; color: var(--accent); }
.request-box h3 { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.request-box p { color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.request-box__form { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.request-box__input, .request-box__textarea {
    width: 100%;
    padding: 13px 16px;
    border-radius: 12px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 14.5px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}
.request-box__input:focus, .request-box__textarea:focus { border-color: var(--accent); }
.request-box__textarea { min-height: 80px; resize: vertical; }
.request-box__status { margin-top: 12px; font-size: 14px; min-height: 20px; font-weight: 600; }

/* ---- Enhanced visual effects -------------------------------------------- */

/* Row title gradient accent on hover */
.row__title {
    transition: color 0.3s ease;
    position: relative;
}
.row:hover .row__title {
    background: linear-gradient(90deg, var(--text), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glowing focus ring on search */
.search:focus-within {
    border-color: var(--accent);
    background: rgba(124, 92, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.15), 0 8px 24px -8px rgba(124, 92, 255, 0.2);
}

/* Chip hover effect */
.chip { transition: all 0.2s ease; }
.chip:hover { background: rgba(255, 255, 255, 0.15); transform: translateY(-1px); }
.chip--lang:hover { background: rgba(124, 92, 255, 0.3); box-shadow: 0 4px 12px -4px rgba(124, 92, 255, 0.4); }

/* Enhanced detail hero play button */
.detail__hero-play {
    animation: pulse-glow 2.5s infinite, float 3s ease-in-out infinite;
}
@keyframes float { 0%,100% { transform: translate(-50%, -50%); } 50% { transform: translate(-50%, calc(-50% - 4px)); } }
.detail__hero-play:hover { animation: none; transform: translate(-50%, -50%) scale(1.12); }

/* Ambient glow behind hero content */
.hero__content::before {
    content: "";
    position: absolute;
    left: -40px; top: -40px;
    width: 300px; height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(124, 92, 255, 0.12), transparent 70%);
    pointer-events: none;
    filter: blur(40px);
    animation: ambientPulse 6s ease-in-out infinite alternate;
}
@keyframes ambientPulse { 0% { opacity: 0.5; transform: scale(0.9); } 100% { opacity: 1; transform: scale(1.1); } }
.hero__content { position: relative; }

/* Enhanced skeleton shimmer */
.sk::after {
    background: linear-gradient(90deg, transparent, rgba(124, 92, 255, 0.04), rgba(255,255,255,0.06), rgba(124, 92, 255, 0.04), transparent);
    animation: shimmer 1.6s ease-in-out infinite;
}
@keyframes shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

/* Selection color */
::selection { background: rgba(124, 92, 255, 0.3); color: #fff; }
::-moz-selection { background: rgba(124, 92, 255, 0.3); color: #fff; }

/* Season pill enhanced interaction */
.season-pill { transition: all 0.25s var(--transition-spring); }
.season-pill:hover { transform: translateY(-2px); box-shadow: 0 6px 16px -6px rgba(0,0,0,0.4); }
.season-pill.is-active { transform: translateY(-2px); }

/* Episode card enhanced */
.ep { transition: all 0.25s var(--transition-spring); }
.ep:hover { transform: translateY(-3px) scale(1.01); box-shadow: 0 12px 28px -8px rgba(124,92,255,0.25); }
.ep__num { transition: transform 0.2s; }
.ep:hover .ep__num { transform: scale(1.08); }

/* Footer subtle styling */
.footer {
    text-align: center;
    padding: 40px 20px;
    font-size: 13px;
    color: var(--muted-2);
    border-top: 1px solid var(--border);
    margin-top: 40px;
}

/* Smooth page transitions for view changes */
.view { animation: viewEnter 0.5s var(--transition-spring); }
@keyframes viewEnter { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* Toast enhanced */
.toast { backdrop-filter: blur(12px); border-radius: 14px; }
.toast--ok { background: rgba(20, 20, 30, 0.9); }
.toast--err { background: rgba(30, 15, 20, 0.9); }

/* Filter chip active glow */
.filter-chip.is-active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 4px 16px -4px rgba(124, 92, 255, 0.6);
    transform: translateY(-1px);
}

/* Arrow buttons enhanced */
.row__arrow { transition: opacity 0.3s, background 0.3s; }
.row__arrow:hover { background: linear-gradient(90deg, rgba(7,7,12,0.95), rgba(7,7,12,0)); }
.row__arrow:hover svg { stroke: var(--accent); filter: drop-shadow(0 0 8px rgba(124,92,255,0.6)); }

/* Scrollbar on detail modal */
.detail::-webkit-scrollbar { width: 6px; }
.detail::-webkit-scrollbar-thumb { background: rgba(124, 92, 255, 0.3); border-radius: 3px; }
.detail::-webkit-scrollbar-track { background: transparent; }

/* Planning entries hover */
.planning__entry { transition: background 0.2s, transform 0.2s; border-radius: 10px; padding: 10px 8px; margin: 0 -8px; }
.planning__entry:hover { background: rgba(124, 92, 255, 0.06); transform: translateX(4px); }

/* Animated gradient border on focused inputs */
.field input:focus, .account__field input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.1);
}

/* User menu enhanced */
.usermenu__pop { border-radius: 16px; backdrop-filter: blur(16px); background: rgba(20, 20, 30, 0.95); }

/* Breathing glow for the mobile fab */
@keyframes fabGlow {
    0%, 100% { box-shadow: 0 12px 30px -8px rgba(124, 92, 255, 0.6); }
    50% { box-shadow: 0 16px 40px -6px rgba(124, 92, 255, 0.9); }
}
.tabbar__fab { animation: fabGlow 3s ease-in-out infinite; }

/* Card play button enhanced */
.card__play { transition: all 0.3s var(--transition-bounce); }
.card:hover .card__play { opacity: 1; transform: scale(1); box-shadow: 0 8px 20px -4px rgba(0,0,0,0.5); }
.card__play:hover { transform: scale(1.12) !important; }

/* Grid card stagger animation */
.grid .card {
    animation: cardFadeIn 0.4s var(--transition-spring) both;
}
.grid .card:nth-child(1) { animation-delay: 0s; }
.grid .card:nth-child(2) { animation-delay: 0.03s; }
.grid .card:nth-child(3) { animation-delay: 0.06s; }
.grid .card:nth-child(4) { animation-delay: 0.09s; }
.grid .card:nth-child(5) { animation-delay: 0.12s; }
.grid .card:nth-child(6) { animation-delay: 0.15s; }
.grid .card:nth-child(7) { animation-delay: 0.18s; }
.grid .card:nth-child(8) { animation-delay: 0.21s; }
.grid .card:nth-child(n+9) { animation-delay: 0.24s; }
@keyframes cardFadeIn { from { opacity: 0; transform: translateY(16px) scale(0.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
