:root {
  color-scheme: dark;
  --bg: #06070a;
  --panel: #111318;
  --panel-2: #191c22;
  --text: #f7f7f8;
  --muted: #b9bec8;
  --soft: #737b8b;
  --line: rgba(255, 255, 255, .12);
  --red: #e50914;
  --red-2: #ff3741;
  --cyan: #3dd7ff;
  --gold: #f6c85f;
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

body.is-loading {
  overflow: hidden;
}

.app-loader {
  position: fixed;
  z-index: 200;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  background: #06070a;
  color: var(--text);
  text-align: center;
  transition: opacity .22s ease, visibility .22s ease;
}

.app-loader.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.loader-mark {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 8px;
  background: var(--red);
  font-size: 32px;
  font-weight: 900;
  box-shadow: 0 20px 48px rgba(229, 9, 20, .42);
  animation: loaderPulse 1.1s ease-in-out infinite;
}

.app-loader p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.toast-stack {
  position: fixed;
  z-index: 260;
  top: 86px;
  right: clamp(16px, 4vw, 42px);
  display: grid;
  gap: 10px;
  width: min(420px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-left: 5px solid var(--cyan);
  border-radius: 8px;
  padding: 14px 16px;
  background: rgba(12, 14, 18, .96);
  box-shadow: 0 18px 46px rgba(0, 0, 0, .42);
  color: var(--text);
  pointer-events: auto;
  animation: toastIn .18s ease-out;
}

.toast strong {
  font-size: 15px;
}

.toast span {
  color: var(--muted);
  line-height: 1.35;
}

.toast.success {
  border-left-color: #35d07f;
}

.toast.error {
  border-left-color: var(--red-2);
}

.toast.info {
  border-left-color: var(--cyan);
}

.security-lock {
  position: fixed;
  z-index: 500;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 45%, rgba(229, 9, 20, .22), transparent 30%),
    rgba(3, 3, 5, .98);
  text-align: center;
}

.security-lock > div {
  max-width: 520px;
}

.security-lock-mark {
  display: grid;
  width: 74px;
  height: 74px;
  place-items: center;
  margin: 0 auto 18px;
  border-radius: 14px;
  background: var(--red);
  color: white;
  font-size: 46px;
  font-weight: 1000;
  box-shadow: 0 0 54px rgba(229, 9, 20, .42);
}

.security-lock h2 {
  margin: 0 0 10px;
  font-size: clamp(30px, 5vw, 54px);
}

.security-lock p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.announcement-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(0, 212, 255, .18);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 16px;
  background: rgba(0, 212, 255, .08);
  color: var(--text);
}

.announcement-bar span {
  color: var(--muted);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes loaderPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  display: block;
}

.topbar {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(180px, 300px) auto;
  gap: 16px;
  align-items: center;
  min-height: 68px;
  padding: 0 clamp(18px, 4vw, 58px);
  background: linear-gradient(180deg, rgba(6, 7, 10, .96), rgba(6, 7, 10, .55) 72%, transparent);
  backdrop-filter: blur(10px);
}

.account-box {
  position: relative;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: end;
}

.notify-button,
.profile-page-button {
  position: relative;
  flex: 0 0 auto;
}

.notify-button span {
  position: absolute;
  top: -5px;
  right: -5px;
  display: grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 999px;
  padding: 0 5px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.notification-popover {
  position: absolute;
  top: 50px;
  right: 0;
  z-index: 25;
  width: min(380px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: rgba(13, 15, 19, .98);
  box-shadow: 0 22px 60px rgba(0, 0, 0, .52);
}

.notification-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.notification-list {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
}

.notification-item {
  display: grid;
  gap: 3px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, .055);
  color: var(--text);
  text-align: left;
}

.notification-item small {
  color: var(--muted);
}

.empty-note {
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, .045);
  color: var(--muted);
  font-weight: 700;
}

.profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 4px 10px 4px 4px;
  background: rgba(255, 255, 255, .08);
  color: var(--text);
  font-weight: 800;
}

.profile-chip img {
  width: 32px;
  height: 32px;
  border-radius: 5px;
  object-fit: cover;
}

.search-popover {
  position: absolute;
  top: 62px;
  right: clamp(118px, 10vw, 210px);
  z-index: 24;
  width: min(560px, calc(100vw - 32px));
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 12px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(229, 9, 20, .14), transparent 34%),
    rgba(11, 12, 16, .96);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .62);
  backdrop-filter: blur(18px);
}

.search-popover-head {
  display: grid;
  gap: 5px;
  margin-bottom: 14px;
}

.search-popover-head strong {
  font-size: 18px;
}

.search-popover-head span {
  color: var(--soft);
  font-size: 13px;
}

.search-popover-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.icon-btn.small {
  width: 32px;
  height: 32px;
  min-height: 32px;
  font-size: 13px;
}

.search-genre-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.search-filter-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 16px;
}

.search-filter-row label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.search-filter-row select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: #111318;
  color: var(--text);
}

.search-genre {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
  background: rgba(255, 255, 255, .07);
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
  text-align: center;
}

.search-genre.is-selected {
  border-color: rgba(255, 255, 255, .36);
  background: var(--red);
  color: white;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-size: 22px;
  font-weight: 850;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 6px;
  background: var(--red);
  color: white;
  box-shadow: 0 14px 30px rgba(229, 9, 20, .38);
}

.nav-links {
  display: flex;
  gap: 6px;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-link,
.pill {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  white-space: nowrap;
}

.nav-link {
  padding: 9px 13px;
}

.nav-link:hover,
.nav-link.is-active,
.pill:hover,
.pill.is-selected {
  color: var(--text);
  background: rgba(255, 255, 255, .12);
}

.search {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(11, 13, 18, .72);
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.search svg {
  flex: 0 0 auto;
  color: var(--soft);
}

.search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.hero {
  position: relative;
  min-height: 76vh;
  display: grid;
  align-items: end;
  overflow: hidden;
  padding: 120px clamp(18px, 4vw, 58px) 82px;
}

.hero-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(6, 7, 10, .95) 0%, rgba(6, 7, 10, .74) 30%, rgba(6, 7, 10, .12) 72%),
    linear-gradient(0deg, var(--bg) 0%, transparent 34%);
}

