:root {
  --bg: #0c0d10;
  --bg-soft: #14161c;
  --bg-card: #1a1d25;
  --line: #2a2e3a;
  --text: #e8eaef;
  --muted: #9aa3b5;
  --brand: #e11d48;
  --brand-soft: #fb7185;
  --accent: #f59e0b;
  --max: 1100px;
  --radius: 12px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  --font: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --display: "Noto Serif SC", "Songti SC", "SimSun", serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(225, 29, 72, 0.18), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(245, 158, 11, 0.12), transparent 50%),
    linear-gradient(180deg, #0c0d10 0%, #101218 40%, #0c0d10 100%);
  line-height: 1.75;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

#tx-ads-bar img {
  max-width: none;
  height: 65px;
}

a {
  color: var(--brand-soft);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #fff;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(12, 13, 16, 0.86);
  border-bottom: 1px solid rgba(42, 46, 58, 0.8);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  position: relative;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
}

.brand span {
  font-size: 1.05rem;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  align-items: center;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.95rem;
}

.nav-links a:hover,
.nav-links a.active {
  color: #fff;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  margin: 0;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  flex-shrink: 0;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.hero {
  padding: 3.2rem 0 2rem;
}

.hero-inner {
  display: grid;
  gap: 1.5rem;
  align-items: end;
}

.hero h1 {
  font-family: var(--display);
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  line-height: 1.25;
  margin: 0 0 0.8rem;
  color: #fff;
}

.hero .lead {
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 48rem;
  margin: 0;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.2rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(26, 29, 37, 0.8);
  color: var(--muted);
  font-size: 0.85rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.4rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.2rem;
  border-radius: 10px;
  font-weight: 600;
  border: 1px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, #e11d48, #be123c);
  color: #fff;
}

.btn-primary:hover {
  color: #fff;
  filter: brightness(1.08);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.section {
  padding: 2.4rem 0;
}

.section-title {
  font-family: var(--display);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin: 0 0 0.6rem;
  color: #fff;
}

.section-desc {
  color: var(--muted);
  margin: 0 0 1.5rem;
  max-width: 46rem;
}

.prose h2,
.prose h3 {
  color: #fff;
  line-height: 1.35;
  margin-top: 2rem;
}

.prose h2 {
  font-family: var(--display);
  font-size: 1.45rem;
  border-left: 3px solid var(--brand);
  padding-left: 0.75rem;
}

.prose h3 {
  font-size: 1.15rem;
}

.prose p {
  margin: 0.9rem 0;
  color: #d5dae6;
}

.prose ul,
.prose ol {
  margin: 0.8rem 0 1rem 1.2rem;
  color: #d5dae6;
}

.prose li {
  margin: 0.35rem 0;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.gallery.two {
  grid-template-columns: repeat(2, 1fr);
}

.card-media {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.card-media:hover {
  transform: translateY(-3px);
  border-color: rgba(225, 29, 72, 0.45);
}

.card-media img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  object-position: top;
  background: #000;
}

.card-media figcaption {
  padding: 0.85rem 1rem 1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.card-media strong {
  display: block;
  color: #fff;
  margin-bottom: 0.25rem;
}

.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.5rem;
  align-items: start;
}

.feature-list {
  display: grid;
  gap: 0.9rem;
}

.feature-item {
  background: rgba(26, 29, 37, 0.75);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}

.feature-item h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  color: #fff;
}

.feature-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.toc {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  margin: 1.5rem 0 2rem;
}

.toc h2 {
  margin: 0 0 0.7rem;
  font-size: 1.1rem;
  border: 0;
  padding: 0;
}

.toc ol {
  margin: 0;
  padding-left: 1.2rem;
}

.toc a {
  color: var(--muted);
}

.toc a:hover {
  color: var(--brand-soft);
}

.internal-box {
  margin: 1.8rem 0;
  padding: 1.1rem 1.2rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.12), rgba(245, 158, 11, 0.08));
  border: 1px solid rgba(225, 29, 72, 0.28);
}

.internal-box p {
  margin: 0;
}

.site-footer {
  margin-top: 3rem;
  border-top: 1px solid var(--line);
  background: #090a0d;
  padding: 2.2rem 0 2.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 1.5rem;
}

.site-footer h3 {
  margin: 0 0 0.7rem;
  font-size: 1rem;
  color: #fff;
}

.site-footer p,
.site-footer a {
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li {
  margin: 0.35rem 0;
}

.copyright {
  margin-top: 1.6rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: #6f788a;
  font-size: 0.85rem;
}

.error-page {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 3rem 1rem;
}

.error-page h1 {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  margin: 0;
  color: var(--brand);
  font-family: var(--display);
}

.error-page p {
  color: var(--muted);
  max-width: 32rem;
  margin: 0.8rem auto 1.4rem;
}

.page-hero {
  padding: 2.2rem 0 0.5rem;
}

.page-hero h1 {
  font-family: var(--display);
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  margin: 0 0 0.6rem;
}

.page-hero p {
  color: var(--muted);
  margin: 0;
  max-width: 42rem;
}

.legal .prose {
  background: rgba(20, 22, 28, 0.7);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem 1.8rem;
}

@media (max-width: 900px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .split,
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .menu-toggle {
    display: inline-flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    left: auto;
    width: min(220px, calc(100vw - 2rem));
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.45rem;
    margin: 0;
    background: rgba(20, 22, 28, 0.98);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
    z-index: 60;
  }

  .nav-links a {
    display: block;
    padding: 0.7rem 0.85rem;
    border-radius: 8px;
  }

  .nav-links a:hover,
  .nav-links a.active {
    background: rgba(225, 29, 72, 0.12);
  }

  .nav-links.open {
    display: flex;
  }

  .nav {
    flex-wrap: nowrap;
  }

  .gallery,
  .gallery.two {
    grid-template-columns: 1fr;
  }

  .card-media img {
    aspect-ratio: 3 / 4;
  }

  .hero {
    padding-top: 2rem;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-inner,
.section .container > *:not(.gallery) {
  animation: rise 0.55s ease both;
}

.gallery .card-media {
  animation: rise 0.6s ease both;
}

.gallery .card-media:nth-child(2) { animation-delay: 0.05s; }
.gallery .card-media:nth-child(3) { animation-delay: 0.1s; }
.gallery .card-media:nth-child(4) { animation-delay: 0.15s; }
.gallery .card-media:nth-child(5) { animation-delay: 0.2s; }
.gallery .card-media:nth-child(6) { animation-delay: 0.25s; }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
