/* ==========================================================================
   DramaWave H5 — visual system
   ========================================================================== */
:root {
  --bg: #08080a;
  --bg-soft: #0e0e11;
  --surface: #17171a;
  --surface-2: #1e1e22;
  --surface-3: #26262b;
  --text: #f8f6f9;
  --text-2: #c9c4ce;
  --muted: #98939f;
  --muted-2: #6f6a76;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --pink: #ff2d6b;
  --pink-2: #ff5f8e;
  --pink-soft: rgba(255, 45, 107, 0.14);
  --orange: #ff7a3d;
  --gold: #ffc66d;
  --gold-deep: #e8a33d;
  --green: #37d6a5;
  --brand: linear-gradient(105deg, #ff2d6b 0%, #ff5f6d 55%, #ff8a4b 100%);
  --gold-grad: linear-gradient(120deg, #ffe0a3 0%, #ffc66d 42%, #ff9d4d 100%);
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 28px;
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --nav-h: 66px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Inter", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #050506;
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(800px 600px at 12% 0%, rgba(255, 45, 107, 0.12), transparent 60%),
    radial-gradient(700px 600px at 92% 30%, rgba(124, 108, 255, 0.08), transparent 60%);
  z-index: 0;
}

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

button {
  border: 0;
  background: none;
  cursor: pointer;
  padding: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

input,
textarea {
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

::selection {
  background: rgba(255, 45, 107, 0.35);
}

::-webkit-scrollbar {
  width: 0;
  height: 0;
}

#app {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 520px;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  overflow-x: hidden;
  isolation: isolate;
}

#view {
  min-height: 100dvh;
  padding-bottom: calc(var(--nav-h) + 18px + var(--safe-bottom));
  transition: opacity 0.2s ease;
}

body[data-page="watch"] #view,
body[data-page="series"] #view {
  padding-bottom: 0;
}

body[data-page="watch"] #app {
  background: #000;
}

@media (min-width: 720px) {
  #app {
    min-height: calc(100dvh - 48px);
    margin: 24px auto;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 40px 120px rgba(0, 0, 0, 0.65);
    overflow: hidden;
  }

  #view {
    min-height: calc(100dvh - 48px);
  }

  body[data-page="watch"] #app {
    height: calc(100dvh - 48px);
    min-height: auto;
  }
}

/* -------------------------------------------------------------------------- */
/* Typography & utilities                                                     */
/* -------------------------------------------------------------------------- */
.hidden {
  display: none !important;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 12px;
}

.strong {
  font-weight: 700;
}

.grow {
  flex: 1;
}

.row {
  display: flex;
  align-items: center;
}

.between {
  justify-content: space-between;
}

.gap-6 {
  gap: 6px;
}

.gap-8 {
  gap: 8px;
}

.gap-10 {
  gap: 10px;
}

.gap-12 {
  gap: 12px;
}

.ico {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.ico-sm {
  width: 18px;
  height: 18px;
}

.ico-xs {
  width: 14px;
  height: 14px;
}

.eyebrow {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

.gradient-text {
  background: var(--brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* -------------------------------------------------------------------------- */
/* Splash                                                                     */
/* -------------------------------------------------------------------------- */
#boot-splash {
  position: fixed;
  inset: 0;
  z-index: 300;
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background:
    radial-gradient(420px 320px at 50% 28%, rgba(255, 45, 107, 0.2), transparent 70%),
    #08080a;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

#boot-splash.done {
  opacity: 0;
  visibility: hidden;
}

.splash-logo {
  width: 74px;
  height: 74px;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(255, 45, 107, 0.35);
  animation: splash-pop 0.7s var(--ease) both;
}

.splash-logo img {
  width: 100%;
  height: 100%;
}

.splash-word {
  font-size: 23px;
  font-weight: 850;
  letter-spacing: -0.02em;
  animation: rise-in 0.6s 0.1s var(--ease) both;
}

.splash-word span {
  background: var(--brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.splash-line {
  width: 92px;
  height: 2px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.splash-line i {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
  animation: splash-load 1s ease-in-out infinite;
}

/* -------------------------------------------------------------------------- */
/* Buttons                                                                    */
/* -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 750;
  letter-spacing: 0.01em;
  color: #fff;
  background: var(--surface-2);
  border: 1px solid transparent;
  transition: transform 0.18s var(--ease), opacity 0.18s ease, background 0.2s ease;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.96);
}

.btn:disabled {
  opacity: 0.45;
  pointer-events: none;
}

.btn-primary {
  background: var(--brand);
  box-shadow: 0 10px 24px rgba(255, 45, 107, 0.28);
}

.btn-gold {
  background: var(--gold-grad);
  color: #3a2206;
  box-shadow: 0 10px 24px rgba(232, 163, 61, 0.25);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
}

.btn-outline {
  background: transparent;
  border-color: var(--line-strong);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  min-height: 36px;
  padding: 0 14px;
  font-size: 12px;
}

.btn-xs {
  min-height: 30px;
  padding: 0 11px;
  font-size: 11px;
}

.btn-add {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  transition: transform 0.18s var(--ease), background 0.18s ease;
}

.icon-btn:active {
  transform: scale(0.92);
}

.icon-btn.is-active {
  color: var(--pink);
  background: var(--pink-soft);
  border-color: rgba(255, 45, 107, 0.25);
}

.icon-btn.is-active .ico {
  fill: currentColor;
}

.coin {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  flex: none;
  background: var(--gold-grad);
  color: #6d4307;
  font-size: 10px;
  font-weight: 900;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.24);
}

/* -------------------------------------------------------------------------- */
/* Header                                                                     */
/* -------------------------------------------------------------------------- */
.app-head {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(12px + var(--safe-top)) 16px 10px;
  background: linear-gradient(180deg, rgba(8, 8, 10, 0.96) 45%, rgba(8, 8, 10, 0.72) 80%, transparent);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.brand img {
  width: 33px;
  height: 33px;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(255, 45, 107, 0.28);
}

.brand-word {
  font-size: 19px;
  font-weight: 850;
  letter-spacing: -0.035em;
  white-space: nowrap;
}

.brand-word em {
  font-style: normal;
  background: var(--brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.coin-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px 0 8px;
  border-radius: 999px;
  background: rgba(255, 198, 109, 0.1);
  border: 1px solid rgba(255, 198, 109, 0.2);
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
}

.search-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 44px;
  margin: 2px 16px 4px;
  padding: 0 14px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.search-pill .ico {
  color: var(--muted-2);
}

.search-pill span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-pill kbd {
  font: inherit;
  font-size: 9px;
  padding: 3px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted-2);
}

@media (max-width: 600px) {
  .search-pill kbd {
    display: none;
  }
}

.page-head {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(12px + var(--safe-top)) 16px 10px;
  background: linear-gradient(180deg, rgba(8, 8, 10, 0.97) 55%, rgba(8, 8, 10, 0.8) 85%, transparent);
  backdrop-filter: blur(16px);
}

.page-title {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.page-head .grow {
  min-width: 0;
}

.page-sub {
  font-size: 11px;
  color: var(--muted);
}

/* -------------------------------------------------------------------------- */
/* Tab bar                                                                    */
/* -------------------------------------------------------------------------- */
.tabbar {
  position: fixed;
  z-index: 60;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 520px;
  height: calc(var(--nav-h) + var(--safe-bottom));
  padding: 6px 22px var(--safe-bottom);
  display: flex;
  align-items: stretch;
  background: rgba(9, 9, 11, 0.93);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(22px) saturate(1.3);
}

.tab {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 650;
  transition: color 0.2s ease;
}

.tab svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s var(--ease);
}

.tab[data-tab="home"] svg {
  fill: currentColor;
  stroke-width: 1.4;
}

.tab[data-tab="library"] svg {
  fill: none;
}

.tab[data-tab="profile"] svg {
  fill: none;
}

.tab.active {
  color: var(--pink);
}

.tab.active svg {
  transform: translateY(-1px);
}

.tab.active::before {
  content: "";
  position: absolute;
  top: 0;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--pink);
  box-shadow: 0 0 12px rgba(255, 45, 107, 0.9);
}

body[data-page="watch"] .tabbar,
body[data-page="search"] .tabbar,
body[data-page="series"] .tabbar,
body[data-page="wallet"] .tabbar,
body[data-page="vip"] .tabbar,
body[data-page="settings"] .tabbar {
  display: none;
}

body[data-page="watch"] #view,
body[data-page="search"] #view,
body[data-page="series"] #view {
  padding-bottom: 0;
}

body[data-page="wallet"] #view,
body[data-page="vip"] #view,
body[data-page="settings"] #view {
  padding-bottom: calc(24px + var(--safe-bottom));
}

@media (min-width: 720px) {
  .tabbar {
    position: absolute;
    bottom: 0;
    border-radius: 0 0 30px 30px;
  }
}

/* -------------------------------------------------------------------------- */
/* Home: hero                                                                 */
/* -------------------------------------------------------------------------- */
.home-top {
  padding-top: 2px;
}

.hero {
  position: relative;
  margin: 10px 16px 0;
  border-radius: 24px;
  overflow: hidden;
  background: var(--surface);
  aspect-ratio: 3 / 3.85;
  max-height: 540px;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.45);
  touch-action: pan-y;
}

.hero-track {
  display: flex;
  height: 100%;
  transition: transform 0.55s var(--ease);
  will-change: transform;
}

.hero-slide {
  position: relative;
  flex: 0 0 100%;
  height: 100%;
  overflow: hidden;
}

.hero-slide > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  transform: scale(1.02);
  -webkit-mask-image: linear-gradient(180deg, #000 42%, transparent 80%);
  mask-image: linear-gradient(180deg, #000 42%, transparent 80%);
}

.hero-slide::before {
  display: none;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 8, 10, 0.24) 0%, transparent 24%, rgba(8, 8, 10, 0.42) 42%, rgba(8, 8, 10, 0.9) 55%, #08080a 78%),
    linear-gradient(90deg, rgba(8, 8, 10, 0.36), transparent 60%);
}

.hero-copy {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 22px 20px 32px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 9px;
  margin-bottom: 10px;
  border-radius: 6px;
  background: var(--pink);
  color: #fff;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.04em;
  box-shadow: 0 4px 14px rgba(255, 45, 107, 0.35);
}

.hero-badge.ghost {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  box-shadow: none;
}

.hero-title {
  font-size: clamp(26px, 7.4vw, 34px);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.04em;
  text-wrap: balance;
  text-shadow: 0 4px 28px rgba(0, 0, 0, 0.5);
}

.hero-en {
  margin-top: 4px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.58);
  font-weight: 650;
}

.hero-desc {
  margin-top: 10px;
  max-width: 89%;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 600;
}

.hero-meta b {
  color: var(--gold);
  font-weight: 800;
}

.hero-meta i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.32);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 17px;
}

