:root {
  --pink-50: #fff1f6;
  --pink-100: #ffe4ee;
  --pink-500: #f24f87;
  --pink-600: #e73572;
  --orange-50: #fff3e5;
  --orange-500: #ff7a2f;
  --gold-400: #d69a2d;
  --gold-600: #8a5a12;
  --red-500: #ff3f35;
  --blue-50: #eef7ff;
  --green-50: #edf9f1;
  --gray-50: #f7f7f8;
  --gray-100: #f1f2f4;
  --gray-200: #e5e7eb;
  --gray-400: #9ca3af;
  --gray-600: #4b5563;
  --gray-900: #171717;
  --white: #ffffff;
  --gradient-page: linear-gradient(135deg, #ffe8f0 0%, #fff8ec 44%, #eef7ff 100%);
  --gradient-primary: linear-gradient(90deg, #f24f87 0%, #ff7a2f 100%);
  --gradient-member: linear-gradient(90deg, #ffb33f 0%, #ff6232 100%);
  --shadow-card: 0 8px 24px rgb(23 23 23 / 0.06);
  --shadow-float: 0 14px 36px rgb(242 79 135 / 0.16);
  --shadow-member: 0 14px 36px rgb(255 122 47 / 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--gray-900);
  background: var(--gray-50);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

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

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid rgb(242 79 135 / 0.35);
  outline-offset: 3px;
}

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

.skip-link:focus {
  z-index: 1000;
  width: auto;
  height: auto;
  clip: auto;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  background: var(--white);
  border-radius: 8px;
}

.container {
  width: min(1360px, calc(100% - 64px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 72px;
  background: rgb(255 255 255 / 0.92);
  border-bottom: 1px solid rgb(229 231 235 / 0.72);
  backdrop-filter: blur(16px);
}

.header-inner {
  width: min(1360px, calc(100% - 40px));
  min-height: 72px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.brand-mark,
.avatar {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--white);
  border-radius: 999px;
  background: var(--gradient-primary);
  box-shadow: var(--shadow-float);
  font-weight: 800;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 9px 13px;
  color: var(--gray-600);
  border-radius: 999px;
  font-size: 14px;
  transition: background 150ms ease, color 150ms ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--pink-600);
  background: var(--pink-50);
}

.search-box {
  margin-left: auto;
  width: min(360px, 28vw);
  height: 44px;
  display: flex;
  align-items: center;
  background: var(--gray-50);
  border: 1px solid transparent;
  border-radius: 999px;
  padding-left: 16px;
}

.search-box:focus-within {
  border-color: rgb(242 79 135 / 0.26);
  box-shadow: 0 0 0 4px rgb(242 79 135 / 0.12);
  background: var(--white);
}

.search-box input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
}

.icon-button,
.modal-close {
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  border-radius: 999px;
}

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 0 22px;
  font-weight: 700;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  color: var(--white);
  background: var(--gradient-primary);
  box-shadow: var(--shadow-float);
}

.button.member {
  color: var(--white);
  background: var(--gradient-member);
  box-shadow: var(--shadow-member);
}

.button.ghost,
.button.light {
  color: var(--pink-600);
  background: var(--white);
  border: 1px solid var(--pink-100);
}

.button.small {
  min-height: 40px;
  padding-inline: 18px;
  font-size: 14px;
}

.button.full {
  width: 100%;
}

.user-chip {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border: 1px solid var(--gray-200);
  background: var(--white);
  border-radius: 999px;
  white-space: nowrap;
}

.hero {
  padding: 48px 0 36px;
  background: var(--gradient-page);
}

.portal-hero {
  padding: 34px 0 24px;
  background: var(--gradient-page);
}

.portal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
}

.portal-carousel {
  min-height: 320px;
}

.portal-carousel .carousel-slide {
  min-height: 320px;
  grid-template-columns: 1.2fr 1fr;
}

.portal-panel,
.rank-card,
.portal-main,
.portal-category-block {
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
}

.portal-panel {
  padding: 20px;
}

.portal-panel-head,
.section-title-row,
.portal-category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.portal-panel-head strong {
  color: var(--pink-600);
  font-size: 22px;
}

.quick-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin: 14px 0 16px;
}

.quick-search input {
  min-width: 0;
  height: 40px;
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  padding: 0 14px;
}

.hot-link-list,
.update-list,
.rank-list {
  display: grid;
  gap: 10px;
}

.hot-link-list a,
.update-item,
.rank-item,
.compact-update-item {
  display: grid;
  gap: 4px;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-100);
}

.hot-link-list a:last-child,
.update-item:last-child,
.rank-item:last-child,
.compact-update-item:last-child {
  border-bottom: 0;
}

.hot-link-list strong,
.update-item strong,
.compact-update-item strong {
  overflow: hidden;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hot-link-list span,
.update-meta,
.rank-item span,
.compact-update-item span {
  color: var(--gray-600);
  font-size: 13px;
}

.portal-categories {
  padding: 16px 0 0;
  background: var(--gray-50);
}

.category-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px;
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
}

.category-pill {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--gray-600);
  background: var(--gray-50);
  font-weight: 700;
}

.category-pill:hover,
.category-pill.active {
  color: var(--pink-600);
  background: var(--pink-50);
}

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

.portal-main,
.rank-card,
.portal-category-block {
  padding: 20px;
}

.section-title-row {
  margin-bottom: 14px;
}

.section-title-row h2,
.portal-category-head h2 {
  margin: 0;
}

.section-title-row span {
  color: var(--gray-600);
}

.update-item {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 14px;
}

.episode-badge {
  min-width: 74px;
  display: inline-flex;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--pink-600);
  background: var(--pink-50);
  font-size: 13px;
  font-weight: 800;
}

.update-time {
  color: var(--gray-400);
  font-size: 13px;
}

.rank-item {
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 10px;
}

.rank-num {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--gray-600);
  background: var(--gray-100);
  font-weight: 900;
}

.rank-item:nth-child(-n + 3) .rank-num {
  color: var(--white);
  background: var(--gradient-primary);
}