.hero-content {
  position: relative;
  max-width: 650px;
}

.kicker {
  margin: 0 0 10px;
  color: var(--cyan);
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 14px;
  font-size: clamp(42px, 8vw, 86px);
  line-height: .95;
  letter-spacing: 0;
}

.hero p:not(.kicker) {
  max-width: 560px;
  color: #e4e6eb;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn,
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius);
  min-height: 44px;
  color: var(--text);
}

.btn {
  gap: 9px;
  padding: 0 18px;
  font-weight: 800;
}

.btn.primary {
  background: var(--text);
  color: #050506;
}

.btn.primary svg {
  color: #050506;
  stroke-width: 2.4;
}

#heroPlay svg {
  width: 19px;
  height: 19px;
  color: #050506;
  fill: #050506;
  stroke: #050506;
}

.btn.ghost {
  background: rgba(255, 255, 255, .16);
  color: var(--text);
}

.content-shell {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  padding: 0 clamp(18px, 4vw, 58px) 58px;
  margin-top: -38px;
}

.content-shell > .announcement-bar {
  order: 1;
}

.content-shell > .quick-panel {
  order: 2;
}

.content-shell > .watch-picker {
  order: 3;
}

.content-shell > .rail-section {
  order: 4;
}

.content-shell > #homeRails {
  order: 6;
}

.content-shell > .rail-section:has(#mixedRail) {
  order: 7;
}

.content-shell > #recommendationSection {
  order: 8;
}

.content-shell > #myListSection {
  order: 9;
}

.content-shell > #newFollowSection {
  order: 10;
}

.content-shell > #continueSection {
  order: 11;
}

.content-shell > #historySection {
  order: 12;
}

body.search-mode .content-shell > .announcement-bar,
body.search-mode .content-shell > .quick-panel,
body.search-mode .content-shell > .watch-picker,
body.search-mode .content-shell > #homeRails,
body.search-mode .content-shell > .rail-section:has(#weeklyRail),
body.search-mode .content-shell > .rail-section:has(#mixedRail),
body.search-mode .content-shell > #recommendationSection,
body.search-mode .content-shell > #myListSection,
body.search-mode .content-shell > #newFollowSection,
body.search-mode .content-shell > #continueSection,
body.search-mode .content-shell > #historySection,
body.search-mode .content-shell > .rail-section:has(#latestEpisodes) {
  display: none;
}

body.search-mode .hero {
  min-height: 660px;
}

body.search-mode .hero-shade {
  background:
    linear-gradient(90deg, rgba(6, 7, 10, .96) 0%, rgba(6, 7, 10, .78) 35%, rgba(6, 7, 10, .2) 76%),
    linear-gradient(0deg, var(--bg) 0%, rgba(6, 7, 10, .36) 42%, transparent);
}

body.search-mode #featuredTitle::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 22px;
  margin-right: 10px;
  border-radius: 999px;
  background: var(--red);
  vertical-align: -4px;
}

.profile-gate {
  position: fixed;
  z-index: 18;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 110px 20px 40px;
  background: rgba(6, 7, 10, .96);
}

.profile-gate-inner {
  width: min(980px, 100%);
  text-align: center;
}

.profile-gate h1 {
  margin-bottom: 30px;
  font-size: clamp(34px, 6vw, 64px);
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(var(--profile-count, 5), 150px);
  justify-content: center;
  gap: clamp(14px, 2.2vw, 28px);
  margin-bottom: 28px;
}

.profile-grid[data-count="1"] {
  --profile-count: 1;
}

.profile-grid[data-count="2"] {
  --profile-count: 2;
}

.profile-grid[data-count="3"] {
  --profile-count: 3;
}

.profile-grid[data-count="4"] {
  --profile-count: 4;
}

.profile-grid[data-count="5"] {
  --profile-count: 5;
}

.profile-card {
  display: grid;
  gap: 12px;
  justify-items: center;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
  min-width: 0;
}

.profile-card img {
  width: 150px;
  aspect-ratio: 1;
  border: 3px solid transparent;
  border-radius: 8px;
  object-fit: cover;
  transition: border-color .16s ease, transform .16s ease;
}

.profile-card:hover {
  color: var(--text);
}

.profile-card:hover img {
  border-color: white;
  transform: translateY(-2px);
}

.add-profile-icon {
  display: grid;
  width: 150px;
  aspect-ratio: 1;
  place-items: center;
  border: 3px solid transparent;
  border-radius: 8px;
  background: rgba(255, 255, 255, .12);
  color: var(--muted);
  font-size: 64px;
  font-weight: 300;
}

.add-profile-card:hover .add-profile-icon {
  border-color: white;
  color: white;
}

.quick-panel {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 20px;
  scrollbar-width: none;
}

.watch-picker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 2px 0 26px;
  padding: 20px clamp(18px, 3vw, 34px);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 8px;
  background:
    linear-gradient(105deg, rgba(229, 9, 20, .24), rgba(18, 20, 26, .92) 45%, rgba(0, 194, 255, .13)),
    #111318;
  box-shadow: inset 0 1px rgba(255, 255, 255, .05);
}

.watch-picker h2 {
  margin: 4px 0 4px;
  font-size: clamp(24px, 3vw, 38px);
  letter-spacing: 0;
}

.watch-picker span {
  color: var(--soft);
}

.watch-picker .btn {
  flex: 0 0 auto;
}

.pill {
  padding: 9px 14px;
  background: rgba(255, 255, 255, .07);
}

.rail-section {
  margin-top: 22px;
}

.seo-discovery {
  margin-top: 38px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 8px;
  background: rgba(255, 255, 255, .035);
  color: #d9dde6;
}

.seo-discovery h2 {
  margin: 0 0 10px;
  font-size: clamp(20px, 2.2vw, 28px);
}

.seo-discovery p {
  max-width: 980px;
  margin: 8px 0;
  color: var(--muted);
  line-height: 1.65;
}

