/* ============================================================
   Read2Play 官网本地版样式
   复刻自万小智生成版（React + Tailwind）的品牌设计：
   深藏蓝 #1C2B4A / 金色 #E3B04B / 纸白 #F2F6FB，学术冒险风
   ============================================================ */

:root {
  --navy: #1c2b4a;
  --navy-light: #243556;
  --gold: #e3b04b;
  --gold-dark: #c99a3a;
  --paper: #f2f6fb;
  --gold-border: rgba(227, 176, 75, 0.3);

  --radius-btn: 8px;
  --radius-card: 12px;
  --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.25);
  --shadow-card-hover: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-gold-glow: 0 0 24px rgba(227, 176, 75, 0.25);

  --ease-brand: cubic-bezier(0.4, 0, 0.2, 1);

  --font-sans: "Source Han Sans SC", "Noto Sans SC", "PingFang SC",
    "Microsoft YaHei", system-ui, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  border-color: var(--gold-border);
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--navy);
  color: var(--paper);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

/* ---------- 通用布局 ---------- */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.container-narrow {
  max-width: 800px;
}

.center {
  text-align: center;
}

.layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---------- 图标 ---------- */

.icon {
  width: 1.25em;
  height: 1.25em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.icon-sm {
  width: 1em;
  height: 1em;
}

.icon-lg {
  width: 2em;
  height: 2em;
}

.icon-xl {
  width: 2.5em;
  height: 2.5em;
}

.is-hidden {
  display: none;
}

/* ---------- 按钮 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-weight: 600;
  border-radius: var(--radius-btn);
  transition: all 0.3s var(--ease-brand);
}

.btn-gold {
  background: var(--gold);
  color: var(--navy);
}

.btn-gold:hover {
  background: var(--gold-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold-glow);
}

.btn-sm {
  padding: 8px 20px;
  font-size: 14px;
}

.btn-lg {
  padding: 14px 40px;
  font-size: 16px;
}

.btn-block {
  width: 100%;
}

/* ---------- 顶部导航 ---------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  transition: all 0.3s var(--ease-brand);
  background: transparent;
}

.site-header.scrolled {
  background: rgba(28, 43, 74, 0.95);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-card);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand .icon {
  width: 24px;
  height: 24px;
  color: var(--gold);
  transition: transform 0.3s var(--ease-brand);
}

.brand:hover .icon {
  transform: scale(1.1);
}

.brand span {
  font-size: 18px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.05em;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-desktop > a:not(.btn) {
  font-size: 14px;
  color: rgba(242, 246, 251, 0.8);
  transition: color 0.3s;
}

.nav-desktop > a:not(.btn):hover {
  color: var(--gold);
}

.nav-toggle {
  display: none;
  color: rgba(242, 246, 251, 0.8);
  padding: 8px;
}

.nav-toggle:hover {
  color: var(--gold);
}

.nav-mobile {
  background: rgba(36, 53, 86, 0.95);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--gold-border);
}

.nav-mobile nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.nav-mobile a:not(.btn) {
  font-size: 14px;
  color: rgba(242, 246, 251, 0.8);
  padding: 8px 0;
  transition: color 0.3s;
}

.nav-mobile a:not(.btn):hover {
  color: var(--gold);
}

@media (max-width: 767px) {
  .nav-desktop {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }
}

/* ---------- Hero 首屏 ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(28, 43, 74, 0.7);
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 0 20px;
  max-width: 720px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease-brand), transform 0.8s var(--ease-brand);
}

.hero-content.entered {
  opacity: 1;
  transform: none;
}

.hero-content h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  color: var(--gold);
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: 0.05em;
}

.hero-slogan {
  font-size: clamp(20px, 3vw, 24px);
  color: var(--paper);
  line-height: 1.4;
  margin-bottom: 16px;
  font-weight: 500;
}

.hero-sub {
  font-size: 16px;
  color: rgba(242, 246, 251, 0.9);
  line-height: 1.7;
  margin-bottom: 40px;
  max-width: 560px;
  margin-inline: auto;
}

.hero-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(227, 176, 75, 0.6);
  animation: hint-bounce 2s infinite;
}

@keyframes hint-bounce {
  0%,
  100% {
    transform: translate(-50%, -25%);
  }

  50% {
    transform: translate(-50%, 25%);
  }
}

/* ---------- 区块通用 ---------- */

.section {
  padding: 64px 0;
}

@media (min-width: 768px) {
  .section {
    padding: 96px 0;
  }
}

.section-alt {
  background: rgba(36, 53, 86, 0.5);
}

.section-title {
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 700;
  color: var(--gold);
  text-align: center;
  line-height: 1.3;
  margin-bottom: 16px;
}

.section-sub {
  font-size: 16px;
  color: rgba(242, 246, 251, 0.8);
  text-align: center;
  margin-bottom: 64px;
  max-width: 480px;
  margin-inline: auto;
}

/* 滚动渐入（IntersectionObserver 驱动） */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s var(--ease-brand), transform 0.5s var(--ease-brand);
  transition-delay: var(--d, 0s);
}

