/* Card Strategy Saga — 暖色现代卡牌风（字体在 HTML 中加载）
   全面响应式：适配 PC / 平板 / 手机
   修复：移动端视频区域溢出问题，增加全局横向滚动隐藏
*/

:root {
  --bg-deep: #f5f0e8;
  --bg-card: rgba(255, 255, 255, 0.78);
  --bg-card-solid: #fffdf9;
  --accent-amber: #d4a03a;
  --accent-amber-bright: #e8b84a;
  --accent-coral: #e07c4c;
  --accent-rust: #b85c3c;
  --text-primary: #3d2e28;
  --text-muted: #7d6a5f;
  --border-subtle: rgba(212, 160, 58, 0.35);
  --shadow-soft: 0 4px 24px rgba(180, 100, 60, 0.1);
  --shadow-lift: 0 12px 40px rgba(120, 72, 48, 0.12);
  --font-display: "Fraunces", "Noto Serif SC", Georgia, serif;
  --font-body: "Outfit", "Noto Sans SC", system-ui, sans-serif;
  --radius: 16px;
  --nav-h: 68px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  color: var(--text-primary);
  background-color: var(--bg-deep);
  line-height: 1.65;
  /* 移动端优化：消除点击高亮（保留原生但提升手感） */
  -webkit-tap-highlight-color: transparent;
  /* 关键修复：防止任何元素导致横向滚动条 */
  overflow-x: hidden;
}

/* 确保所有媒体元素自适应，不溢出父容器 */
img,
video,
iframe,
embed,
object {
  max-width: 100%;
  height: auto;
}

/* 页面背景：由 body.page-xxx 的 background-image 覆盖 */
body.page-shell {
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

body.page-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(
    168deg,
    rgba(255, 252, 247, 0.91) 0%,
    rgba(255, 238, 220, 0.86) 42%,
    rgba(250, 232, 216, 0.92) 100%
  );
  pointer-events: none;
  z-index: 0;
}

body.page-shell > * {
  position: relative;
  z-index: 1;
}

/* 导航 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: linear-gradient(
    180deg,
    rgba(255, 253, 249, 0.97) 0%,
    rgba(255, 248, 240, 0.9) 100%
  );
  border-bottom: 1px solid rgba(212, 160, 58, 0.22);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
  transition: height 0.2s ease;
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

/* 导航 Logo：替换 web/images/logo.png（或同名 .webp / .svg，需改各页 img 的 src） */
.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
  box-shadow: var(--shadow-soft), 0 0 0 1px rgba(212, 160, 58, 0.2);
  background: rgba(255, 253, 249, 0.6);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s, transform 0.2s;
  display: inline-block;
  padding: 0.4rem 0;
  /* 增加点击区域，不影响布局 */
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--accent-rust);
}

.nav-links a[aria-current="page"] {
  font-weight: 600;
}

/* 主内容区 */
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3.5rem;
  flex: 1;
}

.page-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  margin: 0 0 0.5rem;
  color: var(--accent-rust);
}

.page-sub {
  color: var(--text-muted);
  margin: 0 0 2rem;
  font-size: 0.95rem;
}

.card-panel {
  background: var(--bg-card);
  border: 1px solid rgba(224, 124, 76, 0.2);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(8px);
}

/* 首页英雄区 */
.hero {
  text-align: center;
  padding: 1rem 0 2rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.85rem);
  margin: 0 0 0.5rem;
  letter-spacing: 0.02em;
  background: linear-gradient(
    105deg,
    #c45c3c 0%,
    var(--accent-coral) 35%,
    var(--accent-amber) 75%,
    #c9782d 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-tagline {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 2rem;
  font-weight: 500;
}

.video-wrap {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(212, 160, 58, 0.35);
  background: #2a221c;
  aspect-ratio: 16 / 9;
  max-height: 70vh;
  margin: 0 auto 2.5rem;
  box-shadow: var(--shadow-lift), 0 0 0 1px rgba(255, 255, 255, 0.5) inset;
  /* 确保宽度不超过父容器 */
  width: 100%;
  max-width: 100%;
}

.video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  vertical-align: middle;
  display: block;
  /* 防止视频本身溢出 */
  max-width: 100%;
  max-height: 100%;
}

.video-placeholder {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  color: rgba(255, 248, 240, 0.75);
  font-size: 0.9rem;
}

.video-wrap.no-src .video-placeholder {
  display: flex;
}

.video-wrap.no-src video {
  display: none;
}

.section-label {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--accent-rust);
  margin: 0 0 1rem;
  letter-spacing: 0.04em;
}

