/* ==========================================================================
   魔女的夜宴中文主题站 —— 全站样式
   深色主题：深蓝紫底 + 粉红/品红强调色
   若需调整配色，仅修改 :root 中的 CSS 变量即可
   ========================================================================== */

:root {
  --bg-0: #0f0f23;
  --bg-1: #1a1a2e;
  --bg-2: #232342;
  --bg-footer: #0b0b1a;
  --accent: #e94560;
  --accent-2: #ff6b8a;
  --accent-soft: rgba(233, 69, 96, 0.14);
  --text: #f5f5fa;
  --text-dim: #bcbccf;
  --text-mute: #8a8aa8;
  --card-bg: rgba(26, 26, 46, 0.72);
  --card-border: rgba(255, 255, 255, 0.08);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  --shadow-hover: 0 18px 44px rgba(233, 69, 96, 0.22);
  --nav-h: 68px;
  --max-w: 1180px;
}

/* ---------- 重置与基础 ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  color: var(--text);
  line-height: 1.75;
  background: linear-gradient(165deg, var(--bg-0) 0%, var(--bg-1) 55%, #14142a 100%);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--accent-2); text-decoration: none; transition: color 0.25s ease; }
a:hover { color: var(--accent); }
ul, ol { list-style: none; }

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

/* 锚点定位偏移，避免被固定导航遮挡 */
section[id] { scroll-margin-top: calc(var(--nav-h) + 16px); }

/* ---------- 通用按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, #c73659 100%);
  box-shadow: 0 10px 26px rgba(233, 69, 96, 0.38);
}
.btn-primary:hover {
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(233, 69, 96, 0.55);
}
.btn-lg { padding: 16px 44px; font-size: 1.12rem; }

/* ---------- 顶部导航 ---------- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  height: var(--nav-h);
  background: rgba(15, 15, 35, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--card-border);
}
.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo { display: flex; align-items: baseline; gap: 8px; }
.logo-name {
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: 1px;
  background: linear-gradient(90deg, #fff, var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.logo-sub {
  font-size: 0.78rem;
  color: var(--text-mute);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  padding: 1px 10px;
}
.nav-menu { display: flex; gap: 6px; }
.nav-menu a {
  color: var(--text-dim);
  font-size: 0.95rem;
  padding: 8px 14px;
  border-radius: 999px;
  transition: color 0.25s ease, background 0.25s ease;
}
.nav-menu a:hover, .nav-menu a.active {
  color: #fff;
  background: var(--accent-soft);
}
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  background: transparent;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 0 11px;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero 主视觉 ---------- */
.hero {
  position: relative;
  padding: calc(var(--nav-h) + 56px) 0 72px;
  /* 首屏背景：默认调用第一张游戏图片（1.webp），script.js 会按 CONFIG.images 同步覆盖 */
  background:
    linear-gradient(180deg, rgba(15, 15, 35, 0.86) 0%, rgba(26, 26, 46, 0.92) 60%, rgba(20, 20, 42, 0.96) 100%),
    url("1.webp") center 28% / cover no-repeat;
  border-bottom: 1px solid var(--card-border);
}
.hero-content { position: relative; }

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-mute);
  margin-bottom: 26px;
}
.breadcrumb li::after { content: "/"; margin-left: 8px; color: var(--text-mute); }
.breadcrumb li:last-child::after { content: ""; }
.breadcrumb a { color: var(--text-mute); }
.breadcrumb a:hover { color: var(--accent-2); }

.version-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-dim);
  background: var(--accent-soft);
  border: 1px solid rgba(233, 69, 96, 0.35);
  padding: 5px 16px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.badge-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 10px var(--accent-2);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.8); }
}

.hero-title {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: 2px;
}
.hero-title-en {
  display: block;
  font-size: clamp(0.95rem, 2vw, 1.35rem);
  font-weight: 600;
  letter-spacing: 4px;
  color: var(--accent-2);
  margin-top: 10px;
}

.slogan {
  margin-top: 22px;
  max-width: 880px;
  color: var(--text-dim);
  font-size: 1rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}
.tag-list li {
  font-size: 0.86rem;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-dim);
}
.feature-tags li {
  border-color: rgba(233, 69, 96, 0.3);
  color: #ffd3dc;
  background: var(--accent-soft);
}