.seo-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.seo-keywords span {
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, .055);
  color: #f1f3f7;
  font-size: 13px;
  font-weight: 700;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.section-head h2,
.episodes-head h3 {
  margin: 0;
  font-size: 22px;
}

.section-subtitle {
  display: block;
  margin-top: 4px;
  color: var(--soft);
  font-size: 13px;
}

#resultCount {
  color: var(--soft);
  font-size: 14px;
}

.rail-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--soft);
  font-size: 14px;
}

.rail-arrow {
  width: 36px;
  height: 36px;
  border-color: rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .07);
}

.rail-arrow svg {
  width: 19px;
  height: 19px;
}

.rail-arrow:hover {
  border-color: rgba(255, 255, 255, .32);
  background: rgba(255, 255, 255, .14);
}

.poster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(164px, 1fr));
  column-gap: 16px;
  row-gap: 30px;
  align-items: start;
}

.poster-grid.compact {
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
}

.mini-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(132px, 11vw, 166px);
  gap: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 10px;
  max-width: 100%;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  cursor: grab;
  user-select: none;
  touch-action: pan-y;
}

.mini-rail::-webkit-scrollbar,
.wide-rail::-webkit-scrollbar,
.quick-panel::-webkit-scrollbar,
.nav-links::-webkit-scrollbar {
  display: none;
}

.mini-rail.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
}

.mini-rail.is-dragging .poster-card {
  pointer-events: none;
}

.mini-rail .poster-card {
  width: 100%;
}

.poster-card {
  display: grid;
  grid-template-rows: auto 40px 18px;
  align-content: start;
  min-width: 0;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.poster-card > span:not(.poster-thumb) {
  display: block;
}

.poster-thumb {
  display: block;
  width: 100%;
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 2px;
  background: var(--panel);
}

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

.poster-card:hover img {
  transform: scale(1.04);
}

.badge {
  position: absolute;
  left: 8px;
  bottom: 8px;
  max-width: calc(100% - 16px);
  padding: 4px 7px;
  border-radius: 5px;
  background: rgba(0, 0, 0, .72);
  color: white;
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progress-line,
.episode-progress {
  display: block;
  overflow: hidden;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
}

.progress-line {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 0;
}

.progress-line span,
.episode-progress span {
  display: block;
  height: 100%;
  background: var(--red);
}

.poster-title {
  min-height: 40px;
  margin: 9px 0 3px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
  display: -webkit-box !important;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.poster-meta {
  color: var(--soft);
  font-size: 13px;
  line-height: 1.3;
  min-height: 18px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seo-link {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.wide-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(280px, 27vw, 430px);
  gap: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 10px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  cursor: grab;
  user-select: none;
  touch-action: pan-y;
}

.wide-rail.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
}

.wide-rail.is-dragging .wide-card {
  pointer-events: none;
}

.wide-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 8px;
  padding: 0;
  background: #12141a;
  color: white;
  text-align: left;
  scroll-snap-align: start;
}

.wide-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .22s ease;
}

.wide-card:hover img {
  transform: scale(1.04);
}

.wide-card-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, .82), rgba(0, 0, 0, .18) 58%, transparent);
}

.wide-card-copy {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 13px;
  display: grid;
  gap: 4px;
}

.wide-card-copy strong {
  font-size: 16px;
}

.wide-card-copy small {
  color: rgba(255, 255, 255, .78);
}

.picker-modal {
  width: min(940px, calc(100vw - 28px));
}

.picker-modal-body {
  overflow: hidden;
  padding: clamp(22px, 4vw, 40px);
  background:
    radial-gradient(circle at 15% 0%, rgba(229, 9, 20, .24), transparent 34%),
    radial-gradient(circle at 84% 22%, rgba(0, 194, 255, .18), transparent 30%),
    #0b0c10;
}

.picker-head {
  max-width: 650px;
}

.picker-head h2 {
  margin: 4px 0 6px;
  font-size: clamp(32px, 5vw, 58px);
  letter-spacing: 0;
}

.picker-head span {
  color: var(--soft);
}

.picker-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 22px);
  margin-top: 28px;
  perspective: 1200px;
}

.picker-card {
  position: relative;
  overflow: hidden;
  min-height: clamp(270px, 36vw, 390px);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 8px;
  padding: 0;
  background: #14161d;
  color: white;
  text-align: left;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .48);
  opacity: 0;
  transform: translateY(24px) rotateY(-32deg) rotate(var(--tilt, 0deg)) scale(.92);
  animation: pickerDeal .64s cubic-bezier(.18, .85, .28, 1.08) forwards;
  animation-delay: var(--delay);
}

.picker-card:nth-child(1) {
  --tilt: -3deg;
}

.picker-card:nth-child(2) {
  --tilt: 1deg;
}

.picker-card:nth-child(3) {
  --tilt: 3deg;
}

.picker-card:hover {
  border-color: rgba(255, 255, 255, .38);
  transform: translateY(-8px) rotate(0deg) scale(1.03);
}

.picker-card-back {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  background:
    repeating-linear-gradient(135deg, rgba(229, 9, 20, .9) 0 8px, rgba(10, 12, 18, .96) 8px 16px),
    #111318;
  animation: pickerBackOut .34s ease forwards;
  animation-delay: calc(var(--delay) + .32s);
}

.picker-card-back span {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 8px;
  background: var(--red);
  font-size: 34px;
  font-weight: 900;
}

.picker-card-front {
  position: absolute;
  inset: 0;
}

.picker-card-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.picker-card-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, .92));
}

.picker-card-copy {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  display: grid;
  gap: 5px;
}

.picker-card-copy strong {
  font-size: 18px;
  line-height: 1.18;
}

.picker-card-copy small {
  color: rgba(255, 255, 255, .76);
}

