:root {
  --bg: #0b0d12;
  --panel: #111723;
  --panel-2: #161d2b;
  --panel-3: #1a2232;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f5f7fb;
  --muted: #98a2b3;
  --weak: #6b7280;
  --primary: #7c5cff;
  --primary-2: #9f8bff;
  --accent: #18d1a5;
  --warning: #ffb84d;
  --danger: #ff5b77;
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.32);
  --content-width: min(1280px, calc(100vw - 48px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(124, 92, 255, 0.22), transparent 28%),
    radial-gradient(circle at top right, rgba(24, 209, 165, 0.12), transparent 24%),
    var(--bg);
  color: var(--text);
}

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

button,
input,
select {
  font: inherit;
}

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

.page-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  background: rgba(11, 13, 18, 0.88);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  width: var(--content-width);
  margin: 0 auto;
  height: 76px;
  display: flex;
  align-items: center;
  gap: 20px;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background:
    linear-gradient(140deg, #26d0ce 0%, #7c5cff 46%, #ff5b77 100%);
  box-shadow: 0 10px 30px rgba(124, 92, 255, 0.35);
  transform: skew(-14deg);
}

.brand-name {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.brand-slogan {
  color: var(--weak);
  font-size: 12px;
  margin-top: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.nav-link.active,
.nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

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

.icon-btn,
.ghost-btn,
.primary-btn,
.secondary-btn,
.chip {
  border: 0;
  cursor: pointer;
}

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.ghost-btn {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 16px;
}

.primary-btn {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  color: white;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 600;
  box-shadow: 0 14px 32px rgba(124, 92, 255, 0.28);
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border-radius: 999px;
  padding: 12px 18px;
}

.search-shell {
  width: var(--content-width);
  margin: 24px auto 0;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.search-area {
  position: relative;
}

.search-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 10px;
  display: none;
  z-index: 40;
}

.search-suggest.active {
  display: block;
}

.suggest-title {
  color: var(--weak);
  font-size: 12px;
  padding: 6px 8px 10px;
}

.suggest-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 12px;
  border-radius: 14px;
  color: var(--text);
}

.suggest-item:hover {
  background: rgba(255,255,255,0.05);
}

.suggest-meta {
  color: var(--muted);
  font-size: 12px;
}

.search-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.search-tab {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 13px;
}

.search-tab.active {
  background: rgba(124, 92, 255, 0.16);
  color: #d9d1ff;
}

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

.page-content {
  width: var(--content-width);
  margin: 28px auto 100px;
}

.hero {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: 20px;
}

.hero-banner-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.hero-banner-card {
  min-height: 108px;
  border-radius: 18px;
  padding: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background:
    linear-gradient(135deg, rgba(124,92,255,0.18), rgba(24,209,165,0.08)),
    rgba(255,255,255,0.03);
}

.hero-banner-card strong {
  display: block;
  font-size: 16px;
}

.hero-banner-card span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.hero-main,
.hero-side,
.panel,
.banner-card,
.vip-card,
.content-section,
.filter-panel,
.detail-header,
.player-wrap,
.profile-overview,
.table-wrap {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.hero-main {
  padding: 26px;
  min-height: 300px;
  position: relative;
  overflow: hidden;
}

.hero-main::before {
  content: "";
  position: absolute;
  inset: auto -80px -120px auto;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.28), transparent 65%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(124, 92, 255, 0.12);
  color: #d8d0ff;
  font-size: 13px;
}

.hero-title {
  font-size: 38px;
  line-height: 1.14;
  margin: 18px 0 12px;
}

.hero-desc {
  color: var(--muted);
  line-height: 1.7;
  max-width: 720px;
}

.hero-carousel {
  margin-top: 22px;
  position: relative;
  min-height: 210px;
}

.hero-slide {
  position: relative;
  min-height: 210px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(90deg, rgba(7, 9, 14, 0.82) 0%, rgba(7, 9, 14, 0.5) 45%, rgba(7, 9, 14, 0.22) 100%),
    var(--slide-image),
    var(--slide-bg, linear-gradient(135deg, #4f46e5 0%, #111827 100%));
  background-size: cover, cover, cover;
  background-position: center, center, center;
  box-shadow: 0 22px 42px rgba(0, 0, 0, 0.24);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.05), transparent 30%);
  pointer-events: none;
}

.hero-slide-copy {
  position: relative;
  z-index: 1;
  padding: 24px;
  max-width: 56%;
}

.hero-slide-copy strong {
  display: block;
  font-size: 28px;
  line-height: 1.2;
}

.hero-slide-copy span {
  display: block;
  margin-top: 10px;
  color: rgba(255,255,255,0.78);
  line-height: 1.7;
}

.hero-slide-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(11, 13, 18, 0.46);
  color: rgba(255,255,255,0.84);
  font-size: 12px;
}