.hero-actions .btn {
  height: 45px;
}

.hero-actions .btn-primary {
  flex: 1;
  max-width: 210px;
}

.hero-dots {
  position: absolute;
  z-index: 3;
  right: 18px;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.hero-dots button {
  width: 5px;
  height: 5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.35);
  transition: all 0.3s var(--ease);
}

.hero-dots button.active {
  width: 19px;
  background: #fff;
}

.hero-rank {
  position: absolute;
  z-index: 3;
  top: 16px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 27px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(14px);
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.86);
}

.hero-rank .ico {
  color: var(--gold);
}

/* -------------------------------------------------------------------------- */
/* Chips / sections                                                           */
/* -------------------------------------------------------------------------- */
.quick-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 16px 16px 2px;
  scroll-snap-type: x proximity;
}

.chip {
  flex: none;
  height: 34px;
  padding: 0 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 650;
  transition: all 0.2s ease;
  scroll-snap-align: start;
}

.chip.active {
  background: var(--text);
  border-color: var(--text);
  color: #111;
  font-weight: 800;
}

.section {
  padding: 22px 16px 0;
}

.section-tight {
  padding-top: 18px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  line-height: 1.15;
  font-weight: 850;
  letter-spacing: -0.035em;
}

.section-title .ico {
  color: var(--pink);
  width: 18px;
  height: 18px;
}

.section-title .count {
  font-size: 10px;
  color: var(--muted-2);
  font-weight: 700;
  letter-spacing: 0.02em;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  padding: 3px 7px;
}

.section-more {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}

.section-more .ico {
  width: 14px;
  height: 14px;
}

.section-lead {
  margin-top: -7px;
  margin-bottom: 12px;
  font-size: 11px;
  color: var(--muted);
}

/* -------------------------------------------------------------------------- */
/* Poster cards                                                               */
/* -------------------------------------------------------------------------- */
.poster-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 12px;
}

.poster-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 9px;
}

.drama-card {
  display: block;
  min-width: 0;
  position: relative;
}

.poster {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(150deg, #232328, #151518);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
}

.poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), transparent 26%, transparent 62%, rgba(0, 0, 0, 0.48));
  pointer-events: none;
}

.poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease), filter 0.4s ease;
}

.drama-card:active .poster img {
  transform: scale(1.035);
}

.poster .badge {
  position: absolute;
  z-index: 2;
  top: 8px;
  left: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 21px;
  padding: 0 7px;
  border-radius: 6px;
  background: rgba(8, 8, 10, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(9px);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.poster .badge.hot {
  background: var(--brand);
  border-color: transparent;
}

.poster .lock-pin {
  position: absolute;
  z-index: 2;
  right: 8px;
  top: 8px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(8px);
  color: #fff;
}

.poster .lock-pin .ico {
  width: 12px;
  height: 12px;
}

.poster .ep-pill {
  position: absolute;
  z-index: 2;
  right: 8px;
  bottom: 8px;
  height: 20px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  font-size: 9px;
  font-weight: 750;
  color: rgba(255, 255, 255, 0.9);
}

.poster .poster-progress {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.15);
}

.poster .poster-progress i {
  display: block;
  height: 100%;
  background: var(--pink);
  border-radius: 0 4px 4px 0;
}

.poster-play {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(10px);
  color: #fff;
  opacity: 0;
  transition: all 0.25s var(--ease);
}

.poster-play .ico {
  width: 18px;
  height: 18px;
  margin-left: 2px;
}

.drama-card:hover .poster-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-body {
  padding: 8px 2px 0;
}

.card-title {
  font-size: 13.5px;
  line-height: 1.35;
  font-weight: 750;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 19px;
}

.card-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 10.5px;
  font-weight: 550;
  min-width: 0;
}

