:root {
  --bg: #0b0b0f;
  --bg-elevated: #14141c;
  --bg-card: #1a1a24;
  --text: #f5f5f7;
  --text-muted: #a8a8b3;
  --pink: #ff2d6a;
  --orange: #ff8a3d;
  --gradient: linear-gradient(135deg, #ff8a3d 0%, #ff2d6a 55%, #e0148c 100%);
  --border: rgba(255, 255, 255, 0.08);
  --nav-h: 58px;
  --apps-h: 64px;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + var(--apps-h) + 12px);
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: #ff7aa8;
  text-decoration: none;
}

a:hover {
  color: #ffb0cb;
}

.container {
  width: min(1100px, calc(100% - 28px));
  margin: 0 auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(11, 11, 15, 0.96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.nav-bar {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  min-width: 0;
}

.brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-text strong {
  font-size: 16px;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-text span {
  font-size: 12px;
  color: var(--text-muted);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-elevated);
  color: var(--text);
  cursor: pointer;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--text-muted);
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 14px;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: rgba(255, 45, 106, 0.12);
}

/* Site ads from myads.html */
.site-ads-sticky {
  position: sticky;
  top: var(--nav-h);
  z-index: 999;
  background: rgba(20, 20, 28, 0.98);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  padding: 4px 0 8px;
}

.site-ads-sticky[hidden],
.site-ads-top[hidden],
[data-site-ads-slot][hidden] {
  display: none !important;
}

.site-ads-top,
[data-site-ads-slot] {
  margin: 18px 0;
  padding: 14px 12px;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at top right, rgba(255, 45, 106, 0.18), transparent 45%),
    var(--bg-elevated);
  border: 1px solid rgba(255, 45, 106, 0.28);
}

.site-ads-sticky .applist-title,
.site-ads-top .applist-title,
[data-site-ads-slot] .applist-title {
  color: #ffd0df;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}

.site-ads-sticky .caption,
.site-ads-top .caption,
[data-site-ads-slot] .caption {
  color: #cfcfd8 !important;
}

.site-ads-sticky figure,
.site-ads-top figure,
[data-site-ads-slot] figure {
  margin: 0;
}

.site-ads-sticky .ads,
.site-ads-top .ads,
[data-site-ads-slot] .ads {
  gap: 8px 4px;
}

/* Hero */
.hero {
  position: relative;
  min-height: 68vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: #000;
}

.hero-banner {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  z-index: 0;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(11, 11, 15, 0.2) 0%, rgba(11, 11, 15, 0.72) 55%, rgba(11, 11, 15, 0.96) 100%),
    linear-gradient(90deg, rgba(255, 45, 106, 0.12), transparent 50%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 48px 0 36px;
  width: min(1100px, calc(100% - 28px));
  margin: 0 auto;
}

.hero-kicker {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  color: #ffd0df;
  font-size: 13px;
  margin-bottom: 14px;
}

.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(26px, 5vw, 40px);
  line-height: 1.25;
  max-width: 16ch;
}

.hero p {
  margin: 0 0 22px;
  color: #e8e8ee;
  max-width: 40ch;
  font-size: 16px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  color: #fff;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: var(--shadow);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border);
  color: var(--text);
}

/* Breadcrumb */
.breadcrumb {
  margin: 18px 0 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb span {
  color: #ff9fbf;
}

/* Sections */
.section {
  padding: 28px 0;
}

.section-title {
  margin: 0 0 8px;
  font-size: clamp(22px, 3.5vw, 30px);
}

.section-desc {
  margin: 0 0 20px;
  color: var(--text-muted);
  max-width: 70ch;
}

/* 3:7 content blocks */
.ratio-block {
  display: grid;
  grid-template-columns: 3fr 7fr;
  gap: 18px;
  align-items: start;
  margin-bottom: 22px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

.ratio-block.reverse {
  grid-template-columns: 7fr 3fr;
}

.ratio-media {
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border);
}

.ratio-media img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.ratio-text h2,
.ratio-text h3 {
  margin: 0 0 10px;
  font-size: 20px;
}

.ratio-text p {
  margin: 0 0 12px;
  color: #dddde6;
}

.ratio-text ul {
  margin: 0 0 12px;
  padding-left: 1.2em;
  color: #dddde6;
}

.article-body p {
  margin: 0 0 14px;
  color: #dddde6;
}

.article-body h2 {
  margin: 28px 0 12px;
  font-size: 24px;
}

.article-body h3 {
  margin: 22px 0 10px;
  font-size: 19px;
}

.article-body ul,
.article-body ol {
  margin: 0 0 14px;
  padding-left: 1.2em;
  color: #dddde6;
}

/* Cards grids */
.card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.media-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.media-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  object-position: center;
  background: #000;
}

