/* 
 * 响应式样式文件 - 苹果风格游戏导航网站
 * 确保网站在各种设备上都能良好显示，从手机到大屏幕电脑
 */

/* 大型平板电脑和小型桌面设备 (992px 以下) */
@media (max-width: 992px) {
  .navbar {
    padding: var(--spacing-small) 0;
  }
  
  .navbar-search {
    width: 200px;
  }
  
  .featured-game-card {
    width: 250px;
  }
  
  .games-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

/* 平板电脑 (768px 以下) */
@media (max-width: 768px) {
  :root {
    --spacing-large: 20px;
    --spacing-xlarge: 32px;
  }
  
  .navbar {
    flex-wrap: wrap;
  }
  
  .navbar-logo {
    order: 1;
    flex-basis: 50%;
  }
  
  .navbar-controls {
    order: 2;
    flex-basis: 50%;
    justify-content: flex-end;
  }
  
  .navbar-search {
    order: 3;
    flex-basis: 100%;
    width: 100%;
    margin-top: var(--spacing-small);
  }
  
  .section-title {
    font-size: 1.5rem;
  }
  
  .featured-game-card {
    width: 220px;
  }
  
  .featured-game-image {
    height: 140px;
  }
  
  .games-grid {
    gap: var(--spacing-medium);
  }
  
  .footer-links {
    gap: var(--spacing-medium);
  }
}

/* 大型手机和小型平板电脑 (576px 以下) */
@media (max-width: 576px) {
  :root {
    --spacing-medium: 12px;
    --spacing-large: 16px;
  }
  
  .container {
    padding: 0 var(--spacing-small);
  }
  
  .navbar-logo {
    font-size: 1.2rem;
  }
  
  .language-selector, .theme-toggle {
    padding: 4px;
  }
  
  .featured-game-card {
    width: 180px;
  }
  
  .featured-game-image {
    height: 120px;
  }
  
  .featured-game-title {
    font-size: 1rem;
  }
  
  .featured-game-description {
    font-size: 0.8rem;
  }
  
  .games-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: var(--spacing-small);
  }
  
  .game-image {
    height: 100px;
  }
  
  .game-info {
    padding: var(--spacing-small);
  }
  
  .game-title {
    font-size: 0.9rem;
    margin-bottom: 4px;
  }
  
  .game-category {
    font-size: 0.7rem;
    padding: 2px 6px;
  }
  
  .footer {
    padding: var(--spacing-medium) 0;
  }
  
  .footer-links {
    flex-direction: column;
    gap: var(--spacing-small);
  }
}

/* 小型手机 (375px 以下) */
@media (max-width: 375px) {
  .navbar-logo {
    font-size: 1.1rem;
  }
  
  .featured-slider {
    flex-direction: column;
    align-items: center;
  }
  
  .featured-game-card {
    width: 100%;
    max-width: 280px;
  }
  
  .featured-game-image {
    height: 150px;
  }
  
  .games-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .game-modal-content {
    width: 95%;
    height: 90%;
  }
}

/* 修复 iPhone 上的一些特殊问题 */
@supports (-webkit-touch-callout: none) {
  .game-modal-content {
    height: 70%; /* 修复 iOS Safari 底部工具栏问题 */
  }
  
  /* 修复 iOS Safari 触摸事件延迟问题 */
  .category-button, 
  .game-card,
  .featured-game-card,
  .game-modal-close,
  .language-selector,
  .theme-toggle {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
} 