/* ============================================================
   爱与礼仪的培训项目 - 主题站样式
   深色主题：#0f0f23 / #1a1a2e 渐变 + 品红强调色 #e94560
   ============================================================ */

/* ===== 基础变量 ===== */
:root {
  --bg-dark: #0f0f23;
  --bg-mid: #1a1a2e;
  --bg-light: #16213e;
  --accent: #e94560;
  --accent-hover: #ff5c75;
  --text: #ffffff;
  --text-muted: #b8b8d4;
  --card-bg: rgba(255, 255, 255, 0.04);
  --card-border: rgba(255, 255, 255, 0.08);
  --radius: 14px;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  --shadow-hover: 0 12px 40px rgba(233, 69, 96, 0.25);
  --transition: 0.3s ease;
}

/* ===== 重置 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html {
  scroll-behavior: smooth; scroll-padding-top: 80px;
  overflow-x: hidden;        /* 防止移动端横向滑动（配合 body 双重保险） */
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-mid) 100%);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  position: relative;        /* 建立定位上下文，约束绝对定位子元素 */
  width: 100%;
}
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; display: block; }
ul { list-style: none; }

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

/* ===== 导航栏 ===== */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(15, 15, 35, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--card-border);
}
.navbar {
  max-width: 1200px; margin: 0 auto; padding: 0 20px;
  height: 64px; display: flex; align-items: center; justify-content: space-between;
}
.logo {
  font-size: 1.15rem; font-weight: 700; color: var(--text);
  letter-spacing: 0.5px;
}
.logo:hover { color: var(--accent); }
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  color: var(--text-muted); font-size: 0.95rem; font-weight: 500;
  position: relative;
}
.nav-links a::after {
  content: ""; position: absolute; bottom: -6px; left: 0;
  width: 0; height: 2px; background: var(--accent); transition: width var(--transition);
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 6px;
}
.nav-toggle span {
  width: 24px; height: 2px; background: var(--text); border-radius: 2px;
  transition: var(--transition);
}
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Hero 区 ===== */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  justify-content: center; text-align: center; padding: 100px 20px 60px;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  max-width: 100%;           /* 额外保险：防止背景层溢出视口 */
  background-image:
    linear-gradient(135deg, rgba(15, 15, 35, 0.82) 0%, rgba(26, 26, 46, 0.85) 100%),
    radial-gradient(circle at 20% 30%, rgba(233, 69, 96, 0.18) 0%, transparent 45%),
    url("6.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: -1;
}
.hero-content { max-width: 820px; }
.version-badge {
  display: inline-block; padding: 4px 14px; border-radius: 20px;
  background: rgba(233, 69, 96, 0.15); border: 1px solid var(--accent);
  color: var(--accent); font-size: 0.85rem; font-weight: 600; margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(2.2rem, 6vw, 4rem); font-weight: 800;
  letter-spacing: 2px; margin-bottom: 24px;
  background: linear-gradient(135deg, #fff 0%, var(--accent) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-tagline {
  color: var(--text-muted); font-size: 1.05rem; margin-bottom: 32px;
  white-space: pre-line;
}
.feature-tags, .platform-tags {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 16px;
}
.tag {
  padding: 6px 16px; border-radius: 20px; font-size: 0.85rem; font-weight: 500;
  background: rgba(233, 69, 96, 0.12); color: var(--accent);
  border: 1px solid rgba(233, 69, 96, 0.3);
}
.tag-outline {
  background: transparent; color: var(--text-muted);
  border: 1px solid var(--card-border);
}
.info-cards {
  display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin: 36px 0;
}
.info-card {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 16px 24px; min-width: 130px;
}
.info-label { display: block; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 6px; }
.info-value { display: block; font-size: 1.1rem; font-weight: 700; color: var(--text); }

/* ===== 按钮 ===== */
.btn {
  display: inline-block; padding: 12px 32px; border-radius: 30px;
  font-size: 1rem; font-weight: 600; cursor: pointer; border: none;
  transition: all var(--transition);
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #c81e45 100%);
  color: #fff; box-shadow: 0 4px 20px rgba(233, 69, 96, 0.4);
}
.btn-primary:hover {
  transform: translateY(-2px); color: #fff;
  box-shadow: 0 8px 30px rgba(233, 69, 96, 0.6);
}
.btn-large { padding: 16px 44px; font-size: 1.1rem; }
.cta-btn { margin-top: 12px; }

/* ===== 通用区块 ===== */
.section { padding: 80px 0; }
.section-alt { background: rgba(255, 255, 255, 0.015); }
.section-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 700; text-align: center;
  margin-bottom: 12px;
}
.section-subtitle {
  text-align: center; color: var(--text-muted); margin-bottom: 48px; font-size: 1rem;
}