#dramas .media-card img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.media-card .body {
  padding: 12px;
}

.media-card h3 {
  margin: 0 0 6px;
  font-size: 15px;
  line-height: 1.4;
}

.media-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
}

.artist-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.artist-card {
  text-align: center;
  padding: 14px 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.artist-card img {
  width: 96px;
  height: 96px;
  margin: 0 auto 10px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 45, 106, 0.45);
}

.artist-card h3 {
  margin: 0 0 4px;
  font-size: 15px;
}

.artist-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
}

.drama-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.faq details {
  margin-bottom: 10px;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
}

.faq p {
  margin: 10px 0 0;
  color: var(--text-muted);
}

.toc {
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  margin-bottom: 22px;
}

.toc h2 {
  margin: 0 0 10px;
  font-size: 18px;
}

.toc ol {
  margin: 0;
  padding-left: 1.2em;
  color: var(--text-muted);
}

.toc a {
  color: #ff9fbf;
}

.page-hero {
  padding: 28px 0 8px;
}

.page-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(24px, 4vw, 34px);
}

.page-hero p {
  margin: 0;
  color: var(--text-muted);
  max-width: 70ch;
}

.related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.related-links a {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 45, 106, 0.1);
  border: 1px solid rgba(255, 45, 106, 0.25);
  color: #ffd0df;
  font-size: 13px;
}

/* Footer */
.site-footer {
  margin-top: 40px;
  padding: 28px 0 40px;
  border-top: 1px solid var(--border);
  background: #09090d;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 22px;
}

.site-footer h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.site-footer p,
.site-footer li {
  color: var(--text-muted);
  font-size: 14px;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li + li {
  margin-top: 8px;
}

.site-footer a {
  color: #cfcfd8;
}

.copyright {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: #7f7f8c;
  font-size: 13px;
}

/* Error pages */
.error-wrap {
  min-height: 60vh;
  display: flex;
  align-items: center;
  padding: 40px 0;
}

.error-box {
  width: 100%;
  padding: 28px;
  border-radius: 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  text-align: center;
}

.error-box h1 {
  margin: 0 0 10px;
  font-size: 42px;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Mobile */
@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-links {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: var(--nav-h);
    flex-direction: column;
    align-items: stretch;
    padding: 10px 14px 14px;
    background: rgba(11, 11, 15, 0.98);
    border-bottom: 1px solid var(--border);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 12px;
  }

  .ratio-block,
  .ratio-block.reverse {
    grid-template-columns: 1fr;
  }

  .ratio-media img {
    aspect-ratio: 16 / 10;
  }

  .card-grid,
  .artist-grid,
  .drama-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 0;
    display: block;
    overflow: visible;
    background: var(--bg);
  }

  .hero-banner {
    position: static;
    width: 100%;
    height: auto;
    max-height: none;
    aspect-ratio: auto;
    object-fit: contain;
    object-position: center top;
    display: block;
  }

  .hero::before {
    display: none;
  }

  .hero-content {
    padding: 20px 0 24px;
    background: var(--bg);
  }

  .hero h1 {
    max-width: none;
  }

  .artist-card img {
    width: 78px;
    height: 78px;
  }

  :root {
    --apps-h: 120px;
  }
}

@media (max-width: 560px) {
  .hero-content {
    width: min(1100px, calc(100% - 24px));
  }

  .card-grid,
  .artist-grid,
  .drama-grid {
    grid-template-columns: 1fr 1fr;
  }

  .artist-card img {
    width: 72px;
    height: 72px;
  }
}