.card-sub span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-sub .dot {
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--muted-2);
  flex: none;
}

.card-sub .hot {
  color: var(--gold);
}

.tag-inline {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border-radius: 4px;
  background: var(--pink-soft);
  color: var(--pink-2);
  font-size: 9px;
  font-weight: 750;
}

/* -------------------------------------------------------------------------- */
/* Continue + horizontal scroller                                             */
/* -------------------------------------------------------------------------- */
.continue-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 1px 16px 4px;
  margin: 0 -16px;
  scroll-snap-type: x mandatory;
}

.continue-card {
  flex: 0 0 246px;
  display: flex;
  gap: 11px;
  padding: 9px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  scroll-snap-align: start;
}

.continue-card .poster {
  width: 64px;
  aspect-ratio: 3 / 4;
  flex: none;
  border-radius: 10px;
}

.continue-info {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.continue-info h4 {
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.continue-info p {
  margin-top: 4px;
  font-size: 10px;
  color: var(--muted);
}

.mini-progress {
  height: 3px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.12);
  margin-top: 9px;
  overflow: hidden;
}

.mini-progress i {
  display: block;
  height: 100%;
  background: var(--brand);
  border-radius: inherit;
}

.continue-play {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--brand);
  display: grid;
  place-items: center;
  align-self: center;
  flex: none;
  box-shadow: 0 4px 14px rgba(255, 45, 107, 0.28);
}

.continue-play .ico {
  width: 14px;
  height: 14px;
  margin-left: 2px;
}

.hscroll {
  display: flex;
  gap: 11px;
  overflow-x: auto;
  padding: 2px 16px 4px;
  margin: 0 -16px;
  scroll-snap-type: x proximity;
}

.hscroll .drama-card {
  flex: 0 0 138px;
  scroll-snap-align: start;
}

.hscroll .card-title {
  font-size: 12.5px;
}

/* -------------------------------------------------------------------------- */
/* Ranking                                                                    */
/* -------------------------------------------------------------------------- */
.rank-list {
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  background: linear-gradient(180deg, var(--surface), rgba(23, 23, 26, 0.35));
  border: 1px solid var(--line);
  overflow: hidden;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  position: relative;
}

.rank-item + .rank-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 54px;
  right: 12px;
  height: 1px;
  background: var(--line);
}

.rank-no {
  width: 30px;
  flex: none;
  text-align: center;
  font-size: 21px;
  line-height: 1;
  font-weight: 900;
  font-style: italic;
  letter-spacing: -0.08em;
  color: var(--muted-2);
  font-family: "Arial Black", var(--font);
}

.rank-item:nth-child(1) .rank-no {
  color: #ffcf5c;
}

.rank-item:nth-child(2) .rank-no {
  color: #d7d9e2;
}

.rank-item:nth-child(3) .rank-no {
  color: #d58b5f;
}

.rank-item .poster {
  width: 42px;
  aspect-ratio: 3 / 4;
  border-radius: 8px;
  flex: none;
}

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

.rank-info h4 {
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-info p {
  margin-top: 2px;
  font-size: 9.5px;
  color: var(--muted-2);
}

.rank-heat {
  flex: none;
  display: flex;
  align-items: center;
  gap: 3px;
  color: var(--gold);
  font-size: 9.5px;
  font-weight: 700;
}

.rank-heat .ico {
  width: 11px;
  height: 11px;
}

/* -------------------------------------------------------------------------- */
/* Home footer / announcement                                                 */
/* -------------------------------------------------------------------------- */
.announce {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 16px 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 198, 109, 0.07);
  border: 1px solid rgba(255, 198, 109, 0.14);
  color: rgba(255, 220, 165, 0.82);
  font-size: 10.5px;
}

.announce .ico {
  width: 14px;
  height: 14px;
  color: var(--gold);
}

.announce span {
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
  line-height: 1.45;
}

.home-end {
  padding: 30px 16px 12px;
  text-align: center;
  color: var(--muted-2);
  font-size: 10.5px;
}

.home-end b {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

/* -------------------------------------------------------------------------- */
/* Detail                                                                     */
/* -------------------------------------------------------------------------- */
.detail-page {
  padding-bottom: 116px;
  background: var(--bg);
}

.detail-hero {
  position: relative;
  height: min(57vh, 480px);
  min-height: 360px;
  overflow: hidden;
  background: #111;
}

.detail-hero > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  transform: scale(1.015);
  -webkit-mask-image: linear-gradient(180deg, #000 46%, transparent 82%);
  mask-image: linear-gradient(180deg, #000 46%, transparent 82%);
}

.detail-hero::before {
  display: none;
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 8, 10, 0.5) 0%, transparent 20%, rgba(8, 8, 10, 0.2) 38%, rgba(8, 8, 10, 0.9) 58%, var(--bg) 80%);
}

.detail-nav {
  position: absolute;
  z-index: 3;
  top: calc(12px + var(--safe-top));
  left: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.detail-nav .icon-btn {
  background: rgba(0, 0, 0, 0.32);
}

.detail-body {
  position: relative;
  z-index: 4;
  margin-top: -128px;
  padding: 0 18px;
}

@media (max-height: 720px) {
  .detail-hero {
    height: 390px;
    min-height: 330px;
  }
  .detail-body {
    margin-top: -100px;
  }
}

.detail-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.detail-title {
  font-size: clamp(27px, 7.6vw, 34px);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.detail-en {
  margin-top: 4px;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
  font-weight: 650;
}

.detail-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px 12px;
  margin-top: 12px;
  font-size: 11.5px;
  color: var(--muted);
}

.detail-meta b {
  color: var(--gold);
  font-size: 12.5px;
}

.detail-meta i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--muted-2);
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.detail-tags span {
  height: 24px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  color: var(--text-2);
  font-size: 10px;
  font-weight: 600;
}

.detail-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 48px;
  gap: 9px;
  margin-top: 18px;
}

.detail-actions .btn {
  height: 44px;
}

.detail-synopsis {
  margin-top: 18px;
}

.detail-synopsis p {
  font-size: 12.5px;
  line-height: 1.68;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.detail-synopsis.expanded p {
  display: block;
}

.synopsis-toggle {
  margin-top: 5px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--text-2);
  font-size: 10.5px;
  font-weight: 650;
}

.synopsis-toggle .ico {
  width: 13px;
  height: 13px;
}

.ep-panel {
  margin-top: 22px;
  padding: 15px;
  border-radius: 20px;
  background: linear-gradient(180deg, var(--surface), rgba(23, 23, 26, 0.62));
  border: 1px solid var(--line);
}

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