.picker-actions {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

@keyframes pickerDeal {
  to {
    opacity: 1;
    transform: translateY(0) rotateY(0deg) rotate(var(--tilt, 0deg)) scale(1);
  }
}

@keyframes pickerBackOut {
  to {
    opacity: 0;
    transform: rotateY(88deg);
    pointer-events: none;
  }
}

.hover-preview {
  position: fixed;
  z-index: 35;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 6px;
  background: #111318;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .72);
  color: white;
  cursor: pointer;
  transform-origin: center;
  animation: previewIn .16s ease-out both;
}

.hover-preview-media {
  aspect-ratio: 16 / 9;
  background: #05060a;
}

.hover-preview-media video,
.hover-preview-media iframe,
.hover-preview-media img {
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

.hover-preview-copy {
  display: grid;
  gap: 4px;
  padding: 12px 14px 14px;
}

.hover-preview-copy strong {
  font-size: 18px;
}

.hover-preview-copy span {
  color: var(--soft);
  font-size: 13px;
}

@keyframes previewIn {
  from {
    opacity: 0;
    transform: scale(.94);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

.episode-card,
.episode-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .06);
  color: inherit;
}

.episode-card {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 12px;
  padding: 10px;
  text-align: left;
}

.episode-card img {
  width: 84px;
  height: 58px;
  object-fit: cover;
  border-radius: 6px;
}

.episode-card strong,
.episode-row strong {
  display: block;
  margin-bottom: 4px;
}

.episode-card span,
.episode-row span {
  color: var(--soft);
  font-size: 13px;
}

.episode-progress {
  margin-top: 8px;
  width: min(220px, 100%);
}

.modal {
  width: min(980px, calc(100vw - 28px));
  max-width: calc(100vw - 28px);
  overflow-x: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0;
  background: #0d0f13;
  color: var(--text);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .65);
}

.auth-modal,
.profile-modal {
  width: min(760px, calc(100vw - 28px));
  background: #111;
}

.auth-modal {
  width: min(980px, calc(100vw - 24px));
  background:
    linear-gradient(135deg, rgba(229, 9, 20, .16), transparent 38%),
    #08090d;
}

.auth-modal .modal-body {
  padding: 0;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(280px, .82fr) minmax(320px, 1fr);
  min-height: 610px;
}

.auth-brand {
  position: relative;
  display: flex;
  min-height: 100%;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  padding: 34px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .08), rgba(0, 0, 0, .92)),
    url("assets/auth-anime-welcome.png") center / cover;
}

.auth-brand::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 22%, rgba(0, 229, 255, .2), transparent 28%),
    linear-gradient(90deg, rgba(0, 0, 0, .22), rgba(0, 0, 0, .72));
}

.auth-brand > * {
  position: relative;
  z-index: 1;
}

.auth-brand .brand-mark {
  position: absolute;
  top: 30px;
  left: 30px;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 12px;
  background: var(--brand);
  color: white;
  font-size: 34px;
  font-weight: 1000;
  box-shadow: 0 18px 50px rgba(229, 9, 20, .42);
}

.auth-brand p {
  margin: 0 0 10px;
  color: #2ee7ff;
  font-size: 13px;
  font-weight: 1000;
}

.auth-brand h2 {
  max-width: 380px;
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 54px);
  line-height: .96;
}

.auth-brand small {
  max-width: 390px;
  color: #d7dbe4;
  font-size: 15px;
  line-height: 1.55;
}

.auth-panel {
  display: grid;
  align-content: center;
  padding: 58px 42px 42px;
}

.auth-tabs {
  display: inline-flex;
  gap: 6px;
  margin-bottom: 20px;
  padding: 4px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .08);
}

.auth-tab {
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  padding: 0 14px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.auth-tab.is-active {
  background: var(--text);
  color: #06070a;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form h2 {
  margin-bottom: 4px;
  font-size: 30px;
}

.auth-form label,
.profile-editor label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.auth-form input,
.profile-editor input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0b0d12;
  color: var(--text);
  padding: 12px;
  outline: 0;
}

.bot-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.terms-check {
  display: flex !important;
  grid-template-columns: none;
  align-items: flex-start;
  gap: 10px !important;
  color: var(--text) !important;
  line-height: 1.35;
}

.terms-check input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex: 0 0 auto;
  accent-color: var(--brand);
}

.terms-check span {
  display: block;
  font-weight: 700;
}

.terms-check strong {
  display: block;
  margin-bottom: 3px;
}

.terms-box {
  max-height: 150px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .045);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  padding: 12px;
}

.terms-box strong {
  color: var(--text);
}

.terms-box ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.terms-box li + li {
  margin-top: 7px;
}

.form-message {
  min-height: 0;
  margin: 0;
  border-radius: 8px;
  padding: 0;
  color: var(--muted);
}

.form-message:not(:empty) {
  border: 1px solid rgba(255, 255, 255, .14);
  padding: 10px 12px;
  background: rgba(255, 255, 255, .06);
}

.form-message.success {
  border-color: rgba(53, 208, 127, .45);
  color: #8ff0ba;
}

.form-message.error {
  border-color: rgba(255, 55, 65, .52);
  color: #ffb5ba;
}

.btn.is-busy {
  opacity: .7;
  pointer-events: none;
}

.text-link {
  width: fit-content;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0;
  text-align: left;
  text-decoration: underline;
}

.text-link:hover {
  color: var(--text);
}

.login-intro {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #030304;
  color: white;
  pointer-events: none;
}

.login-intro.is-playing {
  animation: introFade 2.1s ease forwards;
}

.intro-mark {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  animation: introMark 2.1s cubic-bezier(.18, .82, .28, 1) forwards;
}

.intro-x {
  display: grid;
  width: clamp(76px, 12vw, 132px);
  aspect-ratio: 1;
  place-items: center;
  border-radius: 18px;
  background: var(--brand);
  color: white;
  font-size: clamp(54px, 9vw, 96px);
  font-weight: 1000;
  box-shadow: 0 0 70px rgba(229, 9, 20, .58);
}

.intro-name {
  font-size: clamp(42px, 8vw, 96px);
  font-weight: 1000;
  letter-spacing: 0;
  opacity: 0;
  transform: translateX(-18px);
  animation: introName 2.1s ease forwards;
}

