/* ==========================================================================
   DFCine Theme - Responsive Styles
   ========================================================================== */

/* 大屏笔记本 */
@media (max-width: 1200px) {
  .pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .course-learning-shell { grid-template-columns: 1fr; }
  .course-copy { max-width: 720px; }
  .nav-left { gap: 24px; }
  .nav-panel { gap: 20px; }
  .nav-actions { gap: 14px; }
  .content-with-sidebar { grid-template-columns: minmax(0, 1fr) 260px; gap: 28px; }
}

/* 平板 / 移动端导航 */
@media (max-width: 900px) {
  .site-header { padding: 16px; }
  .nav-shell { align-items: flex-start; justify-content: space-between; gap: 12px; }
  .nav-left { flex: 1; justify-content: space-between; gap: 16px; }

  .nav-toggle {
    display: inline-grid; place-items: center;
    width: 38px; height: 38px; padding: 9px; gap: 4px;
    border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
  }
  .nav-toggle span { width: 16px; height: 2px; border-radius: 99px; }

  /* 导航面板：默认隐藏，nav-open 时展开（z-index 必须在 header 之上） */
  .nav-panel {
    position: fixed; left: auto; right: 16px; top: 78px; z-index: 30;
    display: none;
    width: min(320px, calc(100vw - 32px));
    height: auto; min-height: 0;
    flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 6px;
    padding: 16px;
    background: var(--glass-strong); backdrop-filter: blur(20px);
    border: 1px solid var(--line); border-radius: 18px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  }
  .nav-panel a {
    width: 100%; min-height: 38px; justify-content: flex-start;
    padding: 10px 12px; font-size: 0.9rem;
    border-bottom: 1px solid rgba(212, 244, 255, 0.08);
  }
  .nav-panel a:last-child { border-bottom: 0; }

  /* 右侧操作区在移动端隐藏（主 CTA 在 Hero 区已有） */
  .nav-actions { display: none; }

  body.nav-open .nav-panel { display: flex; }

  .hero { min-height: auto; padding: 140px 24px 90px; }
  .hero::after { background: linear-gradient(90deg, rgba(248, 251, 252, 0.96) 0%, rgba(248, 251, 252, 0.86) 100%); }
  .hero-inner { margin: 0 auto; }

  .quickstart-grid, .feature-card-grid, .course-track { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .install-panel { grid-template-columns: 1fr; gap: 26px; }
  .works-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: clamp(130px, 16vw, 180px); }
  .work-card-large { grid-column: span 2; grid-row: span 2; }
  .content-with-sidebar { grid-template-columns: 1fr; }
  .site-sidebar { order: 2; }
}

/* 手机 */
@media (max-width: 640px) {
  .site-header { padding: 14px 16px; }
  .nav-shell { gap: 10px; }

  .hero { padding: 126px 20px 76px; }
  .hero h1 { font-size: clamp(2.3rem, 11vw, 3.4rem); }
  .hero-subtitle { font-size: 1rem; }
  .hero-copy { font-size: 0.92rem; }
  .hero-actions .button { flex: 1; min-width: 130px; }
  .hero-compatibility { font-size: 0.75rem; flex-direction: column; align-items: flex-start; gap: 8px; }
  .hero-compatibility i { display: none; }

  .quickstart, .feature-showcase, .install-steps, .works-showcase, .course-learning, .pricing-section { padding-top: 76px; padding-bottom: 80px; }
  .quickstart-grid, .feature-card-grid, .course-track { grid-template-columns: 1fr; }
  .quickstart-heading h2, .feature-showcase h2 span, .install-steps h2, .works-heading h2, .pricing-heading h2, .course-copy h2 { font-size: 1.9rem; }
  .feature-card { padding: 22px; }
  .install-tabs { gap: 8px; }
  .install-tab { padding: 10px 12px; font-size: 0.8rem; }
  .install-panel { padding: 22px; }
  .install-index { font-size: 2.4rem; }
  .install-copy h3 { font-size: 1.4rem; }
  .works-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 150px; gap: 10px; }
  .work-card-large { grid-column: span 2; grid-row: span 2; }
  .work-content { padding: 32px 12px 12px; }
  .work-content h3 { font-size: 0.85rem; }
  .work-content p { font-size: 0.7rem; }
  .work-play { width: 26px; height: 26px; }
  .work-card-large .work-content h3 { font-size: 1.2rem; }
  .pricing-grid { grid-template-columns: 1fr; }
  .price-card { min-height: auto; }
  .course-card { min-height: auto; }
  .pricing-assurance { gap: 14px; flex-direction: column; align-items: center; }

  .requirements-grid { grid-template-columns: 1fr; }
  .requirement-card:last-child { grid-column: auto; }
  .requirements-dialog, .support-dialog { padding: 24px 18px; }
  .floating-support { right: 14px; bottom: 14px; }
  .floating-support > button { min-height: 40px; padding: 0 16px; font-size: 0.85rem; }

  .footer-inner { padding-top: 40px; }
  .footer-top { justify-content: flex-start; }
  .footer-links { gap: 14px; }
  .footer-widgets { flex-direction: column; gap: 24px; }

  .site-main { padding-top: 100px; padding-bottom: 70px; }
  .post-card { grid-template-columns: 1fr; }
  .post-card-media { aspect-ratio: 16 / 8; }
  .entry-title { font-size: 1.6rem; }
  .post-navigation { flex-direction: column; }
  .comment-list .children { margin-left: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* --------------------------------------------------------------------------
   浅色主题响应式补充（唯一配色）
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .nav-toggle {
    border-color: rgba(16, 38, 45, 0.18);
    background: rgba(255, 255, 255, 0.85);
  }
  .nav-toggle span { background: var(--text); }
  .nav-panel {
    box-shadow: 0 24px 60px rgba(16, 45, 55, 0.16);
  }
  .nav-panel a { border-bottom-color: rgba(16, 38, 45, 0.1); }
  .hero::after {
    background: linear-gradient(90deg, rgba(248, 251, 252, 0.96) 0%, rgba(248, 251, 252, 0.86) 100%);
  }
}