.ep-panel-head h3 {
  display: flex;
  align-items: baseline;
  gap: 7px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.ep-panel-head h3 small {
  font-size: 10px;
  color: var(--muted);
  font-weight: 550;
}

.ep-panel-head button {
  color: var(--muted);
  font-size: 10.5px;
  display: flex;
  align-items: center;
  gap: 2px;
}

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

.ep {
  position: relative;
  height: 47px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid transparent;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  transition: all 0.18s ease;
}

.ep:active {
  transform: scale(0.95);
}

.ep b {
  font-size: 12px;
  line-height: 1.1;
  font-weight: 800;
}

.ep small {
  font-size: 8px;
  font-weight: 600;
  color: var(--muted-2);
  margin-top: 1px;
  display: inline-flex;
  align-items: center;
  gap: 1px;
}

.ep small .ico {
  width: 7px;
  height: 7px;
  stroke-width: 2.4;
}

.ep.free {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.ep.free small {
  color: var(--green);
}

.ep.unlocked small {
  color: var(--gold);
}

.ep.locked {
  color: var(--muted-2);
}

.ep.locked .ico {
  width: 12px;
  height: 12px;
  margin-bottom: 1px;
}

.ep.current {
  color: #fff;
  background: var(--brand);
  border-color: transparent;
  box-shadow: 0 6px 14px rgba(255, 45, 107, 0.25);
}

.ep.current small {
  color: rgba(255, 255, 255, 0.72);
}

.ep-more {
  margin-top: 12px;
  width: 100%;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.ep-more .ico {
  width: 13px;
  height: 13px;
}

.detail-section {
  margin-top: 24px;
}

.detail-section h3 {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.detail-section h3 button {
  font-size: 10.5px;
  color: var(--muted);
  font-weight: 550;
}

.preview-comments {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.preview-comment {
  display: flex;
  gap: 9px;
  padding: 10px;
  border-radius: 13px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.preview-comment .avatar {
  width: 29px;
  height: 29px;
  font-size: 11px;
}

.preview-comment h5 {
  font-size: 10.5px;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 2px;
}

.preview-comment p {
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--text-2);
}

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

.related-grid .card-title {
  font-size: 10.5px;
}

.related-grid .card-sub {
  display: none;
}

.detail-cta {
  position: fixed;
  z-index: 40;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 520px;
  padding: 11px 16px calc(13px + var(--safe-bottom));
  background: linear-gradient(180deg, rgba(8, 8, 10, 0), rgba(8, 8, 10, 0.92) 26%, rgba(8, 8, 10, 0.98));
  display: flex;
  gap: 9px;
}

.detail-cta .btn {
  height: 48px;
  border-radius: 14px;
}

.detail-cta .btn-primary {
  flex: 1;
}

.detail-cta .icon-btn {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  flex: none;
}

@media (min-width: 720px) {
  .detail-cta {
    position: absolute;
    bottom: 0;
    border-radius: 0 0 30px 30px;
  }
}

/* -------------------------------------------------------------------------- */
/* Player                                                                     */
/* -------------------------------------------------------------------------- */
.player-page {
  position: fixed;
  inset: 0;
  z-index: 70;
  max-width: 520px;
  margin: 0 auto;
  background: #000;
  overflow: hidden;
  color: #fff;
}

.player-stage {
  position: absolute;
  inset: 0;
  background: #000;
}

.player-stage video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.player-blur {
  position: absolute;
  inset: -20px;
  background-size: cover;
  background-position: center;
  filter: blur(32px) brightness(0.3);
  transform: scale(1.1);
}

.player-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.62) 0%, transparent 22%, transparent 57%, rgba(0, 0, 0, 0.8) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.18), transparent 22%, transparent 78%, rgba(0, 0, 0, 0.28));
  opacity: 1;
  transition: opacity 0.3s ease;
}

.player-page.ui-hidden .player-shade {
  opacity: 0;
}

.player-top {
  position: absolute;
  z-index: 6;
  top: calc(8px + var(--safe-top));
  left: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.player-page.ui-hidden .player-top,
.player-page.ui-hidden .player-rail,
.player-page.ui-hidden .player-bottom {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
}

.player-title-box {
  flex: 1;
  min-width: 0;
  padding-right: 4px;
}

.player-title-box h1 {
  font-size: 14px;
  font-weight: 750;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

.player-title-box p {
  margin-top: 1px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.58);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-top .icon-btn {
  width: 36px;
  height: 36px;
  background: rgba(0, 0, 0, 0.28);
  border-color: rgba(255, 255, 255, 0.06);
}

.player-rail {
  position: absolute;
  z-index: 6;
  right: 8px;
  bottom: 138px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 17px;
  transition: opacity 0.3s ease;
}

.rail-btn {
  width: 46px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: #fff;
  font-size: 9px;
  font-weight: 650;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.rail-btn .ico {
  width: 25px;
  height: 25px;
  stroke-width: 1.65;
}

.rail-btn.is-active {
  color: var(--pink);
}

.rail-btn.is-active .ico {
  fill: currentColor;
}

.rail-btn .rail-count {
  font-size: 8.5px;
  color: rgba(255, 255, 255, 0.68);
}

.center-play {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 45%;
  transform: translate(-50%, -50%);
  width: 66px;
  height: 66px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(12px);
  color: #fff;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.center-play .ico {
  width: 27px;
  height: 27px;
  margin-left: 3px;
}

.center-play.hidden {
  opacity: 0;
  pointer-events: none;
}

.player-loader {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 5;
}

.player-loader.show {
  opacity: 1;
}

.player-bottom {
  position: absolute;
  z-index: 6;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0 15px calc(13px + var(--safe-bottom));
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.player-episode-label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.62);
}

.player-episode-label b {
  color: #fff;
  font-weight: 700;
}

.player-episode-label .free-tag {
  display: inline-flex;
  align-items: center;
  height: 17px;
  padding: 0 5px;
  border-radius: 4px;
  background: rgba(55, 214, 165, 0.16);
  color: #6ff0c8;
  font-size: 8px;
  font-weight: 750;
}

.player-episode-label .vip-tag {
  display: inline-flex;
  align-items: center;
  height: 17px;
  padding: 0 5px;
  border-radius: 4px;
  background: rgba(255, 198, 109, 0.14);
  color: var(--gold);
  font-size: 8px;
  font-weight: 750;
}

.player-progress {
  display: flex;
  align-items: center;
  gap: 9px;
}

.player-progress span {
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.66);
  flex: none;
}

.progress-track {
  position: relative;
  flex: 1;
  height: 18px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.progress-track::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.22);
}

.progress-track i {
  position: relative;
  display: block;
  height: 3px;
  width: 0%;
  border-radius: 3px;
  background: #fff;
}

.progress-track i::after {
  content: "";
  position: absolute;
  right: -3px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  transform: translateY(-50%);
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.35);
}

.player-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

.player-tools-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.player-tool {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 10px;
  font-weight: 600;
}

.player-tool .ico {
  width: 18px;
  height: 18px;
}

.player-tool.speed {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.1);
}

.player-tool.next {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.player-tool.next .ico {
  width: 13px;
  height: 13px;
}

.mute-hint {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 152px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, 0.86);
  font-size: 9px;
  white-space: nowrap;
}

.mute-hint .ico {
  width: 12px;
  height: 12px;
}

/* Player locked */
.player-lock {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.4);
}