.store-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  max-width: 640px;
  margin: 0 auto;
}

.store-link {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  border: 2px solid rgba(212, 160, 58, 0.35);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  text-decoration: none;
  line-height: 0;
  background: var(--bg-card-solid);
}

.store-link:hover {
  transform: translateY(-5px);
  border-color: var(--accent-amber);
  box-shadow: var(--shadow-lift);
}

.store-link img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.store-caption {
  text-align: center;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* 资讯卡片 */
.news-grid {
  display: grid;
  gap: 1.75rem;
}

.news-item {
  display: grid;
  grid-template-columns: minmax(0, 280px) 1fr;
  gap: 1.5rem;
  align-items: start;
  background: var(--bg-card);
  border: 1px solid rgba(224, 124, 76, 0.22);
  border-radius: var(--radius);
  padding: 1.35rem;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(8px);
}

@media (max-width: 720px) {
  .news-item {
    grid-template-columns: 1fr;
  }
}

.news-item img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  object-fit: cover;
  aspect-ratio: 16 / 10;
  box-shadow: 0 4px 16px rgba(120, 72, 48, 0.12);
}

.news-item h2 {
  font-family: var(--font-display);
  font-size: 1.28rem;
  margin: 0 0 0.5rem;
  color: var(--accent-rust);
}

.news-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.news-item p {
  margin: 0;
  color: var(--text-primary);
  font-size: 0.95rem;
}

/* 联系页 */
.contact-grid {
  display: grid;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.contact-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  padding: 0.9rem 1.1rem;
  background: rgba(255, 252, 247, 0.65);
  border-radius: 12px;
  border: 1px solid rgba(212, 160, 58, 0.25);
}

.contact-row strong {
  min-width: 7rem;
  color: var(--accent-rust);
  font-size: 0.9rem;
}

.contact-row a {
  color: #b85c3c;
  word-break: break-all;
  font-weight: 500;
}

.contact-row a:hover {
  color: var(--accent-coral);
}

/* FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.faq-item {
  border: 1px solid rgba(212, 160, 58, 0.28);
  border-radius: 12px;
  background: rgba(255, 252, 247, 0.55);
  overflow: hidden;
}

.faq-q {
  width: 100%;
  text-align: left;
  padding: 1rem 1.1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  transition: background 0.2s;
}

.faq-q:hover {
  background: rgba(255, 230, 200, 0.45);
}

.faq-q::after {
  content: "+";
  color: var(--accent-rust);
  font-size: 1.25rem;
  font-weight: 400;
  flex-shrink: 0;
}

.faq-item.is-open .faq-q::after {
  content: "−";
}

.faq-a {
  display: none;
  padding: 0 1.1rem 1rem;
  color: var(--text-muted);
  font-size: 0.92rem;
  border-top: 1px solid rgba(212, 160, 58, 0.2);
}

.faq-item.is-open .faq-a {
  display: block;
}

/* 条款正文 */
.legal-content {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.legal-content h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--accent-rust);
  margin: 1.75rem 0 0.65rem;
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content p {
  margin: 0 0 0.85rem;
}

.legal-content ul {
  margin: 0 0 0.85rem;
  padding-left: 1.25rem;
}

/* 下载页 */
.download-hero {
  text-align: center;
  margin-bottom: 2rem;
}

.download-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.btn-store {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.88rem 1.85rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  color: #fffdf9;
  background: linear-gradient(
    165deg,
    var(--accent-coral) 0%,
    var(--accent-rust) 50%,
    #9a4a32 100%
  );
  box-shadow: 0 6px 20px rgba(184, 92, 60, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  /* 确保触摸区域足够 */
  min-height: 44px;
}

.btn-store:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 28px rgba(184, 92, 60, 0.42);
}

.btn-store.secondary {
  background: transparent;
  color: var(--accent-rust);
  border-color: rgba(212, 160, 58, 0.55);
  box-shadow: none;
}

.btn-store.secondary:hover {
  background: rgba(255, 230, 200, 0.55);
  box-shadow: var(--shadow-soft);
}

/* 页脚 */
.site-footer {
  margin-top: auto;
  padding: 2rem 1.25rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(212, 160, 58, 0.22);
  background: rgba(255, 248, 238, 0.85);
  backdrop-filter: blur(8px);
}

.site-footer a {
  color: var(--text-muted);
  font-weight: 500;
}

.site-footer a:hover {
  color: var(--accent-rust);
}