.intro-scan {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.28), transparent);
  transform: translateX(-120%);
  animation: introScan 2.1s ease forwards;
}

@keyframes introFade {
  0%, 72% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes introMark {
  0% { transform: scale(.78); filter: blur(8px); opacity: 0; }
  18% { transform: scale(1); filter: blur(0); opacity: 1; }
  55% { transform: scale(1.04); }
  100% { transform: scale(1.22); opacity: 0; }
}

@keyframes introName {
  18% { opacity: 0; transform: translateX(-18px); }
  34%, 72% { opacity: 1; transform: translateX(0); }
  100% { opacity: 0; transform: translateX(20px); }
}

@keyframes introScan {
  12% { transform: translateX(-120%); }
  55% { transform: translateX(120%); }
  100% { transform: translateX(120%); }
}

.modal::backdrop {
  background: rgba(0, 0, 0, .76);
}

.modal-body {
  position: relative;
  max-width: 100%;
  overflow-x: hidden;
  padding: 26px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, .12);
}

.close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
}

.details-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.details-poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: 0 18px 36px rgba(0, 0, 0, .42);
}

.details-copy {
  min-width: 0;
  padding-right: 38px;
}

.details-copy .kicker {
  margin-bottom: 12px;
  color: #d6d9e0;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .02em;
}

.details-copy h2 {
  margin-bottom: 10px;
  font-size: 34px;
  line-height: 1.08;
}

.details-copy p {
  color: #d8dbe2;
  line-height: 1.6;
}

.details-actions {
  display: grid;
  gap: 12px;
  margin: 18px 0 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .025)),
    rgba(255, 255, 255, .03);
}

.details-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(92px, 1fr));
  gap: 8px;
}

.details-stats span {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(0, 0, 0, .22);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  text-align: center;
}

.similar-block {
  margin-top: 18px;
}

.similar-block h3 {
  margin: 0 0 12px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 0;
}

.tag {
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, .1);
  color: #dfe3ea;
  font-size: 13px;
}

.source-note {
  border: 1px solid rgba(246, 200, 95, .22);
  border-left: 3px solid var(--gold);
  border-radius: 9px;
  padding: 9px 12px;
  background: rgba(246, 200, 95, .08);
  color: #f4e4bc;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.quick-episode-tool {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: end;
  padding: 10px;
  border: 1px dashed rgba(255, 255, 255, .16);
  border-radius: 8px;
  background: rgba(255, 255, 255, .035);
}

.site-footer {
  display: flex;
  justify-content: center;
  gap: 18px;
  padding: 28px clamp(18px, 4vw, 58px) 44px;
  color: var(--muted);
}

.profile-page-modal,
.legal-modal {
  width: min(860px, calc(100vw - 28px));
}

.profile-dashboard {
  display: grid;
  gap: 18px;
}

.profile-dashboard-head {
  display: flex;
  gap: 16px;
  align-items: center;
}

.profile-dashboard-head img {
  width: 78px;
  height: 78px;
  border-radius: 12px;
  object-fit: cover;
}

.profile-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.profile-stat {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 12px;
  background: rgba(255, 255, 255, .055);
}

.profile-stat strong {
  display: block;
  font-size: 24px;
}

.profile-stat span {
  color: var(--muted);
  font-size: 13px;
}

.profile-mini-section {
  display: grid;
  gap: 10px;
}

.profile-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-chip-list span {
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, .08);
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
}

.legal-copy {
  display: grid;
  gap: 14px;
  color: #d8dbe2;
  line-height: 1.6;
}

.legal-copy h2,
.profile-dashboard h2 {
  margin: 0;
}

.player-next-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: 12px;
  padding: 0 18px 18px;
}

.player-next-card,
.player-similar-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 9px;
  padding: 9px;
  background: rgba(255, 255, 255, .055);
  color: var(--text);
  text-align: left;
}

.player-next-card img,
.player-similar-card img {
  width: 96px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 7px;
}

.player-next-card small,
.player-similar-card small {
  color: var(--muted);
}

.rating-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0;
}

.vote-btn {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
  background: rgba(255, 255, 255, .08);
  color: var(--text);
  font-weight: 800;
}

.vote-btn.icon-action {
  position: relative;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 9px;
  background: rgba(255, 255, 255, .065);
  color: rgba(255, 255, 255, .88);
}

.vote-btn.icon-action:hover {
  border-color: rgba(255, 255, 255, .28);
  background: rgba(255, 255, 255, .12);
  transform: translateY(-1px);
}

.vote-btn.icon-action svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.vote-btn.icon-action::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 9px);
  z-index: 12;
  max-width: 220px;
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 7px;
  background: rgba(12, 12, 15, .96);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .35);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(4px);
  transition: opacity .16s ease, transform .16s ease;
}

.vote-btn.icon-action:hover::after,
.vote-btn.icon-action:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.vote-btn.is-active {
  border-color: rgba(229, 9, 20, .65);
  background: rgba(229, 9, 20, .28);
  color: #fff;
}

.rating-pill {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 9px;
  padding: 0 12px;
  background: rgba(0, 0, 0, .22);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.episodes-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin: 24px 0 12px;
}

.episodes-head h3 {
  flex: 0 0 auto;
}

.season-tabs {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  overflow-x: hidden;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.season-tabs button {
  display: grid;
  min-width: 112px;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 11px;
  background: rgba(255, 255, 255, .07);
  color: var(--text);
  text-align: left;
}

.season-tabs button.is-active {
  border-color: rgba(229, 9, 20, .75);
  background: rgba(229, 9, 20, .26);
  box-shadow: inset 0 -2px 0 var(--red);
}

.season-tabs small {
  color: var(--muted);
  font-size: 12px;
}

#seasonSelect {
  display: none;
}

select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  padding: 0 10px;
}

.episode-list {
  display: grid;
  gap: 10px;
}

.episode-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 10px;
  text-align: left;
}

.episode-row img {
  width: 112px;
  height: 64px;
  object-fit: cover;
  border-radius: 6px;
}

.play-state {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  color: var(--red-2);
  font-weight: 800;
  font-size: 13px;
}