.reveal.in-view {
  opacity: 1;
  transform: none;
}

/* ---------- 核心玩法 ---------- */

.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  position: relative;
}

.steps-line {
  display: none;
}

.step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.step-icon {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--navy-light);
  border: 2px solid var(--gold-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  margin-bottom: 20px;
  transition: all 0.3s var(--ease-brand);
}

.step:hover .step-icon {
  border-color: var(--gold);
  transform: scale(1.05);
}

.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--navy);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.step h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--paper);
  margin-bottom: 8px;
}

.step p {
  font-size: 14px;
  color: rgba(242, 246, 251, 0.8);
  line-height: 1.6;
}

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

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

  .steps-line {
    display: block;
    position: absolute;
    top: 48px;
    left: 12.5%;
    right: 12.5%;
    height: 1px;
    background: linear-gradient(
      to right,
      transparent,
      rgba(227, 176, 75, 0.4),
      transparent
    );
  }
}

/* ---------- 功能总览 ---------- */

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

.feature-card {
  padding: 24px;
  background: var(--navy);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-card);
  transition: all 0.3s var(--ease-brand);
}

.feature-card:hover {
  background: var(--navy-light);
  border-color: rgba(227, 176, 75, 0.6);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

.feature-icon {
  color: var(--gold);
  margin-bottom: 16px;
  transition: transform 0.3s var(--ease-brand);
}

.feature-card:hover .feature-icon {
  transform: scale(1.1);
}

.feature-card h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--paper);
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 14px;
  color: rgba(242, 246, 251, 0.8);
  line-height: 1.6;
}

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

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

/* ---------- 下载区 ---------- */

.download-section {
  position: relative;
  overflow: hidden;
  background: var(--navy);
}

.glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: rgba(227, 176, 75, 0.05);
  filter: blur(48px);
  pointer-events: none;
}

.download-section .container {
  position: relative;
  z-index: 10;
}

.download-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.download-buttons .btn {
  width: 100%;
}

.download-note {
  font-size: 12px;
  color: rgba(242, 246, 251, 0.6);
  margin-top: 24px;
}

/* 后端有安装包时按钮上追加的版本/大小小字 */
.dl-meta {
  font-size: 12px;
  font-weight: 400;
  opacity: 0.75;
}

@media (min-width: 640px) {
  .download-buttons {
    flex-direction: row;
  }

  .download-buttons .btn {
    width: auto;
  }
}

/* ---------- 常见问题 ---------- */

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  text-align: left;
  transition: background-color 0.3s;
}

.faq-question:hover {
  background: rgba(36, 53, 86, 0.5);
}

.faq-question span {
  font-size: 16px;
  font-weight: 600;
  color: var(--paper);
  padding-right: 16px;
}

.faq-question .icon {
  color: var(--gold);
  transition: transform 0.3s var(--ease-brand);
}

.faq-item.open .faq-question .icon {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s var(--ease-brand);
}

.faq-answer p {
  padding: 0 24px 16px;
  font-size: 14px;
  color: rgba(242, 246, 251, 0.8);
  line-height: 1.6;
}

/* ---------- 页脚 ---------- */

.site-footer {
  padding: 32px 0;
  background: var(--navy);
  border-top: 1px solid var(--gold-border);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gold);
}

.footer-brand span {
  font-size: 14px;
  font-weight: 600;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.footer-links a {
  font-size: 14px;
  color: var(--gold);
  transition: opacity 0.3s;
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-copy {
  font-size: 12px;
  color: rgba(242, 246, 251, 0.6);
}

@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
  }
}

/* ---------- 无 JS 降级：不隐藏内容 ---------- */

.no-js .reveal,
.no-js .hero-content {
  opacity: 1;
  transform: none;
}