.rank-title {
  display: grid;
  gap: 2px;
  overflow: hidden;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-title span {
  overflow: hidden;
  color: var(--gray-600);
  font-size: 13px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-update-section {
  padding-top: 0;
}

.category-section-grid {
  display: grid;
  gap: 20px;
}

.portal-category-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
}

.compact-list,
.compact-rank-list {
  display: grid;
  gap: 8px;
}

.compact-rank-list .rank-item {
  padding: 8px 0;
  border-bottom: 1px solid var(--gray-100);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(480px, 1.08fr);
  gap: 32px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--pink-600);
  font-size: 13px;
  font-weight: 800;
}

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

h1 {
  max-width: 620px;
  margin-bottom: 16px;
  font-size: 32px;
  line-height: 1.25;
}

h2 {
  margin-bottom: 10px;
  font-size: 24px;
  line-height: 1.35;
}

h3 {
  margin-bottom: 10px;
  font-size: 18px;
  line-height: 1.35;
}

.hero-text {
  max-width: 560px;
  color: var(--gray-600);
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0;
}

.keyword-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.keyword-row button,
.segmented button,
.pay-tabs button {
  border: 0;
  border-radius: 999px;
  padding: 9px 14px;
  color: var(--gray-600);
  background: rgb(255 255 255 / 0.7);
}

.keyword-row button:hover,
.segmented button.active,
.pay-tabs button.active {
  color: var(--pink-600);
  background: var(--pink-50);
}

.hero-carousel,
.detail-card,
.member-status,
.balance-card,
.profile-content,
.admin-shell,
.table-card {
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
}

.hero-carousel {
  position: relative;
  min-height: 292px;
  overflow: hidden;
}

.carousel-track {
  height: 100%;
}

.carousel-slide {
  min-height: 292px;
  display: none;
  grid-template-columns: 1.35fr 1fr;
  gap: 24px;
  padding: 20px 52px 20px 20px;
}

.carousel-slide.active {
  display: grid;
}

.banner-poster {
  overflow: hidden;
  border-radius: 14px;
}

.banner-poster img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--gradient-page);
}

.banner-content {
  align-self: center;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: var(--pink-600);
  background: rgb(255 255 255 / 0.86);
  box-shadow: var(--shadow-card);
  transform: translateY(-50%);
  transition: background 150ms ease, transform 150ms ease;
}

.carousel-arrow:hover {
  background: var(--pink-50);
  transform: translateY(-50%) scale(1.04);
}

.carousel-arrow.prev {
  left: 14px;
}

.carousel-arrow.next {
  right: 14px;
}

.carousel-dots {
  position: absolute;
  right: 24px;
  bottom: 18px;
  display: flex;
  gap: 8px;
}

.carousel-dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--gray-200);
  transition: width 150ms ease, background 150ms ease;
}

.carousel-dots button.active {
  width: 22px;
  background: var(--gradient-primary);
}

.tag,
.meta-row span,
.episode-strip button.unlocked::after,
.plan-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 10px;
  border-radius: 999px;
  color: var(--pink-600);
  background: var(--pink-50);
  font-size: 13px;
  font-weight: 700;
}

.section {
  padding: 42px 0;
}

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

.section-head.simple {
  align-items: center;
}

.text-link {
  color: var(--pink-600);
  font-weight: 700;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  gap: 16px;
}

.category-card {
  min-height: 108px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid rgb(255 255 255 / 0.75);
}

.category-card strong {
  font-size: 18px;
}

.category-card span {
  color: var(--gray-600);
  font-size: 14px;
}

.drama-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 20px;
}

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

.poster-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgb(23 23 23 / 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.drama-card:hover .poster-wrap {
  transform: translateY(-4px);
  box-shadow: var(--shadow-float);
}

.poster-wrap img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.poster-meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px 10px 10px;
  color: var(--white);
  background: linear-gradient(180deg, transparent, rgb(0 0 0 / 0.68));
  font-size: 13px;
}

.play-float {
  position: absolute;
  inset: auto 12px 12px;
  opacity: 0;
  color: var(--white);
  background: var(--gradient-primary);
  border-radius: 999px;
  text-align: center;
  padding: 9px 12px;
  font-size: 14px;
  font-weight: 800;
  transition: opacity 150ms ease;
}

.drama-card:hover .play-float {
  opacity: 1;
}

.drama-title {
  margin: 12px 0 2px;
  overflow: hidden;
  font-size: 18px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drama-subtitle,
.detail-desc,
.player-info p,
.member-status p,
.profile-head p {
  color: var(--gray-600);
}

.detail-card {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 28px;
  padding: 28px;
}

.detail-poster {
  width: 260px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 8px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.episode-strip,
.episode-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.episode-strip button,
.episode-grid button {
  min-width: 74px;
  min-height: 40px;
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  color: var(--gray-600);
  background: var(--white);
}

.episode-grid button.active,
.episode-strip button.unlocked {
  color: var(--pink-600);
  border-color: var(--pink-100);
  background: var(--pink-50);
}

.license-line {
  margin-bottom: 14px;
  color: var(--gray-400);
  font-size: 13px;
}

.player-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 20px;
}

.video-shell {
  position: relative;
  min-height: 560px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 16px;
  background: radial-gradient(circle at 50% 50%, #ffe8f0, #1f1f26 58%);
}

.vertical-video {
  width: min(320px, 52%);
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgb(0 0 0 / 0.24);
}

.vertical-video img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.locked-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 10px;
  padding: 32px;
  text-align: center;
  color: var(--white);
  background: rgb(0 0 0 / 0.58);
}

.locked-overlay.is-hidden {
  display: none;
}

.player-info {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 18px;
}

.episode-panel {
  padding: 18px;
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.panel-head span {
  color: var(--gray-400);
}

.recommend-mini {
  margin-top: 24px;
}

.recommend-mini a {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
  font-weight: 700;
}

.recommend-mini img {
  width: 56px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 8px;
}

.member-section {
  background: linear-gradient(180deg, var(--gray-50), #fff8ec);
}

.member-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 28px;
  margin-bottom: 20px;
}

.plan-grid,
.recharge-grid,
.history-grid,
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.plan-card,
.recharge-card,
.history-card,
.stat-grid div {
  padding: 22px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
}

.plan-card.featured {
  border-color: rgb(214 154 45 / 0.5);
  box-shadow: var(--shadow-member);
}

.price {
  display: block;
  margin: 14px 0;
  font-size: 40px;
  line-height: 48px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.plan-card ul {
  padding-left: 18px;
  color: var(--gray-600);
}

.two-column {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 20px;
}

.balance-card {
  padding: 24px;
}

.balance-card strong {
  display: block;
  margin: 6px 0 18px;
  font-size: 40px;
  line-height: 48px;
}

.profile-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
}

.profile-menu,
.admin-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
}

.profile-menu a,
.admin-menu span {
  padding: 10px 12px;
  color: var(--gray-600);
  border-radius: 10px;
}

.profile-menu a.active,
.admin-menu span.active {
  color: var(--pink-600);
  background: var(--pink-50);
  font-weight: 800;
}

.profile-content {
  padding: 24px;
}

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

.avatar.large {
  width: 56px;
  height: 56px;
  font-size: 20px;
}

.profile-head .button {
  margin-left: auto;
}

.history-card {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 12px;
  align-items: center;
}

.history-card img {
  width: 78px;
  aspect-ratio: 3 / 4;
  border-radius: 8px;
  object-fit: cover;
}

.admin-shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  padding: 20px;
}

