/* ============================================================
   响应式适配：平板 → 手机 → 超小屏
   ============================================================ */

/* ---- 平板 ---- */
@media (max-width: 992px) {
  .features-grid     { grid-template-columns: repeat(2, 1fr); }
  .char-layout       { grid-template-columns: 1fr; }
  .char-tabs         { flex-direction: row; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
  .char-tab          { min-width: 200px; flex: 1; }
  .char-tab:hover,
  .char-tab.active   { transform: translateY(-4px) translateX(0); }
  .world-content     { margin-left: 24px; margin-right: 24px; }
  .editions-grid     { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
  .edition-card.popular { transform: none; }
  .edition-card.popular:hover { transform: translateY(-8px); }
  .community-grid    { grid-template-columns: 1fr; }
  .footer-grid       { grid-template-columns: 1fr 1fr; }
}

/* ---- 手机 ---- */
@media (max-width: 768px) {
  body { font-size: 14.5px; }

  /* 抽屉式导航 */
  .nav-links {
    position: fixed; inset: 0 -100% 0 auto;
    width: 82%; max-width: 320px; height: 100vh;
    background: rgba(9, 7, 20, 0.97);
    backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    border-left: 1px solid rgba(255,255,255,.08);
    flex-direction: column; justify-content: center; align-items: flex-start;
    gap: 8px; padding: 60px 34px;
    transition: right .42s var(--ease);
    box-shadow: -30px 0 80px rgba(0,0,0,.6);
    z-index: 1150;
  }
  .nav-links.open { right: 0; }
  .nav-links a {
    font-size: 19px; padding: 12px 0; width: 100%;
    border-bottom: 1px solid rgba(255,255,255,.06);
  }
  .nav-toggle { display: flex; z-index: 1300; }
  .nav-actions .btn-login { display: none; }

  .section-padding { padding: 72px 0; }
  .section-header h2 { font-size: clamp(26px, 9vw, 34px); }

  .features-grid   { grid-template-columns: 1fr; gap: 18px; }
  .feature-card    { padding: 28px 22px; }

  .stats           { grid-template-columns: 1fr; gap: 14px; }
  .gallery         { grid-template-columns: 1fr; }
  .media-item      { height: 210px; }

  .world-section   { justify-content: center; text-align: center; }
  .world-content   { margin: 0 16px; padding: 34px 24px; }
  .world-content .chapter { justify-content: center; }

  .spec-table-wrap { margin-top: 44px; }

  .cta-group .btn-primary,
  .cta-group .btn-secondary { padding: 14px 28px; font-size: 13.5px; }

  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .footer-bottom { flex-direction: column; text-align: left; }
}

/* ---- 超小屏 / 横屏手机 ---- */
@media (max-width: 420px) {
  .container { padding: 0 18px; }
  .game-logo { letter-spacing: .1em; }
  .cta-group { flex-direction: column; width: 100%; }
  .cta-group button { width: 100%; }
  .platform-badges { gap: 8px; }
  .platform-badge { padding: 7px 13px; font-size: 12px; }
  .modal { padding: 14px; }
  .modal-form { padding: 30px 22px 24px; }
  .modal-head h3 { font-size: 22px; }
  .btn-code { padding: 13px 12px; font-size: 12px; }
  .chip { min-width: 0; }
}

/* 横屏且视口很矮时，Hero 不撑满一屏造成内容挤压 */
@media (max-height: 560px) and (orientation: landscape) {
  .hero { min-height: 560px; padding: 100px 0 60px; }
  .scroll-indicator { display: none; }
}

/* 打印 / 高对比度兜底 */
@media print {
  .navbar, .modal, .scroll-indicator, .cta-group { display: none !important; }
  body { background: #fff; color: #000; }
}