.hero-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 30px;
  max-width: 720px;
}
.info-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  backdrop-filter: blur(8px);
}
.info-label { font-size: 0.8rem; color: var(--text-mute); }
.info-value { font-size: 1.2rem; font-weight: 800; color: #fff; }

.hero-cta { margin-top: 32px; }
.cta-note {
  margin-top: 12px;
  font-size: 0.82rem;
  color: var(--text-mute);
}
.cta-note strong { color: var(--accent-2); font-weight: 600; }

/* ---------- 通用区块 ---------- */
.section { padding: 84px 0; }
.section-alt {
  background: rgba(11, 11, 26, 0.55);
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
}
.section-title {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  font-weight: 800;
  text-align: center;
  letter-spacing: 2px;
}
.section-title::after {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  margin: 14px auto 0;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.section-sub {
  text-align: center;
  color: var(--text-mute);
  font-size: 0.92rem;
  margin: 16px auto 44px;
  max-width: 680px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.card:hover {
  transform: translateY(-5px);
  border-color: rgba(233, 69, 96, 0.4);
  box-shadow: var(--shadow-hover);
}
.card-title { font-size: 1.15rem; font-weight: 700; line-height: 1.5; }
.card-text { color: var(--text-dim); font-size: 0.94rem; margin-top: 12px; }

.card-tag {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #c73659);
  border-radius: 6px;
  padding: 2px 10px;
}
.tag-blue { background: linear-gradient(135deg, #4b6cb7, #3a4f9e); }
.tag-purple { background: linear-gradient(135deg, #8e44ad, #6c3483); }

/* ---------- 最新资讯 ---------- */
.card-grid.news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.news-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.news-meta time { font-size: 0.82rem; color: var(--text-mute); }
.read-more {
  display: inline-block;
  margin-top: 16px;
  font-size: 0.9rem;
  font-weight: 700;
}

/* ---------- 截图九宫格 ---------- */
.shot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.shot-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--card-border);
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--bg-2), var(--bg-1));
  box-shadow: var(--shadow);
}
.shot-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}
.shot-item:hover img { transform: scale(1.06); }
.shot-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(15,15,35,0) 30%, rgba(15,15,35,0.92) 100%);
  opacity: 0;
  transition: opacity 0.35s ease;
}
.shot-item:hover .shot-overlay,
.shot-item:focus-within .shot-overlay { opacity: 1; }
.shot-overlay h3 { font-size: 1.05rem; font-weight: 700; color: #fff; }
.shot-overlay p { font-size: 0.84rem; color: var(--text-dim); }

/* ---------- 版本时间线 ---------- */
.timeline {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
  padding-left: 34px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 9px; top: 6px; bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), rgba(233, 69, 96, 0.15));
}
.timeline-item { position: relative; margin-bottom: 28px; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -31px; top: 30px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg-0);
  box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.3);
}
.version-card { padding: 24px 28px; }
.version-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.version-head time { color: var(--text-mute); font-size: 0.88rem; }
.version-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 12px 0 18px;
  font-size: 0.86rem;
  color: var(--text-dim);
}
.update-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.update-label {
  font-size: 0.84rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.label-add { color: #7ef0b0; }
.label-opt { color: #8ecbff; }
.label-fix { color: #ffcf8a; }
.update-group ul { list-style: disc; padding-left: 18px; }
.update-group li {
  font-size: 0.86rem;
  color: var(--text-dim);
  margin-bottom: 6px;
}

/* ---------- 用户评价 ---------- */
.reviews-wrap {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.rating-box { text-align: center; }
.rating-score {
  font-size: 3.4rem;
  font-weight: 900;
  line-height: 1;
  color: var(--accent-2);
}
.rating-score small { font-size: 1rem; color: var(--text-mute); font-weight: 600; }
.rating-note { font-size: 0.82rem; color: var(--text-mute); margin: 8px 0 20px; }

.star-dist { display: flex; flex-direction: column; gap: 10px; text-align: left; }
.star-dist li { display: flex; align-items: center; gap: 10px; font-size: 0.84rem; color: var(--text-dim); }
.star-label { width: 34px; flex-shrink: 0; }
.bar-track {
  flex: 1;
  height: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.bar-fill {
  display: block;
  height: 100%;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.bar-percent { width: 40px; text-align: right; flex-shrink: 0; color: var(--text-mute); }

.keyword-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
  justify-content: center;
}
.keyword-tags li {
  font-size: 0.8rem;
  padding: 4px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  color: var(--text-dim);
}

.review-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.reviewer { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.avatar {
  width: 44px; height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #8e44ad);
}
.reviewer-name { font-size: 0.98rem; font-weight: 700; }
.stars { color: #ffd166; font-size: 0.9rem; letter-spacing: 2px; }

/* ---------- 常见问题 ---------- */
.faq-list { display: flex; flex-direction: column; gap: 14px; }
.faq-list details {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 16px 22px;
  transition: border-color 0.3s ease;
}
.faq-list details[open] { border-color: rgba(233, 69, 96, 0.4); }
.faq-list summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 1rem;
  list-style: none;
  position: relative;
  padding-right: 30px;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  position: absolute;
  right: 4px; top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--accent-2);
  transition: transform 0.3s ease;
}
.faq-list details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-list details p { margin-top: 12px; color: var(--text-dim); font-size: 0.93rem; }

/* ---------- 底部 CTA ---------- */
.cta-section {
  padding: 90px 0;
  text-align: center;
  background:
    radial-gradient(ellipse at 50% 120%, rgba(233, 69, 96, 0.28), transparent 60%),
    rgba(11, 11, 26, 0.6);
  border-top: 1px solid var(--card-border);
}
.cta-title { font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 800; }
.cta-text { color: var(--text-dim); margin: 14px 0 30px; }
.cta-section .cta-note { margin-top: 14px; }

/* ---------- 页脚 ---------- */
.footer {
  background: var(--bg-footer);
  border-top: 1px solid var(--card-border);
  padding: 60px 0 36px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr 1.4fr;
  gap: 34px;
}
.footer-title { font-size: 1rem; font-weight: 800; margin-bottom: 16px; }
.footer-text { font-size: 0.86rem; color: var(--text-mute); margin-bottom: 10px; }
.footer-links li { font-size: 0.88rem; color: var(--text-mute); margin-bottom: 10px; }
.footer-links a { color: var(--text-dim); }
.footer-links a:hover { color: var(--accent-2); }
.disclaimer { line-height: 1.7; }
.legal-links { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 14px; }
.legal-links a { font-size: 0.86rem; }

/* ---------- 弹层（资讯全文 / 合规文案） ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal[hidden] { display: none; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 20, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.modal-dialog {
  position: relative;
  width: 100%;
  max-width: 720px;
  max-height: 86vh;
  overflow-y: auto;
  background: linear-gradient(170deg, var(--bg-2), var(--bg-1));
  border: 1px solid rgba(233, 69, 96, 0.3);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  padding: 32px 34px;
  animation: modalIn 0.28s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(24px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-close {
  position: absolute;
  top: 14px; right: 16px;
  width: 38px; height: 38px;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-dim);
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.25s ease;
}
.modal-close:hover { color: #fff; background: var(--accent); border-color: var(--accent); }
.modal-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.modal-head time { font-size: 0.84rem; color: var(--text-mute); }
.modal-title { font-size: 1.3rem; font-weight: 800; line-height: 1.5; margin-bottom: 18px; padding-right: 40px; }
.modal-body p { color: var(--text-dim); font-size: 0.95rem; margin-bottom: 14px; }
.modal-body strong { color: var(--text); }

body.modal-open { overflow: hidden; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .badge-dot { animation: none; }
}

/* ==========================================================================
   响应式：平板（≤960px）
   ========================================================================== */
@media (max-width: 960px) {
  .card-grid.news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .news-grid .news-card:last-child { grid-column: 1 / -1; }
  .shot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reviews-wrap { grid-template-columns: 1fr; }
  .review-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
  .update-groups { grid-template-columns: 1fr; gap: 10px; }
}

/* ==========================================================================
   响应式：手机（≤680px）
   ========================================================================== */
@media (max-width: 680px) {
  .container { padding: 0 18px; }
  .section { padding: 60px 0; }

  /* 汉堡菜单 */
  .nav-toggle { display: flex; }
  .nav-menu {
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    flex-direction: column;
    gap: 4px;
    background: rgba(15, 15, 35, 0.97);
    border-bottom: 1px solid var(--card-border);
    padding: 14px 18px 20px;
    display: none;
  }
  .nav-menu.open { display: flex; }
  .nav-menu a { padding: 12px 16px; font-size: 1rem; }

  .hero { padding: calc(var(--nav-h) + 36px) 0 56px; }
  .hero-cards { grid-template-columns: 1fr; max-width: none; }
  .card-grid.news-grid { grid-template-columns: 1fr; }
  .news-grid .news-card:last-child { grid-column: auto; }
  .shot-grid { grid-template-columns: 1fr; }
  .review-cards { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }

  .version-card { padding: 20px; }
  .modal-dialog { padding: 26px 20px; }
  .btn-lg { padding: 14px 34px; }
}