.admin-content {
  min-width: 0;
}

.stat-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
}

.table-card {
  margin-top: 20px;
  overflow: hidden;
}

.table-row {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr 0.8fr;
  gap: 12px;
  padding: 14px 18px;
  border-top: 1px solid var(--gray-100);
}

.table-head {
  color: var(--gray-600);
  background: var(--gray-50);
  font-weight: 800;
}

.site-footer {
  padding: 32px 0;
  color: var(--gray-600);
  background: var(--white);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgb(23 23 23 / 0.45);
}

.modal-backdrop[hidden] {
  display: none;
}

.modal {
  position: relative;
  width: min(420px, 100%);
  padding: 28px;
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 22px 80px rgb(0 0 0 / 0.24);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 26px;
}

.pay-tabs {
  display: flex;
  gap: 10px;
  margin: 18px 0;
}

.qr-box {
  height: 170px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  border-radius: 12px;
  background:
    linear-gradient(90deg, #111 10px, transparent 10px) 0 0 / 24px 24px,
    linear-gradient(#111 10px, transparent 10px) 0 0 / 24px 24px,
    var(--gray-50);
  color: var(--pink-600);
  font-weight: 900;
}

.modal-status {
  min-height: 24px;
  margin: 12px 0 0;
  color: var(--gray-600);
  text-align: center;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 120;
  min-width: 220px;
  padding: 12px 18px;
  color: var(--white);
  background: rgb(23 23 23 / 0.88);
  border-radius: 999px;
  text-align: center;
  transform: translate(-50%, 90px);
  transition: transform 180ms ease;
}

.toast.show {
  transform: translate(-50%, 0);
}

@media (max-width: 1180px) {
  .main-nav {
    display: none;
  }

  .search-box {
    width: min(340px, 34vw);
  }

  .hero-grid,
  .portal-grid,
  .portal-layout,
  .portal-category-block,
  .player-layout,
  .two-column {
    grid-template-columns: 1fr;
  }

  .category-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .drama-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 760px) {
  .container,
  .header-inner {
    width: min(100% - 28px, 640px);
  }

  .site-header .button.primary,
  .user-chip span:last-child,
  .search-box {
    display: none;
  }

  .hero {
    padding-top: 28px;
  }

  .hero-carousel,
  .carousel-slide,
  .portal-carousel .carousel-slide,
  .detail-card,
  .profile-layout,
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .carousel-slide {
    padding: 18px;
  }

  .portal-hero {
    padding-top: 22px;
  }

  .portal-carousel {
    min-height: 430px;
  }

  .update-item,
  .rank-item {
    grid-template-columns: 1fr;
  }

  .episode-badge {
    justify-self: start;
  }

  .carousel-arrow {
    display: none;
  }

  .category-grid,
  .drama-grid,
  .plan-grid,
  .recharge-grid,
  .history-grid,
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-poster {
    width: 100%;
  }

  .video-shell {
    min-height: 460px;
  }

  .member-status,
  .player-info,
  .profile-head,
  .footer-inner,
  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .category-grid,
  .drama-grid,
  .plan-grid,
  .recharge-grid,
  .history-grid,
  .stat-grid {
    grid-template-columns: 1fr;
  }
}

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

/* Dark portal layout inspired by the provided reference screenshot. */
body {
  color: #d7d9de;
  background: #34363b;
}

.container,
.header-inner {
  width: min(1360px, calc(100% - 64px));
}

.site-header {
  min-height: 42px;
  background: #111215;
  border-bottom: 1px solid #26282d;
  backdrop-filter: none;
}

.header-inner {
  min-height: 42px;
  gap: 14px;
}

.brand {
  color: #f2f3f5;
  font-size: 14px;
}

.brand-mark,
.avatar {
  width: 24px;
  height: 24px;
  font-size: 12px;
  box-shadow: none;
}

.main-nav {
  gap: 2px;
}

.nav-link {
  padding: 4px 8px;
  color: #8f949e;
  font-size: 12px;
}

.nav-link:hover,
.nav-link.active {
  color: #ff7a2f;
  background: transparent;
}

.search-box {
  width: 210px;
  height: 28px;
  background: #191b1f;
  border-color: #2a2d33;
  padding-left: 10px;
}

.search-box input {
  color: #d7d9de;
  font-size: 12px;
}

.search-box input::placeholder,
.quick-search input::placeholder {
  color: #747a84;
}

.icon-button {
  width: 28px;
  height: 28px;
  color: #8f949e;
}

.site-header .button.primary {
  min-height: 28px;
  padding-inline: 12px;
  font-size: 12px;
  box-shadow: none;
}

.user-chip {
  min-height: 28px;
  padding: 2px 8px 2px 2px;
  color: #d7d9de;
  background: #191b1f;
  border-color: #2a2d33;
  font-size: 12px;
}

.portal-hero {
  padding: 118px 0 16px;
  background: #34363b;
}

.portal-grid {
  display: block;
}

.portal-carousel {
  min-height: 128px;
  background:
    linear-gradient(180deg, rgb(20 21 24 / 0), #1f2126 56%),
    radial-gradient(circle at 42% 0%, rgb(255 122 47 / 0.16), transparent 28%),
    #24262b;
  border-radius: 0;
  box-shadow: 0 18px 42px rgb(0 0 0 / 0.28);
}

.portal-carousel .carousel-slide {
  min-height: 128px;
  grid-template-columns: 1fr;
  padding: 24px 28px 18px;
}

.portal-carousel .banner-poster {
  display: none;
}

.portal-carousel .banner-content {
  max-width: 540px;
  align-self: end;
}

.portal-carousel .banner-content h2 {
  margin-bottom: 4px;
  color: #f4f5f7;
  font-size: 16px;
}

.portal-carousel .banner-content p {
  margin-bottom: 10px;
  color: #a7acb5;
  font-size: 12px;
}

.portal-carousel .button.small {
  min-height: 28px;
  padding-inline: 12px;
  font-size: 12px;
}

.carousel-arrow {
  width: 28px;
  height: 28px;
  color: #d7d9de;
  background: rgb(255 255 255 / 0.08);
  box-shadow: none;
}

.carousel-arrow:hover {
  background: rgb(255 122 47 / 0.22);
}

.carousel-dots {
  right: 16px;
  bottom: 12px;
}

.carousel-dots button {
  width: 6px;
  height: 6px;
  background: #5c616b;
}

.carousel-dots button.active {
  width: 18px;
  background: #ff7a2f;
}

.portal-panel {
  margin-top: 12px;
  padding: 14px;
  background: #24262b;
  border-radius: 0;
  box-shadow: none;
}

.portal-panel-head strong,
.eyebrow,
.section-title-row h2,
.portal-category-head h2 {
  color: #ff7a2f;
}

.portal-panel-head strong {
  font-size: 14px;
}

.quick-search {
  grid-template-columns: 1fr auto;
  margin: 10px 0 8px;
}

.quick-search input {
  height: 30px;
  color: #d7d9de;
  background: #191b1f;
  border-color: #333741;
}

.hot-link-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.hot-link-list a {
  min-width: 0;
  padding: 8px 0 0;
  border: 0;
}

.hot-link-list strong {
  color: #f4f5f7;
  font-size: 12px;
}

.hot-link-list span {
  color: #8f949e;
  font-size: 11px;
}

.portal-categories {
  padding-top: 0;
  background: #34363b;
}

.category-strip {
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.category-pill {
  min-height: 26px;
  padding: 0 9px;
  color: #a7acb5;
  background: #24262b;
  border-radius: 2px;
  font-size: 12px;
}

.category-pill span {
  display: none;
}

.category-pill:hover,
.category-pill.active {
  color: #ff7a2f;
  background: #24262b;
}

.section {
  padding: 12px 0;
}

.portal-layout {
  display: block;
}

.portal-main,
.rank-card,
.portal-category-block,
.portal-rank-block,
.detail-card,
.episode-panel,
.member-status,
.plan-card,
.recharge-card,
.balance-card,
.profile-menu,
.profile-content {
  background: #24262b;
  border-radius: 0;
  box-shadow: none;
}

.portal-main,
.rank-card,
.portal-category-block,
.portal-rank-block {
  padding: 12px 14px 14px;
}

.rank-card {
  margin-top: 12px;
}

.section-title-row,
.portal-category-head {
  margin-bottom: 12px;
  padding-bottom: 0;
}

.section-title-row h2,
.portal-category-head h2 {
  position: relative;
  padding-left: 12px;
  font-size: 14px;
}

.section-title-row h2::before,
.portal-category-head h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: #ff7a2f;
  transform: translateY(-50%);
}

.section-title-row span,
.text-link {
  color: #8f949e;
  font-size: 12px;
}

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

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

.portal-poster-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 3px;
  background: #f4f4f4;
}

.portal-poster-card strong {
  display: block;
  margin-top: 7px;
  overflow: hidden;
  color: #dfe2e7;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-poster-card span {
  display: block;
  overflow: hidden;
  color: #7f858f;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

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

.rank-column {
  min-width: 0;
  padding: 8px;
  background: #17191d;
}

.rank-column > strong {
  display: block;
  margin-bottom: 7px;
  color: #c8ccd3;
  font-size: 12px;
}

.rank-item {
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 6px;
  padding: 5px 0;
  border: 0;
}

.rank-item > span:last-child {
  display: none;
}

.rank-num {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  color: #0f1115;
  background: #9cc7ff;
  font-size: 10px;
}

.rank-item:nth-child(-n + 3) .rank-num {
  background: #ff3f35;
}

.rank-title {
  color: #cfd3da;
  font-size: 11px;
}

.rank-title span {
  color: #747a84;
  font-size: 10px;
}

.portal-category-block {
  display: block;
}

.portal-rank-block {
  margin-top: 12px;
}

.category-section-grid {
  gap: 12px;
}

.detail-card,
.member-status,
.balance-card,
.profile-content {
  color: #d7d9de;
}

.detail-desc,
.player-info p,
.member-status p,
.profile-head p,
.drama-subtitle {
  color: #a7acb5;
}

.member-section {
  background: #34363b;
}

.site-footer {
  color: #8f949e;
  background: #24262b;
}

@media (max-width: 900px) {
  .hot-link-list,
  .rank-list,
  .rank-column-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portal-poster-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .portal-hero {
    padding-top: 34px;
  }

  .hot-link-list,
  .rank-list,
  .rank-column-grid,
  .portal-poster-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Keep the reference-site layout, but restore the original light pink-orange visual style. */
body {
  color: var(--gray-900);
  background: var(--gray-50);
}

.site-header {
  min-height: 72px;
  background: rgb(255 255 255 / 0.92);
  border-bottom: 1px solid rgb(229 231 235 / 0.72);
  backdrop-filter: blur(16px);
}

.header-inner {
  min-height: 72px;
  gap: 18px;
}

.brand {
  color: var(--gray-900);
  font-size: 16px;
}

.brand-mark,
.avatar {
  width: 36px;
  height: 36px;
  font-size: 16px;
  box-shadow: var(--shadow-float);
}

.main-nav {
  gap: 4px;
}

.nav-link {
  padding: 9px 13px;
  color: var(--gray-600);
  font-size: 14px;
}

.nav-link:hover,
.nav-link.active {
  color: var(--pink-600);
  background: var(--pink-50);
}

.search-box {
  width: min(360px, 28vw);
  height: 44px;
  background: var(--gray-50);
  border-color: transparent;
  padding-left: 16px;
}

.search-box input {
  color: var(--gray-900);
  font-size: 14px;
}

.search-box input::placeholder,
.quick-search input::placeholder {
  color: var(--gray-400);
}

.icon-button {
  width: 40px;
  height: 40px;
  color: var(--gray-600);
}

.site-header .button.primary {
  min-height: 40px;
  padding-inline: 18px;
  font-size: 14px;
  box-shadow: var(--shadow-float);
}

.user-chip {
  min-height: 44px;
  padding: 4px 10px 4px 4px;
  color: var(--gray-900);
  background: var(--white);
  border-color: var(--gray-200);
  font-size: 14px;
}

.portal-hero {
  background: var(--gradient-page);
}

.portal-carousel {
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
}

.portal-carousel .banner-content h2 {
  color: var(--gray-900);
  font-size: 24px;
}

.portal-carousel .banner-content p {
  color: var(--gray-600);
  font-size: 16px;
}

.portal-carousel .button.small {
  min-height: 40px;
  padding-inline: 18px;
  font-size: 14px;
}

.carousel-arrow {
  color: var(--pink-600);
  background: rgb(255 255 255 / 0.86);
  box-shadow: var(--shadow-card);
}

.carousel-arrow:hover {
  background: var(--pink-50);
}

.carousel-dots button {
  background: var(--gray-200);
}

.carousel-dots button.active {
  background: var(--gradient-primary);
}

.portal-panel,
.portal-main,
.rank-card,
.portal-category-block,
.portal-rank-block,
.detail-card,
.episode-panel,
.member-status,
.plan-card,
.recharge-card,
.balance-card,
.profile-menu,
.profile-content {
  color: var(--gray-900);
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
}

.portal-panel-head strong,
.eyebrow,
.section-title-row h2,
.portal-category-head h2 {
  color: var(--pink-600);
}

.quick-search input {
  color: var(--gray-900);
  background: var(--white);
  border-color: var(--gray-200);
}

.hot-link-list strong,
.portal-poster-card strong,
.rank-title,
.rank-column > strong {
  color: var(--gray-900);
}

.hot-link-list span,
.portal-poster-card span,
.rank-title span,
.detail-desc,
.player-info p,
.member-status p,
.profile-head p,
.drama-subtitle {
  color: var(--gray-600);
}

.portal-categories,
.member-section {
  background: var(--gray-50);
}

.category-strip {
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.category-pill {
  color: var(--gray-600);
  background: var(--gray-50);
  border-radius: 999px;
}

.category-pill:hover,
.category-pill.active {
  color: var(--pink-600);
  background: var(--pink-50);
}

.section-title-row h2::before,
.portal-category-head h2::before {
  background: var(--pink-500);
}

.section-title-row span,
.text-link {
  color: var(--pink-600);
}

.rank-column {
  background: var(--gray-50);
  border-radius: 8px;
}

.rank-num {
  color: var(--gray-600);
  background: var(--gray-100);
}

.rank-item:nth-child(-n + 3) .rank-num {
  color: var(--white);
  background: var(--gradient-primary);
}

.site-footer {
  color: var(--gray-600);
  background: var(--white);
}

/* Home page readability tweaks. */
.site-header .nav-link {
  font-size: 15px;
}

.portal-carousel .banner-content h2 {
  font-size: 30px;
}

.portal-carousel .banner-content p {
  font-size: 17px;
}

.portal-panel-head strong {
  font-size: 18px;
}

.hot-link-list strong {
  font-size: 15px;
}

.hot-link-list span {
  font-size: 13px;
}

.category-pill {
  font-size: 14px;
}

.section-title-row h2,
.portal-category-head h2 {
  font-size: 21px;
}

.section-title-row span,
.text-link {
  font-size: 14px;
}

.portal-poster-card strong {
  font-size: 16px;
}

.portal-poster-card span {
  font-size: 13px;
}

.rank-column > strong {
  font-size: 15px;
}

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

.rank-item .rank-title {
  font-size: 14px;
}

.rank-title span {
  font-size: 12px;
}

.watch-page[hidden] {
  display: none;
}

.player-page {
  width: min(1280px, calc(100% - 64px));
  display: grid;
  gap: 20px;
}

.player-stage {
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
}

.player-page .video-shell {
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 0;
  border-radius: 0;
  background: #111;
}

.player-page .vertical-video {
  position: absolute;
  inset: 0;
  width: 100%;
  aspect-ratio: auto;
  border-radius: 0;
  box-shadow: none;
}

.player-page .vertical-video video,
.player-page .vertical-video img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #111;
}

.player-page .vertical-video [hidden] {
  display: none;
}

.player-toolbar {
  min-height: 88px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
  background:
    linear-gradient(135deg, rgb(255 241 246 / 0.92), rgb(255 248 236 / 0.92)),
    var(--white);
  border-top: 1px solid var(--gray-200);
}

.player-now {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, auto);
  align-items: center;
  justify-content: start;
  gap: 6px 12px;
}

.play-status {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  color: var(--white);
  background: var(--gradient-primary);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.player-now strong {
  overflow: hidden;
  color: var(--gray-900);
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-now small {
  grid-column: 2;
  color: var(--gray-600);
  font-size: 13px;
}

.player-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.player-tools button {
  min-width: 72px;
  min-height: 40px;
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  color: var(--gray-600);
  background: var(--white);
  font-weight: 700;
  box-shadow: 0 6px 18px rgb(23 23 23 / 0.04);
}

.player-tools button:hover {
  color: var(--pink-600);
  border-color: var(--pink-100);
  background: var(--pink-50);
}

.player-tools button.next {
  color: var(--white);
  border-color: transparent;
  background: var(--gradient-primary);
}

.player-episode-panel .episode-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 12px;
  max-height: 350px;
  overflow: auto;
  padding-right: 6px;
}

.player-episode-panel .episode-grid button {
  min-height: 44px;
  border-radius: 10px;
}

.player-plot-panel {
  margin-bottom: 12px;
}

@media (max-width: 960px) {
  .player-page {
    width: min(100% - 32px, 760px);
  }

  .player-page .video-shell {
    aspect-ratio: 16 / 9;
  }

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

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

  .player-now small {
    grid-column: auto;
  }

  .player-tools {
    justify-content: flex-start;
  }

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

@media (max-width: 560px) {
  .player-page {
    width: min(100% - 24px, 430px);
  }

  .player-page .video-shell {
    aspect-ratio: 9 / 16;
  }

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

  .player-tools button {
    min-width: calc(50% - 5px);
  }
}

.detail-page {
  display: grid;
  gap: 20px;
}

.detail-hero-card,
.detail-panel {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
}

.detail-hero-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 28px;
  padding: 28px;
}

.detail-hero-card .detail-poster {
  width: 220px;
  aspect-ratio: 3 / 4;
  border-radius: 10px;
  object-fit: cover;
}

.detail-content h1 {
  margin: 0 0 14px;
  font-size: 30px;
  line-height: 1.25;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 18px;
  margin-bottom: 14px;
  color: var(--gray-600);
}

.detail-desc {
  max-width: 980px;
  margin-bottom: 18px;
}

.detail-panel {
  padding: 22px 24px 24px;
}

.detail-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--gray-100);
}

.detail-panel-head h2 {
  position: relative;
  margin: 0;
  padding-left: 14px;
  color: var(--pink-600);
  font-size: 22px;
}

.detail-panel-head h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--pink-500);
  transform: translateY(-50%);
}