/* ===== 最新资讯 ===== */
.news-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.news-card {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow);
  transition: all var(--transition);
}
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: rgba(233, 69, 96, 0.3); }
.news-category {
  display: inline-block; padding: 3px 12px; border-radius: 12px;
  background: rgba(233, 69, 96, 0.15); color: var(--accent);
  font-size: 0.78rem; font-weight: 600; margin-bottom: 10px;
}
.news-date { display: block; color: var(--text-muted); font-size: 0.85rem; margin-bottom: 12px; }
.news-card h3 { font-size: 1.15rem; margin-bottom: 12px; }
.news-card p { color: var(--text-muted); font-size: 0.92rem; margin-bottom: 16px; }
.read-more {
  font-size: 0.9rem; font-weight: 600; background: none; border: none;
  color: var(--accent); cursor: pointer; padding: 0; font-family: inherit;
  transition: color var(--transition);
}
.read-more:hover { color: var(--accent-hover); }

/* ===== 游戏截图 ===== */
.screenshot-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.screenshot-item {
  position: relative; border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 3 / 2; box-shadow: var(--shadow); cursor: pointer;
}
.screenshot-item img {
  width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease;
}
.screenshot-item:hover img { transform: scale(1.08); }
.screenshot-item figcaption {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  justify-content: flex-end; padding: 20px;
  background: linear-gradient(to top, rgba(15, 15, 35, 0.9) 0%, transparent 60%);
  opacity: 0; transition: opacity var(--transition);
}
.screenshot-item:hover figcaption { opacity: 1; }
.screenshot-item figcaption strong { font-size: 1.05rem; color: #fff; display: block; margin-bottom: 4px; }
.screenshot-item figcaption span { font-size: 0.85rem; color: var(--text-muted); }

/* ===== 版本历史时间线 ===== */
.timeline { position: relative; max-width: 760px; margin: 0 auto; padding-left: 30px; }
.timeline::before {
  content: ""; position: absolute; left: 8px; top: 0; bottom: 0;
  width: 2px; background: linear-gradient(to bottom, var(--accent), transparent);
}
.timeline-item { position: relative; margin-bottom: 36px; }
.timeline-dot {
  position: absolute; left: -30px; top: 6px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--accent);
  border: 3px solid var(--bg-dark); box-shadow: 0 0 0 2px var(--accent);
}
.timeline-card {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow);
}
.timeline-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; flex-wrap: wrap; gap: 8px; }
.timeline-header h3 { color: var(--accent); font-size: 1.25rem; }
.timeline-date { color: var(--text-muted); font-size: 0.88rem; }
.timeline-meta { display: flex; gap: 20px; flex-wrap: wrap; color: var(--text-muted); font-size: 0.85rem; margin-bottom: 16px; }
.update-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px; }
.update-group h4 { font-size: 0.9rem; color: var(--accent); margin-bottom: 8px; }
.update-group ul { padding-left: 18px; }
.update-group li { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 4px; list-style: disc; }

