:root {
  --ink: #0B0D0C;
  --paper: #E7DDC6;
  --cinnabar: #9E3B2F;
  --jade: #4E7568;
  --gold: #C9A86A;
  --ink-light: #1A1D1B;
  --text-main: #E7DDC6;
  --text-muted: #A8A08F;
  --font-serif: "Noto Serif SC", "Songti SC", "SimSun", serif;
  --font-sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --max-width: 1280px;
  --radius: 6px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--ink);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--gold);
}

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

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.3;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  letter-spacing: 0.1em;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  color: var(--gold);
  margin-bottom: 16px;
}

h3 {
  font-size: 1.25rem;
  color: var(--paper);
  margin-bottom: 8px;
}

p {
  color: var(--text-muted);
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 16px 0;
  transition: background-color 0.4s ease, border-bottom 0.4s ease;
}

.site-header.scrolled {
  background-color: rgba(11, 13, 12, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(201, 168, 106, 0.2);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--paper);
}

.logo-area img {
  height: 32px;
  width: auto;
}

.nav-links {
  display: none;
  gap: 32px;
  font-size: 0.95rem;
}

.nav-links a {
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--gold);
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--cinnabar);
  color: var(--paper);
}

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

.btn-outline {
  border-color: var(--gold);
  color: var(--gold);
  background: transparent;
}

.btn-outline:hover {
  background-color: rgba(201, 168, 106, 0.1);
}

.header-cta {
  display: none;
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background-image: url('images/hero-cover-wz4m.jpg');
  background-size: cover;
  background-position: center;
  padding-top: 80px;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(11,13,12,0.9) 0%, rgba(11,13,12,0.6) 50%, rgba(11,13,12,0.1) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--gold);
  margin-bottom: 24px;
  letter-spacing: 0.2em;
}

.hero-desc {
  font-size: 1.1rem;
  margin-bottom: 32px;
  color: var(--paper);
  opacity: 0.9;
}

.platform-tags {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.tag {
  font-size: 0.85rem;
  padding: 4px 12px;
  border: 1px solid rgba(231, 221, 198, 0.3);
  border-radius: 20px;
  color: var(--paper);
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-meta {
  margin-top: 48px;
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

/* Overview Bar */
.overview-bar {
  background-color: var(--ink-light);
  border-y: 1px solid rgba(201, 168, 106, 0.2);
  padding: 24px 0;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  align-items: center;
}

@media (min-width: 768px) {
  .overview-grid {
    grid-template-columns: repeat(4, 1fr) auto;
  }
}

.overview-item {
  display: flex;
  flex-direction: column;
}

.overview-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.overview-value {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--gold);
  font-weight: 700;
}

/* Sections Common */
.section {
  padding: 96px 0;
}

.section-header {
  margin-bottom: 48px;
  text-align: center;
}

.section-header p {
  max-width: 600px;
  margin: 0 auto;
}

/* Intro */
.intro-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
}

@media (min-width: 1024px) {
  .intro-grid {
    grid-template-columns: 1fr 1.2fr;
  }
}

.intro-img {
  border-radius: var(--radius);
  border: 1px solid var(--gold);
  overflow: hidden;
}

.intro-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.intro-img:hover img {
  transform: scale(1.05);
}

.intro-text p {
  margin-bottom: 20px;
  font-size: 1.05rem;
}

.pull-quote {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--gold);
  border-left: 3px solid var(--cinnabar);
  padding-left: 20px;
  margin: 32px 0;
  line-height: 1.4;
}

/* Features */
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 768px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature-card {
  background-color: var(--ink-light);
  border: 1px solid rgba(201, 168, 106, 0.3);
  border-radius: var(--radius);
  padding: 32px 24px;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.feature-card:hover {
  border-color: var(--gold);
  transform: translateY(-4px);
}

.feature-card p {
  font-size: 0.95rem;
}

/* Characters */
.characters-scroll {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding-bottom: 24px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--gold) var(--ink-light);
}

.characters-scroll::-webkit-scrollbar {
  height: 6px;
}

.characters-scroll::-webkit-scrollbar-track {
  background: var(--ink-light);
  border-radius: 3px;
}

.characters-scroll::-webkit-scrollbar-thumb {
  background: var(--gold);
  border-radius: 3px;
}

.char-card {
  flex: 0 0 240px;
  scroll-snap-align: start;
  background-color: var(--ink-light);
  border: 1px solid rgba(201, 168, 106, 0.3);
  border-radius: var(--radius);
  overflow: hidden;
}

.char-img {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background-color: #000;
}

.char-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.char-card:hover .char-img img {
  transform: scale(1.05);
}

.char-info {
  padding: 16px;
}

.char-name {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--paper);
  font-weight: 700;
}

.char-role {
  font-size: 0.85rem;
  color: var(--gold);
  margin-bottom: 8px;
}

.char-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* World */
.world-scene {
  margin-bottom: 32px;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}

.world-scene img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.8s ease;
}

.world-scene:hover img {
  transform: scale(1.02);
}

.scene-caption {
  position: absolute;
  bottom: 16px;
  left: 16px;
  background: rgba(11, 13, 12, 0.8);
  padding: 8px 16px;
  border-radius: var(--radius);
  font-family: var(--font-serif);
  color: var(--gold);
  font-size: 1.1rem;
}

/* Loop */
.loop-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  counter-reset: step;
}