.detail-panel-head span,
.detail-tip {
  color: var(--gray-600);
}

.detail-tip {
  margin: 14px 0 16px;
}

.detail-episode-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 12px;
  max-height: 360px;
  overflow: auto;
  padding-right: 6px;
}

.detail-episode-grid a {
  min-height: 44px;
  display: grid;
  place-items: center;
  color: var(--gray-600);
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  font-weight: 700;
}

.detail-episode-grid a.free {
  color: var(--pink-600);
  background: var(--pink-50);
  border-color: var(--pink-100);
}

.detail-episode-grid a:hover {
  color: var(--white);
  background: var(--gradient-primary);
  border-color: transparent;
}

.plot-copy {
  padding-top: 16px;
  color: var(--gray-600);
}

.plot-copy p {
  margin-bottom: 6px;
}

@media (max-width: 960px) {
  .detail-hero-card,
  .detail-meta-grid {
    grid-template-columns: 1fr;
  }

  .detail-hero-card .detail-poster {
    width: min(260px, 100%);
  }

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

@media (max-width: 560px) {
  .detail-episode-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.member-page,
.recharge-page {
  display: grid;
  gap: 24px;
}

.member-page .member-status {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 24px;
  padding: 32px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgb(255 241 246 / 0.98), rgb(255 248 236 / 0.98)),
    var(--white);
  border: 1px solid var(--pink-100);
  border-radius: 16px;
  box-shadow: var(--shadow-float);
}

.member-status-copy h2 {
  margin-bottom: 8px;
  font-size: 28px;
}

.member-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 360px;
}

