/* ==========================================================================
   FirasMovies — legacy component styles.

   Generated from the old styles.css and ui.css by stripping everything the
   new design system owns: the :root token blocks, the element resets, and
   every rule for the nav, footer, buttons, cards, grids, panels, fields and
   skeletons.

   What remains is the page-specific furniture that only ever existed in those
   files — the watch page's cast row and player chrome, the profile page's
   "Wrapped" cards, the leaderboard rows, the legal pages. Roughly ninety
   classes that would otherwise have rendered unstyled.

   It works in the new palette for free: these rules were written against
   --card / --border / --accent, and compat.css aliases those onto the new
   tokens. Load order is fm.css -> legacy.css -> compat.css, so the aliases
   and any deliberate override always win.

   DO NOT EDIT BY HAND. Regenerate, or better, move a rule into fm.css when
   the page it belongs to is properly redesigned.
   ========================================================================== */

/* ---- from styles.css ---- */
* { box-sizing: border-box; margin: 0; padding: 0; }
::selection { background: var(--accent); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
@keyframes tk-fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes tk-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes tk-pop {
  0% { opacity: 0; transform: scale(0.96); }
  100% { opacity: 1; transform: scale(1); }
}
.anim-up { animation: tk-fade-up 0.7s var(--ease) both; }
.anim-in { animation: tk-fade-in 0.9s ease both; }
.anim-pop { animation: tk-pop 0.5s var(--ease) both; }
.delay-1 { animation-delay: 0.08s; }
.delay-2 { animation-delay: 0.16s; }
.delay-3 { animation-delay: 0.24s; }
.delay-4 { animation-delay: 0.32s; }
.reveal { opacity: 1; transform: none; }
.reveal.reveal-ready { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.reveal-ready.revealed { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {

  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }

  .reveal.reveal-ready { opacity: 1; transform: none; }
}
.brand { font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em; transition: opacity .15s; }
.brand:hover { opacity: 0.85; }
.brand span { color: var(--accent); }
@keyframes tk-bell-shake { 0%,100% { transform: rotate(0); } 20% { transform: rotate(-12deg); } 40% { transform: rotate(10deg); } 60% { transform: rotate(-6deg); } }
.notif-panel { position: fixed; top: 60px; right: 12px; width: min(360px, calc(100vw - 24px)); max-height: 70vh; overflow-y: auto;
  background: var(--card); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-card); z-index: 65; display: none; }
.notif-panel.open { display: block; animation: tk-pop .18s var(--ease) both; }
.notif-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--card); }
.notif-head button { background: none; border: none; color: var(--accent); font-size: 0.82rem; font-weight: 600; cursor: pointer; }
.notif-empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.notif-item { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.notif-item:hover { background: var(--bg-soft); }
.notif-item.unread { background: var(--accent-soft); }
.notif-item.critical .notif-ic { animation: tk-pulse 1.4s ease-in-out infinite; }
.notif-ic { font-size: 1.2rem; flex-shrink: 0; }
.notif-body { display: flex; flex-direction: column; min-width: 0; }
.notif-body strong { font-size: 0.9rem; }
.notif-body span { font-size: 0.82rem; color: var(--muted); line-height: 1.4; }
.notif-body time { font-size: 0.72rem; color: var(--muted); opacity: 0.7; margin-top: 3px; }
@keyframes tk-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(229, 9, 20, 0.5); }
  50% { box-shadow: 0 0 0 6px rgba(229, 9, 20, 0); }
}
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.feature {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px;
  transition: transform .25s var(--ease), border-color .25s, box-shadow .25s;
}
.feature:hover { transform: translateY(-4px); border-color: var(--muted); box-shadow: var(--shadow-card); }
.feature .ico {
  font-size: 1.5rem; margin-bottom: 14px;
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); border: 1px solid rgba(229, 9, 20, 0.18);
}
.feature h3 { font-size: 1.05rem; margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: 0.92rem; }
.poster { aspect-ratio: 2/3; width: 100%; object-fit: cover; background: var(--bg-soft); }
.poster.placeholder { display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 2rem; }
.player-wrap { background: #000; border-radius: var(--radius); overflow: hidden; margin-top: 24px; box-shadow: var(--shadow-card); }
.player-wrap video { width: 100%; max-height: 78vh; display: block; background: #000; }
.watch-meta { padding: 28px 0; }
.watch-meta h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 800; }
.watch-meta .tags { color: var(--muted); margin: 8px 0 18px; }
.watch-meta p { color: var(--muted); max-width: 760px; }
.auth-wrap { max-width: 420px; margin: 60px auto; padding: 0 20px; }
.legal { max-width: 800px; margin: 0 auto; padding: 60px 20px; }
.legal h1 { font-size: 2rem; margin-bottom: 6px; }
.legal .updated { color: var(--muted); font-size: 0.85rem; margin-bottom: 32px; }
.legal h2 { font-size: 1.2rem; margin: 28px 0 10px; }
.legal p, .legal li { color: var(--muted); margin-bottom: 10px; }
.legal ul { padding-left: 20px; }
.badge { display: inline-block; padding: 4px 12px; border-radius: 99px; font-size: 0.78rem; font-weight: 700; }
.badge.live { background: rgba(74,222,128,0.15); color: #4ade80; }
.badge.locked { background: rgba(255,107,114,0.15); color: #ff6b72; }
.admin-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 900px) {
 .admin-grid { grid-template-columns: 360px 1fr; align-items: start; }
}
.admin-list { display: flex; flex-direction: column; gap: 10px; }
.admin-item { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; transition: border-color .2s; }
.admin-item:hover { border-color: var(--muted); }
.admin-item img { width: 40px; height: 56px; object-fit: cover; border-radius: 6px; background: var(--bg-soft); }
.admin-item .info { flex: 1; min-width: 0; }
.admin-item .info h4 { font-size: 0.92rem; }
.admin-item .info span { color: var(--muted); font-size: 0.8rem; }
.admin-item button { background: transparent; border: none; color: #ff6b72; cursor: pointer; font-size: 0.85rem; }
.hr { height: 1px; background: var(--border); margin: 24px 0; border: none; }
.loading { text-align: center; color: var(--muted); padding: 40px; }
.lib-toolbar { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.search-status { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 0.9rem; margin: 0 0 16px; min-height: 22px; }
.spinner {
  width: 16px; height: 16px; flex-shrink: 0; border-radius: 50%;
  border: 2px solid var(--border); border-top-color: var(--accent);
  animation: tk-spin 0.8s linear infinite;
}
@keyframes tk-spin { to { transform: rotate(360deg); } }
.indexing-note { text-align: center; padding: 48px 20px; color: var(--muted); }
.indexing-note .spinner { width: 28px; height: 28px; margin: 0 auto 16px; border-width: 3px; }
.skeleton-card { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--card); }
@keyframes tk-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.cast-row { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 10px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.cast-row::-webkit-scrollbar { display: none; }
.cast-card { flex: 0 0 96px; text-align: center; }
.cast-card img, .cast-card .cast-noimg { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; background: var(--card); display: block; margin: 0 auto 8px; border: 1px solid var(--border); }
.cast-card .cast-noimg { display: flex; align-items: center; justify-content: center; font-size: 2rem; font-weight: 800; color: var(--muted); text-transform: uppercase; }
.cast-card strong { display: block; font-size: 0.82rem; line-height: 1.25; }
.cast-card span { display: block; font-size: 0.74rem; color: var(--muted); margin-top: 2px; }
.cast-card:hover strong { color: var(--accent); }
.watch-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 4px; }
.watch-actions .tb-icon { padding: 9px 13px; }
@media (max-width: 640px) {

  .watch-actions { gap: 7px; }

  
  .watch-actions #share-btn .lbl, .watch-actions #trailer-btn .lbl { display: none; }
}
.trailer-pop {
  position: fixed; z-index: 90; border-radius: 14px; overflow: hidden;
  background: #000; box-shadow: 0 24px 60px rgba(0,0,0,0.6);
  border: 1px solid var(--border); opacity: 0; transform: scale(0.92);
  transition: opacity .22s var(--ease), transform .22s var(--ease); pointer-events: none;
}
.trailer-pop.show { opacity: 1; transform: scale(1); }
.trailer-pop iframe, .trailer-pop img { width: 100%; display: block; border: 0; }
.trailer-pop .tp-info { padding: 10px 12px; background: var(--card); }
.trailer-pop .tp-info h4 { font-size: 0.95rem; margin: 0 0 2px; }
.trailer-pop .tp-info .meta { color: var(--muted); font-size: 0.78rem; }
@media (hover: none) {
 .trailer-pop { display: none !important; }
}
.lb-preview { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.lb-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.lb-row:last-child { border-bottom: none; }
.lb-rank { width: 26px; text-align: center; font-weight: 800; font-size: 0.95rem; flex-shrink: 0; color: var(--muted); }
.lb-row.me { background: var(--accent-soft); margin: 0 -12px; padding: 9px 12px; border-radius: 10px; border-bottom: none; }
.lb-medal { font-size: 1.1rem; }
.lb-name { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-time { color: var(--accent-hover); font-weight: 700; font-size: 0.9rem; white-space: nowrap; }
.wrap-stage { position: fixed; inset: 0; z-index: 300; background: #050509; display: none; opacity: 0; transition: opacity .25s ease; }
.wrap-stage.open { display: block; opacity: 1; }
.wrap-track { display: flex; height: 100%; scroll-snap-type: x mandatory; overflow-x: auto; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; }
.wrap-track::-webkit-scrollbar { display: none; }
.wrap-card {
  flex: 0 0 100%; scroll-snap-align: center; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 74px 26px 84px; position: relative; color: #fff; overflow: hidden;
}
.wc-bg1 { background:
  radial-gradient(120% 80% at 50% -10%, #ff2d38 0%, rgba(255,45,56,0) 55%),
  radial-gradient(90% 60% at 80% 110%, #6a0d17 0%, rgba(106,13,23,0) 60%),
  linear-gradient(160deg, #24060a 0%, #0a0a0f 100%); }
.wc-bg2 { background:
  radial-gradient(110% 70% at 20% 0%, #b0219e 0%, rgba(176,33,158,0) 55%),
  radial-gradient(120% 80% at 90% 100%, #e50914 0%, rgba(229,9,20,0) 55%),
  linear-gradient(160deg, #2a0a3f 0%, #150210 100%); }
.wc-bg3 { background:
  radial-gradient(100% 60% at 50% 0%, #ff3b43 0%, rgba(255,59,67,0) 50%),
  linear-gradient(165deg, #1a0207 0%, #0a0a0f 100%); }
.wc-glow { position: absolute; inset: -30%; z-index: 0; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255,255,255,0.12), rgba(255,255,255,0) 70%);
  animation: tk-shine 9s ease-in-out infinite alternate; }
@keyframes tk-shine { 0% { transform: translate(-12%, -8%) scale(1); } 100% { transform: translate(14%, 10%) scale(1.25); } }
.wrap-card .wc-in { max-width: 440px; width: 100%; position: relative; z-index: 2; animation: tk-fade-up .55s var(--ease) both; }
.wrap-top { position: absolute; top: 30px; left: 0; right: 0; text-align: center; z-index: 6;
  font-weight: 800; font-size: 1.05rem; letter-spacing: 0.3px; text-shadow: 0 2px 14px rgba(0,0,0,.4); }
.wrap-top span { color: #ff3b43; }
.wrap-top-tag { color: #fff !important; opacity: 0.55; font-size: 0.62rem; letter-spacing: 3px; vertical-align: middle; margin-left: 4px; }
.wrap-domain { position: absolute; bottom: 28px; left: 0; right: 0; text-align: center; z-index: 6;
  font-size: 0.95rem; font-weight: 800; letter-spacing: 1.5px; opacity: 0.95; text-shadow: 0 2px 14px rgba(0,0,0,.45); }
.wrap-card .wc-label { text-transform: uppercase; letter-spacing: 3px; font-size: 0.74rem; font-weight: 800; opacity: 0.8; margin-bottom: 16px; }
.wrap-card .wc-big { font-size: clamp(3.4rem, 20vw, 6.5rem); font-weight: 800; line-height: 0.95; letter-spacing: -0.04em; margin: 4px 0;
  background: linear-gradient(180deg, #fff, #ffd9db); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.wrap-card .wc-sub { font-size: clamp(1.05rem, 4.5vw, 1.4rem); font-weight: 700; margin-top: 8px; opacity: 0.95; }
.wrap-card .wc-note { opacity: 0.82; margin-top: 18px; font-size: 0.95rem; line-height: 1.55; }
.wrap-card .wc-emoji { font-size: 3.2rem; margin-bottom: 8px; filter: drop-shadow(0 6px 16px rgba(0,0,0,.4)); }
.wc-grid { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }
.wc-stat { flex: 1; min-width: 74px; background: rgba(255,255,255,0.10); border: 1px solid rgba(255,255,255,0.14);
  border-radius: 14px; padding: 14px 8px; backdrop-filter: blur(4px); }
.wc-stat b { display: block; font-size: 1.7rem; font-weight: 800; line-height: 1; }
.wc-stat span { display: block; font-size: 0.66rem; text-transform: uppercase; letter-spacing: 1.2px; opacity: 0.8; margin-top: 6px; }
.wc-persona { margin-top: 22px; display: inline-flex; align-items: center; gap: 8px; background: rgba(0,0,0,0.28);
  border: 1px solid rgba(255,255,255,0.18); padding: 10px 18px; border-radius: 99px; font-size: 1rem; }
.wc-persona-emoji { font-size: 1.3rem; }
.wc-poster-wrap { margin: 4px auto 16px; width: 150px; }
.wc-poster { width: 150px; border-radius: 14px; box-shadow: 0 18px 44px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.1), 0 0 40px rgba(255,45,56,.4);
  animation: tk-pop .5s var(--ease) both; }
.wc-title { font-size: clamp(1.5rem, 7vw, 2.3rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; }
.wc-meta { opacity: 0.85; font-size: 0.9rem; margin-top: 8px; }
.wc-top5 { margin-top: 20px; text-align: left; }
.wc-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.10); }
.wc-row:last-child { border-bottom: none; }
.wc-rank { width: 24px; text-align: center; font-size: 1.3rem; font-weight: 800; opacity: 0.9; flex-shrink: 0; }
.wc-thumb { width: 40px; height: 58px; object-fit: cover; border-radius: 7px; background: rgba(255,255,255,0.12); flex-shrink: 0; box-shadow: 0 6px 16px rgba(0,0,0,.4); }
.wc-row-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wc-row-info strong { font-size: 0.98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wc-row-info span { font-size: 0.78rem; opacity: 0.7; }
.wc-share { margin-top: 22px; font-weight: 700; font-size: 0.95rem; opacity: 0.95; }
.wrap-dots { position: absolute; top: 14px; left: 12px; right: 12px; display: flex; gap: 5px; justify-content: center; z-index: 7; }
.wrap-dots span { flex: 1; max-width: 60px; height: 3px; border-radius: 3px; background: rgba(255,255,255,0.28); transition: background .25s; }
.wrap-dots span.on { background: #fff; }
.wrap-close { position: absolute; top: 26px; right: 16px; z-index: 8; background: rgba(0,0,0,0.3); border: none; color: #fff; width: 36px; height: 36px; border-radius: 50%; font-size: 1rem; cursor: pointer; }
.wrap-tap { position: absolute; top: 0; bottom: 0; z-index: 5; background: none; border: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.wrap-tap.left { left: 0; width: 33%; }
.wrap-tap.right { left: 33%; right: 0; width: 67%; }
.wrap-hint { position: absolute; bottom: 54px; left: 0; right: 0; text-align: center; z-index: 6; color: #fff; font-size: 0.78rem; opacity: 0.7; pointer-events: none; animation: tk-pulse-hint 1.8s ease-in-out infinite; }
@keyframes tk-pulse-hint { 0%,100% { opacity: 0.35; } 50% { opacity: 0.85; } }
main { animation: tk-fade-in 0.3s ease both; }
@keyframes tk-card-in {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.spotlight {
  position: relative; border-radius: 16px; overflow: hidden;
  min-height: clamp(300px, 45vw, 440px);
  display: flex; align-items: flex-end;
  background: var(--card); border: 1px solid var(--border);
}
.spotlight .sp-bg {
  position: absolute; inset: 0; background-size: cover; background-position: center 20%;
  opacity: 0; transition: opacity 1.1s ease; transform: scale(1.02);
}
.spotlight .sp-bg.on { opacity: 1; }
.spotlight::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(3,3,13,0.92) 0%, rgba(3,3,13,0.45) 45%, rgba(3,3,13,0.05) 100%);
  pointer-events: none;
}
.spotlight .sp-content { position: relative; z-index: 2; padding: clamp(20px, 4vw, 36px); max-width: 640px; }
.spotlight .sp-tag { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-hover); margin-bottom: 8px; }
.spotlight h2 { font-size: clamp(1.5rem, 4.5vw, 2.4rem); color: #fff; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 8px; }
.spotlight .sp-meta { color: #c8cede; font-size: 0.88rem; margin-bottom: 10px; }
.spotlight .sp-desc { color: #aab2c8; font-size: 0.92rem; line-height: 1.55; margin-bottom: 18px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.spotlight .sp-dots { position: absolute; right: 18px; bottom: 18px; z-index: 3; display: flex; gap: 7px; }
.spotlight .sp-dots span { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.35); cursor: pointer; transition: background .2s, transform .2s; }
.spotlight .sp-dots span.on { background: var(--accent); transform: scale(1.25); }
.save-btn {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  width: 34px; height: 34px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(3, 3, 13, 0.65); color: #fff; font-size: 1rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  transition: background .2s, transform .15s var(--ease);
}
.save-btn:hover { background: var(--accent); transform: scale(1.1); }
.save-btn.saved { background: var(--accent); }
.watch-backdrop {
  position: absolute; top: 0; left: 0; right: 0; height: 62vh; z-index: -1;
  background-size: cover; background-position: center top; opacity: 0.16;
  -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent);
  mask-image: linear-gradient(to bottom, #000 30%, transparent);
  pointer-events: none;
}
.resume-note {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--accent-soft); border: 1px solid rgba(229, 9, 20, 0.25);
  color: var(--text); border-radius: 10px; padding: 10px 16px;
  font-size: 0.9rem; margin: 4px 0 16px;
}
.stat-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin-bottom: 28px; }
.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.stat-card b { font-size: 1.8rem; display: block; letter-spacing: -0.02em; }
.stat-card span { color: var(--muted); font-size: 0.85rem; }
.fm-side {
  position: fixed; top: 50%; transform: translateY(-50%); z-index: 30;
  width: 160px; height: 600px; display: none;
}
.fm-side.l { left: 16px; }
.fm-side.r { right: 16px; }
@media (min-width: 1500px) {
 .fm-side { display: block; }
}
.fm-strip { max-width: var(--maxw); margin: 8px auto 0; padding: 0 20px; }
.fm-strip .fm-tile { height: 110px; width: 100%; }
@media (max-width: 640px) {
 .fm-strip .fm-tile { height: 90px; }
}
.pill { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 0.72rem; font-weight: 700; }
.pill.public { background: rgba(74,222,128,0.15); color: #4ade80; }
.pill.unlisted { background: rgba(250,204,21,0.16); color: #eab308; }
.pill.private { background: rgba(255,107,114,0.15); color: #ff6b72; }
.pill.success { background: rgba(74,222,128,0.15); color: #4ade80; }
.pill.fail { background: rgba(255,107,114,0.15); color: #ff6b72; }
.pill.unavailable { background: rgba(250,204,21,0.16); color: #eab308; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 24px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { white-space: nowrap; flex-shrink: 0; }
.tabs button { background: none; border: none; color: var(--muted); font-family: inherit; font-size: 0.95rem; font-weight: 600; padding: 12px 16px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .15s, border-color .15s; }
.tabs button.active { color: var(--text); border-bottom-color: var(--accent); }
.tabs button:hover { color: var(--text); }
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); z-index: 200; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-bg.open { display: flex; animation: tk-fade-in 0.2s ease both; }
.modal { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 26px; max-width: 520px; width: 100%; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-card); }
.modal-bg.open .modal { animation: tk-pop 0.25s var(--ease) both; }
.modal h2 { font-size: 1.2rem; margin-bottom: 16px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }
.hist-row { display: flex; align-items: center; gap: 14px; padding: 12px; background: var(--card); border: 1px solid var(--border); border-radius: 10px; margin-bottom: 10px; transition: border-color .2s; }
.hist-row:hover { border-color: var(--muted); }
.hist-row img { width: 46px; height: 64px; object-fit: cover; border-radius: 6px; background: var(--bg-soft); }
.hist-row .h-info { flex: 1; min-width: 0; }
.hist-row .h-info h4 { font-size: 0.95rem; }
.hist-row .h-info span { color: var(--muted); font-size: 0.8rem; }
.profile-head { display: flex; align-items: center; gap: 18px; margin-bottom: 8px; }
.stat-row { display: flex; gap: 28px; flex-wrap: wrap; margin: 8px 0; }
.stat-row .stat b { display: block; font-size: 1.5rem; }
.stat-row .stat span { color: var(--muted); font-size: 0.82rem; }
@media (max-width: 767px) {

  main { animation: none; }
}
@media (max-width: 640px) {

  .save-btn { width: 40px; height: 40px; }

  
  .lib-toolbar { position: sticky; top: 56px; z-index: 20; background: var(--bg);
    padding: 8px 0; margin: 0 -16px 4px; padding-left: 16px; padding-right: 16px;
    display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }

  .lib-toolbar::-webkit-scrollbar { display: none; }

  
  .modal-bg { align-items: flex-end; padding: 0; }

  .modal { border-radius: 20px 20px 0 0; max-width: 100%; max-height: 86dvh; padding-bottom: calc(22px + env(safe-area-inset-bottom)); }

  .modal-bg.open .modal { animation: tk-sheet-up 0.32s var(--ease) both; }

  
  .notif-panel { top: 56px; left: 8px; right: 8px; width: auto; max-height: 78dvh; }

  
  .player-wrap { margin-left: -16px; margin-right: -16px; border-radius: 0; }

  .watch-meta h1 { font-size: 1.4rem; }
}
@keyframes tk-sheet-up {
  from { transform: translateY(40px); opacity: 0.6; }
  to { transform: translateY(0); opacity: 1; }
}
.wrap-stage, #bs-lockscreen { height: 100dvh; }
.hide-on-mobile { }
@media (max-width: 480px) {
 .hide-on-mobile { display: none; }
}

/* ---- from ui.css ---- */
.row { margin: 0 0 clamp(26px, 4vw, 40px); position: relative; }
.row-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.row-head h2 {
  font-size: clamp(1.05rem, 2vw, 1.32rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.row-sub {
  display: block;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0;
  margin-top: 2px;
}
.row-link {
  font-size: 0.84rem;
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.2s var(--ease);
}
.row-link:hover { color: var(--accent-hover); }
.row-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-60%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(10, 10, 15, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text);
  font-size: 1.1rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity 0.2s var(--ease), background 0.2s var(--ease);
  z-index: 2;
}
.row-nav.prev { left: -6px; }
.row-nav.next { right: -6px; }
.row-nav:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.row-nav:focus-visible { opacity: 1; }
@media (hover: none) {
 .row-nav { display: none; }
}
.pcard { display: block; position: relative; }
.pcard-score {
  position: absolute;
  top: 7px;
  right: 7px;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.72);
  color: #ffd15c;
  backdrop-filter: blur(4px);
}
.pcard-prog {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.22);
}
.pcard-prog span { display: block; height: 100%; background: var(--accent); }
@keyframes tk-shimmer {
  0% { background-position: -420px 0; }
  100% { background-position: 420px 0; }
}
.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.stat-cell { background: var(--bg-soft); padding: 18px 16px; text-align: center; }
.stat-cell b {
  display: block;
  font-size: clamp(1.3rem, 3vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}
.stat-cell span { font-size: 0.76rem; color: var(--muted); }
.gate-bg {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  background: rgba(6, 6, 12, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.28s var(--ease);
}
.gate-bg.open { opacity: 1; }
.gate-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: clamp(26px, 5vw, 40px);
  max-width: 430px;
  width: 100%;
  text-align: center;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.6);
  transform: translateY(14px) scale(0.98);
  transition: transform 0.28s var(--ease);
}
.gate-bg.open .gate-card { transform: none; }
.gate-card h2 {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}
.gate-card p {
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.6;
  margin-bottom: 20px;
}
.gate-benefits {
  text-align: left;
  display: grid;
  gap: 9px;
  margin: 0 0 22px;
  font-size: 0.88rem;
}
.gate-benefits li { list-style: none; display: flex; gap: 9px; align-items: flex-start; }
.gate-benefits li::before { content: '✓'; color: #4ade80; font-weight: 800; flex-shrink: 0; }
.gate-note { font-size: 0.78rem; color: var(--muted); margin-top: 14px; }
.gate-toast {
  position: absolute;
  right: 14px;
  bottom: 14px;
  background: rgba(6, 6, 12, 0.88);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 9px 13px;
  font-size: 0.8rem;
  z-index: 5;
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  gap: 9px;
}
.gate-toast a { color: var(--accent-hover); font-weight: 700; }
@keyframes tk-spin { to { transform: rotate(360deg); } }
.spin {
  display: inline-block;
  width: 15px;
  height: 15px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: tk-spin 0.7s linear infinite;
  vertical-align: -3px;
}
.reveal-up { opacity: 0; transform: translateY(22px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); will-change: opacity, transform; }
.reveal-up.in { opacity: 1; transform: none; }
.row.reveal-up { transition-delay: 0.04s; }
@keyframes tk-card-rise {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.stat-cell { transition: background 0.25s var(--ease); }
.stat-cell b { display: block; animation: tk-fade-up 0.5s var(--ease) both; }
@media (hover: hover) {

  .stat-cell:hover { background: var(--card); }
}
.row-nav { transition: opacity 0.2s var(--ease), background 0.2s var(--ease), transform 0.2s var(--ease); }
.row-nav:active { transform: translateY(-60%) scale(0.9); }
@keyframes tk-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes tk-toast-in { from { opacity: 0; transform: translateY(16px) scale(0.96); } to { opacity: 1; transform: none; } }
.gate-benefits li { animation: tk-fade-up 0.4s var(--ease) both; }
.gate-benefits li:nth-child(1) { animation-delay: 0.06s; }
.gate-benefits li:nth-child(2) { animation-delay: 0.12s; }
.gate-benefits li:nth-child(3) { animation-delay: 0.18s; }
.gate-benefits li:nth-child(4) { animation-delay: 0.24s; }
.binge-card {
  position: absolute;
  right: 16px; bottom: 16px;
  width: min(340px, 78vw);
  background: rgba(8, 8, 14, 0.94);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  z-index: 6;
  display: flex;
  gap: 12px;
  align-items: center;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: tk-fade-up 0.35s var(--ease) both;
}
.binge-card img { width: 58px; height: 84px; object-fit: cover; border-radius: 7px; flex-shrink: 0; }
.binge-card .bc-body { min-width: 0; flex: 1; }
.binge-card .bc-label { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.binge-card .bc-title { font-size: 0.92rem; font-weight: 700; margin: 2px 0 8px; line-height: 1.25; }
.binge-card .bc-actions { display: flex; gap: 8px; }
.binge-ring {
  --p: 0;
  width: 40px; height: 40px; border-radius: 50%;
  flex-shrink: 0;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--border) 0);
  display: grid; place-items: center;
  transition: none;
}
.binge-ring span { width: 32px; height: 32px; border-radius: 50%; background: var(--card); display: grid; place-items: center; font-weight: 800; font-size: 0.85rem; }
@media (prefers-reduced-motion: reduce) {
 .binge-card { animation: none; }
}
.player-wrap { position: relative; }
.fs-btn {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 3;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(10, 10, 15, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.18s var(--ease), background 0.18s var(--ease);
}
.player-wrap:hover .fs-btn,
.fs-btn:focus-visible { opacity: 1; }
.fs-btn:hover { background: rgba(10, 10, 15, 0.9); }
@media (hover: none) {

  .fs-btn { opacity: 0.85; }
}
.player-wrap:fullscreen { background: #000; display: flex; align-items: center; }
.player-wrap:fullscreen iframe { max-height: 100vh !important; height: 100vh; }
.player-wrap:-webkit-full-screen { background: #000; }
.player-wrap:-webkit-full-screen iframe { max-height: 100vh !important; height: 100vh; }
