:root {
  color-scheme: dark;
  --canvas: #08090b;
  --canvas-raised: #0d0f13;
  --surface: #12151a;
  --surface-strong: #181c23;
  --surface-soft: #20252d;
  --line: #2b3039;
  --line-soft: rgba(255, 255, 255, 0.09);
  --text: #f6f5f3;
  --muted: #a6abb5;
  --muted-strong: #cbd0d8;
  --accent: #ed1e61;
  --accent-strong: #ff2d72;
  --signal: #42d6c4;
  --danger: #ff6b6b;
  --header-height: 72px;
  --content-max: 1440px;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
  font-family: "Segoe UI Variable", "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--canvas);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 84% 10%, rgba(66, 214, 196, 0.05), transparent 26rem),
    var(--canvas);
  color: var(--text);
}

body.has-layer {
  overflow: hidden;
}

button,
input,
a {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 3px;
}

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

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 80;
  padding: 10px 14px;
  transform: translateY(-160%);
  border-radius: 4px;
  background: var(--text);
  color: var(--canvas);
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

.web-app {
  min-height: 100dvh;
}

.web-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  min-height: var(--header-height);
  padding: 0 32px;
  border-bottom: 1px solid transparent;
  background: linear-gradient(180deg, rgba(8, 9, 11, 0.94), rgba(8, 9, 11, 0.62));
  backdrop-filter: blur(18px);
  transition: background 220ms ease, border-color 220ms ease;
}

.web-header.is-solid {
  border-color: var(--line-soft);
  background: rgba(8, 9, 11, 0.96);
}

.web-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 148px;
  color: var(--text);
  text-decoration: none;
}

.web-brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 6px;
  background: var(--accent);
  box-shadow: 0 10px 26px rgba(237, 30, 97, 0.24);
  font-weight: 850;
}

.web-brand-copy {
  display: grid;
  line-height: 1;
}

.web-brand-copy strong {
  font-size: 17px;
  font-weight: 800;
}

.web-brand-copy small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.8px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.nav-button {
  position: relative;
  min-height: 42px;
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: var(--muted-strong);
  cursor: pointer;
  font-size: 14px;
  font-weight: 650;
  white-space: nowrap;
  transition: color 180ms ease, transform 180ms ease;
}

.nav-button::after {
  position: absolute;
  right: 14px;
  bottom: 3px;
  left: 14px;
  height: 2px;
  transform: scaleX(0);
  background: var(--accent);
  content: "";
  transition: transform 180ms ease;
}

.nav-button:hover,
.nav-button.is-active {
  color: var(--text);
}

.nav-button.is-active::after {
  transform: scaleX(1);
}

.nav-button:active,
.primary-button:active,
.secondary-button:active,
.icon-command:active,
.poster-card:active {
  transform: translateY(1px) scale(0.99);
}

.header-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.global-search {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  width: min(23vw, 290px);
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: rgba(20, 23, 28, 0.84);
  transition: border-color 180ms ease, background 180ms ease;
}

.global-search:focus-within {
  border-color: rgba(237, 30, 97, 0.65);
  background: var(--surface);
}

.global-search img {
  width: 16px;
  height: 16px;
  opacity: 0.68;
}

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

.global-search input::placeholder {
  color: #777d88;
}

.header-icon-button,
.wallet-trigger {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: rgba(20, 23, 28, 0.84);
  color: var(--muted-strong);
  cursor: pointer;
  text-decoration: none;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.header-icon-button {
  padding: 0 11px;
  font-size: 12px;
}

.language-trigger img {
  width: 15px;
  height: 15px;
  opacity: 0.82;
}

.wallet-trigger {
  min-width: 64px;
  padding: 0 12px;
}

.wallet-trigger span {
  color: var(--signal);
  font-size: 11px;
}

.header-icon-button:hover,
.wallet-trigger:hover {
  border-color: var(--line);
  background: var(--surface-strong);
  color: var(--text);
}

#web-main {
  min-height: 100dvh;
}

.web-skeleton {
  min-height: 100dvh;
  padding-top: var(--header-height);
  background: var(--canvas);
}

.skeleton-hero {
  min-height: 580px;
  background: linear-gradient(110deg, #101319 24%, #191d24 42%, #101319 60%);
  background-size: 240% 100%;
  animation: skeleton-shift 1.4s ease-in-out infinite;
}

.skeleton-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  width: min(calc(100% - 64px), var(--content-max));
  margin: 28px auto 0;
}