.player-lock .lock-card {
  width: 100%;
  max-width: 330px;
  padding: 24px 20px 20px;
  border-radius: 24px;
  text-align: center;
  background: rgba(18, 18, 21, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(22px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.lock-orb {
  width: 58px;
  height: 58px;
  margin: 0 auto 13px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--gold);
  background: radial-gradient(circle at 35% 30%, rgba(255, 198, 109, 0.28), rgba(255, 198, 109, 0.05));
  border: 1px solid rgba(255, 198, 109, 0.22);
  box-shadow: 0 0 30px rgba(255, 198, 109, 0.08);
}

.lock-orb .ico {
  width: 26px;
  height: 26px;
}

.lock-card h3 {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.lock-card p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.lock-price {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 15px 0;
  color: var(--gold);
  font-size: 22px;
  font-weight: 850;
}

.lock-price .coin {
  width: 21px;
  height: 21px;
}

.lock-card .btn {
  height: 44px;
  width: 100%;
}

.lock-card .btn + .btn {
  margin-top: 8px;
}

.lock-balance {
  margin-top: 11px;
  color: var(--muted-2);
  font-size: 9.5px;
}

.lock-balance b {
  color: var(--gold);
}

/* Player end card */
.player-end {
  position: absolute;
  z-index: 7;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  text-align: center;
}

.player-end .end-cover {
  width: 86px;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

.player-end h3 {
  margin-top: 5px;
  font-size: 18px;
  font-weight: 850;
}

.player-end p {
  color: var(--muted);
  font-size: 11px;
}

.player-end .btn {
  margin-top: 8px;
  width: 190px;
  height: 45px;
}

/* -------------------------------------------------------------------------- */
/* Library                                                                    */
/* -------------------------------------------------------------------------- */
.library-seg {
  display: flex;
  gap: 4px;
  margin: 4px 16px 0;
  padding: 4px;
  border-radius: 13px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.library-seg button {
  flex: 1;
  height: 37px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  transition: all 0.2s ease;
}

.library-seg button.active {
  background: var(--surface-3);
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.library-body {
  padding: 16px;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.history-row {
  display: flex;
  gap: 11px;
  padding: 9px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.history-row .poster {
  width: 68px;
  aspect-ratio: 3 / 4;
  border-radius: 9px;
  flex: none;
}

.history-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.history-info h4 {
  font-size: 13px;
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-info .meta {
  margin-top: 3px;
  font-size: 9.5px;
  color: var(--muted);
}

.history-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
}

.history-actions .btn {
  min-height: 29px;
  padding: 0 10px;
  font-size: 9.5px;
}

.library-empty {
  padding-top: 32px;
}

.fav-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 10.5px;
}

/* -------------------------------------------------------------------------- */
/* Profile                                                                    */
/* -------------------------------------------------------------------------- */
.profile-page {
  padding-bottom: 24px;
}

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

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 18px;
  font-weight: 850;
  flex: none;
  background: var(--brand);
  border: 2px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}

.profile-head .avatar {
  width: 58px;
  height: 58px;
  font-size: 22px;
  border: 2px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.03), 0 10px 24px rgba(0, 0, 0, 0.35);
}

.profile-id {
  flex: 1;
  min-width: 0;
}

.profile-id h2 {
  font-size: 20px;
  font-weight: 850;
  letter-spacing: -0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-id p {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
  font-size: 9.5px;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
}

.profile-id p .copy-id {
  color: var(--muted);
}

.profile-login {
  color: var(--text-2);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 1px;
}

.profile-login .ico {
  width: 14px;
  height: 14px;
}

.vip-banner {
  position: relative;
  margin: 0 16px;
  padding: 16px;
  border-radius: 18px;
  overflow: hidden;
  background: var(--gold-grad);
  color: #432804;
  box-shadow: 0 14px 30px rgba(232, 163, 61, 0.2);
}

.vip-banner::before {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  right: -35px;
  top: -70px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 50%;
  box-shadow: 0 0 0 18px rgba(255, 255, 255, 0.08), 0 0 0 40px rgba(255, 255, 255, 0.05);
}

.vip-banner .vip-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.12em;
  opacity: 0.7;
}

.vip-banner h3 {
  margin-top: 3px;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.vip-banner p {
  margin-top: 1px;
  font-size: 10px;
  font-weight: 600;
  opacity: 0.62;
}

.vip-banner .btn {
  position: absolute;
  right: 14px;
  bottom: 14px;
  height: 35px;
  padding: 0 14px;
  border-radius: 9px;
  background: #2a1905;
  color: #ffda96;
  font-size: 10.5px;
  box-shadow: none;
}

.vip-banner.is-vip {
  background: linear-gradient(120deg, #2a2117, #46321b 60%, #2a2117);
  color: var(--gold);
  border: 1px solid rgba(255, 198, 109, 0.25);
  box-shadow: none;
}

.vip-banner.is-vip p {
  color: rgba(255, 222, 166, 0.66);
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 14px 16px 0;
}

.profile-stat {
  padding: 11px 8px;
  border-radius: 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  text-align: center;
}

.profile-stat b {
  display: block;
  font-size: 17px;
  font-weight: 850;
  letter-spacing: -0.03em;
}

.profile-stat span {
  display: block;
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 9px;
}

.wallet-card {
  margin: 12px 16px 0;
  padding: 15px;
  border-radius: 18px;
  background: linear-gradient(135deg, #1d1c20, #141416);
  border: 1px solid var(--line);
}

.wallet-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10.5px;
}

.wallet-card-top span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.wallet-card-top .ico {
  width: 14px;
  height: 14px;
}

.wallet-card-main {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 9px;
}

.wallet-card-main b {
  font-size: 25px;
  line-height: 1;
  font-weight: 850;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.wallet-card-main .coin {
  width: 22px;
  height: 22px;
  font-size: 12px;
}

.wallet-card-main .btn {
  margin-left: auto;
  min-height: 33px;
  height: 33px;
  padding: 0 14px;
  border-radius: 9px;
  font-size: 10.5px;
}

.checkin-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 16px 0;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 45, 107, 0.07);
  border: 1px solid rgba(255, 45, 107, 0.16);
}

.checkin-strip .gift-orb {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--pink-soft);
  color: var(--pink-2);
  flex: none;
}

.checkin-strip .gift-orb .ico {
  width: 18px;
  height: 18px;
}

.checkin-strip .grow h4 {
  font-size: 11.5px;
  font-weight: 750;
}

.checkin-strip .grow p {
  margin-top: 1px;
  font-size: 9.5px;
  color: var(--muted);
}

.checkin-strip .btn {
  height: 31px;
  min-height: 31px;
  padding: 0 12px;
  font-size: 10px;
  flex: none;
}

.menu-card {
  margin: 12px 16px 0;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
}

.menu-row {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 51px;
  padding: 0 14px;
  position: relative;
  color: var(--text-2);
}

.menu-row + .menu-row::before {
  content: "";
  position: absolute;
  top: 0;
  left: 44px;
  right: 14px;
  height: 1px;
  background: var(--line);
}

.menu-row .menu-ico {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.055);
  color: var(--muted);
  flex: none;
}

.menu-row .menu-ico .ico {
  width: 14px;
  height: 14px;
}

.menu-row .menu-label {
  flex: 1;
  font-size: 12px;
  font-weight: 600;
}

.menu-row .menu-value {
  color: var(--muted-2);
  font-size: 10px;
}

.menu-row > .ico {
  width: 14px;
  height: 14px;
  color: var(--muted-2);
}

.menu-row.danger .menu-label {
  color: #ff718d;
}

.profile-version {
  padding: 20px 16px 4px;
  text-align: center;
  color: var(--muted-2);
  font-size: 9px;
}

/* -------------------------------------------------------------------------- */
/* Wallet                                                                     */
/* -------------------------------------------------------------------------- */
.wallet-hero {
  position: relative;
  margin: 6px 16px 0;
  padding: 22px 20px;
  border-radius: 22px;
  overflow: hidden;
  background:
    radial-gradient(220px 150px at 85% 10%, rgba(255, 198, 109, 0.28), transparent 65%),
    linear-gradient(135deg, #251d16, #161416 55%, #1e1718);
  border: 1px solid rgba(255, 198, 109, 0.18);
}

.wallet-hero::after {
  content: "";
  position: absolute;
  right: -32px;
  bottom: -50px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 1px solid rgba(255, 198, 109, 0.16);
  box-shadow: 0 0 0 20px rgba(255, 198, 109, 0.03), 0 0 0 44px rgba(255, 198, 109, 0.025);
}

.wallet-hero .eyebrow {
  color: rgba(255, 214, 151, 0.62);
}

.wallet-balance {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 9px;
}

.wallet-balance .coin {
  width: 29px;
  height: 29px;
  font-size: 15px;
}

.wallet-balance b {
  font-size: 36px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}

.wallet-hero p {
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 9.5px;
}

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

.package {
  position: relative;
  padding: 15px 13px;
  border-radius: 15px;
  background: var(--surface);
  border: 1px solid var(--line);
  text-align: left;
  transition: all 0.2s ease;
}

.package:active {
  transform: scale(0.97);
}

.package.hot {
  border-color: rgba(255, 45, 107, 0.36);
  background: linear-gradient(180deg, rgba(255, 45, 107, 0.1), var(--surface));
}

.package .pkg-flag {
  position: absolute;
  top: -1px;
  right: 10px;
  height: 17px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  border-radius: 0 0 5px 5px;
  background: var(--brand);
  font-size: 7.5px;
  font-weight: 850;
  letter-spacing: 0.04em;
}

.package .pkg-coins {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 18px;
  font-weight: 850;
  letter-spacing: -0.03em;
}

.package .pkg-coins .coin {
  width: 18px;
  height: 18px;
}

.package .pkg-bonus {
  margin-top: 3px;
  font-size: 9px;
  color: var(--gold);
  font-weight: 600;
}

.package .pkg-buy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
}

.package .pkg-price {
  font-size: 12px;
  font-weight: 800;
}

.package .pkg-price small {
  font-size: 9px;
  font-weight: 500;
  color: var(--muted-2);
}

.package .pkg-arrow {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  color: var(--muted);
}

.package .pkg-arrow .ico {
  width: 12px;
  height: 12px;
}

.pay-note {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 9px 11px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted-2);
  font-size: 9px;
}

.pay-note .ico {
  width: 13px;
  height: 13px;
}

.order-list {
  display: flex;
  flex-direction: column;
}

.order-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.order-row:last-child {
  border-bottom: 0;
}

.order-ico {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(255, 198, 109, 0.08);
  color: var(--gold);
  flex: none;
}

.order-ico .ico {
  width: 16px;
  height: 16px;
}

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

.order-info h5 {
  font-size: 11px;
  font-weight: 650;
}

.order-info p {
  margin-top: 2px;
  font-size: 8.5px;
  color: var(--muted-2);
}

.order-amount {
  text-align: right;
}

.order-amount b {
  display: block;
  font-size: 11px;
  font-weight: 750;
}

.order-amount span {
  font-size: 8px;
  color: var(--green);
}

/* -------------------------------------------------------------------------- */
/* VIP                                                                        */
/* -------------------------------------------------------------------------- */
.vip-page {
  padding-bottom: 120px;
}

.vip-hero {
  position: relative;
  margin: 10px 16px 0;
  padding: 25px 20px 22px;
  border-radius: 24px;
  overflow: hidden;
  background:
    radial-gradient(220px 180px at 82% 8%, rgba(255, 255, 255, 0.18), transparent 65%),
    var(--gold-grad);
  color: #3c2203;
  box-shadow: 0 20px 44px rgba(232, 163, 61, 0.16);
}

.vip-hero::before,
.vip-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.vip-hero::before {
  width: 120px;
  height: 120px;
  right: -18px;
  top: -40px;
  box-shadow: 0 0 0 16px rgba(255, 255, 255, 0.08), 0 0 0 36px rgba(255, 255, 255, 0.05);
}

.vip-hero::after {
  width: 70px;
  height: 70px;
  right: 42px;
  bottom: -32px;
  border-color: rgba(255, 255, 255, 0.16);
}

.vip-hero .vip-kicker {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.18em;
  opacity: 0.58;
}

.vip-hero h1 {
  margin-top: 7px;
  font-size: 32px;
  line-height: 1.02;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.vip-hero p {
  margin-top: 7px;
  max-width: 78%;
  font-size: 10.5px;
  line-height: 1.55;
  opacity: 0.66;
  font-weight: 550;
}

.vip-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 14px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(60, 34, 3, 0.12);
  font-size: 9px;
  font-weight: 750;
}

.vip-benefits {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 14px;
}

.vip-benefit {
  padding: 13px;
  border-radius: 15px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.vip-benefit .b-ico {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(255, 198, 109, 0.09);
  color: var(--gold);
  margin-bottom: 8px;
}

.vip-benefit .b-ico .ico {
  width: 16px;
  height: 16px;
}

.vip-benefit h4 {
  font-size: 11px;
  font-weight: 750;
}

.vip-benefit p {
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 8.5px;
  line-height: 1.4;
}

.plan-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.plan {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 15px;
  background: var(--surface);
  border: 1px solid var(--line);
  text-align: left;
  transition: all 0.2s ease;
}

.plan.active {
  border-color: rgba(255, 198, 109, 0.55);
  background: linear-gradient(105deg, rgba(255, 198, 109, 0.09), var(--surface));
}

.plan .plan-radio {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 1.5px solid var(--muted-2);
  display: grid;
  place-items: center;
  flex: none;
}

.plan.active .plan-radio {
  border-color: var(--gold);
  background: var(--gold);
}

.plan.active .plan-radio::after {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #2a1b07;
}

.plan-info {
  flex: 1;
}

.plan-info h4 {
  font-size: 12.5px;
  font-weight: 750;
}

.plan-info p {
  margin-top: 2px;
  font-size: 8.5px;
  color: var(--muted-2);
}

.plan-price {
  text-align: right;
}

.plan-price b {
  font-size: 17px;
  font-weight: 850;
  letter-spacing: -0.03em;
  color: var(--gold);
}

.plan-price span {
  display: block;
  font-size: 8px;
  color: var(--muted-2);
  text-decoration: line-through;
}

.plan .plan-flag {
  position: absolute;
  top: -7px;
  left: 14px;
  height: 17px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  border-radius: 5px;
  background: var(--brand);
  color: #fff;
  font-size: 7.5px;
  font-weight: 850;
}

.vip-cta {
  position: fixed;
  z-index: 40;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 520px;
  padding: 11px 16px calc(13px + var(--safe-bottom));
  background: linear-gradient(180deg, rgba(8, 8, 10, 0), rgba(8, 8, 10, 0.94) 30%, #08080a);
  display: flex;
  gap: 10px;
}

.vip-cta .btn {
  flex: 1;
  height: 48px;
  border-radius: 14px;
}

.vip-cta .vip-price {
  font-size: 11px;
  font-weight: 800;
  opacity: 0.62;
  margin-left: 4px;
}

@media (min-width: 720px) {
  .vip-cta {
    position: absolute;
    border-radius: 0 0 30px 30px;
  }
}

/* -------------------------------------------------------------------------- */
/* Search                                                                     */
/* -------------------------------------------------------------------------- */
.search-page {
  min-height: 100dvh;
  padding-bottom: 30px;
}

.search-head {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: calc(10px + var(--safe-top)) 12px 10px;
  background: rgba(8, 8, 10, 0.94);
  backdrop-filter: blur(18px);
}

.search-field {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 13px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.search-field .ico {
  width: 18px;
  height: 18px;
  color: var(--muted-2);
}

.search-field input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font-size: 13px;
  color: var(--text);
}

.search-field input::placeholder {
  color: var(--muted-2);
}

.search-cancel {
  flex: none;
  font-size: 12px;
  color: var(--text-2);
  padding: 0 4px;
}

.search-body {
  padding: 16px;
}

.search-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 750;
}

.search-label button {
  font-size: 10px;
  color: var(--muted-2);
  font-weight: 500;
}

.trend-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.trend-tag {
  height: 32px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text-2);
  font-size: 11px;
}

.trend-tag .rank {
  color: var(--pink);
  font-size: 9px;
  font-weight: 850;
}

.recent-list {
  display: flex;
  flex-direction: column;
}

.recent-row {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 43px;
  border-bottom: 1px solid var(--line);
  color: var(--text-2);
  font-size: 11.5px;
}

.recent-row .ico {
  width: 14px;
  height: 14px;
  color: var(--muted-2);
}

.recent-row .grow {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-row .del {
  color: var(--muted-2);
}

.recent-row .del .ico {
  width: 13px;
  height: 13px;
}

.search-empty {
  padding-top: 46px;
}

.search-result-head {
  padding: 4px 0 12px;
  color: var(--muted);
  font-size: 10.5px;
}

/* -------------------------------------------------------------------------- */
/* Settings / language                                                        */
/* -------------------------------------------------------------------------- */
.settings-body {
  padding: 6px 16px 24px;
}

.setting-group {
  margin-top: 14px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
}

.setting-row {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 52px;
  padding: 0 14px;
  position: relative;
}

.setting-row + .setting-row::before {
  content: "";
  position: absolute;
  top: 0;
  left: 14px;
  right: 14px;
  height: 1px;
  background: var(--line);
}

.setting-row .s-label {
  flex: 1;
  font-size: 12px;
  font-weight: 600;
}

.setting-row .s-value {
  color: var(--muted-2);
  font-size: 10px;
}

.lang-options {
  display: flex;
  gap: 6px;
}

.lang-options button {
  height: 27px;
  padding: 0 11px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid transparent;
  color: var(--muted);
  font-size: 9.5px;
}

.lang-options button.active {
  background: var(--pink-soft);
  border-color: rgba(255, 45, 107, 0.26);
  color: var(--pink-2);
  font-weight: 700;
}

.language-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: -4px 0 4px;
}

.language-row {
  display: grid;
  grid-template-columns: 1fr auto 28px;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 50px;
  padding: 0 4px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.language-row:last-child {
  border-bottom: 0;
}

.language-native {
  font-size: 13px;
  font-weight: 650;
  color: var(--text);
}

.language-english {
  color: var(--muted-2);
  font-size: 9.5px;
}

.language-check {
  display: grid;
  place-items: center;
  color: var(--pink);
}

.language-check .ico {
  width: 17px;
  height: 17px;
}

.language-row.active {
  background: linear-gradient(90deg, rgba(255, 45, 107, 0.07), transparent);
}

.switch {
  position: relative;
  width: 40px;
  height: 23px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  transition: background 0.2s ease;
  flex: none;
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s var(--ease);
}

.switch.on {
  background: var(--pink);
}

.switch.on::after {
  transform: translateX(17px);
}

.settings-about {
  padding: 26px 16px 8px;
  text-align: center;
  color: var(--muted-2);
  font-size: 9px;
}

.settings-about b {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 3px;
}

/* -------------------------------------------------------------------------- */
/* Auth form                                                                  */
/* -------------------------------------------------------------------------- */
.auth-sheet {
  padding: 4px 20px calc(20px + var(--safe-bottom));
}

.auth-sheet-wrap .sheet-body {
  padding: 0;
}

.auth-sheet-wrap .sheet-head {
  position: absolute;
  z-index: 4;
  top: 9px;
  right: 14px;
  padding: 0;
}

.auth-sheet-wrap .sheet-head h3 {
  display: none;
}

.auth-sheet-wrap .sheet-head .icon-btn {
  width: 31px;
  height: 31px;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 15px;
}

.auth-brand img {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}

.auth-brand h2 {
  font-size: 21px;
  font-weight: 850;
  letter-spacing: -0.035em;
}

.auth-brand p {
  margin-top: 1px;
  font-size: 9.5px;
  color: var(--muted);
}

.auth-tabs {
  display: flex;
  gap: 18px;
  margin-bottom: 15px;
  border-bottom: 1px solid var(--line);
}

.auth-tabs button {
  position: relative;
  height: 37px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.auth-tabs button.active {
  color: var(--text);
}

.auth-tabs button.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--pink);
}

.field {
  margin-bottom: 11px;
}

.field label {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 650;
}

.field input {
  width: 100%;
  height: 45px;
  padding: 0 13px;
  border-radius: 11px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 13px;
  transition: border 0.2s ease;
}

.field input:focus {
  border-color: rgba(255, 45, 107, 0.45);
}

.auth-submit {
  width: 100%;
  height: 47px;
  margin-top: 4px;
}

.auth-helper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 11px;
  font-size: 9.5px;
  color: var(--muted-2);
}

.auth-helper button {
  color: var(--pink-2);
  font-weight: 650;
}

.auth-demo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 15px;
  padding: 10px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.5;
}

.auth-demo .ico {
  width: 15px;
  height: 15px;
  color: var(--gold);
  flex: none;
}

.auth-demo b {
  color: var(--text-2);
}

.auth-guest {
  display: block;
  width: 100%;
  margin-top: 13px;
  color: var(--muted);
  font-size: 10.5px;
  text-align: center;
  padding: 7px;
}

.auth-guest:active {
  color: var(--text-2);
}

input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
  display: none;
}

