:root {
  --bg: #0c0d10;
  --bg-elevated: #15171c;
  --bg-soft: #1c1f27;
  --text: #e8e6e3;
  --text-muted: #9a9690;
  --accent: #e11d48;
  --accent-hover: #fb7185;
  --border: #2a2e38;
  --link: #f43f5e;
  --max: 1080px;
  --font-display: "Noto Serif SC", "Source Han Serif SC", "Songti SC", Georgia, serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(225, 29, 72, 0.18), transparent 50%),
    radial-gradient(ellipse 60% 40% at 90% 0%, rgba(120, 80, 40, 0.12), transparent 45%),
    var(--bg);
  min-height: 100vh;
}

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

a {
  color: var(--link);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12, 13, 16, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
}

.logo:hover {
  color: var(--accent-hover);
  text-decoration: none;
}

.logo img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-elevated);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--accent-hover);
}

/* Hero */
.hero {
  padding: 3.5rem 0 2.5rem;
  border-bottom: 1px solid var(--border);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.3;
  margin: 0 0 1rem;
  font-weight: 700;
}

.hero-lead {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin: 0 0 1.5rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: #be123c;
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent-hover);
}

.hero-visual {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

.hero-visual img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

/* Sections */
.section {
  padding: 3rem 0;
  border-bottom: 1px solid var(--border);
}

.section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  margin: 0 0 0.75rem;
  line-height: 1.35;
}

.section h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 1.75rem 0 0.6rem;
}

.section h4 {
  font-size: 1.05rem;
  margin: 1.25rem 0 0.5rem;
  color: #f0ece8;
}

.section p {
  margin: 0 0 1rem;
  color: var(--text);
}

.section-intro {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* Category grid */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin: 1.5rem 0;
}

.cat-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.cat-item:hover {
  border-color: rgba(225, 29, 72, 0.5);
}

.cat-item a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.cat-item img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.cat-item .cat-body {
  padding: 0.9rem 1rem 1.1rem;
}

.cat-item h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}

.cat-item p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Content prose */
.prose ul,
.prose ol {
  margin: 0 0 1.25rem;
  padding-left: 1.35rem;
  color: var(--text);
}

.prose li {
  margin-bottom: 0.45rem;
}

.prose li::marker {
  color: var(--accent);
}

.highlight-box {
  background: var(--bg-soft);
  border-left: 3px solid var(--accent);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  border-radius: 0 8px 8px 0;
}

.highlight-box p:last-child {
  margin-bottom: 0;
}

.toc {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0 2rem;
}

.toc h2 {
  font-size: 1.1rem;
  margin: 0 0 0.75rem;
}

.toc ol {
  margin: 0;
  padding-left: 1.25rem;
}

.toc li {
  margin-bottom: 0.35rem;
}

.toc a {
  color: var(--text-muted);
}

.toc a:hover {
  color: var(--accent-hover);
}

/* Related links */
.related {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.related a {
  display: block;
  padding: 0.85rem 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
}

.related a:hover {
  border-color: var(--accent);
  color: var(--accent-hover);
}

/* Page header for inner pages */
.page-hero {
  padding: 2.5rem 0 1.5rem;
  border-bottom: 1px solid var(--border);
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  margin: 0 0 0.75rem;
}

.breadcrumb {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--accent-hover);
}

.breadcrumb span {
  margin: 0 0.35rem;
  opacity: 0.5;
}

/* Error pages */
.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 0;
}

.error-page .code {
  font-family: var(--font-display);
  font-size: clamp(4rem, 12vw, 7rem);
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin: 0 0 0.5rem;
}

.error-page h1 {
  font-size: 1.5rem;
  margin: 0 0 1rem;
}

.error-page p {
  color: var(--text-muted);
  max-width: 420px;
  margin: 0 auto 1.5rem;
}

/* Footer */
.site-footer {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  padding: 2.5rem 0 1.5rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  margin: 0 0 0.75rem;
}

.footer-brand a {
  color: var(--text);
  text-decoration: none;
}

.site-footer p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0 0 0.75rem;
}

.site-footer h3 {
  font-size: 0.95rem;
  margin: 0 0 0.75rem;
  color: var(--text);
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li {
  margin-bottom: 0.4rem;
}

.site-footer a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.site-footer a:hover {
  color: var(--accent-hover);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.age-notice {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Mobile */
@media (max-width: 860px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(12, 13, 16, 0.98);
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .site-nav.is-open {
    max-height: 360px;
  }

  .site-nav ul {
    flex-direction: column;
    padding: 0.75rem 1rem 1.25rem;
    gap: 0;
  }

  .site-nav li {
    border-bottom: 1px solid var(--border);
  }

  .site-nav a {
    display: block;
    padding: 0.85rem 0.25rem;
  }

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

  .hero-visual {
    order: -1;
  }

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

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 2rem 0 1.75rem;
  }

  .section {
    padding: 2rem 0;
  }
}

/* Top ads / APP 推荐 */
#applist {
  border-bottom: 1px solid var(--border);
  background: rgba(28, 31, 39, 0.65);
  padding: 0.65rem 0.75rem 0.85rem;
}

#applist .applist-title {
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
}

#ads {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  background: transparent;
  margin: 0;
  max-width: var(--max);
  margin-inline: auto;
}

#ads > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 70px;
  box-sizing: border-box;
}

#ads figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#ads a {
  display: inline-block;
  text-decoration: none;
  border-radius: 15px;
}

#ads img {
  width: 65px;
  height: 65px;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  transition: transform 180ms ease, box-shadow 180ms ease;
  display: block;
  border: none;
  background: linear-gradient(135deg, #fff, #f3f3f3);
}

#ads img:hover {
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 10px 24px rgba(225, 29, 72, 0.28);
}

#ads figcaption,
#ads .caption {
  height: 15px;
  max-width: 100px;
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
