/* 响应式设计 - Mobile First */

/* 平板端 (768px - 1199px) */
@media (max-width: 1199px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
    text-align: center;
  }
  
  .hero-title {
    font-size: 3rem;
  }
  
  .features-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
  
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .testimonials-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
}

/* 手机端 (320px - 767px) */
@media (max-width: 767px) {
  /* 导航 */
  .nav-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: var(--white);
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-top: var(--spacing-xl);
    transition: left 0.3s ease;
    box-shadow: var(--shadow-lg);
  }
  
  .nav-menu.active {
    left: 0;
  }
  
  .nav-toggle {
    display: flex;
  }
  
  .nav-toggle.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
  }
  
  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  
  .nav-toggle.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
  }
  
  /* 英雄区域 */
  .hero {
    padding: 100px 0 var(--spacing-xl);
    min-height: auto;
  }
  
  .hero-container {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
    text-align: center;
  }
  
  .hero-title {
    font-size: 2.5rem;
    line-height: 1.3;
  }
  
  .hero-subtitle {
    font-size: 1.125rem;
  }
  
  .hero-buttons {
    justify-content: center;
    flex-direction: column;
    align-items: center;
  }
  
  .hero-buttons .btn {
    width: 100%;
    max-width: 280px;
  }
  
  /* 手机模型 */
  .phone-mockup {
    width: 250px;
    height: 500px;
  }
  
  /* 功能特色 */
  .features {
    padding: var(--spacing-xl) 0;
  }
  
  .section-header h2 {
    font-size: 2rem;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
  
  .feature-card {
    padding: var(--spacing-lg);
  }
  
  /* 数据展示 */
  .statistics {
    padding: var(--spacing-xl) 0;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
  }
  
  .stat-number {
    font-size: 2.5rem;
  }
  
  /* 用户评价 */
  .testimonials {
    padding: var(--spacing-xl) 0;
  }
  
  .testimonials-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
  
  .testimonial-card {
    padding: var(--spacing-lg);
  }
  
  /* 下载区域 */
  .download {
    padding: var(--spacing-xl) 0;
  }
  
  .download-content h2 {
    font-size: 2rem;
  }
  
  .download-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .download-btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }
  
  .subscribe-form {
    flex-direction: column;
  }
  
  .subscribe-form input {
    min-width: auto;
    width: 100%;
  }
  
  /* 页脚 */
  .footer {
    padding: var(--spacing-xl) 0 var(--spacing-lg);
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
    text-align: center;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: var(--spacing-sm);
  }
  
  .footer-links {
    justify-content: center;
  }
}

/* 小屏手机 (320px - 480px) */
@media (max-width: 480px) {
  .container {
    padding: 0 var(--spacing-sm);
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .section-header h2 {
    font-size: 1.75rem;
  }
  
  .section-header p {
    font-size: 1rem;
  }
  
  .feature-card {
    padding: var(--spacing-md);
  }
  
  .feature-icon {
    font-size: 2.5rem;
  }
  
  .feature-card h3 {
    font-size: 1.25rem;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }
  
  .stat-number {
    font-size: 2rem;
  }
  
  .download-content h2 {
    font-size: 1.75rem;
  }
  
  .download-content p {
    font-size: 1rem;
  }
  
  .phone-mockup {
    width: 200px;
    height: 400px;
  }
}

/* 横屏手机 */
@media (max-width: 767px) and (orientation: landscape) {
  .hero {
    padding: 80px 0 var(--spacing-lg);
    min-height: auto;
  }
  
  .hero-container {
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .phone-mockup {
    width: 200px;
    height: 350px;
  }
}

/* 高分辨率屏幕 */
@media (min-width: 1400px) {
  .container {
    max-width: 1400px;
  }
  
  .hero-title {
    font-size: 4rem;
  }
  
  .section-header h2 {
    font-size: 3rem;
  }
  
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .stats-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

/* 打印样式 */
@media print {
  .header,
  .nav-toggle,
  .hero-buttons,
  .download-buttons,
  .subscribe-form,
  .footer {
    display: none;
  }
  
  .hero {
    padding: 0;
    background: none;
  }
  
  .hero-title {
    color: var(--black);
  }
  
  .section-header h2 {
    color: var(--black);
  }
  
  .feature-card,
  .testimonial-card {
    box-shadow: none;
    border: 1px solid var(--grey-300);
  }
}

/* 减少动画 (用户偏好) */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
  :root {
    --primary-color: #0000FF;
    --secondary-color: #800080;
    --accent-pink: #FF0080;
    --accent-orange: #FF8000;
    --grey-900: #000000;
    --grey-700: #333333;
    --grey-500: #666666;
    --grey-300: #999999;
    --grey-100: #CCCCCC;
  }
  
  .btn {
    border: 2px solid currentColor;
  }
  
  .feature-card,
  .testimonial-card {
    border: 2px solid var(--grey-300);
  }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
  :root {
    --white: #1a1a1a;
    --black: #ffffff;
    --grey-900: #ffffff;
    --grey-700: #cccccc;
    --grey-500: #999999;
    --grey-300: #666666;
    --grey-100: #333333;
  }
  
  body {
    background-color: var(--white);
    color: var(--black);
  }
  
  .header {
    background: rgba(26, 26, 26, 0.95);
    border-bottom-color: var(--grey-300);
  }
  
  .hero {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a1a1a 100%);
  }
  
  .features {
    background: var(--white);
  }
  
  .testimonials {
    background: var(--grey-100);
  }
  
  .feature-card,
  .testimonial-card {
    background: var(--white);
    border-color: var(--grey-300);
  }
}