.skeleton-row span {
  aspect-ratio: 2 / 3;
  border-radius: 6px;
  background: var(--surface);
}

@keyframes skeleton-shift {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.web-hero {
  position: relative;
  display: grid;
  height: clamp(560px, 64dvh, 720px);
  min-height: 620px;
  align-items: end;
  overflow: hidden;
  background: #111318;
}

.hero-media,
.hero-media picture,
.hero-media img,
.hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-media img {
  object-fit: cover;
  object-position: var(--hero-focus, center center);
  filter: saturate(0.82) contrast(1.03);
  transform: scale(1.008);
  transition: opacity 360ms ease, transform 5.8s ease;
}

.web-hero.is-entering .hero-media img {
  transform: scale(1.035);
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(8, 9, 11, 0.98) 0%, rgba(8, 9, 11, 0.82) 34%, rgba(8, 9, 11, 0.18) 70%, rgba(8, 9, 11, 0.5) 100%),
    linear-gradient(0deg, var(--canvas) 0%, rgba(8, 9, 11, 0.05) 48%, rgba(8, 9, 11, 0.35) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(calc(100% - 64px), var(--content-max));
  margin: 0 auto;
  padding: 150px 0 74px;
}

.hero-kicker,
.detail-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #ff7ba5;
  font-size: 13px;
  font-weight: 760;
}

.hero-kicker::before,
.detail-kicker::before {
  width: 24px;
  height: 2px;
  background: var(--accent);
  content: "";
}

.hero-content h1,
.detail-content h1 {
  max-width: 700px;
  margin: 14px 0 12px;
  font-size: 58px;
  font-weight: 840;
  line-height: 1.04;
  text-wrap: balance;
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  color: var(--muted-strong);
  font-size: 14px;
}

.hero-meta span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.hero-meta span + span::before,
.detail-meta span + span::before {
  width: 3px;
  height: 3px;
  margin-right: 4px;
  border-radius: 50%;
  background: #707681;
  content: "";
}

.hero-description,
.detail-description {
  max-width: 610px;
  margin: 18px 0 0;
  color: #d2d5da;
  font-size: 16px;
  line-height: 1.65;
  text-wrap: pretty;
}

.hero-actions,
.detail-actions,
.player-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.primary-button,
.secondary-button,
.quiet-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 18px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 760;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.primary-button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: white;
  box-shadow: 0 13px 34px rgba(237, 30, 97, 0.22);
}

.primary-button:hover {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
}

.secondary-button {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(19, 22, 27, 0.72);
  color: var(--text);
  backdrop-filter: blur(10px);
}

.secondary-button:hover,
.quiet-button:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: var(--surface-strong);
}

.quiet-button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted-strong);
}

.button-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.hero-carousel-controls {
  display: flex;
  width: min(410px, 72vw);
  align-items: center;
  gap: 12px;
  margin-top: 34px;
}

.hero-progress {
  display: flex;
  min-width: 0;
  flex: 1;
  gap: 7px;
}

.hero-progress button {
  position: relative;
  width: 52px;
  height: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.hero-progress button::before,
.hero-progress button::after {
  position: absolute;
  top: 8px;
  right: 0;
  left: 0;
  height: 2px;
  content: "";
}

.hero-progress button::before {
  background: rgba(255, 255, 255, 0.3);
}

.hero-progress button::after {
  transform: scaleX(0);
  transform-origin: left;
  background: white;
}

.hero-progress button.is-active::after {
  animation: hero-progress 5.4s linear forwards;
}

.web-hero.is-carousel-paused .hero-progress button.is-active::after {
  animation-play-state: paused;
}

.hero-playback-toggle {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: rgba(14, 16, 20, 0.7);
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.hero-playback-toggle:hover,
.hero-playback-toggle:focus-visible {
  border-color: rgba(255, 255, 255, 0.52);
  background: rgba(29, 32, 38, 0.9);
}

.hero-playback-toggle img {
  width: 12px;
  height: 14px;
  object-fit: contain;
}

@keyframes hero-progress {
  to { transform: scaleX(1); }
}

.web-content {
  position: relative;
  z-index: 4;
  width: min(calc(100% - 64px), var(--content-max));
  margin: -18px auto 0;
  padding-bottom: 110px;
}

.content-section {
  margin-top: 52px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.section-heading h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.2;
}

.section-heading p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.section-link {
  border: 0;
  background: transparent;
  color: var(--muted-strong);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

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

.continue-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) auto;
  min-height: 164px;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: var(--surface);
}

.continue-cover {
  align-self: stretch;
  min-height: 164px;
  overflow: hidden;
}

.continue-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 24%;
}