.report-flag {
  position: relative;
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 8px;
  background: rgba(255, 255, 255, .06);
  color: var(--muted);
  transition: .16s ease;
}

.report-flag svg {
  width: 17px;
  height: 17px;
}

.report-flag:hover,
.report-flag:focus-visible {
  border-color: rgba(255, 55, 65, .7);
  background: rgba(229, 9, 20, .22);
  color: #fff;
  transform: translateY(-1px);
}

.report-flag::after {
  content: attr(title);
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 4;
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 7px;
  background: rgba(12, 12, 15, .96);
  color: var(--text);
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity .16s ease, transform .16s ease;
}

.report-flag:hover::after,
.report-flag:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.player-modal {
  width: min(1100px, calc(100vw - 18px));
  background: #030304;
}

.player-shell {
  position: relative;
}

.viewer-badge {
  position: absolute;
  z-index: 2;
  top: 14px;
  left: 14px;
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(0, 0, 0, .72);
  color: white;
  font-size: 13px;
  font-weight: 800;
}

.player-close {
  top: 12px;
  right: 12px;
}

.player-frame {
  display: grid;
  min-height: min(62vw, 620px);
  aspect-ratio: 16 / 9;
  place-items: center;
  background: #000;
  overflow: hidden;
}

.player-frame iframe,
.player-frame video {
  width: 100%;
  height: 100%;
  border: 0;
  transition: filter .22s ease, transform .22s ease;
}

.player-frame.ai-upscale-on iframe,
.player-frame.ai-upscale-on video {
  filter: contrast(1.18) saturate(1.14) brightness(1.035);
  image-rendering: auto;
  transform: scale(1.01);
}

.next-episode-prompt {
  position: absolute;
  z-index: 4;
  right: 18px;
  bottom: 92px;
  width: min(390px, calc(100% - 36px));
  animation: nextPromptIn .22s ease both;
}

.next-prompt-card {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 8px;
  padding: 10px;
  background: rgba(12, 13, 17, .94);
  color: white;
  text-align: left;
  box-shadow: 0 22px 60px rgba(0, 0, 0, .58);
}

.next-prompt-card img {
  width: 92px;
  height: 52px;
  border-radius: 5px;
  object-fit: cover;
}

.next-prompt-card small {
  display: block;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.next-prompt-card strong {
  display: block;
  margin-top: 3px;
  color: white;
  line-height: 1.18;
}

.next-prompt-card b {
  border-radius: 999px;
  padding: 8px 11px;
  background: white;
  color: #050506;
  font-size: 12px;
}

@keyframes nextPromptIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.empty-player {
  max-width: 520px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
  line-height: 1.55;
}

.player-info {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 16px;
  color: var(--muted);
}

.player-title-line {
  display: flex;
  min-width: 0;
  gap: 10px;
  align-items: center;
}

.player-info strong {
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-upscale-toggle {
  flex: 0 0 auto;
  min-height: 32px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  padding: 0 12px;
  background: rgba(255, 255, 255, .08);
  color: #dfe3ea;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.ai-upscale-toggle[aria-pressed="true"] {
  border-color: rgba(0, 229, 255, .8);
  background: linear-gradient(135deg, rgba(0, 229, 255, .32), rgba(229, 9, 20, .35));
  box-shadow: 0 0 22px rgba(0, 229, 255, .16);
  color: white;
}

.is-hidden {
  display: none !important;
}

.admin-panel {
  margin-top: 34px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(12, 14, 18, .92);
}

.edit-profile-title {
  margin: 0;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, .25);
  font-size: clamp(38px, 6vw, 62px);
  font-weight: 400;
}

.profile-editor-list {
  margin-top: 18px;
}

.profile-editor {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  border: 0;
  padding: 0;
  background: transparent;
}

.editable-avatar {
  position: relative;
  width: 130px;
  height: 130px;
}

.editable-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 4px;
  object-fit: cover;
  filter: brightness(.72);
}

.editable-avatar span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: white;
  font-size: 34px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .7);
}

.edit-profile-fields {
  display: grid;
  gap: 16px;
}

.profile-name-input {
  width: 100%;
  border: 0;
  border-radius: 0;
  background: #666;
  color: white;
  padding: 8px 10px;
  font-size: 18px;
  outline: 0;
}

.compact-label {
  display: grid;
  gap: 6px;
  justify-items: start;
  color: #ddd;
  font-size: 14px;
}

.compact-label select {
  min-height: 32px;
  border-color: rgba(255, 255, 255, .7);
  border-radius: 0;
  background: #111;
  color: white;
}

.game-handle,
.maturity-settings,
.autoplay-settings {
  display: grid;
  gap: 8px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, .15);
}

.game-handle p,
.maturity-settings p,
.autoplay-settings p {
  margin: 0;
  color: #ddd;
}

.game-handle small,
.maturity-settings small {
  color: #cfcfcf;
  line-height: 1.35;
}

.game-handle input {
  width: 100%;
  border: 0;
  background: #666;
  color: white;
  padding: 9px 10px;
}

.maturity-settings strong {
  width: fit-content;
  padding: 7px 10px;
  background: #555;
  color: white;
  font-size: 13px;
}

.maturity-select {
  width: fit-content;
  min-width: 180px;
  min-height: 36px;
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 0;
  background: #111;
  color: white;
  padding: 0 10px;
}

.small-outline {
  width: fit-content;
  min-height: 34px;
  border: 1px solid #555;
  background: transparent;
  color: #aaa;
  padding: 0 18px;
}

.autoplay-settings label {
  display: flex;
  gap: 8px;
  align-items: center;
  color: #ddd;
  font-size: 13px;
}

.autoplay-settings input {
  width: 22px;
  height: 22px;
  accent-color: transparent;
}

.avatar-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 150px;
  overflow: auto;
  padding-right: 4px;
}

.avatar-picks button {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 3px;
  background: transparent;
  cursor: pointer;
}

.avatar-picks button.is-selected {
  border-color: var(--red-2);
  box-shadow: 0 0 0 2px rgba(229, 9, 20, .28);
}