.member-benefits span {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  color: var(--pink-600);
  background: var(--white);
  border: 1px solid var(--pink-100);
  border-radius: 999px;
  font-weight: 700;
}

.member-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.member-section-head h2 {
  margin-bottom: 0;
}

.member-section-head > p {
  max-width: 520px;
  margin-bottom: 0;
  color: var(--gray-600);
}

.member-page .plan-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}

.member-page .plan-card {
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  min-height: 330px;
  padding: 28px;
  border-radius: 16px;
}

.member-page .plan-card.featured {
  transform: translateY(-8px);
}

.member-page .price {
  margin: 16px 0;
  font-size: 46px;
  line-height: 1.05;
}

.member-page .plan-card .button {
  align-self: end;
}

.recharge-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.recharge-page .balance-card {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 10px;
  padding: 28px;
  border-radius: 16px;
}

.recharge-page .balance-card p {
  margin: 0 0 8px;
  color: var(--gray-600);
}

.recharge-page .recharge-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.recharge-page .recharge-card {
  display: grid;
  gap: 10px;
  min-height: 190px;
  padding: 24px;
  border-radius: 16px;
}

.recharge-page .recharge-card .price {
  margin: 4px 0;
  font-size: 40px;
}

@media (max-width: 980px) {
  .member-page .member-status,
  .recharge-layout {
    grid-template-columns: 1fr;
  }

  .member-page .plan-grid,
  .recharge-page .recharge-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .member-page .plan-card.featured {
    transform: none;
  }

  .recharge-page .balance-card {
    position: static;
  }
}