.continue-copy {
  min-width: 0;
  padding: 24px 28px;
}

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

.continue-copy h3 {
  margin: 7px 0 6px;
  overflow: hidden;
  font-size: 24px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.continue-copy p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 13px;
}

.continue-actions {
  padding-right: 28px;
}

.ranking-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(380px, 0.75fr);
  min-height: 0;
  align-items: stretch;
  gap: 22px;
  height: clamp(500px, 40vw, 620px);
}

.ranking-feature {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border-radius: 7px;
  cursor: pointer;
  background: var(--surface);
}

.ranking-feature img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 24%;
}

.ranking-feature::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(8, 9, 11, 0.96), transparent 66%);
  content: "";
}

.ranking-number {
  position: absolute;
  z-index: 2;
  top: 18px;
  left: 18px;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  font-size: 20px;
  font-weight: 850;
}

.ranking-feature-copy {
  position: absolute;
  z-index: 2;
  right: 30px;
  bottom: 30px;
  left: 30px;
}

.ranking-feature-copy h3 {
  max-width: 22ch;
  margin: 0 0 8px;
  font-size: 36px;
  line-height: 1.12;
  text-wrap: balance;
}

.ranking-feature-copy p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 14px;
  font-weight: 650;
}

.ranking-list {
  display: grid;
  grid-template-rows: repeat(4, minmax(0, 1fr));
  min-height: 0;
  overflow: hidden;
  gap: 10px;
}

.ranking-item {
  display: grid;
  grid-template-columns: 44px 92px minmax(0, 1fr) 88px;
  align-items: center;
  gap: 14px;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: 12px 16px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--surface);
  cursor: pointer;
  transition: background 180ms ease, transform 180ms ease;
}

.ranking-item:hover {
  transform: translateX(2px);
  background: var(--surface-strong);
}

.ranking-item > strong {
  color: #ff6b9b;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

.ranking-item img {
  width: 92px;
  height: min(112px, 100%);
  aspect-ratio: 4 / 5;
  border-radius: 4px;
  object-fit: cover;
  object-position: center 24%;
}

.ranking-item-copy {
  min-width: 0;
}

.ranking-item-copy h3 {
  display: -webkit-box;
  margin: 0 0 7px;
  overflow: hidden;
  font-size: 16px;
  line-height: 1.35;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.ranking-item-copy p,
.ranking-trend {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.ranking-compact-trend {
  display: none;
}

.ranking-trend {
  justify-self: end;
  color: var(--muted-strong);
  font-weight: 700;
  white-space: nowrap;
}

.poster-rail {
  display: grid;
  grid-auto-columns: clamp(150px, 12vw, 184px);
  grid-auto-flow: column;
  gap: 16px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: 2px 2px 12px;
  scrollbar-width: none;
  scroll-snap-type: inline proximity;
}

.poster-rail::-webkit-scrollbar {
  display: none;
}

.poster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  align-items: start;
  gap: 34px 18px;
}

.poster-card {
  display: grid;
  grid-template-rows: auto minmax(62px, auto);
  align-content: start;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  scroll-snap-align: start;
  transition: transform 220ms ease;
}

.poster-card:hover {
  transform: translateY(-4px);
}

.poster-media {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 6px;
  background: var(--surface);
}

.poster-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 300ms ease, filter 300ms ease;
}

.poster-card:hover .poster-media img {
  filter: brightness(1.06);
  transform: scale(1.025);
}

.poster-badge,
.poster-views {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  border-radius: 3px;
  backdrop-filter: blur(8px);
}

.poster-badge {
  top: 9px;
  right: 9px;
  min-height: 24px;
  padding: 0 7px;
  background: rgba(237, 30, 97, 0.88);
  font-size: 11px;
  font-weight: 750;
}

.poster-views {
  right: 9px;
  bottom: 9px;
  padding: 5px 7px;
  background: rgba(8, 9, 11, 0.72);
  color: white;
  font-size: 11px;
}

.poster-copy {
  display: grid;
  min-width: 0;
  min-height: 62px;
  align-content: start;
  gap: 5px;
  padding: 11px 2px 0;
  overflow: hidden;
}

.poster-title {
  display: -webkit-box;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  font-size: 15px;
  font-weight: 720;
  line-height: 1.35;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.poster-meta {
  display: block;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.genre-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
  overflow-x: auto;
  scrollbar-width: none;
}

.genre-tabs::-webkit-scrollbar {
  display: none;
}

.genre-tab {
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: transparent;
  color: var(--muted-strong);
  cursor: pointer;
  white-space: nowrap;
}

.genre-tab.is-active {
  border-color: rgba(237, 30, 97, 0.54);
  background: rgba(237, 30, 97, 0.12);
  color: #ff7ba5;
}

.load-sentinel {
  display: grid;
  min-height: 96px;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
}

.load-sentinel span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.load-sentinel span::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 5px rgba(66, 214, 196, 0.09);
  content: "";
}

.detail-page {
  min-height: 100dvh;
  background: var(--canvas);
}

.detail-hero {
  position: relative;
  display: grid;
  min-height: 650px;
  align-items: end;
  overflow: hidden;
}

.detail-background,
.detail-background img,
.detail-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.detail-background img {
  object-fit: cover;
  object-position: center 22%;
}

.detail-overlay {
  background:
    linear-gradient(90deg, rgba(8, 9, 11, 0.98), rgba(8, 9, 11, 0.72) 42%, rgba(8, 9, 11, 0.22)),
    linear-gradient(0deg, var(--canvas), transparent 58%);
}

.detail-content {
  position: relative;
  z-index: 2;
  width: min(calc(100% - 64px), var(--content-max));
  margin: 0 auto;
  padding: 150px 0 74px;
}

.back-command {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  margin-bottom: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted-strong);
  cursor: pointer;
}

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