.hero-dots {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,0.16);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, width 0.2s ease;
}

.hero-dot.active {
  width: 24px;
  background: #7c5cff;
}

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

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  padding: 16px;
}

.stat-label {
  color: var(--weak);
  font-size: 12px;
}

.stat-value {
  margin-top: 8px;
  font-size: 24px;
  font-weight: 700;
}

.hero-side {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ref-image {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: #0d111a;
}

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

.quick-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.quick-link,
.metric-card {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
}

.quick-link-title {
  font-size: 15px;
  font-weight: 600;
}

.quick-link-sub {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 34px 0 16px;
}

.section-title {
  font-size: 24px;
  margin: 0;
}

.section-sub {
  color: var(--muted);
  margin-top: 6px;
  font-size: 14px;
}

.tags-row,
.chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 13px;
}

.chip.active {
  background: rgba(24, 209, 165, 0.12);
  color: #a6f8e5;
}

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

.card {
  min-width: 0;
}

.card a {
  display: block;
}

.poster {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background:
    linear-gradient(180deg, rgba(255,255,255,0) 32%, rgba(0,0,0,0.65) 100%),
    var(--poster-image),
    var(--poster-bg, linear-gradient(135deg, #333 0%, #111 100%));
  background-size: cover, cover, cover;
  background-position: center, center, center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(130deg, rgba(255,255,255,0.06), transparent 28%),
    linear-gradient(0deg, rgba(0,0,0,0.2), rgba(0,0,0,0.2));
}

.card:hover .poster {
  transform: translateY(-4px);
  box-shadow: 0 28px 48px rgba(0, 0, 0, 0.32);
  border-color: rgba(255,255,255,0.16);
}

.poster-top,
.poster-bottom {
  position: absolute;
  z-index: 2;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.poster-top {
  top: 12px;
}

.poster-bottom {
  bottom: 12px;
}

.poster-body {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 48px;
  z-index: 2;
}

.poster-code {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(11,13,18,0.68);
  color: #ffffff;
  font-size: 11px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.poster-copy {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.55;
  color: rgba(255,255,255,0.92);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.badge,
.duration {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  backdrop-filter: blur(8px);
}

.badge {
  background: rgba(24, 209, 165, 0.16);
  color: #bffdef;
}

.badge.warn {
  background: rgba(255, 184, 77, 0.16);
  color: #ffd9a2;
}

.duration {
  background: rgba(11, 13, 18, 0.72);
  color: #fff;
}

.card-title {
  margin: 12px 0 8px;
  font-size: 15px;
  line-height: 1.5;
  font-weight: 600;
  min-height: 44px;
}

.card-meta,
.muted-line {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  color: var(--weak);
  font-size: 12px;
}

.two-col {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 20px;
}

.filter-panel {
  padding: 18px;
  align-self: start;
  position: sticky;
  top: 96px;
}

.filter-group + .filter-group {
  margin-top: 18px;
}

.filter-title {
  font-size: 13px;
  color: var(--weak);
  margin-bottom: 12px;
}

.sort-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.result-count {
  color: var(--muted);
  font-size: 14px;
}

.detail-header {
  padding: 24px;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 24px;
}

.detail-cover {
  border-radius: 22px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background:
    linear-gradient(180deg, rgba(255,255,255,0) 25%, rgba(0,0,0,0.46) 100%),
    var(--poster-image),
    var(--poster-bg, linear-gradient(135deg, #333 0%, #111 100%));
  background-size: cover, cover, cover;
  background-position: center, center, center;
}

.detail-cover.image-ref {
  background: none;
}

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

.detail-title {
  font-size: 34px;
  margin: 4px 0 10px;
  line-height: 1.2;
}

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

.detail-meta-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 14px;
}

.detail-meta-item .label {
  color: var(--weak);
  font-size: 12px;
}

.detail-meta-item .value {
  margin-top: 6px;
  font-size: 15px;
  font-weight: 600;
}

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

.detail-paragraph {
  color: var(--muted);
  line-height: 1.8;
}

.player-wrap {
  padding: 20px;
}

.player-screen {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 22px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.16), rgba(0,0,0,0.56)),
    var(--player-image),
    var(--player-bg, linear-gradient(135deg, #2a1c55 0%, #0e1320 100%));
  background-size: cover, cover, cover;
  background-position: center, center, center;
  border: 1px solid rgba(255,255,255,0.06);
}

.player-screen.image-ref {
  background: none;
}

.player-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.play-btn {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(14px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
}

.player-toolbar,
.profile-grid {
  display: grid;
  gap: 16px;
}

.player-toolbar {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 18px;
}

.toolbar-item,
.profile-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 16px;
}

.toolbar-item strong,
.profile-card strong {
  display: block;
  font-size: 16px;
}

.toolbar-item span,
.profile-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-top: 6px;
  line-height: 1.6;
}

.profile-overview {
  padding: 24px;
}

.profile-top {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
}

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

.avatar {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(124,92,255,0.9), rgba(24,209,165,0.9));
  box-shadow: 0 14px 30px rgba(124,92,255,0.25);
}

.vip-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 184, 77, 0.14);
  color: #ffd9a2;
  font-size: 13px;
  margin-top: 10px;
}

.progress-shell {
  margin-top: 18px;
}

.progress-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}

.progress-value {
  width: 68%;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.profile-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 20px;
}

.vip-card {
  padding: 24px;
  margin-top: 24px;
}

.vip-table {
  display: grid;
  grid-template-columns: 100px 1fr 1fr;
  gap: 1px;
  border-radius: 18px;
  overflow: hidden;
  background: var(--line);
  margin-top: 18px;
}

.vip-table > div {
  background: var(--panel-2);
  padding: 14px 16px;
  font-size: 14px;
}

.footer {
  width: var(--content-width);
  margin: 0 auto 40px;
  color: var(--weak);
  font-size: 13px;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--weak);
  font-size: 13px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.search-summary,
.info-banner {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 18px;
  box-shadow: var(--shadow);
}

.search-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.summary-main {
  min-width: 0;
}

.summary-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 6px;
}