/* ========== 移动端全面适配 ========== */
@media screen and (max-width: 768px) {
  /* 全局微调 */
  main {
    padding: 1.5rem 1rem 2.5rem;
  }

  .card-panel {
    padding: 1.25rem;
  }

  /* 导航栏转为垂直布局，提升触控体验 */
  .site-header {
    height: auto;
    min-height: var(--nav-h);
  }

  .nav-inner {
    flex-direction: column;
    padding: 0.75rem 1rem;
    gap: 0.75rem;
  }

  .brand {
    align-self: flex-start;
  }

  .nav-links {
    width: 100%;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0 0.5rem;
  }

  .nav-links li {
    width: 100%;
    text-align: center;
  }

  .nav-links a {
    display: block;
    padding: 0.75rem 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    /* 增大触摸区域 */
    border-radius: 28px;
    transition: background 0.2s;
  }

  .nav-links a:hover,
  .nav-links a:active {
    background: rgba(212, 160, 58, 0.12);
  }

  /* 首页英雄区 */
  .hero {
    padding: 0.5rem 0 1.5rem;
  }

  .hero-tagline {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
  }

  /* 视频容器在手机上的专项优化 */
  .video-wrap {
    margin-bottom: 1.75rem;
    /* 确保宽高完全由父容器控制，无溢出 */
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    border-radius: 12px; /* 手机上圆角略小更自然 */
  }

  .video-wrap video {
    /* 保证视频内容完全可见，不溢出 */
    object-fit: contain;
  }

  .section-label {
    font-size: 1rem;
    text-align: center;
  }

  /* 商店按钮行 */
  .store-row {
    gap: 1rem;
  }

  .store-link {
    border-radius: 12px;
  }

  .store-caption {
    font-size: 0.8rem;
  }

  /* 资讯卡片 */
  .news-item {
    padding: 1rem;
    gap: 1rem;
  }

  .news-item h2 {
    font-size: 1.2rem;
  }

  .news-meta {
    font-size: 0.75rem;
  }

  .news-item p {
    font-size: 0.9rem;
  }

  /* 联系页 */
  .contact-row {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.9rem;
    gap: 0.5rem;
  }

  .contact-row strong {
    min-width: auto;
    font-size: 0.85rem;
  }

  /* FAQ 提高可读性 */
  .faq-q {
    padding: 0.9rem 1rem;
    font-size: 0.95rem;
  }

  .faq-a {
    padding: 0 1rem 1rem;
    font-size: 0.88rem;
  }

  /* 下载页按钮组 */
  .download-buttons {
    gap: 0.85rem;
  }

  .btn-store {
    padding: 0.7rem 1.5rem;
    font-size: 0.9rem;
    min-height: 44px;
  }

  /* 条款页 */
  .legal-content h2 {
    font-size: 1.1rem;
  }

  /* 页脚 */
  .site-footer {
    padding: 1.5rem 1rem;
    font-size: 0.75rem;
  }
}

/* 超小屏设备 (≤480px) 进一步紧凑优化 */
@media screen and (max-width: 480px) {
  :root {
    --radius: 14px;
  }

  main {
    padding: 1.25rem 0.9rem 2rem;
  }

  .page-title {
    font-size: clamp(1.5rem, 5vw, 1.9rem);
  }

  .page-sub {
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
  }

  .hero h1 {
    font-size: clamp(1.6rem, 6vw, 2.2rem);
  }

  .hero-tagline {
    font-size: 0.9rem;
  }

  .video-wrap {
    border-radius: 10px;
    margin-bottom: 1.25rem;
  }

  .card-panel {
    padding: 1rem;
  }

  .news-item {
    padding: 0.9rem;
  }

  .news-item h2 {
    font-size: 1.1rem;
  }

  .contact-row {
    padding: 0.75rem;
  }

  .faq-q {
    padding: 0.8rem;
    font-size: 0.9rem;
  }

  .btn-store {
    padding: 0.6rem 1.25rem;
    font-size: 0.85rem;
  }

  .site-footer {
    padding: 1.25rem 0.9rem;
  }
}

/* 横屏模式小调整（手机横屏时导航依然保持垂直，内容区域更宽裕） */
@media screen and (max-width: 896px) and (orientation: landscape) {
  .site-header {
    position: sticky;
  }

  .nav-links {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
  }

  .nav-links li {
    width: auto;
  }

  .nav-links a {
    padding: 0.5rem 0.9rem;
    font-size: 0.85rem;
  }

  .nav-inner {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .brand {
    align-self: center;
  }

  .hero {
    padding: 0.25rem 0 1rem;
  }

  .video-wrap {
    max-height: 60vh; /* 横屏时适当降低高度，避免过高 */
  }
}