.detail-body {
  display: grid;
  grid-template-columns: minmax(240px, 0.72fr) minmax(0, 1.8fr);
  gap: 54px;
  width: min(calc(100% - 64px), var(--content-max));
  margin: 0 auto;
  padding: 40px 0 110px;
}

.detail-summary h2,
.episode-section h2,
.player-meta h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

.detail-summary p {
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.75;
}

.detail-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 28px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--line-soft);
}

.detail-stats div {
  padding: 18px;
  background: var(--surface);
}

.detail-stats span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.detail-stats strong {
  display: block;
  margin-top: 6px;
  font-size: 19px;
  font-variant-numeric: tabular-nums;
}

.episode-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.episode-legend {
  display: flex;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
}

.episode-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-color: #3a404a transparent;
}

.episode-button {
  position: relative;
  aspect-ratio: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--muted-strong);
  cursor: pointer;
  font-variant-numeric: tabular-nums;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.episode-button:hover {
  border-color: #59616e;
  color: var(--text);
}

.episode-button.is-free::after,
.episode-button.is-unlocked::after,
.episode-button.is-locked::after {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  content: "";
}

.episode-button.is-free::after { background: var(--signal); }
.episode-button.is-unlocked::after { background: #72a7ff; }
.episode-button.is-locked::after { background: #6f7580; }

.player-page {
  width: min(calc(100% - 64px), var(--content-max));
  min-height: 100dvh;
  margin: 0 auto;
  padding: calc(var(--header-height) + 34px) 0 110px;
}

.player-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.player-label {
  color: var(--muted);
  font-size: 12px;
}

.player-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: start;
}

.player-screen {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: #050506;
  box-shadow: var(--shadow);
}

.player-screen > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  filter: brightness(0.66);
}

.player-screen::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(5, 5, 6, 0.9), transparent 45%);
  content: "";
}

.player-center-button {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 50%;
  background: rgba(246, 245, 243, 0.95);
  cursor: pointer;
}

.player-center-button img {
  width: 26px;
  height: 26px;
  filter: brightness(0);
}

.player-demo-label {
  position: absolute;
  z-index: 3;
  top: 16px;
  left: 16px;
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  background: rgba(5, 5, 6, 0.64);
  color: var(--muted-strong);
  font-size: 11px;
  backdrop-filter: blur(8px);
}

.player-controls {
  position: absolute;
  z-index: 3;
  right: 18px;
  bottom: 16px;
  left: 18px;
}

.player-track {
  position: relative;
  height: 3px;
  margin-bottom: 14px;
  background: rgba(255, 255, 255, 0.26);
}

.player-track span {
  display: block;
  width: 34%;
  height: 100%;
  background: var(--accent);
}