@media (max-width: 620px) {
  .member-page .plan-grid,
  .recharge-page .recharge-grid {
    grid-template-columns: 1fr;
  }

  .member-page .member-status,
  .member-page .plan-card,
  .recharge-page .balance-card,
  .recharge-page .recharge-card {
    padding: 22px;
  }
}

/* 首页轮播：删除右侧信息区后保持大横幅高度，并与下方内容区对齐。 */
.portal-hero {
  padding: 32px 0 22px;
}

.portal-hero .container {
  width: min(1360px, calc(100% - 64px));
}

.portal-carousel {
  width: 100%;
  min-height: clamp(420px, 33vw, 620px);
}

.portal-carousel .carousel-track,
.portal-carousel .carousel-slide {
  min-height: clamp(420px, 33vw, 620px);
}

.portal-carousel .carousel-slide {
  padding: clamp(28px, 4vw, 72px);
}

@media (max-width: 760px) {
  .portal-hero {
    padding: 18px 0 12px;
  }

  .portal-hero .container {
    width: min(100% - 28px, 640px);
  }

  .portal-carousel,
  .portal-carousel .carousel-track,
  .portal-carousel .carousel-slide {
    min-height: 320px;
  }
}

/* 首页分类版块：参考横向剧集墙版式，保留现有浅色粉橙主题。 */
.category-update-section {
  padding-top: 12px;
}

.category-update-section .container {
  width: min(100% - 48px, 1760px);
  max-width: none;
}

.category-section-grid {
  display: grid;
  gap: 18px;
}

.category-showcase {
  padding: 28px 36px 34px;
  overflow: hidden;
}

.category-showcase .portal-category-head {
  margin-bottom: 22px;
  padding-bottom: 0;
}

.category-showcase .portal-category-head h2 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-left: 0;
  font-size: 24px;
  line-height: 1.1;
}

.category-showcase .portal-category-head h2::before {
  display: none;
}

.category-showcase .portal-category-head h2 span {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  color: var(--pink-600);
  background: var(--pink-50);
  border-radius: 6px;
  font-size: 13px;
}

.category-showcase .text-link {
  color: var(--gray-500);
  font-size: 15px;
}

.category-showcase .text-link:hover {
  color: var(--pink-600);
}