.summary-desc {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.mini-card-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.mini-card {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
}

.mini-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.mini-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.star-hero {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.star-avatar {
  aspect-ratio: 3 / 4;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(124,92,255,0.9), rgba(24,209,165,0.6));
  border: 1px solid rgba(255,255,255,0.08);
  position: relative;
  overflow: hidden;
}

.star-avatar::after {
  content: "";
  position: absolute;
  inset: auto -20% -20% auto;
  width: 70%;
  height: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.12), transparent 68%);
}

.star-subtitle {
  color: var(--muted);
  margin: 6px 0 12px;
  font-size: 14px;
}

.split-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
}

.link-inline {
  color: #dcd6ff;
  text-decoration: underline;
  text-decoration-color: rgba(220,214,255,0.35);
  text-underline-offset: 3px;
}

.ad-slot {
  position: relative;
  border-radius: 18px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(135deg, rgba(124, 92, 255, 0.08), rgba(24, 209, 165, 0.06)),
    rgba(255,255,255,0.02);
  overflow: hidden;
}

.ad-slot::before {
  content: attr(data-slot);
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 11px;
  letter-spacing: 0.4px;
  color: var(--weak);
  text-transform: uppercase;
}

.ad-slot-inner {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  padding: 34px 18px 18px;
}

.ad-slot.home-top {
  min-height: 136px;
}

.ad-slot.inline-card {
  min-height: 220px;
}

.ad-slot.player-slot {
  min-height: 140px;
}

.modal-backdrop,
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 10, 0.72);
  backdrop-filter: blur(10px);
  z-index: 100;
  display: none;
}

.modal-backdrop.active,
.drawer-backdrop.active {
  display: block;
}

.modal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(520px, calc(100vw - 24px));
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  z-index: 101;
  display: none;
  overflow: hidden;
}

.modal.active {
  display: block;
}

.sheet-modal {
  top: auto;
  bottom: 16px;
  transform: translateX(-50%);
  width: min(560px, calc(100vw - 24px));
}

.modal-head {
  padding: 22px 22px 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.modal-title {
  font-size: 24px;
  font-weight: 700;
  margin: 0;
}

.modal-close {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  border: 0;
  color: var(--text);
  cursor: pointer;
}

.modal-body {
  padding: 0 22px 22px;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

.field {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  border-radius: 16px;
  padding: 14px 16px;
  outline: 0;
}

.field + .field-label,
.field-wrap + .field-wrap {
  margin-top: 14px;
}

.form-tip {
  color: var(--weak);
  font-size: 12px;
  line-height: 1.7;
  margin-top: 14px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.vip-upgrade-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.08);
  background:
    radial-gradient(circle at left center, rgba(124,92,255,0.16), transparent 28%),
    linear-gradient(135deg, rgba(255,184,77,0.08), rgba(124,92,255,0.08)),
    var(--panel);
  box-shadow: var(--shadow);
}

.vip-upgrade-banner strong {
  display: block;
  font-size: 18px;
}

.vip-upgrade-banner span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  margin-top: 6px;
}

.drawer {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: min(420px, 92vw);
  background: var(--panel);
  border-left: 1px solid var(--line);
  z-index: 101;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
}

.drawer.active {
  transform: translateX(0);
}

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

.menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 16px;
  color: var(--text);
}

.menu-item small {
  color: var(--muted);
  display: block;
  margin-top: 4px;
}

