@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  color-scheme: dark;
  --bg: #101112;
  --surface: #17191a;
  --surface-raised: #1e2021;
  --surface-soft: #141617;
  --ink: #f0eee9;
  --muted: #949696;
  --muted-dark: #686b6b;
  --line: rgba(240, 238, 233, .105);
  --line-strong: rgba(240, 238, 233, .18);
  --red: #9b3946;
  --red-light: #c15a62;
  --sand: #c3a782;
  --sans: 'DM Sans', 'Segoe UI', sans-serif;
  --display: 'Manrope', 'Segoe UI', sans-serif;
  --wide: 1440px;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); min-height: 100vh; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
::selection { background: rgba(155, 57, 70, .45); color: white; }

.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  height: 76px; padding: 0 clamp(22px, 5.2vw, 84px); display: flex; align-items: center;
  gap: clamp(28px, 5.2vw, 82px); position: sticky; top: 0; z-index: 30;
  background: rgba(16, 17, 18, .94); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.wordmark { display: inline-flex; align-items: center; gap: 12px; flex-shrink: 0; }
.wordmark-symbol { width: 26px; height: 23px; display: flex; align-items: end; gap: 3px; padding: 0 1px 2px; border-bottom: 1px solid rgba(195,167,130,.78); transform: skewX(-8deg); }
.wordmark-symbol i { display: block; width: 6px; background: var(--sand); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.wordmark-symbol i:nth-child(1), .wordmark-symbol i:nth-child(3) { height: 14px; background: #a14954; }
.wordmark-symbol i:nth-child(2) { height: 21px; background: #e1c29a; }
.wordmark-text { font: 800 15px/1 var(--display); letter-spacing: .15em; }
.wordmark-sub { display: block; color: var(--muted); font: 500 7px/1.8 var(--sans); letter-spacing: .17em; }
.primary-nav { height: 100%; display: flex; align-items: center; gap: 34px; }
.primary-nav a { height: 100%; display: flex; align-items: center; position: relative; color: #a7a8a6; font-size: 13px; transition: color .2s ease; }
.primary-nav a:hover, .primary-nav a.active { color: var(--ink); }
.primary-nav a.active::after { content: ""; height: 2px; position: absolute; bottom: -1px; left: 0; right: 0; background: var(--red-light); }
.topbar-actions { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.header-search { width: clamp(190px, 22vw, 278px); height: 38px; position: relative; }
.header-search svg { width: 15px; height: 15px; fill: none; stroke: #939595; stroke-width: 1.6; position: absolute; top: 11px; left: 12px; pointer-events: none; }
.header-search input { width: 100%; height: 100%; color: var(--ink); background: #191b1c; border: 1px solid var(--line); border-radius: 2px; padding: 0 12px 0 37px; outline: none; font-size: 12px; }
.header-search input:focus { border-color: rgba(195, 167, 130, .6); }
.header-search input::placeholder { color: #777a79; }
.search-suggestions { position: absolute; z-index: 45; top: 46px; right: 0; width: min(370px, 88vw); background: #1b1d1e; border: 1px solid var(--line-strong); box-shadow: 0 14px 40px rgba(0,0,0,.4); }
.suggestion-item { display: flex; align-items: center; gap: 12px; padding: 9px; border-bottom: 1px solid var(--line); }
.suggestion-item:last-child { border-bottom: 0; }
.suggestion-item:hover { background: rgba(255,255,255,.045); }
.suggestion-item img { width: 34px; height: 46px; object-fit: cover; }
.suggestion-copy { min-width: 0; }
.suggestion-title { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.suggestion-meta { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.suggestion-empty { padding: 15px; color: var(--muted); font-size: 12px; }
.library-shortcut { width: 35px; height: 35px; display: grid; place-items: center; border: 1px solid var(--line); color: #bfc0bc; }
.library-shortcut:hover { border-color: var(--sand); color: var(--sand); }
.library-shortcut svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.account-control { min-height: 35px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 1px; color: #e5e2da; background: transparent; cursor: pointer; font-size: 10px; white-space: nowrap; transition: border-color .18s, background .18s; }
.account-control:hover { border-color: rgba(195,167,130,.65); background: rgba(255,255,255,.035); }
.account-control:disabled { opacity: .45; cursor: not-allowed; }
.account-control.signed-in { padding-left: 5px; }
.account-avatar, .profile-avatar { display: grid; flex: 0 0 auto; place-items: center; border-radius: 50%; color: #f0eee9; font: 600 10px var(--display); }
.account-avatar { width: 23px; height: 23px; }
.avatar-tone-0 { background: #485053; }
.avatar-tone-1 { background: #853d46; }
.avatar-tone-2 { background: #856d50; }
.avatar-tone-3 { background: #51536a; }
.account-name { max-width: 118px; overflow: hidden; text-overflow: ellipsis; }

main { flex: 1; min-height: 70vh; }
.hero { height: clamp(540px, 51vw, 710px); min-height: 540px; position: relative; overflow: clip; background: #17191a; border-bottom: 1px solid var(--line); }
.hero-image { position: absolute; inset: 0; background-color: #17191a; background-position: center center; background-repeat: no-repeat; background-size: cover; opacity: .74; animation: hero-enter .55s ease both; }
.hero-image::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(16,17,18,.99) 0%, rgba(16,17,18,.89) 26%, rgba(16,17,18,.45) 53%, rgba(16,17,18,.12) 100%), linear-gradient(0deg, rgba(16,17,18,.92) 0%, transparent 46%, rgba(16,17,18,.14) 100%); }
.hero::after { content: ""; width: 1px; position: absolute; top: 12%; bottom: 13%; left: clamp(28px, 7vw, 110px); background: linear-gradient(transparent, rgba(240,238,233,.28), transparent); }
.hero-content { position: relative; z-index: 2; width: min(610px, 55%); margin-left: clamp(52px, 10.8vw, 172px); padding-top: clamp(112px, 17vw, 220px); }
.eyebrow { color: var(--sand); font-size: 10px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
.hero-kicker { display: flex; align-items: center; gap: 11px; margin-bottom: 19px; color: #d5d3cc; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.hero-kicker::before { content: ""; width: 26px; height: 1px; background: var(--red-light); }
.hero-title { max-width: 600px; margin: 0; font: 600 clamp(42px, 6vw, 78px)/1.04 var(--display); letter-spacing: -.065em; text-wrap: balance; text-shadow: 0 2px 32px rgba(0,0,0,.22); }
.hero-title-native { margin-top: 13px; color: rgba(240,238,233,.62); font-size: 13px; letter-spacing: .06em; }
.hero-description { max-width: 490px; margin: 24px 0 0; color: rgba(237,235,229,.77); font-size: 13px; line-height: 1.8; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hero-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 9px 13px; margin-top: 22px; color: #d6d3cc; font-size: 11px; }
.hero-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--sand); }
.rating-mark { color: var(--sand); font-weight: 600; }
.hero-actions { display: flex; align-items: center; gap: 11px; margin-top: 29px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 10px; min-height: 44px; padding: 0 20px; border: 1px solid transparent; border-radius: 2px; cursor: pointer; font-size: 11px; font-weight: 600; letter-spacing: .04em; transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease; }
.button:hover { transform: translateY(-1px); }
.button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.button-primary { background: var(--ink); color: #171819; }
.button-primary:hover { background: white; }
.button-secondary { border-color: rgba(240,238,233,.38); color: var(--ink); background: rgba(16,17,18,.2); }
.button-secondary:hover { background: rgba(240,238,233,.09); border-color: rgba(240,238,233,.7); }
.button-accent { background: var(--red); color: #fff; }
.button-accent:hover { background: #ad4652; }
.button-quiet { border-color: var(--line); color: #cac9c4; background: transparent; }
.button-quiet:hover { border-color: var(--line-strong); background: rgba(255,255,255,.045); }
.button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.hero-index { position: absolute; right: clamp(25px, 5vw, 80px); bottom: 35px; z-index: 3; display: flex; align-items: center; gap: 9px; color: rgba(240,238,233,.75); font-size: 10px; letter-spacing: .12em; }
.hero-index-line { width: 42px; height: 1px; background: rgba(240,238,233,.4); }
.hero-index-num { color: var(--sand); }
.hero-pager { position: absolute; bottom: 26px; right: clamp(120px, 16vw, 245px); display: flex; gap: 6px; z-index: 4; }
.hero-dot { width: 18px; height: 2px; padding: 0; border: 0; background: rgba(240,238,233,.38); cursor: pointer; }
.hero-dot.active { background: var(--red-light); }

.content-wrap { width: min(var(--wide), 100%); margin: 0 auto; padding: 0 clamp(22px, 5.2vw, 84px); }
.home-content { padding-top: 28px; }
.section-block { padding: 32px 0 20px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 17px; }
.section-kicker { margin-bottom: 7px; color: var(--sand); font-size: 9px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; }
.section-title { margin: 0; font: 600 21px/1.2 var(--display); letter-spacing: -.035em; }
.section-link { display: inline-flex; align-items: center; gap: 7px; color: #a7a8a5; font-size: 11px; transition: color .18s; }
.section-link:hover { color: var(--ink); }
.section-link svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.card-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 15px; }
.anime-card { min-width: 0; position: relative; animation: rise-in .36s ease both; }
.card-image-wrap { position: relative; aspect-ratio: 2 / 3; overflow: hidden; isolation: isolate; background: #202223; }
.poster-fallback { position: absolute; inset: 0; background: #202223; }
.card-image[hidden], .detail-poster[hidden], .admin-media-image[hidden] { display: none; }
.detail-poster-wrap { position: relative; width: 178px; aspect-ratio: 2 / 2.8; flex: 0 0 auto; box-shadow: 0 16px 36px rgba(0,0,0,.45); }
.detail-poster-wrap .poster-fallback { position: absolute; }
.card-image { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; object-position: center; background: #202223; transition: transform .36s cubic-bezier(.2,.7,.2,1), filter .3s; }
.anime-card:hover .card-image { transform: scale(1.045); filter: brightness(.72); }
.card-overlay { position: absolute; inset: 0; z-index: 2; opacity: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 11px; background: rgba(8,9,10,.28); transition: opacity .22s ease; pointer-events: none; }
.anime-card:hover .card-overlay, .anime-card:focus-within .card-overlay { opacity: 1; }
.card-overlay button { pointer-events: auto; }
.card-overlay-top { display: flex; justify-content: flex-end; }
.icon-button { width: 31px; height: 31px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.54); color: white; background: rgba(16,17,18,.7); cursor: pointer; transition: background .2s, border-color .2s; }
.icon-button:hover { background: var(--red); border-color: var(--red); }
.icon-button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.65; }
.card-play { align-self: center; width: 48px; height: 48px; border-radius: 50%; opacity: 0; transform: scale(.88); transition: opacity .22s ease, transform .22s ease, background .2s, border-color .2s; }
.anime-card:hover .card-play, .anime-card:focus-within .card-play { opacity: 1; transform: scale(1); }
.card-play svg { width: 16px; height: 16px; fill: currentColor; stroke: none; margin-left: 2px; }
.card-info { padding-top: 10px; }
.card-title { display: block; overflow: hidden; color: #e5e3de; font-size: 12px; font-weight: 500; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; transition: color .18s; }
.card-title:hover { color: white; }
.card-native { height: 15px; overflow: hidden; margin-top: 3px; color: #777a79; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.card-meta { display: flex; align-items: center; gap: 7px; margin-top: 7px; color: #969896; font-size: 10px; }
.card-meta .meta-sep { width: 2px; height: 2px; border-radius: 50%; background: #626564; }
.card-score { margin-left: auto; color: var(--sand); }
.library-status-line { margin-bottom: 4px; color: var(--sand); font-size: 9px; letter-spacing: .045em; text-transform: uppercase; }
.card-progress { height: 2px; margin-top: 10px; background: rgba(255,255,255,.13); }
.card-progress span { height: 100%; display: block; background: var(--red-light); }
.admin-stage { min-height: calc(100vh - 184px); display: grid; place-items: center; padding: 64px 24px; }
.admin-login-panel { width: min(430px, 100%); padding: 34px; border: 1px solid #343636; background: #171919; box-shadow: 0 22px 55px rgba(0,0,0,.28); }
.admin-title { margin: 0; font: 600 clamp(28px, 4vw, 44px)/1.08 var(--display); letter-spacing: -.045em; }
.admin-login-panel .page-intro { margin: 13px 0 27px; }
.admin-login-panel .filter-label { display: block; margin: 17px 0 7px; }
.admin-return { display: inline-block; margin-top: 19px; }
.admin-shell { width: min(1280px, calc(100% - 48px)); margin: 0 auto; padding: 64px 0 82px; }
.admin-heading { display: flex; justify-content: space-between; align-items: end; gap: 26px; padding-bottom: 30px; border-bottom: 1px solid #303232; }
.admin-heading .page-intro { max-width: 590px; margin-bottom: 0; }
.admin-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.admin-catalogue { padding-top: 32px; }
.admin-telegram { margin-top: 28px; padding: 24px; border: 1px solid #303232; background: #171919; }
.admin-telegram .section-heading { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.admin-telegram .page-intro { margin-top: 12px; }
.telegram-upload { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px 14px; align-items: end; margin-top: 20px; }
.telegram-upload .filter-label { grid-column: 1/-1; margin: 0; }
.telegram-upload .filter-control { height: auto; min-height: 40px; padding: 8px; }
.telegram-upload progress { grid-column: 1/-1; width: 100%; height: 7px; accent-color: var(--sand); }
.telegram-upload #telegram-upload-status { grid-column: 1/-1; min-height: 18px; margin: 0; }
.telegram-limits { margin: 20px 0 0; color: var(--muted-dark); font-size: 10px; line-height: 1.65; }
.telegram-test-player { display: block; width: min(640px,100%); max-height: 360px; margin-top: 18px; background: #090a0a; }
.admin-telegram .error { color: #df8d83; }
.admin-search { display: flex; gap: 10px; margin: 18px 0 25px; max-width: 660px; }
.admin-search .source-input { flex: 1; min-width: 0; }
.admin-media-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.admin-media-card { min-width: 0; border: 1px solid #303232; background: #171919; }
.admin-media-preview { position: relative; aspect-ratio: 16 / 8; overflow: hidden; background-color: #202223; background-position: center; background-repeat: no-repeat; background-size: cover; }
.admin-media-preview::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(16,17,18,.06), rgba(16,17,18,.48)); pointer-events: none; }
.admin-media-image { position: absolute; z-index: 1; top: 11%; bottom: 11%; left: 5%; width: auto; height: 78%; aspect-ratio: 2 / 3; object-fit: cover; object-position: center; border: 1px solid rgba(255,255,255,.16); box-shadow: 0 12px 28px rgba(0,0,0,.4); }
.admin-media-preview .poster-fallback { z-index: 1; top: 11%; bottom: 11%; left: 5%; width: auto; height: 78%; aspect-ratio: 2 / 2.8; border: 1px solid rgba(255,255,255,.16); }
.admin-media-card > div:last-child { padding: 13px 14px 15px; }
.admin-media-card h3 { overflow: hidden; margin: 0; color: #e9e7e2; font: 600 15px/1.3 var(--display); text-overflow: ellipsis; white-space: nowrap; }
.admin-media-card p { margin: 6px 0 0; color: #8d908e; font-size: 11px; }

.page-heading { padding: clamp(48px, 6vw, 76px) 0 24px; border-bottom: 1px solid var(--line); }
.page-heading .section-title { font-size: clamp(30px, 4vw, 44px); }
.page-intro { max-width: 620px; margin: 11px 0 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.discover-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 38px; padding: 28px 0 70px; }
.filter-panel { border-right: 1px solid var(--line); padding-right: 24px; }
.filter-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.filter-head h2 { margin: 0; font: 600 12px var(--display); letter-spacing: .07em; text-transform: uppercase; }
.text-button { padding: 5px 0; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 10px; }
.text-button:hover { color: var(--ink); }
.filter-group { padding-top: 17px; }
.filter-label { display: block; margin-bottom: 8px; color: #c8c7c1; font-size: 11px; }
.muted-inline { color: var(--muted-dark); font-size: 9px; }
.filter-control { width: 100%; height: 36px; padding: 0 9px; border: 1px solid var(--line); border-radius: 1px; background: #181a1b; color: #dedcd5; outline: none; font-size: 11px; }
.filter-control:focus { border-color: rgba(195,167,130,.55); }
.genre-filter { height: 130px; padding: 7px; }
.genre-filter option { padding: 4px; }
.filter-actions { display: grid; gap: 8px; margin-top: 21px; }
.results-toolbar { min-height: 37px; display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 17px; }
.results-count { color: var(--muted); font-size: 11px; }
.results-sort { width: 145px; }
.card-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 24px 15px; }
.load-more-wrap { display: flex; justify-content: center; margin-top: 30px; }
.empty-state, .error-state { min-height: 260px; display: grid; place-items: center; padding: 35px; text-align: center; background: var(--surface-soft); border: 1px solid var(--line); }
.empty-mark { width: 39px; height: 39px; margin: 0 auto 15px; display: grid; place-items: center; border: 1px solid rgba(195,167,130,.5); color: var(--sand); font: 500 17px var(--display); }
.empty-title { margin: 0; font: 600 17px var(--display); }
.empty-copy { max-width: 390px; margin: 8px auto 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.empty-state .button, .error-state .button { margin-top: 19px; }

.skeleton { background: linear-gradient(90deg, #191b1c 25%, #202223 38%, #191b1c 60%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; }
.skeleton-card .skeleton-poster { aspect-ratio: 2/2.8; }
.skeleton-card .skeleton-line { height: 10px; margin-top: 10px; }
.skeleton-card .skeleton-line.short { width: 60%; margin-top: 7px; }

.detail-hero { min-height: 340px; position: relative; display: flex; align-items: end; overflow: hidden; background: #191b1c; border-bottom: 1px solid var(--line); }
.detail-banner { position: absolute; inset: 0; background-color: #17191a; background-position: center center; background-repeat: no-repeat; background-size: cover; opacity: .42; }
.detail-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, var(--bg) 0%, rgba(16,17,18,.65) 38%, rgba(16,17,18,.4) 100%), linear-gradient(90deg, rgba(16,17,18,.6), transparent 80%); }
.detail-summary { width: min(var(--wide),100%); position: relative; z-index: 1; display: grid; grid-template-columns: 178px minmax(0, 700px); align-items: end; gap: 28px; margin: 0 auto; padding: 50px clamp(22px,5.2vw,84px) 31px; }
.detail-poster { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; object-position: center; background: #202223; }
.detail-title { margin: 0; font: 600 clamp(30px,4vw,49px)/1.08 var(--display); letter-spacing: -.05em; text-wrap: balance; }
.detail-native { margin-top: 10px; color: #a6a7a3; font-size: 12px; }
.detail-description { max-width: 720px; margin: 17px 0 0; color: #c3c2bc; font-size: 12px; line-height: 1.8; }
.detail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 13px; margin-top: 16px; color: #c9c7c0; font-size: 10px; }
.genre-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.genre-chip { padding: 5px 8px; border: 1px solid var(--line-strong); color: #c9c8c2; font-size: 9px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 20px; }
.custom-list-select { width: auto; min-width: 150px; max-width: 220px; }
.detail-columns { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 42px; padding-top: 31px; padding-bottom: 64px; }
.episode-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 13px; }
.episode-heading h2, .detail-side h2 { margin: 0; font: 600 18px var(--display); }
.episode-list { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
.watch-links { margin: 5px 0 16px; padding: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.018); }
.watch-link-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 9px; }
.watch-link-list .button { min-height: 34px; padding: 0 11px; }
.episode-item { min-height: 50px; display: flex; align-items: center; gap: 11px; padding: 8px; border: 1px solid var(--line); background: #151718; cursor: pointer; text-align: left; transition: border .18s, background .18s; }
.episode-item:hover { border-color: rgba(195,167,130,.55); background: #1a1c1d; }
.episode-number { color: var(--sand); font: 600 10px var(--display); }
.episode-caption { color: #c9c8c2; font-size: 10px; }
.episode-seen { width: 5px; height: 5px; margin-left: auto; border-radius: 50%; background: var(--red-light); }
.detail-side { padding-left: 20px; border-left: 1px solid var(--line); }
.info-list { margin: 17px 0 0; }
.info-row { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.info-row strong { color: #dedcd5; font-weight: 500; text-align: right; }

.library-tabs { display: flex; gap: 22px; overflow-x: auto; margin-top: 24px; border-bottom: 1px solid var(--line); }
.library-tab { padding: 0 0 12px; border: 0; border-bottom: 2px solid transparent; color: var(--muted); background: transparent; cursor: pointer; white-space: nowrap; font-size: 11px; }
.library-tab:hover { color: var(--ink); }
.library-tab.active { border-color: var(--red-light); color: var(--ink); }
.library-tools { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 0; }
.library-tools-actions { display: flex; gap: 8px; }
.library-tools-actions { flex-wrap: wrap; }
.mini-button { min-height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 1px; background: transparent; color: #c6c5bf; cursor: pointer; font-size: 10px; }
.mini-button:hover { border-color: var(--line-strong); color: white; }

.player-dialog { width: min(900px, calc(100% - 28px)); max-width: none; max-height: min(92vh, 900px); padding: 0; border: 1px solid var(--line-strong); background: #141617; color: var(--ink); box-shadow: 0 22px 80px rgba(0,0,0,.65); }
.player-dialog::backdrop { background: rgba(5,6,7,.82); backdrop-filter: blur(5px); }
.account-dialog { width: min(440px, calc(100% - 28px)); max-width: none; max-height: min(90vh, 760px); padding: 0; border: 1px solid var(--line-strong); background: #17191a; color: var(--ink); box-shadow: 0 22px 80px rgba(0,0,0,.65); }
.account-dialog::backdrop { background: rgba(5,6,7,.78); backdrop-filter: blur(5px); }
.account-panel { padding: 23px 24px 25px; }
.account-panel-head { display: flex; justify-content: space-between; align-items: start; gap: 15px; margin-bottom: 15px; }
.account-panel-head .section-title { font-size: 22px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 18px 0 19px; border-bottom: 1px solid var(--line); }
.auth-tab { padding: 0 0 11px; border: 0; border-bottom: 2px solid transparent; color: var(--muted); background: transparent; cursor: pointer; text-align: left; font-size: 11px; }
.auth-tab.active { border-color: var(--red-light); color: var(--ink); }
.auth-intro { margin: 9px 0 18px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.account-text-input { width: 100%; margin-bottom: 15px; }
.merge-option { display: flex; align-items: start; gap: 8px; margin: 13px 0 4px; color: #b7b8b3; font-size: 10px; line-height: 1.5; cursor: pointer; }
.merge-option input { width: 13px; height: 13px; margin: 1px 0 0; accent-color: var(--red-light); }
.account-submit { width: 100%; margin-top: 12px; }
.auth-feedback { min-height: 15px; margin-top: 9px; color: #a8b6a8; font-size: 10px; line-height: 1.5; }
.auth-feedback.error { color: #d58a8e; }
.auth-forgot, .auth-back { width: 100%; margin-top: 11px; text-align: center; }
.auth-footnote, .account-sync-note { margin: 17px 0 0; padding-top: 13px; border-top: 1px solid var(--line); color: #777a79; font-size: 9px; line-height: 1.65; }
.profile-identity { display: flex; align-items: center; gap: 12px; margin: 17px 0 21px; padding: 14px; border: 1px solid var(--line); background: #131516; }
.profile-avatar { width: 43px; height: 43px; font-size: 15px; }
.profile-identity strong, .profile-identity span { display: block; }
.profile-identity strong { font-size: 12px; font-weight: 500; }
.profile-identity span { margin-top: 4px; color: var(--muted); font-size: 10px; }
.reset-card { width: min(450px, 100%); margin: 28px 0 72px; padding: 22px; border: 1px solid var(--line); background: var(--surface-soft); }
.player-head { display: flex; justify-content: space-between; align-items: start; gap: 16px; padding: 19px 22px; border-bottom: 1px solid var(--line); }
.player-title { margin: 0; font: 600 17px var(--display); }
.player-subtitle { margin-top: 5px; color: var(--muted); font-size: 10px; }
.player-close { width: 30px; height: 30px; border: 1px solid var(--line); background: transparent; cursor: pointer; font-size: 17px; line-height: 1; }
.video-wrap { position: relative; aspect-ratio: 16/9; display: grid; place-items: center; background: #050606; }
.video-wrap video { width: 100%; height: 100%; object-fit: contain; }
.video-empty { max-width: 390px; padding: 25px; text-align: center; }
.video-empty .empty-title { font-size: 15px; }
.video-empty .empty-copy { font-size: 11px; }
.player-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.player-control-group { display: flex; align-items: center; gap: 7px; }
.player-select { height: 31px; padding: 0 8px; border: 1px solid var(--line); background: #1b1d1e; color: #ddd; font-size: 10px; }
.player-control-button { height: 31px; padding: 0 10px; border: 1px solid var(--line); background: transparent; color: #d3d1ca; cursor: pointer; font-size: 10px; }
.player-control-button:hover { border-color: var(--line-strong); color: white; }
.player-control-button:disabled { opacity: .35; cursor: not-allowed; }
.autoplay-option { display: inline-flex; align-items: center; gap: 6px; color: #bcbcb7; font-size: 10px; }
.autoplay-option input { width: 13px; height: 13px; margin: 0; accent-color: var(--red-light); }
.source-panel { padding: 18px 22px 22px; }
.source-panel h3 { margin: 0; font: 600 12px var(--display); }
.source-panel p { margin: 6px 0 13px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.source-fields { display: grid; grid-template-columns: 1.5fr 1fr auto; gap: 8px; }
.source-input { min-width: 0; height: 35px; padding: 0 10px; border: 1px solid var(--line); background: #1b1d1e; color: var(--ink); outline: none; font-size: 10px; }
.source-input:focus { border-color: rgba(195,167,130,.55); }
.player-note { margin-top: 10px; color: #767977; font-size: 9px; }
.toast { position: fixed; z-index: 60; right: 22px; bottom: 22px; max-width: min(360px, calc(100% - 44px)); padding: 12px 16px; border-left: 2px solid var(--red-light); background: #222425; box-shadow: 0 12px 38px rgba(0,0,0,.4); color: #eeece6; font-size: 11px; opacity: 0; transform: translateY(9px); pointer-events: none; transition: opacity .22s, transform .22s; }
.toast.show { opacity: 1; transform: translateY(0); }
.site-footer { min-height: 98px; display: flex; align-items: center; gap: 15px; padding: 22px clamp(22px,5.2vw,84px); border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.site-footer p { margin: 0; }
.footer-wordmark { color: #dedcd6; font: 800 11px var(--display); letter-spacing: .18em; }
.footer-note { margin-left: auto !important; text-align: right; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@keyframes shimmer { 100% { background-position: -100% 0; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
@keyframes hero-enter { from { opacity: .35; } to { opacity: .74; } }

@media (max-width: 1080px) {
  .topbar { gap: 35px; }
  .primary-nav { gap: 22px; }
  .card-row { grid-template-columns: repeat(5,minmax(0,1fr)); }
  .card-row .anime-card:nth-child(n+6) { display: none; }
  .card-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .episode-list { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .topbar { height: 66px; padding: 0 18px; gap: 15px; }
  .wordmark { gap: 8px; }
  .wordmark-text { font-size: 13px; }
  .wordmark-sub { font-size: 6px; }
  .wordmark-symbol { width: 18px; height: 18px; }
  .primary-nav { gap: 15px; }
  .primary-nav a { font-size: 11px; }
  .topbar-actions { gap: 9px; }
  .header-search { width: 36px; transition: width .2s ease; }
  .header-search:focus-within { position: absolute; left: 17px; right: 60px; z-index: 3; width: auto; }
  .header-search input { padding-right: 7px; color: transparent; }
  .header-search:focus-within input { padding-right: 12px; color: var(--ink); }
  .header-search input::placeholder { color: transparent; }
  .header-search:focus-within input::placeholder { color: #777a79; }
  .library-shortcut { width: 32px; height: 32px; }
  .hero { height: clamp(540px, 76vh, 640px); min-height: 0; }
  .hero-content { width: min(590px, 76%); margin-left: 48px; padding-top: clamp(100px,20vw,170px); }
  .hero-title { font-size: clamp(38px,8vw,58px); }
  .hero-description { max-width: 430px; font-size: 12px; -webkit-line-clamp: 3; }
  .hero-meta { margin-top: 16px; }
  .hero-actions { margin-top: 22px; }
  .content-wrap { padding-left: 20px; padding-right: 20px; }
  .home-content { padding-top: 15px; }
  .section-block { padding-top: 27px; }
  .section-title { font-size: 19px; }
  .card-row { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
  .card-row .anime-card:nth-child(n+5) { display: none; }
  .card-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px 12px; }
  .card-title { font-size: 11px; }
  .card-meta { font-size: 9px; }
  .discover-layout { grid-template-columns: 1fr; gap: 21px; padding-top: 18px; }
  .filter-panel { padding: 0 0 18px; border-right: 0; border-bottom: 1px solid var(--line); }
  .filter-form { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 0 12px; }
  .filter-head, .filter-actions { grid-column: 1/-1; }
  .filter-group { padding-top: 12px; }
  .genre-filter { height: 87px; }
  .detail-summary { grid-template-columns: 124px minmax(0,1fr); gap: 18px; padding: 41px 20px 25px; }
  .detail-poster-wrap { width: 124px; }
  .detail-title { font-size: clamp(26px,5vw,38px); }
  .detail-description { font-size: 11px; line-height: 1.68; }
  .detail-columns { grid-template-columns: 1fr; gap: 25px; padding-top: 25px; }
  .detail-side { padding: 20px 0 0; border: 0; border-top: 1px solid var(--line); }
  .episode-list { grid-template-columns: repeat(4,minmax(0,1fr)); }
}
@media (max-width: 520px) {
  .topbar { gap: 10px; }
  .wordmark-sub { display: none; }
  .primary-nav { margin-left: auto; gap: 12px; }
  .primary-nav a { font-size: 10px; }
  .library-shortcut { display: none; }
  .account-control { min-height: 31px; padding: 0 8px; font-size: 9px; }
  .account-name { max-width: 70px; }
  .topbar-actions { margin-left: 0; }
  .hero { height: clamp(520px, 78vh, 600px); }
  .hero-image { background-position: 62% center; }
  .hero-image::before { background: linear-gradient(90deg, rgba(16,17,18,.9), rgba(16,17,18,.35)), linear-gradient(0deg, rgba(16,17,18,.96), transparent 78%); }
  .hero::after { left: 21px; }
  .hero-content { width: calc(100% - 58px); margin-left: 36px; padding-top: 116px; }
  .hero-title { font-size: clamp(36px,11vw,52px); }
  .hero-description { font-size: 11px; }
  .hero-index { right: 20px; bottom: 19px; }
  .hero-pager { right: 104px; bottom: 16px; }
  .button { min-height: 40px; padding: 0 13px; font-size: 10px; }
  .card-row { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .card-row .anime-card:nth-child(n+4) { display: none; }
  .card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px 12px; }
  .card-overlay { padding: 7px; }
  .icon-button { width: 27px; height: 27px; }
  .page-heading { padding-top: 38px; }
  .page-heading .section-title { font-size: 31px; }
  .filter-form { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .detail-hero { min-height: 0; }
  .detail-summary { grid-template-columns: 88px minmax(0,1fr); align-items: start; gap: 14px; padding: 37px 18px 22px; }
  .detail-poster-wrap { width: 88px; }
  .detail-title { font-size: 25px; }
  .detail-native { margin-top: 6px; font-size: 10px; }
  .detail-description { grid-column: 1/-1; margin-top: 1px; }
  .detail-meta, .genre-chips, .detail-actions { grid-column: 1/-1; }
  .detail-meta { margin-top: 0; }
  .genre-chips { margin-top: -4px; }
  .detail-actions { margin-top: 0; }
  .episode-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .library-tabs { gap: 17px; }
  .library-tools { align-items: start; flex-direction: column; }
  .library-tools-actions { width: 100%; }
  .library-tools-actions .mini-button { flex: 1; }
  .source-fields { grid-template-columns: 1fr; }
  .source-fields .button { width: 100%; }
  .player-head, .source-panel { padding-left: 15px; padding-right: 15px; }
  .player-controls { padding-left: 12px; padding-right: 12px; }
  .site-footer { flex-wrap: wrap; gap: 9px 13px; padding-top: 18px; padding-bottom: 18px; }
  .site-footer p { font-size: 9px; }
  .footer-note { flex-basis: 100%; margin-left: 0 !important; text-align: left; }
}
@media (hover: none), (pointer: coarse) {
  .card-overlay { opacity: 1; background: transparent; }
  .card-play { position: absolute; right: 8px; bottom: 8px; width: 38px; height: 38px; opacity: 1; transform: none; background: rgba(16,17,18,.78); border-color: rgba(255,255,255,.72); }
  .card-overlay-top { opacity: 0; }
  .anime-card:focus-within .card-overlay { background: rgba(8,9,10,.28); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}


/* =========================================================
   ANIKING STUDIO & ADMINISTRATOR DASHBOARD STYLES
   ========================================================= */

.badge-original {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  padding: 3px 6px;
  border-radius: 2px;
  background: var(--red);
  color: #fff;
  font: 700 8px/1 var(--display);
  letter-spacing: .12em;
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(0,0,0,.5);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 2px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.badge-green {
  background: rgba(46, 125, 80, .25);
  border: 1px solid rgba(76, 175, 80, .4);
  color: #81c784;
}

.badge-amber {
  background: rgba(230, 140, 20, .2);
  border: 1px solid rgba(255, 179, 0, .4);
  color: #ffb74d;
}

.badge-blue {
  background: rgba(30, 136, 229, .2);
  border: 1px solid rgba(66, 165, 245, .4);
  color: #90caf9;
}

.text-danger {
  color: #e57373 !important;
}
.text-danger:hover {
  border-color: #ef5350 !important;
  background: rgba(239, 83, 80, .15) !important;
}

.admin-status-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  margin-top: 24px;
  background: rgba(25, 27, 28, .85);
  border: 1px solid var(--line-strong);
  border-radius: 2px;
}

.admin-status-banner .storage-info {
  flex: 1;
  color: var(--muted);
  font-size: 11px;
}

.admin-tabs {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1px;
}

.admin-tab {
  padding: 11px 18px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font: 600 12px var(--sans);
  cursor: pointer;
  transition: all .2s;
}

.admin-tab:hover {
  color: var(--ink);
  background: rgba(255,255,255,.02);
}

.admin-tab.active {
  color: var(--sand);
  border-bottom-color: var(--sand);
  background: rgba(195,167,130,.06);
}

.admin-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 24px 0 20px;
  flex-wrap: wrap;
}

.admin-search-wrap {
  width: min(380px, 100%);
}

.admin-anime-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 20px;
  margin-top: 10px;
}

.admin-anime-card {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 2px;
  overflow: hidden;
  transition: border-color .2s, transform .2s;
}

.admin-anime-card:hover {
  border-color: rgba(195,167,130,.4);
  transform: translateY(-2px);
}

.admin-anime-poster-wrap {
  position: relative;
  width: 105px;
  flex-shrink: 0;
  background: #000;
}

.admin-anime-poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-anime-poster-wrap .status-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  font-size: 8px;
  padding: 2px 5px;
}

.admin-anime-details {
  display: flex;
  flex-direction: column;
  padding: 14px 16px;
  flex: 1;
  min-width: 0;
}

.admin-anime-title {
  margin: 0;
  font: 700 14px/1.3 var(--display);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink);
}

.admin-anime-native {
  margin-top: 3px;
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-anime-meta {
  margin: 8px 0 14px;
  color: var(--muted);
  font-size: 11px;
}

.admin-anime-meta strong {
  color: var(--sand);
}

.admin-anime-actions {
  display: flex;
  gap: 7px;
  margin-top: auto;
  flex-wrap: wrap;
}

.mini-btn {
  min-height: 29px !important;
  padding: 0 10px !important;
  font-size: 10px !important;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.mini-btn svg {
  width: 12px;
  height: 12px;
}

/* Modals */
.admin-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: rgba(5, 6, 7, .82);
  backdrop-filter: blur(8px);
  padding: 20px;
  overflow-y: auto;
}

.admin-modal {
  width: min(840px, 100%);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: #161819;
  border: 1px solid var(--line-strong);
  box-shadow: 0 24px 70px rgba(0,0,0,.7);
  overflow: hidden;
  border-radius: 2px;
}

.admin-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  background: #191b1c;
}

.admin-modal-header h2 {
  margin: 0;
  font: 700 18px var(--display);
  color: var(--ink);
}

.admin-form {
  padding: 22px 24px;
  overflow-y: auto;
}

.admin-form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.admin-form-col {
  flex: 1;
  min-width: 200px;
}

.admin-textarea {
  width: 100%;
  resize: vertical;
  height: 80px;
  padding: 8px 10px;
  font-family: inherit;
}

.admin-form-checkboxes {
  display: flex;
  gap: 24px;
  margin: 16px 0;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.admin-form-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.input-with-upload {
  display: flex;
  gap: 8px;
}

.input-with-upload input {
  flex: 1;
}

.upload-file-btn {
  white-space: nowrap;
  min-height: 35px;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.image-preview-box {
  width: 100%;
  height: 90px;
  margin-top: 8px;
  border: 1px dashed var(--line-strong);
  background: #111213;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.image-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-preview-box .placeholder-text {
  color: var(--muted-dark);
  font-size: 11px;
}

/* Episode Modal */
.episode-modal {
  width: min(980px, 100%);
  height: 88vh;
}

.episode-modal-body {
  display: grid;
  grid-template-columns: 320px 1fr;
  flex: 1;
  overflow: hidden;
}

.episode-list-pane {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: #141617;
  overflow: hidden;
}

.pane-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.pane-header h3 {
  margin: 0;
  font: 600 13px var(--display);
}

.admin-ep-list-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-ep-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #1a1c1d;
  border: 1px solid var(--line);
  border-radius: 2px;
}

.admin-ep-num {
  font: 700 12px var(--display);
  color: var(--sand);
  flex-shrink: 0;
}

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

.admin-ep-info strong {
  display: block;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink);
}

.admin-ep-meta {
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 9px;
  color: var(--muted);
}

.admin-ep-actions {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}

.episode-editor-pane {
  flex: 1;
  overflow-y: auto;
  padding: 22px 28px;
  background: #17191a;
}

.editor-pane-title {
  margin: 0 0 18px;
  font: 700 17px var(--display);
  color: var(--ink);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.video-config-card {
  margin: 18px 0;
  padding: 18px;
  background: #121415;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
}

.telegram-upload-field-row {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  align-items: center;
}

.telegram-upload-field-row input[type="file"] {
  flex: 1;
}

.admin-progress {
  width: 100%;
  height: 8px;
  margin-top: 12px;
  border-radius: 4px;
  overflow: hidden;
}

.admin-progress::-webkit-progress-bar {
  background: #25282a;
}
.admin-progress::-webkit-progress-value {
  background: var(--sand);
}

.upload-status-text {
  margin-top: 8px;
  font-size: 11px;
  color: #81c784;
}

.upload-status-text.error {
  color: #e57373;
}

.field-hint {
  margin: 4px 0 8px;
  font-size: 10px;
  color: var(--muted);
}

/* Telegram Storage Table */
.admin-media-table-wrap {
  margin-top: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.admin-table th, .admin-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.admin-table th {
  background: #131415;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 9px;
  letter-spacing: .08em;
}

.admin-table code {
  color: var(--sand);
  background: rgba(0,0,0,.3);
  padding: 2px 6px;
  border-radius: 2px;
  font-size: 10px;
}

.current-ep-pill {
  padding: 5px 10px;
  background: #1b1d1e;
  border: 1px solid var(--line);
  color: var(--sand);
  font: 700 11px var(--display);
}

.stream-indicator {
  color: #81c784;
  font-size: 9px;
  margin-left: 6px;
}

.audio-tag {
  color: var(--muted);
  font-size: 9px;
}

@media (max-width: 840px) {
  .episode-modal-body {
    grid-template-columns: 1fr;
  }
  .episode-list-pane {
    max-height: 240px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

/* Admin Catalogue Filters & Action Toolbar */
.admin-catalogue-toolbar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.admin-catalogue-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.filter-pill {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  font: 600 12px var(--display);
  letter-spacing: 0.04em;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-pill:hover {
  border-color: var(--accent);
  color: var(--sand);
}

.filter-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #0b0c0d;
}

.admin-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.admin-toolbar-actions .admin-search-wrap {
  flex: 1;
  min-width: 240px;
}

.stream-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  font: 700 10px var(--display);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.stream-status-pill.ready {
  background: rgba(46, 125, 50, 0.2);
  color: #81c784;
  border: 1px solid rgba(129, 199, 132, 0.35);
}

.stream-status-pill.missing {
  background: rgba(230, 81, 0, 0.18);
  color: #ffb74d;
  border: 1px solid rgba(255, 183, 77, 0.35);
}

.editor-btn-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.quick-add-bar {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed var(--line);
  border-radius: 4px;
  font-size: 11px;
  color: var(--muted);
  align-items: center;
}

.admin-ep-item.active {
  border-color: var(--accent);
  background: rgba(232, 90, 42, 0.08);
}



/* ==========================================================================
   ANIKING PREMIUM CINEMATIC WATCH PAGE & PLAYER ENGINE
   ========================================================================== */

.aniking-watch-page {
  width: 100%;
  max-width: 1560px;
  margin: 0 auto;
  padding: 22px clamp(16px, 4vw, 48px) 80px;
}

.watch-nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.watch-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sand);
  transition: color 0.18s ease;
  padding: 4px 0;
}
.watch-back-link:hover {
  color: #f5e4cd;
}
.watch-back-link svg {
  width: 14px;
  height: 14px;
  transform: rotate(180deg);
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.watch-anime-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.watch-tag-pill {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 2px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
}
.watch-tag-pill.accent {
  border-color: rgba(195, 167, 130, 0.45);
  color: var(--sand);
}
.watch-tag-pill.crimson {
  border-color: rgba(193, 90, 98, 0.45);
  color: var(--red-light);
}

/* Cinema Stage Wrapper */
.aniking-cinema-stage {
  width: 100%;
  margin: 0 auto 28px;
  transition: max-width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.aniking-cinema-stage.theater-mode {
  max-width: 100vw;
  width: calc(100% + clamp(32px, 8vw, 96px));
  margin-left: calc(-1 * clamp(16px, 4vw, 48px));
  margin-right: calc(-1 * clamp(16px, 4vw, 48px));
}

/* Video Player Container */
.aniking-player-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  max-height: min(85vh, 900px);
  background: #000000;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  box-shadow: 0 20px 65px rgba(0, 0, 0, 0.75);
  user-select: none;
}

:fullscreen .aniking-player-container,
:-webkit-full-screen .aniking-player-container {
  width: 100vw !important;
  height: 100vh !important;
  max-height: none !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.aniking-video-element {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
  display: block;
}

/* Player HUD Overlay */
.player-hud {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 10;
  pointer-events: none;
  transition: opacity 0.26s cubic-bezier(0.16, 1, 0.3, 1);
}
.aniking-player-container.hud-hidden .player-hud {
  opacity: 0;
  pointer-events: none;
}
.aniking-player-container.hud-hidden {
  cursor: none;
}
.aniking-player-container.hud-visible .player-hud {
  opacity: 1;
  pointer-events: none;
}
.player-top-overlay,
.player-controls-overlay {
  pointer-events: auto;
}

/* Top Overlay */
.player-top-overlay {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  background: linear-gradient(180deg, rgba(8, 9, 10, 0.94) 0%, rgba(8, 9, 10, 0.45) 60%, transparent 100%);
  gap: 16px;
  transform: translateY(0);
  opacity: 1;
  transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.26s cubic-bezier(0.16, 1, 0.3, 1);
}
.aniking-player-container.hud-hidden .player-top-overlay {
  transform: translateY(-12px);
  opacity: 0;
  pointer-events: none;
}
.player-top-info {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}
.player-top-anime {
  font: 700 14px/1.2 var(--display);
  color: var(--ink);
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-top-ep {
  font-size: 11px;
  color: var(--sand);
  font-weight: 500;
  white-space: nowrap;
}
.player-top-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.player-stream-pill {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 2px;
  background: rgba(18, 20, 21, 0.85);
  border: 1px solid var(--line-strong);
  color: var(--ink);
}

/* Center Big Button & Ripple */
.player-center-action {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 18;
  pointer-events: none;
}
.center-play-btn {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(16, 17, 18, 0.88);
  border: 1.5px solid rgba(240, 238, 233, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink);
  backdrop-filter: blur(12px);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  pointer-events: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
}
.center-play-btn:hover {
  transform: scale(1.12);
  background: rgba(155, 57, 70, 0.95);
  border-color: var(--red-light);
  box-shadow: 0 0 35px rgba(193, 90, 98, 0.6);
  color: #ffffff;
}
.center-play-btn:active {
  transform: scale(0.94);
}
.center-play-btn svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
  margin-left: 3px;
  pointer-events: none;
}
.player-ripple-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(16, 17, 18, 0.9);
  border: 1px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  pointer-events: none;
  opacity: 0;
}
.player-ripple-badge.ripple-anim {
  animation: ripplePop 0.45s ease-out forwards;
}
.player-ripple-badge svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
}
@keyframes ripplePop {
  0% { opacity: 0.85; transform: translate(-50%, -50%) scale(0.8); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.12); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.35); }
}

/* Buffering Spinner */
.player-buffering-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  opacity: 1;
  transition: opacity 0.2s ease;
  animation: spinnerFadeIn 0.2s ease-out;
}
@keyframes spinnerFadeIn {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.aniking-spinner-ring {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--sand);
  border-right-color: var(--red-light);
  animation: anikingSpin 0.75s linear infinite;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
}
@keyframes anikingSpin {
  to { transform: rotate(360deg); }
}
.spinner-label {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sand);
  font-weight: 600;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
}

/* Error Banner */
.player-error-banner {
  position: absolute;
  inset: 0;
  z-index: 15;
  background: rgba(12, 13, 14, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  text-align: center;
}
.player-error-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(155, 57, 70, 0.2);
  border: 1px solid var(--red-light);
  color: var(--red-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 14px;
}
.player-error-title {
  font: 700 17px var(--display);
  color: var(--ink);
  margin: 0 0 8px;
}
.player-error-desc {
  font-size: 11px;
  color: var(--muted);
  max-width: 460px;
  line-height: 1.6;
  margin: 0 0 18px;
}
.player-error-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Custom Subtitles Overlay */
.player-custom-subtitles {
  position: absolute;
  bottom: 84px;
  left: 5%;
  right: 5%;
  z-index: 9;
  pointer-events: none;
  display: flex;
  justify-content: center;
  text-align: center;
  transition: bottom 0.2s ease;
}
:fullscreen .player-custom-subtitles,
:-webkit-full-screen .player-custom-subtitles {
  bottom: 96px;
}
.aniking-subtitle-box {
  display: inline-block;
  max-width: 86%;
  line-height: 1.45;
  font-weight: 600;
  font-family: var(--sans);
  white-space: pre-wrap;
  transition: all 0.12s ease;
}
.aniking-subtitle-box.sz-small { font-size: 15px; }
.aniking-subtitle-box.sz-medium { font-size: 19px; }
.aniking-subtitle-box.sz-large { font-size: 26px; }
.aniking-subtitle-box.col-white { color: #ffffff; }
.aniking-subtitle-box.col-yellow { color: #ffe66d; }
.aniking-subtitle-box.col-cyan { color: #7df9ff; }
.aniking-subtitle-box.bg-box {
  background: rgba(8, 9, 10, 0.82);
  padding: 5px 14px;
  border-radius: 3px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}
.aniking-subtitle-box.bg-solid {
  background: #000000;
  padding: 5px 14px;
  border-radius: 3px;
}
.aniking-subtitle-box.bg-outline {
  background: transparent;
  text-shadow: 2px 2px 0 #000, -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 0 3px 6px rgba(0,0,0,0.9);
  padding: 2px 6px;
}

/* Bottom Controls Overlay */
.player-controls-overlay {
  padding: 26px 22px 14px;
  background: linear-gradient(0deg, rgba(8, 9, 10, 0.96) 0%, rgba(8, 9, 10, 0.6) 65%, transparent 100%);
  display: flex;
  flex-direction: column;
  transform: translateY(0);
  opacity: 1;
  transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.26s cubic-bezier(0.16, 1, 0.3, 1);
}
.aniking-player-container.hud-hidden .player-controls-overlay {
  transform: translateY(12px);
  opacity: 0;
  pointer-events: none;
}

/* Custom Scrubber Bar */
.aniking-scrubber-track {
  position: relative;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 3px;
  cursor: pointer;
  margin-bottom: 12px;
  transition: height 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}
.aniking-scrubber-track:hover,
.aniking-scrubber-track.dragging {
  height: 10px;
}
.scrubber-buffer-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
  pointer-events: none;
  transition: width 0.15s linear;
}
.scrubber-played-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--red-light);
  border-radius: 3px;
  pointer-events: none;
}
.scrubber-thumb {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid var(--red-light);
  box-shadow: 0 0 10px rgba(193, 90, 98, 0.7);
  pointer-events: none;
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}
.aniking-scrubber-track:hover .scrubber-thumb,
.aniking-scrubber-track.dragging .scrubber-thumb {
  transform: translate(-50%, -50%) scale(1);
}
.scrubber-time-tooltip {
  position: absolute;
  bottom: calc(100% + 9px);
  transform: translateX(-50%);
  padding: 3px 7px;
  border-radius: 2px;
  background: #17191a;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  font-size: 10px;
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}
.aniking-scrubber-track:hover .scrubber-time-tooltip {
  opacity: 1;
}

/* Control Buttons Row */
.player-controls-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.player-ctrl-group {
  display: flex;
  align-items: center;
  gap: 6px;
}
.player-btn {
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  color: #d6d5cf;
  cursor: pointer;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, background 0.15s ease, transform 0.1s ease;
  position: relative;
}
.player-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}
.player-btn:active {
  transform: scale(0.94);
}
.player-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}
.player-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Volume Slider Expand */
.volume-container {
  display: flex;
  align-items: center;
  position: relative;
}
.volume-slider-wrap {
  width: 0;
  overflow: hidden;
  transition: width 0.22s cubic-bezier(0.16, 1, 0.3, 1), margin-left 0.22s ease;
  display: flex;
  align-items: center;
}
.volume-container:hover .volume-slider-wrap,
.volume-container:focus-within .volume-slider-wrap {
  width: 72px;
  margin-left: 5px;
}
.volume-slider {
  width: 68px;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  accent-color: var(--red-light);
}

.player-time-display {
  font-size: 11px;
  color: #a4a7a6;
  font-variant-numeric: tabular-nums;
  margin-left: 6px;
  user-select: none;
}
.player-time-display strong {
  color: var(--ink);
  font-weight: 600;
}

/* Badges and Dropdowns */
.badge-btn {
  height: 30px;
  padding: 0 9px;
  border-radius: 2px;
  border: 1px solid var(--line);
  background: rgba(25, 27, 28, 0.6);
  color: #cfcdc8;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}
.badge-btn:hover,
.badge-btn.active {
  border-color: var(--line-strong);
  background: rgba(42, 45, 47, 0.85);
  color: #ffffff;
}
.badge-btn.accent {
  color: var(--sand);
  border-color: rgba(195, 167, 130, 0.35);
}
.badge-btn.accent.active {
  background: rgba(195, 167, 130, 0.15);
  border-color: var(--sand);
}

/* Popover Menus Inside Player */
.player-popover-menu {
  position: absolute;
  bottom: 68px;
  right: 22px;
  z-index: 25;
  width: 300px;
  max-height: min(440px, 80vh);
  overflow-y: auto;
  background: #141617;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.9);
  padding: 14px;
  opacity: 1;
  transform: translateY(0) scale(1);
  transform-origin: bottom right;
  transition: opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1), transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  animation: popoverIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.player-popover-menu.popover-closing {
  opacity: 0;
  transform: translateY(8px) scale(0.96);
  pointer-events: none;
}
@keyframes popoverIn {
  from { opacity: 0; transform: translateY(8px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.popover-page-enter {
  animation: popoverPageIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes popoverPageIn {
  from { opacity: 0; transform: translateX(8px); }
  to { opacity: 1; transform: translateX(0); }
}
.popover-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 10px;
  gap: 8px;
}
.popover-back-btn {
  background: transparent;
  border: none;
  color: var(--sand);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  padding: 3px 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 2px;
  transition: color 0.15s ease, background 0.15s ease;
}
.popover-back-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}
.popover-title {
  font: 700 11px var(--display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sand);
  margin: 0;
  flex: 1;
}
.popover-close {
  width: 22px;
  height: 22px;
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  transition: color 0.15s ease, background 0.15s ease;
}
.popover-close:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
}
.popover-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 8px 10px;
  background: transparent;
  border: none;
  border-radius: 2px;
  color: #d1cfc9;
  font-size: 11px;
  text-align: left;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease, transform 0.12s ease;
}
.popover-option:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  transform: translateX(2px);
}
.popover-option.selected {
  background: rgba(155, 57, 70, 0.28);
  border-left: 2px solid var(--red-light);
  color: #ffffff;
  font-weight: 600;
}
.popover-option.selected::after {
  content: "✓";
  color: var(--red-light);
  font-weight: 700;
}
.popover-info-card {
  padding: 10px 12px;
  background: #111213;
  border: 1px solid var(--line);
  border-radius: 2px;
  font-size: 10px;
  color: var(--muted);
  line-height: 1.55;
  margin-top: 10px;
}
.popover-info-card strong {
  color: var(--ink);
}

/* Subtitle Appearance Section in Popover */
.subtitle-styling-section {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.subtitle-style-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
  display: block;
}
.subtitle-btn-group {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
}
.sub-choice-btn {
  flex: 1;
  height: 24px;
  background: #1f2223;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: #c9c7c2;
  font-size: 10px;
  cursor: pointer;
}
.sub-choice-btn:hover {
  border-color: var(--line-strong);
  color: #fff;
}
.sub-choice-btn.active {
  border-color: var(--red-light);
  background: rgba(155, 57, 70, 0.25);
  color: #ffffff;
  font-weight: 600;
}

/* Autoplay Countdown Overlay */
.autoplay-countdown-card {
  position: absolute;
  bottom: 80px;
  right: 22px;
  z-index: 20;
  padding: 16px 20px;
  background: #161819;
  border: 1px solid var(--red-light);
  border-radius: 4px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 260px;
  animation: popoverIn 0.2s ease-out;
}
.countdown-header {
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sand);
  font-weight: 700;
}
.countdown-title {
  font: 700 13px var(--display);
  color: var(--ink);
}
.countdown-progress-track {
  height: 3px;
  width: 100%;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  overflow: hidden;
}
.countdown-progress-bar {
  height: 100%;
  background: var(--red-light);
  width: 100%;
  transition: width 3s linear;
}
.countdown-actions {
  display: flex;
  gap: 8px;
}
.countdown-btn {
  flex: 1;
  height: 28px;
  font-size: 10px;
  font-weight: 600;
  border-radius: 2px;
  cursor: pointer;
  border: 1px solid var(--line);
}
.countdown-btn.primary {
  background: var(--red);
  color: #fff;
  border-color: var(--red-light);
}
.countdown-btn.quiet {
  background: transparent;
  color: var(--muted);
}
.countdown-btn.quiet:hover {
  color: var(--ink);
}

/* Watch Deck Below Player */
.aniking-watch-deck {
  display: grid;
  grid-template-columns: 1fr 410px;
  gap: 32px;
  align-items: start;
}

/* Current Episode Summary Card */
.current-ep-summary-card {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 24px 28px;
  border-radius: 2px;
  margin-bottom: 24px;
}
.ep-summary-kicker {
  font: 700 10px var(--sans);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--sand);
  margin-bottom: 8px;
}
.ep-summary-title {
  font: 700 22px/1.3 var(--display);
  color: var(--ink);
  margin: 0 0 10px;
}
.ep-summary-desc {
  font-size: 12px;
  line-height: 1.7;
  color: #b2b5b4;
  margin: 0 0 18px;
}
.ep-action-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

/* Anime Accordion / Info Card */
.anime-info-card {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  padding: 20px 24px;
  border-radius: 2px;
}
.anime-info-header {
  font: 700 12px var(--display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sand);
  margin-bottom: 10px;
}
.anime-info-synopsis {
  font-size: 11px;
  line-height: 1.65;
  color: #9ea1a0;
  margin-bottom: 14px;
}

/* Episode Navigator Deck */
.aniking-episode-deck {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 2px;
  overflow: hidden;
  position: sticky;
  top: 90px;
}
.episode-deck-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.episode-deck-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.episode-deck-title {
  font: 700 12px var(--display);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0;
}
.ep-deck-count {
  font-size: 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 6px;
  border-radius: 2px;
}
.ep-search-input {
  width: 100px;
  height: 28px;
  background: #111313;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--ink);
  font-size: 11px;
  padding: 0 8px;
  outline: none;
}
.ep-search-input:focus {
  border-color: rgba(195, 167, 130, 0.6);
}

/* Range Tabs */
.range-tabs-row {
  display: flex;
  gap: 4px;
  padding: 8px 14px;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: thin;
}
.range-tab-btn {
  height: 26px;
  padding: 0 10px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  border-radius: 2px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.range-tab-btn:hover {
  color: var(--ink);
  border-color: var(--line);
}
.range-tab-btn.active {
  background: #202224;
  border-color: var(--line-strong);
  color: var(--sand);
}

/* Episode Nav Cards List */
.episode-nav-list {
  max-height: 540px;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scrollbar-width: thin;
}
.episode-nav-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 14px;
  background: #151617;
  border: 1px solid var(--line);
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.16s ease;
  text-align: left;
  width: 100%;
  color: inherit;
}
.episode-nav-card:hover {
  border-color: var(--line-strong);
  background: #1c1e1f;
}
.episode-nav-card.is-current {
  border-color: var(--red-light);
  background: rgba(155, 57, 70, 0.14);
  box-shadow: inset 3px 0 0 var(--red-light);
}
.ep-card-num {
  font: 700 13px var(--display);
  color: var(--sand);
  min-width: 24px;
}
.episode-nav-card.is-current .ep-card-num {
  color: var(--red-light);
}
.ep-card-info {
  flex: 1;
  min-width: 0;
}
.ep-card-title {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 3px;
}
.ep-card-meta {
  font-size: 9px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.now-playing-equalizer {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
  margin-left: auto;
}
.now-playing-equalizer span {
  display: block;
  width: 2px;
  background: var(--red-light);
  border-radius: 1px;
  animation: anikingEqWave 0.7s ease-in-out infinite alternate;
}
.now-playing-equalizer span:nth-child(1) { height: 4px; animation-delay: 0.1s; }
.now-playing-equalizer span:nth-child(2) { height: 11px; animation-delay: 0.3s; }
.now-playing-equalizer span:nth-child(3) { height: 7px; animation-delay: 0.2s; }
@keyframes anikingEqWave {
  0% { height: 3px; }
  100% { height: 12px; }
}

/* Responsive Breakpoints */
@media (max-width: 1040px) {
  .aniking-watch-deck {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .aniking-episode-deck {
    position: static;
  }
}

@media (max-width: 680px) {
  .aniking-watch-page {
    padding-top: 14px;
  }
  .player-top-overlay {
    padding: 10px 14px;
  }
  .player-top-anime {
    font-size: 12px;
  }
  .player-controls-overlay {
    padding: 14px 14px 10px;
  }
  .player-btn {
    width: 30px;
    height: 30px;
  }
  .badge-btn {
    height: 26px;
    padding: 0 6px;
    font-size: 9px;
  }
  .player-popover-menu {
    width: calc(100% - 24px);
    right: 12px;
    bottom: 56px;
  }
  .current-ep-summary-card {
    padding: 18px 20px;
  }
  .ep-summary-title {
    font-size: 18px;
  }
}