.portal-poster-card .poster-image {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 8px;
}

.portal-poster-card .poster-image img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  display: block;
  transition: transform 180ms ease;
}

.portal-poster-card .poster-image em,
.portal-poster-card small {
  display: none;
}

.category-showcase-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 30px;
}

.category-showcase-grid .portal-poster-card {
  display: block;
  min-width: 0;
}

.category-showcase-grid .portal-poster-card:hover .poster-image img {
  transform: scale(1.035);
}

.category-showcase-grid .portal-poster-card .poster-image::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 34%;
  background: linear-gradient(180deg, rgb(17 24 39 / 0), rgb(17 24 39 / 0.62));
  pointer-events: none;
}

.category-showcase-grid .portal-poster-card .poster-image em {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 12px;
  z-index: 1;
  display: block;
  overflow: hidden;
  color: var(--white);
  font-size: 16px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-shadow: 0 2px 8px rgb(0 0 0 / 0.36);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-showcase-grid .portal-poster-card strong {
  margin-top: 14px;
  color: var(--gray-900);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
}

.category-showcase-grid .portal-poster-card span:not(.poster-image) {
  display: none;
}

.category-showcase-grid .portal-poster-card small {
  display: block;
  margin-top: 9px;
  overflow: hidden;
  color: var(--gray-500);
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .category-showcase-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .category-update-section .container {
    width: min(100% - 28px, 640px);
  }

  .category-showcase {
    padding: 18px;
  }

  .category-showcase-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
}

@media (max-width: 520px) {
  .category-showcase-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 首页主内容统一对齐：轮播、热门推荐、分类区使用同一容器宽度。 */
.portal-hero .container,
.portal-section .container,
.category-update-section .container {
  width: min(100% - 48px, 1760px);
  max-width: none;
}

.portal-layout {
  display: block;
}

.portal-main {
  width: 100%;
}

@media (max-width: 760px) {
  .portal-hero .container,
  .portal-section .container,
  .category-update-section .container {
    width: min(100% - 28px, 640px);
  }
}

/* 会员页与个人中心：重排成可操作的账户工作台。 */
.member-section,
.recharge-section,
.profile-section {
  background: var(--gray-50);
}

.member-page,
.recharge-page,
.profile-layout {
  width: min(1360px, calc(100% - 64px));
}

.member-page {
  gap: 26px;
}

.member-page .member-status {
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  grid-template-areas:
    "copy overview"
    "benefits actions";
  gap: 22px 28px;
  padding: 34px;
  border-radius: 18px;
}

.member-status-copy {
  grid-area: copy;
}

.member-status-copy h2 {
  max-width: 760px;
  font-size: 34px;
  line-height: 1.15;
}

.member-status-copy p:last-child {
  color: var(--gray-600);
}

.member-overview {
  grid-area: overview;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.member-overview div,
.profile-stats article {
  min-height: 96px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--pink-100);
  border-radius: 14px;
}

.member-overview span,
.profile-stats span {
  color: var(--gray-500);
  font-size: 13px;
}

.member-overview strong,
.profile-stats strong {
  color: var(--gray-900);
  font-size: 26px;
  line-height: 1;
}

.member-benefits {
  grid-area: benefits;
  max-width: none;
}

.member-actions {
  grid-area: actions;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  align-items: center;
}

.member-actions .button {
  min-width: 128px;
}

.member-page .plan-grid {
  gap: 18px;
}

.member-page .plan-card,
.recharge-page .balance-card,
.recharge-page .recharge-card,
.profile-menu,
.profile-content,
.profile-panel {
  border: 1px solid var(--gray-100);
}

.recharge-section {
  padding-top: 0;
}

.recharge-layout {
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 22px;
}

.recharge-page .recharge-grid {
  gap: 16px;
}

.profile-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.profile-menu {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 8px;
  padding: 18px;
  border-radius: 16px;
}

.profile-menu strong {
  margin-bottom: 8px;
  color: var(--gray-900);
  font-size: 18px;
}

.profile-menu a {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 10px;
}

.profile-content {
  display: grid;
  gap: 18px;
  padding: 22px;
  border-radius: 16px;
}

.profile-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 22px;
  background:
    linear-gradient(135deg, rgb(255 241 246 / 0.88), rgb(255 248 236 / 0.88)),
    var(--white);
  border: 1px solid var(--pink-100);
  border-radius: 16px;
}

.profile-head h2 {
  margin: 4px 0 6px;
  font-size: 28px;
}

.profile-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

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

.profile-stats small {
  color: var(--gray-500);
}

.profile-panel {
  padding: 20px;
  background: var(--white);
  border-radius: 16px;
}

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

.profile-tab-panel[hidden] {
  display: none;
}

.profile-panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 18px;
}

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

.profile-panel-head h3 {
  margin: 0;
  font-size: 20px;
}

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

.history-card {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  border-radius: 12px;
}

.history-card img {
  width: 74px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 8px;
}

.history-card strong,
.history-card small {
  overflow: hidden;
  display: block;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.order-list div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--gray-100);
}

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

.order-list span {
  color: var(--gray-900);
  font-weight: 700;
}

.order-list strong {
  color: var(--pink-600);
}

.order-list small {
  grid-column: 1 / -1;
  color: var(--gray-500);
}

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

.profile-table div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 16px;
  align-items: center;
  padding: 14px;
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  border-radius: 12px;
}