/* -------------------------------------------------------------------------- */
/* Sheets, dialogs, toast                                                     */
/* -------------------------------------------------------------------------- */
#overlay-root {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
}

.overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: auto;
}

.overlay.open {
  opacity: 1;
}

.sheet {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 102%);
  width: 100%;
  max-width: 520px;
  max-height: 88dvh;
  overflow-y: auto;
  background: #141416;
  border-radius: 24px 24px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-bottom: 0;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.5);
  transition: transform 0.38s var(--ease);
  pointer-events: auto;
  padding-bottom: var(--safe-bottom);
}

.sheet.open {
  transform: translate(-50%, 0);
}

.sheet-grip {
  width: 34px;
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.16);
  margin: 9px auto 2px;
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px 10px;
}

.sheet-head h3 {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.sheet-head .icon-btn {
  width: 31px;
  height: 31px;
  background: rgba(255, 255, 255, 0.06);
}

.sheet-head .icon-btn .ico {
  width: 15px;
  height: 15px;
}

.sheet-body {
  padding: 0 18px 18px;
}

.sheet-ep-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.sheet-ep-grid .ep {
  height: 45px;
}

.sheet-note {
  padding: 12px 14px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.sheet-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.sheet-actions .btn {
  flex: 1;
}

/* Unlock sheet */
.unlock-sheet-top {
  display: flex;
  gap: 13px;
  align-items: center;
  padding: 5px 0 16px;
}

.unlock-sheet-top .poster {
  width: 64px;
  aspect-ratio: 3 / 4;
  border-radius: 9px;
  flex: none;
}

.unlock-sheet-top h3 {
  font-size: 15px;
  font-weight: 800;
}

.unlock-sheet-top p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.unlock-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px;
  border-radius: 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  margin-bottom: 8px;
}

.unlock-row .u-orb {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(255, 198, 109, 0.08);
  color: var(--gold);
  flex: none;
}

.unlock-row .u-orb .ico {
  width: 17px;
  height: 17px;
}

.unlock-row.vip .u-orb {
  background: rgba(255, 45, 107, 0.08);
  color: var(--pink-2);
}

.unlock-row .u-info {
  flex: 1;
}

.unlock-row h4 {
  font-size: 11.5px;
  font-weight: 700;
}

.unlock-row p {
  margin-top: 1px;
  color: var(--muted-2);
  font-size: 9px;
}

.unlock-row .u-price {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 850;
  flex: none;
}

.unlock-row .u-price .coin {
  width: 16px;
  height: 16px;
}

.unlock-balance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 12px 2px 0;
  color: var(--muted);
  font-size: 10px;
}