/* ===== 用户评价 ===== */
.reviews-summary {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px;
  max-width: 800px; margin: 0 auto 40px; align-items: center;
}
.rating-overall { text-align: center; }
.rating-big { display: block; font-size: 4rem; font-weight: 800; color: var(--accent); line-height: 1; }
.rating-stars { display: block; color: #ffc107; font-size: 1.4rem; margin: 8px 0; }
.rating-count { color: var(--text-muted); font-size: 0.85rem; }
.rating-bars { display: flex; flex-direction: column; gap: 10px; }
.rating-bar { display: grid; grid-template-columns: 50px 1fr 40px; align-items: center; gap: 10px; font-size: 0.85rem; color: var(--text-muted); }
.bar { height: 8px; background: rgba(255, 255, 255, 0.08); border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent), #ff8a65); border-radius: 4px; }

.keywords { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-bottom: 40px; }
.keyword {
  padding: 6px 18px; border-radius: 20px; font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--card-border);
  color: var(--text-muted); transition: all var(--transition);
}
.keyword:hover { border-color: var(--accent); color: var(--accent); }

.review-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.review-card {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow);
}
.review-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.review-stars { color: #ffc107; font-size: 0.9rem; }
.review-card p { color: var(--text-muted); font-size: 0.92rem; }

/* ===== FAQ ===== */
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-item {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: var(--radius); margin-bottom: 14px; overflow: hidden;
}
.faq-item summary {
  padding: 18px 24px; cursor: pointer; font-weight: 600; font-size: 1rem;
  list-style: none; position: relative; padding-right: 50px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; position: absolute; right: 24px; top: 50%; transform: translateY(-50%);
  font-size: 1.4rem; color: var(--accent); transition: transform var(--transition);
}
.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-item p { padding: 0 24px 18px; color: var(--text-muted); font-size: 0.92rem; }

/* ===== 底部 CTA ===== */
.cta-section {
  text-align: center; padding: 80px 20px;
  background: linear-gradient(135deg, rgba(233, 69, 96, 0.1) 0%, rgba(83, 52, 131, 0.15) 100%);
}
.cta-section h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin-bottom: 12px; }
.cta-section p { color: var(--text-muted); margin-bottom: 28px; }

/* ===== 页脚 ===== */
.site-footer {
  background: var(--bg-dark); border-top: 1px solid var(--card-border);
  padding: 60px 0 30px;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 40px;
}
.footer-col h3 { font-size: 1.05rem; margin-bottom: 16px; color: var(--text); }
.footer-col p { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 10px; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: var(--text-muted); font-size: 0.88rem; }
.footer-links a:hover { color: var(--accent); }
.footer-legal-links a { font-size: 0.85rem; }
.disclaimer { font-size: 0.8rem; color: var(--text-muted); margin-top: 12px; opacity: 0.8; }

/* ===== 弹层 ===== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay[hidden] { display: none; }
.modal {
  background: var(--bg-mid); border: 1px solid var(--card-border);
  border-radius: var(--radius); max-width: 640px; width: 100%;
  max-height: 80vh; overflow-y: auto; padding: 36px; position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.modal h2 { color: var(--accent); margin-bottom: 8px; font-size: 1.4rem; }
.modal-meta { color: var(--text-muted); font-size: 0.82rem; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--card-border); }
.modal-body h3 { font-size: 1rem; margin: 18px 0 8px; color: var(--text); }
.modal-body p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 8px; }
.modal-close {
  position: absolute; top: 16px; right: 20px; background: none; border: none;
  color: var(--text-muted); font-size: 1.8rem; cursor: pointer; line-height: 1;
}
.modal-close:hover { color: var(--accent); }

/* ===== 滚动淡入动画 ===== */
.fade-in {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed; top: 64px; right: 0; width: 240px; height: calc(100vh - 64px);
    background: rgba(15, 15, 35, 0.97); backdrop-filter: blur(12px);
    flex-direction: column; gap: 0; padding: 20px 0;
    transform: translateX(100%); transition: transform var(--transition);
    border-left: 1px solid var(--card-border);
  }
  .nav-links.active { transform: translateX(0); }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 14px 28px; }

  .screenshot-grid { grid-template-columns: repeat(2, 1fr); }
  .reviews-summary { grid-template-columns: 1fr; gap: 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .info-cards { gap: 10px; }
  .info-card { min-width: 100px; padding: 12px 16px; }
  .section { padding: 60px 0; }
}

@media (max-width: 480px) {
  .screenshot-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding: 90px 16px 40px; }
  .update-groups { grid-template-columns: 1fr; }
}