.profile-table span {
  min-width: 0;
  overflow: hidden;
  color: var(--gray-900);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-table strong {
  color: var(--pink-600);
}

.profile-table small {
  grid-column: 1 / -1;
  color: var(--gray-500);
}

.button-reset {
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.empty-state {
  min-height: 96px;
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 18px;
  color: var(--gray-500);
  text-align: center;
  background: var(--gray-50);
  border: 1px dashed var(--gray-200);
  border-radius: 12px;
}

@media (max-width: 1080px) {
  .member-page .member-status,
  .profile-layout,
  .recharge-layout {
    grid-template-columns: 1fr;
  }

  .member-page .member-status {
    grid-template-areas:
      "copy"
      "overview"
      "benefits"
      "actions";
  }

  .member-actions {
    justify-content: flex-start;
  }

  .profile-menu {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .profile-menu strong {
    grid-column: 1 / -1;
  }

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

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

@media (max-width: 720px) {
  .member-page,
  .recharge-page,
  .profile-layout {
    width: min(100% - 28px, 640px);
  }

  .member-page .member-status,
  .profile-head,
  .profile-content,
  .profile-panel {
    padding: 18px;
  }

  .member-overview,
  .profile-menu,
  .profile-stats,
  .history-grid {
    grid-template-columns: 1fr;
  }

  .member-actions,
  .profile-actions {
    flex-direction: column;
    align-items: stretch;
  }

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

/* 分类列表页：参考筛选+片库网格版式，保留浅色粉橙主题。 */
.catalog-page {
  background: var(--gray-50);
}

.catalog-page .container {
  width: min(100% - 48px, 1760px);
  max-width: none;
}

.catalog-filter-section {
  padding: 22px 0;
  background: var(--white);
  border-bottom: 1px solid var(--gray-100);
}

.catalog-filter-card {
  display: grid;
  gap: 20px;
  padding: 22px 24px;
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
}

.catalog-filter-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.catalog-filter-row > span {
  color: var(--gray-500);
  font-weight: 700;
  line-height: 34px;
}

.catalog-filter-row > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.catalog-filter-row a,
.catalog-sort button,
.catalog-pagination a,
.catalog-pagination span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  color: var(--gray-600);
  background: transparent;
  border: 0;
  border-radius: 999px;
  font: inherit;
}

.catalog-filter-row a.active,
.catalog-filter-row a:hover,
.catalog-sort button.active,
.catalog-sort button:hover {
  color: var(--pink-600);
  background: var(--pink-50);
}

.catalog-results-section {
  padding-top: 26px;
}

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

.catalog-result-head h1 {
  margin: 4px 0 0;
  color: var(--gray-900);
  font-size: 30px;
  line-height: 1.15;
}

.catalog-result-head p {
  margin: 0;
  color: var(--gray-500);
}

.catalog-result-head strong {
  color: var(--pink-600);
}

.catalog-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}

.catalog-sort {
  display: flex;
  gap: 8px;
}

.catalog-sort button {
  cursor: pointer;
  font-weight: 700;
}

.catalog-poster-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 30px;
}

.catalog-poster-grid .portal-poster-card {
  min-width: 0;
}

.catalog-pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 34px;
}

.catalog-pagination a,
.catalog-pagination span {
  min-width: 46px;
  color: var(--gray-600);
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: 8px;
}

.catalog-pagination a.active,
.catalog-pagination a:hover {
  color: var(--white);
  background: var(--gradient-primary);
  border-color: transparent;
}

.catalog-pagination span.disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

@media (max-width: 1180px) {
  .catalog-poster-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .catalog-page .container {
    width: min(100% - 28px, 640px);
  }

  .catalog-result-head,
  .catalog-toolbar {
    display: grid;
    justify-content: stretch;
  }

  .catalog-filter-row {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 520px) {
  .catalog-poster-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 登录注册页 */
.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
  background:
    radial-gradient(circle at 20% 12%, rgb(234 80 132 / 0.12), transparent 30%),
    radial-gradient(circle at 82% 24%, rgb(255 122 47 / 0.12), transparent 28%),
    var(--gradient-page);
}

.auth-card {
  width: min(100%, 460px);
  display: grid;
  gap: 22px;
  padding: 34px;
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: 18px;
  box-shadow: var(--shadow-float);
}

.auth-brand {
  width: max-content;
}

.auth-head h1 {
  margin: 4px 0 8px;
  color: var(--gray-900);
  font-size: 32px;
  line-height: 1.15;
}

.auth-head p {
  margin: 0;
  color: var(--gray-600);
}

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

.auth-form label {
  display: grid;
  gap: 8px;
  color: var(--gray-700);
  font-weight: 700;
}

.auth-form input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  color: var(--gray-900);
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.auth-form input:focus {
  background: var(--white);
  border-color: var(--pink-400);
  box-shadow: 0 0 0 4px rgb(234 80 132 / 0.12);
}

.auth-rules {
  padding: 12px 14px;
  color: var(--gray-600);
  background: var(--pink-50);
  border: 1px solid var(--pink-100);
  border-radius: 12px;
}

.auth-rules span {
  display: block;
  margin-bottom: 4px;
  color: var(--pink-600);
  font-weight: 800;
}

.auth-rules p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
}

.auth-status {
  min-height: 22px;
  margin: 0;
  color: var(--gray-500);
  font-size: 14px;
}

.auth-status[data-type="error"] {
  color: #dc2626;
}

.auth-status[data-type="success"] {
  color: #16a34a;
}

.auth-foot {
  display: flex;
  justify-content: center;
  gap: 8px;
  color: var(--gray-600);
}

@media (max-width: 520px) {
  .auth-card {
    padding: 24px;
  }
}

/* 客服与资质页 */
.support-page {
  min-height: calc(100vh - 72px);
  padding: 34px 0 42px;
  background: var(--gray-50);
}

.support-hero {
  padding: 34px;
  background:
    linear-gradient(135deg, rgb(255 241 246 / 0.94), rgb(255 248 236 / 0.94)),
    var(--white);
  border: 1px solid var(--pink-100);
  border-radius: 18px;
  box-shadow: var(--shadow-card);
}

.support-hero h1 {
  max-width: 760px;
  margin: 4px 0 10px;
  color: var(--gray-900);
  font-size: 34px;
  line-height: 1.16;
}

.support-hero p:last-child {
  max-width: 720px;
  margin: 0;
  color: var(--gray-600);
}

.support-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.support-card {
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
}

.support-card h2 {
  margin: 0 0 14px;
  color: var(--gray-900);
  font-size: 22px;
}

.support-card p,
.support-card li {
  color: var(--gray-600);
  line-height: 1.8;
}

.support-card ul {
  margin: 0;
  padding-left: 18px;
}

.support-contact,
.license-list {
  display: grid;
  gap: 10px;
}

.support-contact span,
.license-list span {
  padding: 12px 14px;
  color: var(--gray-700);
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  border-radius: 12px;
}

.support-contact strong {
  margin-bottom: 2px;
  color: var(--pink-600);
}

@media (max-width: 760px) {
  .support-page {
    padding-top: 20px;
  }

  .support-hero {
    padding: 22px;
  }

  .support-grid {
    grid-template-columns: 1fr;
  }
}