.player-control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.player-control-row div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-command {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background: rgba(8, 9, 11, 0.55);
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.icon-command img {
  width: 16px;
  height: 16px;
}

.player-time {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.player-side {
  max-height: calc((100vw - 64px - 358px) * 0.5625);
  min-height: 410px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: var(--surface);
}

.player-side header {
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--line-soft);
}

.player-side h2 {
  margin: 0;
  font-size: 17px;
}

.player-side p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.player-episodes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  max-height: 470px;
  overflow-y: auto;
  padding: 14px;
}

.player-episodes .episode-button.is-current {
  border-color: var(--accent);
  background: rgba(237, 30, 97, 0.14);
  color: white;
}

.player-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line-soft);
}

.player-meta p {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.simple-page {
  width: min(calc(100% - 64px), var(--content-max));
  min-height: 100dvh;
  margin: 0 auto;
  padding: calc(var(--header-height) + 48px) 0 120px;
}

.simple-page-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.simple-page-header h1 {
  margin: 0;
  font-size: 42px;
}

.simple-page-header p {
  margin: 8px 0 0;
  color: var(--muted);
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.66fr) minmax(0, 1.5fr);
  gap: 18px;
}

.wallet-panel,
.settings-panel {
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: var(--surface);
}

.wallet-panel {
  min-height: 270px;
  padding: 28px;
}

.wallet-panel > span {
  color: var(--muted);
}

.wallet-balance {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 18px 0 30px;
}

.wallet-balance strong {
  font-size: 56px;
  font-variant-numeric: tabular-nums;
}

.wallet-balance span {
  color: var(--muted);
}

.settings-panel {
  overflow: hidden;
}

.setting-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  min-height: 82px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line-soft);
}

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

.setting-row span {
  color: var(--muted);
  font-size: 12px;
}

.setting-row strong {
  display: block;
  margin-top: 5px;
}

.empty-state,
.error-state {
  display: grid;
  min-height: 420px;
  place-items: center;
  padding: 60px 20px;
  text-align: center;
}

.empty-state > div,
.error-state > div {
  max-width: 420px;
}

.state-symbol {
  display: grid;
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted-strong);
  font-size: 24px;
}

.empty-state h2,
.error-state h2 {
  margin: 0 0 8px;
}

.empty-state p,
.error-state p {
  margin: 0 0 22px;
  color: var(--muted);
}

.layer-root:empty {
  display: none;
}

.layer-backdrop {
  position: fixed;
  z-index: 70;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(3, 4, 6, 0.74);
  backdrop-filter: blur(12px);
  animation: layer-fade 180ms ease both;
}

.layer-panel {
  width: min(100%, 520px);
  max-height: min(760px, calc(100dvh - 48px));
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: #15181e;
  box-shadow: 0 36px 100px rgba(0, 0, 0, 0.56);
  animation: layer-in 220ms ease both;
}

.layer-panel > header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 24px 18px;
  border-bottom: 1px solid var(--line-soft);
}

.layer-panel > header h2 {
  margin: 0;
  font-size: 24px;
}

.layer-panel > header p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.layer-close {
  flex: 0 0 auto;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.layer-close img {
  width: 14px;
  height: 14px;
}

.layer-body {
  padding: 24px;
}

.balance-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-soft);
}

.balance-line span {
  color: var(--muted);
}

.balance-line strong {
  font-size: 28px;
  font-variant-numeric: tabular-nums;
}

.layer-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr);
  gap: 10px;
  margin-top: 24px;
}

.layer-actions button {
  width: 100%;
}

.package-list,
.language-list {
  display: grid;
  gap: 8px;
}

.package-option,
.language-option {
  display: grid;
  min-height: 64px;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  cursor: pointer;
  text-align: left;
}

.package-option {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 0 16px;
}

.language-option {
  grid-template-columns: 30px minmax(0, 1fr) auto;
  padding: 0 16px;
}

.package-option.is-selected,
.language-option.is-selected {
  border-color: rgba(237, 30, 97, 0.76);
  background: rgba(237, 30, 97, 0.09);
}

.package-option span,
.language-option span {
  color: var(--muted);
  font-size: 12px;
}

.package-option strong,
.language-option strong {
  display: block;
  margin-bottom: 3px;
}

.package-option > strong {
  margin: 0;
  font-size: 17px;
}