.avatar-picks img {
  width: 42px;
  height: 42px;
  border-radius: 5px;
  object-fit: cover;
}

.favorite-genre-settings {
  border-top: 1px solid rgba(255, 255, 255, .16);
  padding-top: 16px;
}

.favorite-genre-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.favorite-genre-grid label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, .06);
}

.report-list {
  display: grid;
  gap: 8px;
}

.report-row {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, .05);
}

.profile-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, .25);
}

.profile-actions .btn {
  min-height: 44px;
  padding: 0 26px;
  border-radius: 0;
  font-size: 14px;
  letter-spacing: 0;
}

.btn:disabled,
.btn[disabled] {
  cursor: not-allowed;
  opacity: .45;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-import {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 8px;
  background: rgba(255, 255, 255, .035);
  padding: 12px;
}

.admin-import .admin-help {
  grid-column: 1 / -1;
  min-height: 18px;
  font-size: 12px;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.admin-card {
  display: grid;
  gap: 14px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: rgba(255, 255, 255, .05);
}

.admin-card h3 {
  margin: 0;
  font-size: 18px;
}

.admin-card label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.admin-card input,
.admin-card select,
.admin-card textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0b0d12;
  color: var(--text);
  padding: 10px 11px;
  outline: 0;
}

.admin-card textarea {
  resize: vertical;
}

.admin-card select[multiple] {
  min-height: 126px;
}

.bulk-preview {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(61, 215, 255, .34);
  border-radius: 8px;
  padding: 12px;
  background: rgba(61, 215, 255, .08);
}

.bulk-preview p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.bulk-preview div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.bulk-preview span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 9px;
  background: rgba(255, 255, 255, .07);
  color: #dfe3ea;
  font-size: 12px;
  font-weight: 800;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.admin-help {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.library-manager {
  margin-top: 16px;
}

.admin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.admin-row:first-child {
  border-top: 0;
}

.admin-row small {
  display: block;
  margin-top: 4px;
  color: var(--soft);
}

.admin-episode-list {
  display: flex;
  flex-basis: 100%;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.admin-episode-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .06);
  color: var(--text);
  border-radius: 6px;
  overflow: hidden;
}

.admin-episode-pill button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  padding: 7px 9px;
}

.admin-episode-pill:hover {
  border-color: rgba(255, 255, 255, .36);
}

.admin-episode-pill .episode-delete {
  align-self: stretch;
  background: rgba(229, 9, 20, .22);
  color: #ffb5ba;
}

.check-line {
  align-items: center;
  flex-direction: row !important;
  gap: 10px;
}

.check-line input {
  width: auto;
}

.bulk-format-guide {
  display: grid;
  grid-template-columns: repeat(7, minmax(112px, 1fr));
  gap: 8px;
  margin-top: -4px;
  overflow-x: auto;
  padding-bottom: 3px;
}

.bulk-format-guide span {
  display: grid;
  gap: 4px;
  min-width: 112px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 6px;
  background: rgba(255, 255, 255, .05);
  color: var(--soft);
  font-size: 12px;
  white-space: nowrap;
}

.bulk-format-guide strong {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  color: white;
  font-size: 13px;
}

.bulk-format-guide .is-important {
  border-color: rgba(229, 9, 20, .6);
  background: rgba(229, 9, 20, .18);
  color: white;
}

.bulk-format-guide .is-important strong {
  background: var(--red);
}

.bulk-link-note {
  margin: 8px 0 0;
  padding: 12px;
  border-left: 3px solid var(--red);
  border-radius: 6px;
  background: rgba(229, 9, 20, .1);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.bulk-link-note code,
.admin-help code {
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, .09);
  color: white;
}

.btn.danger {
  min-height: 36px;
  padding: 0 12px;
  background: rgba(229, 9, 20, .18);
  color: #ffb5ba;
}