.unlock-balance b {
  color: var(--gold);
}

/* Comments */
.comment-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 44dvh;
  overflow-y: auto;
  padding-right: 2px;
}

.comment {
  display: flex;
  gap: 9px;
}

.comment .avatar {
  width: 31px;
  height: 31px;
  font-size: 11px;
}

.comment-main {
  flex: 1;
  min-width: 0;
}

.comment-top {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 9.5px;
  color: var(--muted);
}

.comment-top b {
  color: var(--text-2);
  font-weight: 650;
}

.comment-top .you {
  height: 15px;
  padding: 0 4px;
  border-radius: 3px;
  background: var(--pink-soft);
  color: var(--pink-2);
  font-size: 7px;
  font-weight: 700;
}

.comment p {
  margin-top: 3px;
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--text-2);
  word-break: break-word;
}

.comment-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 5px;
  font-size: 8.5px;
  color: var(--muted-2);
}

.comment-like {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.comment-like .ico {
  width: 11px;
  height: 11px;
}

.comment-form {
  display: flex;
  gap: 8px;
  align-items: center;
  padding-top: 11px;
  margin-top: 12px;
  border-top: 1px solid var(--line);
}

.comment-form input {
  flex: 1;
  height: 39px;
  padding: 0 12px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 11px;
}

.comment-form .btn {
  height: 39px;
  min-height: 39px;
  border-radius: 10px;
  padding: 0 14px;
}

/* Confirm dialog */
.dialog {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -46%) scale(0.94);
  width: calc(100% - 48px);
  max-width: 330px;
  padding: 21px 20px 16px;
  border-radius: 20px;
  background: #1a1a1e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  opacity: 0;
  transition: all 0.24s var(--ease);
  pointer-events: auto;
  text-align: center;
}