.language-code {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 4px;
  background: var(--surface-soft);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.layer-message {
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.65;
}

.web-toast {
  position: fixed;
  z-index: 90;
  right: 24px;
  bottom: 24px;
  max-width: min(380px, calc(100vw - 32px));
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #1a1e24;
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 13px;
  animation: toast-in 180ms ease both;
}

.mobile-nav {
  display: none;
}

@keyframes layer-fade {
  from { opacity: 0; }
}

@keyframes layer-in {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px); }
}

@media (min-width: 1600px) {
  .hero-media,
  .hero-media picture {
    background: var(--canvas);
  }

  .hero-media img {
    object-fit: contain;
    object-position: right center;
  }
}

@media (max-width: 1180px) {
  .desktop-nav .nav-button:nth-child(4) {
    display: none;
  }

  .global-search {
    width: 210px;
  }

  .ranking-layout {
    grid-template-columns: minmax(0, 1.2fr) minmax(330px, 0.8fr);
  }

  .episode-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (max-width: 1120px) {
  .ranking-item {
    grid-template-columns: 32px 72px minmax(0, 1fr);
    min-height: 112px;
    gap: 10px;
    padding: 10px 12px;
  }

  .ranking-item img {
    width: 72px;
    height: 88px;
  }

  .ranking-item-copy p {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .ranking-compact-trend {
    display: inline;
  }

  .ranking-trend {
    display: none;
  }
}

@media (max-width: 960px) {
  :root {
    --header-height: 64px;
  }

  .web-header {
    grid-template-columns: auto minmax(0, 1fr);
    padding: 0 20px;
  }

  .desktop-nav {
    display: none;
  }

  .header-tools {
    min-width: 0;
  }

  .global-search {
    width: min(38vw, 280px);
  }

  .web-hero {
    min-height: 590px;
  }

  .hero-content h1,
  .detail-content h1 {
    font-size: 50px;
  }

  .ranking-layout {
    grid-template-columns: 1fr;
    height: auto;
  }

  .ranking-feature {
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .ranking-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(92px, auto));
    overflow: visible;
  }

  .continue-card {
    grid-template-columns: 190px minmax(0, 1fr) auto;
  }

  .detail-body,
  .profile-layout {
    grid-template-columns: 1fr;
  }

  .episode-grid {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }

  .player-layout {
    grid-template-columns: 1fr;
  }

  .player-side {
    max-height: none;
    min-height: 0;
  }

  .player-episodes {
    grid-template-columns: repeat(8, minmax(0, 1fr));
    max-height: 270px;
  }

  .mobile-nav {
    position: fixed;
    z-index: 45;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    min-height: 68px;
    padding: 6px max(12px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    border-top: 1px solid var(--line-soft);
    background: rgba(9, 10, 12, 0.95);
    backdrop-filter: blur(18px);
  }

  .mobile-nav button {
    display: grid;
    min-width: 0;
    place-items: center;
    align-content: center;
    gap: 4px;
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
  }

  .mobile-nav button.is-active {
    color: var(--accent-strong);
  }

  .mobile-nav img {
    width: 20px;
    height: 20px;
    opacity: 0.86;
  }

  .mobile-nav span {
    max-width: 100%;
    overflow: hidden;
    font-size: 10px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .web-toast {
    bottom: 82px;
  }
}

@media (max-width: 640px) {
  :root {
    --header-height: 60px;
  }

  .web-header {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    padding: 0 14px;
  }

  .web-brand {
    min-width: 0;
  }

  .web-brand-mark {
    width: 32px;
    height: 32px;
  }

  .web-brand-copy {
    display: none;
  }

  .header-tools {
    gap: 6px;
  }

  .global-search {
    min-width: 0;
    width: 100%;
  }

  .global-search input {
    font-size: 12px;
  }

  .language-trigger {
    width: 40px;
    padding: 0;
  }

  .language-trigger span:last-child {
    display: none;
  }

  .wallet-trigger {
    min-width: 48px;
    padding: 0 8px;
  }

  .web-hero {
    min-height: 540px;
  }

  .hero-media img,
  .detail-background img {
    object-position: center 18%;
  }

  .hero-shade {
    background:
      linear-gradient(0deg, var(--canvas) 0%, rgba(8, 9, 11, 0.15) 62%, rgba(8, 9, 11, 0.35) 100%),
      linear-gradient(90deg, rgba(8, 9, 11, 0.65), transparent);
  }

  .hero-content,
  .detail-content,
  .web-content,
  .detail-body,
  .player-page,
  .simple-page {
    width: calc(100% - 28px);
  }

  .hero-content {
    padding: 140px 0 40px;
  }

  .hero-content h1,
  .detail-content h1 {
    max-width: 94%;
    margin-top: 10px;
    font-size: 39px;
    line-height: 1.06;
  }

  .hero-description {
    display: -webkit-box;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .hero-actions,
  .detail-actions {
    gap: 8px;
    margin-top: 20px;
  }

  .primary-button,
  .secondary-button,
  .quiet-button {
    min-height: 43px;
    padding: 0 14px;
    font-size: 13px;
  }

  .hero-carousel-controls {
    width: min(270px, 82vw);
    margin-top: 24px;
  }

  .hero-progress {
    width: auto;
  }

  .hero-progress button {
    width: 36px;
  }

  .web-content {
    margin-top: -8px;
    padding-bottom: 96px;
  }

  .content-section {
    margin-top: 38px;
  }

  .section-heading {
    margin-bottom: 14px;
  }

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

  .section-heading p,
  .section-link {
    font-size: 11px;
  }

  .continue-card {
    grid-template-columns: 102px minmax(0, 1fr);
    min-height: 136px;
  }

  .continue-cover {
    min-height: 136px;
  }

  .continue-copy {
    padding: 17px 16px;
  }

  .continue-copy h3 {
    font-size: 18px;
  }

  .continue-actions {
    grid-column: 2;
    padding: 0 16px 16px;
  }

  .continue-actions .primary-button {
    width: 100%;
  }

  .ranking-feature {
    width: 100%;
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .ranking-feature-copy {
    right: 18px;
    bottom: 18px;
    left: 18px;
  }

  .ranking-feature-copy h3 {
    font-size: 22px;
  }

  .ranking-list {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  .ranking-item {
    grid-template-columns: 30px 62px minmax(0, 1fr);
    min-height: 80px;
    padding: 8px 10px;
  }

  .ranking-item img {
    width: 62px;
    height: 64px;
  }

  .ranking-trend {
    display: none;
  }

  .poster-rail {
    grid-auto-columns: minmax(136px, 146px);
    gap: 11px;
  }

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

  .poster-media {
    aspect-ratio: 2 / 3;
  }

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

  .detail-hero {
    min-height: 580px;
  }

  .detail-overlay {
    background:
      linear-gradient(0deg, var(--canvas), rgba(8, 9, 11, 0.12) 70%),
      linear-gradient(90deg, rgba(8, 9, 11, 0.58), transparent);
  }

  .detail-content {
    padding: 110px 0 46px;
  }

  .back-command {
    margin-bottom: 150px;
  }

  .detail-description {
    display: -webkit-box;
    overflow: hidden;
    font-size: 14px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  .detail-body {
    gap: 36px;
    padding: 26px 0 96px;
  }

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

  .episode-toolbar {
    display: block;
  }

  .episode-legend {
    margin-top: 9px;
  }

  .episode-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    max-height: 330px;
  }

  .player-page {
    padding-top: calc(var(--header-height) + 18px);
  }

  .player-screen {
    margin-inline: -14px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .player-center-button {
    width: 68px;
    height: 68px;
  }

  .player-side {
    border-radius: 6px;
  }

  .player-episodes {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .player-meta {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .player-actions {
    margin-top: 6px;
  }

  .simple-page {
    padding-top: calc(var(--header-height) + 30px);
  }

  .simple-page-header h1 {
    font-size: 32px;
  }

  .profile-layout {
    gap: 12px;
  }

  .wallet-panel {
    min-height: 230px;
    padding: 22px;
  }

  .wallet-balance strong {
    font-size: 48px;
  }

  .setting-row {
    min-height: 74px;
    padding: 0 18px;
  }

  .layer-backdrop {
    align-items: end;
    padding: 0;
  }

  .layer-panel {
    width: 100%;
    max-height: calc(100dvh - 64px);
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 10px 10px 0 0;
    padding-bottom: max(0px, env(safe-area-inset-bottom));
  }

  .layer-panel > header,
  .layer-body {
    padding-right: 18px;
    padding-left: 18px;
  }

  .layer-actions {
    grid-template-columns: 1fr;
  }

  .web-toast {
    right: 16px;
    bottom: 80px;
    left: 16px;
    max-width: none;
    text-align: center;
  }
}

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

  .hero-progress button.is-active::after {
    animation: none !important;
    transform: scaleX(1);
  }
}