@media (min-width: 768px) {
  .loop-steps {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }
}

.loop-step {
  background: var(--ink-light);
  border: 1px solid rgba(201, 168, 106, 0.2);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
  text-align: center;
}

.loop-step::before {
  counter-increment: step;
  content: "0" counter(step);
  display: block;
  font-family: var(--font-serif);
  font-size: 2rem;
  color: rgba(201, 168, 106, 0.3);
  margin-bottom: 12px;
}

.loop-step h3 {
  font-size: 1.1rem;
  color: var(--paper);
}

/* Download */
.download-wrapper {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  background-color: var(--ink-light);
  border: 1px solid rgba(201, 168, 106, 0.3);
  border-radius: var(--radius);
  padding: 48px 24px;
}

@media (min-width: 1024px) {
  .download-wrapper {
    grid-template-columns: 1fr 1fr;
    padding: 64px 48px;
  }
}

.download-info h2 {
  text-align: left;
}

.download-info p {
  margin-bottom: 24px;
  font-size: 1.05rem;
}

.download-checkmarks {
  margin-bottom: 24px;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--paper);
}

.check-icon {
  color: var(--jade);
  font-weight: bold;
}

.age-warning {
  font-size: 0.8rem;
  color: var(--cinnabar);
  margin-top: 24px;
}

.download-card {
  background-color: #141715;
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  padding: 24px;
}

.platform-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  background: var(--ink);
  padding: 4px;
  border-radius: var(--radius);
}

.tab-btn {
  flex: 1;
  padding: 10px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-weight: 600;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.tab-btn.active {
  background: var(--gold);
  color: var(--ink);
}

.download-btn-large {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 16px;
  font-size: 1.2rem;
  margin-bottom: 16px;
}

.download-details {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.8;
}

.sha-box {
  background: var(--ink);
  padding: 8px 12px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.sha-text {
  word-break: break-all;
  color: var(--text-muted);
}

.copy-btn {
  background: transparent;
  border: 1px solid var(--text-muted);
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: 2px;
  cursor: pointer;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.copy-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.mirror-links {
  display: flex;
  gap: 16px;
  font-size: 0.85rem;
  margin-bottom: 24px;
}

.mirror-links a {
  color: var(--jade);
  border-bottom: 1px dashed var(--jade);
}

.install-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 32px;
}

.install-step {
  background: rgba(11, 13, 12, 0.5);
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid rgba(201, 168, 106, 0.1);
}

.install-step h4 {
  font-size: 0.9rem;
  color: var(--gold);
  margin-bottom: 4px;
}

.install-step p {
  font-size: 0.8rem;
}

/* FAQ */
.faq-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 768px) {
  .faq-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.faq-item {
  border: 1px solid rgba(201, 168, 106, 0.2);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--ink-light);
}

.faq-q {
  width: 100%;
  text-align: left;
  padding: 20px;
  background: transparent;
  border: none;
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-q::after {
  content: '+';
  color: var(--gold);
  font-size: 1.5rem;
  line-height: 1;
  transition: transform 0.3s ease;
}

.faq-item.open .faq-q::after {
  transform: rotate(45deg);
}

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
  padding: 0 20px;
}

.faq-item.open .faq-a {
  padding: 0 20px 20px;
  max-height: 500px;
}

.faq-a p {
  font-size: 0.9rem;
  margin-bottom: 0;
}

/* Final CTA */
.final-cta {
  position: relative;
  padding: 120px 0;
  text-align: center;
  background-image: url('images/screenshot-ss4.webp');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.final-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(11, 13, 12, 0.8);
}

.final-cta .container {
  position: relative;
  z-index: 2;
}

.final-cta h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--paper);
  margin-bottom: 32px;
}

/* Footer */
.site-footer {
  background-color: #050605;
  padding: 64px 0 24px;
  border-top: 1px solid rgba(201, 168, 106, 0.2);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-bottom: 48px;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.footer-col h4 {
  color: var(--gold);
  margin-bottom: 16px;
  font-size: 1rem;
}

.footer-col p, .footer-col a {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.footer-bottom {
  text-align: center;
  font-size: 0.8rem;
  color: #666;
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 24px;
}

/* Age Modal */
.age-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.age-modal.show {
  display: flex;
}

.age-modal-content {
  background: var(--ink-light);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 400px;
  text-align: center;
}

.age-modal-content h2 {
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.age-modal-content p {
  margin-bottom: 24px;
  font-size: 0.95rem;
}

.age-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* Mobile Download Bar */
.mobile-dl-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(11, 13, 12, 0.95);
  backdrop-filter: blur(8px);
  padding: 12px 24px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(201, 168, 106, 0.3);
  z-index: 99;
  justify-content: center;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.mobile-dl-bar.visible {
  transform: translateY(0);
}

@media (max-width: 767px) {
  .mobile-dl-bar {
    display: flex;
  }
}

.mobile-dl-bar .btn {
  width: 100%;
  padding: 14px;
}

/* Utilities */
.text-center { text-align: center; }
.mt-8 { margin-top: 32px; }

/* Responsive adjustments */
@media (min-width: 768px) {
  .nav-links { display: flex; }
  .header-cta { display: block; }
  .hero-content { padding-right: 48px; }
}

@media (max-width: 767px) {
  .section { padding: 64px 0; }
  .hero { min-height: 80vh; }
  .final-cta { padding: 80px 0; }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Animations */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}