.dialog.open {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.dialog .dialog-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 11px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--pink-soft);
  color: var(--pink-2);
}

.dialog .dialog-icon .ico {
  width: 20px;
  height: 20px;
}

.dialog h3 {
  font-size: 15px;
  font-weight: 800;
}

.dialog p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.55;
  white-space: pre-line;
}

.dialog-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.dialog-actions .btn {
  flex: 1;
  height: 41px;
  min-height: 41px;
  font-size: 11.5px;
}

/* Toast */
#toast-root {
  position: fixed;
  z-index: 400;
  top: calc(16px + var(--safe-top));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  pointer-events: none;
  width: max-content;
  max-width: 90vw;
}

.toast {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 35px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(30, 30, 34, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(14px);
  color: var(--text);
  font-size: 10.5px;
  font-weight: 550;
  animation: toast-in 0.25s var(--ease) both;
}

.toast.out {
  animation: toast-out 0.22s ease both;
}

.toast .ico {
  width: 14px;
  height: 14px;
  color: var(--green);
}

.toast.error .ico {
  color: #ff6f87;
}

.toast.gold .ico {
  color: var(--gold);
}

/* -------------------------------------------------------------------------- */
/* Empty / skeleton / misc                                                    */
/* -------------------------------------------------------------------------- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 46px 28px;
}

.empty-art {
  width: 120px;
  height: 104px;
  position: relative;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  color: var(--muted-2);
}

.empty-art::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 45, 107, 0.11), transparent 68%);
}

.empty-art .ico {
  width: 46px;
  height: 46px;
  stroke-width: 1.2;
}

.empty-state h3 {
  font-size: 14px;
  font-weight: 750;
}

.empty-state p {
  margin-top: 4px;
  max-width: 250px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.55;
}

.empty-state .btn {
  margin-top: 14px;
  height: 38px;
  min-height: 38px;
  font-size: 11px;
}

.skeleton {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
  animation: shimmer 1.25s infinite;
}

.sk-hero {
  height: 400px;
  margin: 12px 16px;
  border-radius: 24px;
}

.sk-line {
  height: 12px;
  margin: 8px 16px;
}

.sk-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 16px;
}

.sk-poster {
  aspect-ratio: 3 / 4;
  border-radius: 14px;
}

.loader-block {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 45vh;
  color: var(--muted);
  font-size: 11px;
  gap: 8px;
}

.spinner {
  width: 19px;
  height: 19px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--pink);
  animation: spin 0.7s linear infinite;
}

.divider {
  height: 1px;
  background: var(--line);
  margin: 14px 0;
}

/* -------------------------------------------------------------------------- */
/* Animations                                                                 */
/* -------------------------------------------------------------------------- */
.rise {
  animation: rise-in 0.55s var(--ease) both;
}

.rise-1 {
  animation-delay: 0.04s;
}

.rise-2 {
  animation-delay: 0.09s;
}

.rise-3 {
  animation-delay: 0.14s;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes splash-pop {
  from {
    opacity: 0;
    transform: scale(0.72) rotate(-6deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}

@keyframes splash-load {
  0% {
    transform: translateX(-110%);
  }
  100% {
    transform: translateX(250%);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-7px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(-6px) scale(0.97);
  }
}

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