@media (max-width: 760px) {
  body {
    overflow-x: hidden;
  }

  .topbar {
    grid-template-columns: 1fr auto;
    gap: 9px 10px;
    padding-top: 12px;
    padding-bottom: 12px;
    background: rgba(6, 7, 10, .95);
  }

  .brand {
    min-width: 0;
    font-size: 20px;
  }

  .brand-mark {
    flex: 0 0 auto;
  }

  .nav-links {
    grid-column: 1 / -1;
    order: 3;
    margin-inline: -18px;
    padding: 0 18px 2px;
    scroll-snap-type: x mandatory;
  }

  .nav-link {
    min-height: 38px;
    padding: 8px 12px;
    scroll-snap-align: start;
  }

  .search {
    grid-column: 1 / -1;
    order: 4;
    width: 100%;
    min-height: 42px;
  }

  .account-box {
    justify-content: end;
    min-width: 0;
  }

  .account-box .btn {
    min-height: 38px;
    padding: 0 12px;
  }

  .profile-chip {
    max-width: 150px;
    min-height: 38px;
  }

  .profile-chip span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .search-popover {
    position: fixed;
    top: 156px;
    left: 16px;
    right: 16px;
    width: auto;
    max-height: calc(100vh - 178px);
    overflow: auto;
  }

  .notification-popover {
    position: fixed;
    top: 76px;
    left: 12px;
    right: 12px;
    width: auto;
  }

  .search-filter-row,
  .quick-episode-tool,
  .profile-stat-grid,
  .player-next-panel {
    grid-template-columns: 1fr;
  }

  .next-episode-prompt {
    right: 10px;
    bottom: 124px;
    width: calc(100% - 20px);
  }

  .next-prompt-card {
    grid-template-columns: 78px 1fr;
  }

  .next-prompt-card img {
    width: 78px;
    height: 46px;
  }

  .next-prompt-card b {
    grid-column: 1 / -1;
    justify-self: stretch;
    text-align: center;
  }

  .content-shell {
    padding: 18px 14px 34px;
  }

  .announcement-bar {
    align-items: flex-start;
    border-radius: 8px;
    font-size: 13px;
  }

  .hero {
    min-height: 520px;
    padding: 190px 18px 46px;
  }

  .hero-shade {
    background:
      linear-gradient(180deg, rgba(6, 7, 10, .2), rgba(6, 7, 10, .92) 72%, var(--bg)),
      linear-gradient(90deg, rgba(6, 7, 10, .72), transparent);
  }

  .hero-content {
    width: min(100%, 520px);
  }

  .hero h1 {
    max-width: 100%;
    font-size: clamp(38px, 12vw, 58px);
    line-height: 1;
    overflow-wrap: anywhere;
  }

  .hero p:not(.kicker) {
    display: -webkit-box;
    max-width: 100%;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    font-size: 16px;
  }

  .hero-actions {
    gap: 10px;
  }

  .hero-actions .btn {
    flex: 1 1 135px;
    justify-content: center;
  }

  .section-head {
    align-items: flex-start;
    gap: 8px;
  }

  .section-head h2 {
    font-size: 22px;
  }

  .quick-panel {
    margin-inline: -14px;
    padding: 0 14px;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }

  .watch-picker {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
  }

  .watch-picker .btn {
    width: 100%;
    justify-content: center;
  }

  .pill {
    flex: 0 0 auto;
  }

  .poster-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 10px;
    row-gap: 22px;
  }

  .poster-card {
    min-width: 0;
  }

  .poster-thumb {
    border-radius: 6px;
  }

  .poster-title {
    min-height: 34px;
    font-size: 14px;
  }

  .poster-meta {
    font-size: 12px;
  }

  .wide-rail {
    grid-auto-columns: minmax(260px, 82vw);
    margin-inline: -14px;
    padding: 0 14px 8px;
  }

  .wide-card {
    min-height: 146px;
  }

  .rail-actions {
    margin-left: auto;
  }

  .rail-arrow {
    width: 34px;
    height: 34px;
  }

  .picker-card-grid {
    grid-template-columns: 1fr;
    max-height: 62vh;
    overflow: auto;
    padding-right: 2px;
  }

  .picker-card {
    min-height: 250px;
  }

  .mini-rail {
    grid-auto-columns: minmax(136px, 38vw);
    margin-inline: -14px;
    padding: 0 14px 8px;
  }

  .episode-strip {
    grid-template-columns: 1fr;
  }

  .episode-card {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .episode-card img {
    width: 96px;
    height: 62px;
  }

  .auth-shell {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .auth-brand {
    min-height: 230px;
    padding: 86px 22px 24px;
  }

  .auth-brand .brand-mark {
    top: 22px;
    left: 22px;
  }

  .auth-brand h2 {
    font-size: 34px;
  }

  .auth-panel {
    padding: 24px 20px 22px;
  }

  .profile-grid,
  .profile-grid[data-count] {
    grid-template-columns: repeat(2, minmax(112px, 142px));
    gap: 22px 14px;
    justify-content: center;
  }

  .profile-gate-inner {
    padding: 90px 18px 38px;
  }

  .profile-gate h1 {
    font-size: clamp(42px, 15vw, 66px);
  }

  .profile-card img,
  .add-profile-icon {
    width: min(136px, 100%);
    height: auto;
    aspect-ratio: 1;
  }

  .modal {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    overflow: auto;
    border-radius: 8px;
  }

  .modal-body {
    padding: 18px;
  }

  .close {
    top: 8px;
    right: 8px;
  }

  .details-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .details-poster {
    max-width: 160px;
  }

  .details-copy {
    padding-right: 0;
  }

  .details-copy h2 {
    padding-right: 44px;
    font-size: 28px;
  }

  .details-actions {
    padding: 10px;
  }

  .rating-row {
    align-items: center;
  }

  .vote-btn {
    flex: 1 1 140px;
  }

  .vote-btn.icon-action {
    flex: 0 0 42px;
  }

  .rating-pill {
    flex: 0 1 auto;
  }

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

  .details-stats span {
    white-space: normal;
  }

  .episode-row {
    grid-template-columns: 96px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
  }

  .episodes-head {
    display: grid;
    gap: 10px;
  }

  .season-tabs {
    justify-content: flex-start;
    margin-inline: 0;
    padding: 0 0 8px;
  }

  .season-tabs button {
    flex: 1 1 132px;
    min-width: 0;
  }

  .episode-row > .play-state {
    grid-column: 1 / -1;
    justify-self: stretch;
    border-top: 1px solid var(--line);
    padding-top: 8px;
  }

  .episode-row img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .player-modal {
    width: 100vw;
    max-height: 100vh;
    border-radius: 0;
  }

  .player-frame {
    min-height: auto;
    width: 100%;
  }

  .player-info {
    display: grid;
    padding: 12px;
  }

  .player-title-line {
    align-items: flex-start;
  }

  .viewer-badge {
    top: 10px;
    left: 10px;
    font-size: 12px;
  }

  .admin-panel {
    margin-top: 24px;
    padding: 14px;
  }

  .admin-import {
    grid-template-columns: 1fr;
  }

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

  .admin-actions {
    width: 100%;
  }

  .admin-actions .btn {
    flex: 1 1 150px;
  }

  .admin-card {
    padding: 14px;
  }

  .admin-row {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-row .btn {
    width: 100%;
  }

  .admin-episode-pill {
    width: 100%;
    justify-content: space-between;
  }

  .admin-episode-pill button:first-child {
    min-width: 0;
    overflow: hidden;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .profile-editor {
    grid-template-columns: 1fr;
  }

  .editable-avatar {
    width: 110px;
    height: 110px;
  }

  .profile-actions .btn {
    flex: 1 1 130px;
  }
}

@media (max-width: 420px) {
  .topbar {
    padding-inline: 12px;
  }

  .brand span:last-child {
    max-width: 92px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .content-shell {
    padding-inline: 10px;
  }

  .poster-grid {
    column-gap: 8px;
  }

  .hero {
    min-height: 500px;
    padding-inline: 14px;
  }

  .hero h1 {
    font-size: clamp(34px, 13vw, 52px);
  }

  .episode-card {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .episode-card img {
    width: 82px;
    height: 56px;
  }
}
