/* NEXTWAVE 响应式适配 */

/* ===== 平板 (1024px) ===== */
@media (max-width: 1024px) {
  /* Header */
  .header { padding: 12px 24px; }
  .nav { gap: 16px; }
  .nav a { font-size: 13px; }
  
  /* Hero */
  .hero { padding: 100px 32px 60px; }
  .hero-title { font-size: 44px; }
  .hero-desc { font-size: 16px; }
  
  /* Sections */
  .section { padding: 80px 32px; }
  .section-title { font-size: 32px; }
  
  /* Grids */
  .steps-grid,
  .roles-grid,
  .testimonials-grid,
  .pricing-grid { 
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .caps-grid { grid-template-columns: 1fr; }
  
  /* Stats */
  .stats-num { font-size: 72px; }
  
  /* Studio */
  .sidebar { width: 200px; }
  .control-panel { width: 280px; }
  
  /* Workflow */
  .node-palette { width: 200px; }
  .node { min-width: 160px; }
  
  /* Console */
  .panel-left { width: 240px; }
  .panel-right { width: 300px; }
}

/* ===== 大手机 (768px) ===== */
@media (max-width: 768px) {
  /* Header */
  .header { 
    padding: 12px 16px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
  }
  .header-left { gap: 16px; }
  .nav { display: none; }
  .header-right .btn-ghost { display: none; }
  
  /* Mobile nav toggle */
  .nav-toggle { display: block; }
  
  /* Hero */
  .hero { 
    padding: 100px 20px 60px;
    min-height: auto;
  }
  .hero-title { font-size: 32px; }
  .hero-desc { font-size: 15px; max-width: 100%; }
  .hero-btns { flex-direction: column; width: 100%; }
  .hero-btns .btn-primary,
  .hero-btns .btn-outline { 
    width: 100%; 
    text-align: center;
    padding: 14px 24px;
  }
  .hero-tags { flex-wrap: wrap; justify-content: center; }
  
  /* Stats */
  .stats { padding: 60px 20px; }
  .stats-num { font-size: 56px; }
  .stats-text { font-size: 15px; }
  
  /* Sections */
  .section { padding: 60px 20px; }
  .section-title { font-size: 28px; }
  .section-desc { font-size: 14px; }
  
  /* Grids - single column */
  .steps-grid,
  .roles-grid,
  .testimonials-grid,
  .pricing-grid,
  .caps-grid { 
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  /* Cards */
  .step-card,
  .role-card,
  .testimonial-card,
  .pricing-card {
    padding: 20px;
  }
  
  /* Role cards - 2 columns */
  .roles-grid { grid-template-columns: 1fr 1fr; }
  .role-card { padding: 16px; }
  .role-icon { font-size: 24px; }
  
  /* CTA */
  .cta-section { padding: 60px 20px; }
  .cta-title { font-size: 28px; }
  
  /* Footer */
  .footer { padding: 32px 20px; }
  .footer-inner { flex-direction: column; gap: 32px; }
  .footer-links { flex-wrap: wrap; gap: 24px; }
  .footer-col { min-width: 120px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  
  /* Studio */
  .topbar { padding: 0 12px; }
  .topbar-center { display: none; }
  .sidebar { 
    width: 100%;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: auto;
    max-height: 200px;
    z-index: 100;
    border-top: 1px solid var(--border);
    border-right: none;
  }
  .sidebar-section { padding: 8px 12px; }
  .job-selector { flex-direction: row; flex-wrap: wrap; }
  .job-btn { padding: 8px; flex: 1; min-width: 80px; justify-content: center; }
  .job-btn .shortcut { display: none; }
  
  .control-panel {
    position: fixed;
    right: 0;
    top: 48px;
    bottom: 200px;
    width: 100%;
    z-index: 90;
    display: none;
  }
  .control-panel.open { display: flex; }
  
  .viewport { margin-bottom: 200px; }
  
  /* Workflow */
  .node-palette {
    position: fixed;
    left: 0;
    top: 48px;
    bottom: 0;
    width: 280px;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.3s;
  }
  .node-palette.open { transform: translateX(0); }
  
  /* Community */
  .main { padding-top: 60px; }
  .sub-nav { 
    padding: 12px 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .sub-nav a { font-size: 12px; white-space: nowrap; }
  
  .hero-banner { padding: 40px 20px; }
  .hero-banner h1 { font-size: 28px; }
  .hero-stats { gap: 32px; }
  .stat-value { font-size: 24px; }
  
  .content { padding: 24px 16px; }
  .works-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  
  /* Console */
  .panel-left { 
    position: fixed;
    left: 0;
    top: 48px;
    bottom: 0;
    width: 280px;
    z-index: 50;
    transform: translateX(-100%);
    transition: transform 0.3s;
  }
  .panel-left.open { transform: translateX(0); }
  
  .panel-right {
    position: fixed;
    right: 0;
    top: 48px;
    bottom: 0;
    width: 100%;
    max-width: 360px;
    z-index: 50;
    transform: translateX(100%);
    transition: transform 0.3s;
  }
  .panel-right.open { transform: translateX(0); }
  
  .panel-middle { width: 100%; }
}

/* ===== 小手机 (480px) ===== */
@media (max-width: 480px) {
  /* Hero */
  .hero-title { font-size: 28px; }
  .hero-tags { margin-bottom: 16px; }
  .tag { padding: 4px 10px; font-size: 11px; }
  
  /* Stats */
  .stats-num { font-size: 48px; }
  
  /* Sections */
  .section-title { font-size: 24px; }
  
  /* Role cards - single column */
  .roles-grid { grid-template-columns: 1fr; }
  
  /* Works */
  .works-grid { grid-template-columns: 1fr; }
  
  /* Studio */
  .sidebar { max-height: 160px; }
  .job-btn { min-width: 60px; font-size: 11px; }
  .job-btn .icon { font-size: 14px; }
  
  /* Workflow */
  .node-palette { width: 240px; }
  .node { min-width: 140px; }
  
  /* Console */
  .panel-left { width: 260px; }
  .stats-row { gap: 8px; padding: 8px; }
  .stat-value { font-size: 16px; }
  
  /* Pricing */
  .pricing-price { font-size: 28px; }
}

/* ===== 横屏手机 ===== */
@media (max-width: 768px) and (orientation: landscape) {
  .hero { min-height: auto; padding: 80px 20px 40px; }
  .hero-title { font-size: 28px; }
  
  .sidebar { max-height: 120px; }
  .viewport { margin-bottom: 120px; }
}

/* ===== 触摸设备优化 ===== */
@media (hover: none) {
  /* 增大可点击区域 */
  .btn-primary,
  .btn-outline,
  .btn-ghost,
  .nav a,
  .tab,
  .job-btn,
  .quick-btn {
    min-height: 44px;
  }
  
  /* 移除 hover 效果 */
  .card:hover,
  .step-card:hover,
  .role-card:hover,
  .work-card:hover {
    transform: none;
  }
  
  /* 添加 active 效果 */
  .btn-primary:active,
  .btn-outline:active {
    opacity: 0.8;
    transform: scale(0.98);
  }
}

/* ===== 高对比度 ===== */
@media (prefers-contrast: high) {
  :root {
    --border: rgba(255,255,255,0.2);
    --text2: rgba(255,255,255,0.8);
    --text3: rgba(255,255,255,0.5);
  }
}

/* ===== 减少动画 ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== 打印样式 ===== */
@media print {
  .header,
  .footer,
  .sidebar,
  .control-panel,
  .panel-left,
  .panel-right {
    display: none;
  }
  
  body {
    background: #fff;
    color: #000;
  }
  
  .section { page-break-inside: avoid; }
}