.tab-switch {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.tab-pill {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
}

.tab-pill.active {
  background: rgba(124, 92, 255, 0.16);
  color: #e3ddff;
}

.home-panel {
  display: none;
}

.home-panel.active {
  display: block;
}

.quick-scroll-nav {
  display: flex;
  gap: 10px;
  overflow: auto;
  padding-bottom: 4px;
  margin: 14px 0 4px;
}

.quick-scroll-item {
  flex: 0 0 auto;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  color: var(--muted);
  font-size: 13px;
  border: 1px solid rgba(255,255,255,0.05);
}

.selected-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.selected-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(24,209,165,0.12);
  color: #b8fff0;
  font-size: 13px;
}

.selected-filter button {
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
}

.auth-user {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 6px 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
}

.auth-user.active {
  display: inline-flex;
}

.auth-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

.auth-meta {
  min-width: 0;
}

.auth-name {
  font-size: 13px;
  font-weight: 600;
}

.auth-level {
  font-size: 11px;
  color: var(--muted);
}

.guest-only.hidden,
.auth-only.hidden {
  display: none !important;
}

.login-state-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.03);
  margin-bottom: 16px;
}

.login-state-banner strong {
  display: block;
  font-size: 15px;
}

.login-state-banner span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-top: 6px;
  line-height: 1.7;
}

.premium-panel {
  background:
    radial-gradient(circle at top left, rgba(124,92,255,0.16), transparent 32%),
    linear-gradient(135deg, rgba(255,255,255,0.03), rgba(255,255,255,0.02)),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 22px;
}

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

.premium-title {
  font-size: 22px;
  margin: 0;
}

.premium-sub {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.task-list {
  display: grid;
  gap: 12px;
}

.task-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 18px;
  padding: 16px;
}

.task-item strong {
  display: block;
  font-size: 15px;
}

.task-item span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  margin-top: 6px;
}

.task-points {
  white-space: nowrap;
  color: #aaf7e7;
  font-weight: 700;
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.drawer-title {
  margin: 0;
  font-size: 20px;
}

.drawer-body {
  padding: 18px;
  overflow: auto;
}

.drawer-actions {
  padding: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 10px;
}

.empty-state {
  padding: 36px 24px;
  text-align: center;
  color: var(--muted);
  background: var(--panel);
  border: 1px dashed rgba(255,255,255,0.1);
  border-radius: 20px;
}

.mobile-bottom-nav {
  display: none;
}

@media (max-width: 1100px) {
  .hero,
  .detail-header,
  .two-col {
    grid-template-columns: 1fr;
  }

  .filter-panel {
    position: static;
  }

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

  .quick-row,
  .mini-card-row,
  .split-grid,
  .player-toolbar,
  .profile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  :root {
    --content-width: calc(100vw - 24px);
  }

  .topbar {
    position: sticky;
  }

  .topbar-inner {
    height: 64px;
    gap: 12px;
  }

  .brand-name {
    font-size: 19px;
  }

  .brand-slogan,
  .nav-links,
  .desktop-only {
    display: none;
  }

  .search-shell {
    margin-top: 16px;
  }

  .search-bar {
    padding: 12px 14px;
    border-radius: 16px;
    flex-wrap: wrap;
  }

  .search-tabs {
    order: 2;
    width: 100%;
    overflow: auto;
    flex-wrap: nowrap;
  }

  .page-content {
    margin: 18px auto 92px;
  }

  .hero-main {
    padding: 20px;
    min-height: auto;
  }

  .hero-title {
    font-size: 28px;
  }

  .hero-slide-copy {
    max-width: 100%;
    padding: 18px;
  }

  .hero-slide-copy strong {
    font-size: 22px;
  }

  .hero-stats,
  .quick-row,
  .mini-card-row,
  .split-grid,
  .player-toolbar,
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .star-hero {
    grid-template-columns: 1fr;
  }

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

  .vip-upgrade-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-title {
    font-size: 20px;
  }

  .detail-title {
    font-size: 26px;
  }

  .detail-meta-grid {
    grid-template-columns: 1fr;
  }

  .vip-table {
    grid-template-columns: 84px 1fr;
  }

  .vip-table > div:nth-child(3n) {
    display: none;
  }

  .mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    background: rgba(11, 13, 18, 0.96);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--line);
    z-index: 60;
  }

  .mobile-bottom-nav a {
    padding: 12px 6px 14px;
    text-align: center;
    color: var(--muted);
    font-size: 12px;
  }

  .mobile-bottom-nav a.active {
    color: var(--text);
  }

  .mobile-only {
    display: inline-flex !important;
  }

  .sheet-modal {
    bottom: 8px;
  }
}

@media (min-width: 821px) {
  .mobile-only {
    display: none !important;
  }
}
