/* 移动端激进性能优化样式 */

/* 基础媒体查询 - 针对手机和小平板 */
@media (max-width: 768px) {
  
  /* 完全禁用所有动画和过渡效果 */
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
  
  /* 禁用字体加载，使用系统字体 */
  * {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
  }
  
  /* 禁用所有外部字体 */
  @font-face {
    font-display: none !important;
  }
  
  /* 1. 禁用复杂动画和变换效果 */
  .glass-card {
    transition: none !important;
  }
  
  .glass-card:hover {
    transform: none !important;
    scale: 1 !important;
  }
  
  .feature-card:hover,
  .trending-timer:hover,
  .scenario-card:hover,
  .review-card:hover {
    transform: none !important;
    scale: 1 !important;
    box-shadow: inherit !important;
  }
  
  /* 2. 简化背景和视觉效果 */
  .backdrop-blur-sm {
    backdrop-filter: none !important;
  }
  
  /* 极简化视觉效果 */
  .timer-container,
  .control-btn,
  .timer-preset,
  .sound-option {
    box-shadow: none !important;
    border-radius: 0 !important;
    background: #333 !important;
    border: 1px solid #666 !important;
  }
  
  /* 移除所有渐变和复杂背景 */
  .custom-background,
  .hero-section,
  .timer-progress-container {
    background: #1a1a1a !important;
    background-image: none !important;
  }
  
  /* 3. 隐藏非核心功能提示 */
  .interaction-tips .hidden.md\:block {
    display: none !important;
  }
  
  /* 隐藏更多非核心功能 */
  .background-selector,
  .sound-selector,
  .timer-presets .timer-preset:nth-child(n+4),
  .features-section .feature-card:nth-child(n+3),
  .trust-indicators,
  .related-timers,
  .hero-banner,
  .interaction-tips {
    display: none !important;
  }
  
  /* 隐藏所有图片和SVG */
  img, svg {
    display: none !important;
  }
  
  /* 4. 优化Trending Timers部分 - 只显示前4个 */
  .trending-timer:nth-child(n+5) {
    display: none !important;
  }
  
  /* 5. 优化Features部分 - 减少同时显示的功能卡片 */
  .feature-card:nth-child(n+5) {
    display: none !important;
  }
  
  /* 6. 优化用户评价部分 - 只显示前3个 */
  .review-card:nth-child(n+4) {
    display: none !important;
  }
  
  /* 大幅减少内容显示 */
  .trending-timers .timer-card:nth-child(n+3),
  .features-section .feature-card:nth-child(n+2),
  .review-cards .review-card:nth-child(n+2),
  .faq-container .faq-item:nth-child(n+3),
  .use-cases-section,
  .how-it-works-section,
  .benefits-section {
    display: none !important;
  }
  
  /* 简化导航 */
  .desktop-menu,
  .mobile-menu-toggle {
    display: none !important;
  }
  
  /* 7. 简化场景展示 - 减少到2个主要场景 */
  .scenario-card:nth-child(n+3) {
    display: none !important;
  }
  
  /* 8. 优化FAQ部分 - 减少初始显示数量 */
  .faq-item:nth-child(n+6) {
    display: none !important;
  }
  
  /* 极简化计时器控制 */
  .timer-controls .control-btn:nth-child(n+2),
  .custom-time-input,
  .timer-progress-ring {
    display: none !important;
  }
  
  /* 简化计时器显示 */
  .timer-display {
    font-size: 2rem !important;
    font-weight: normal !important;
  }
  
  /* 9. 简化计时器控件 */
  .timer-preset-btns {
    gap: 1px !important;
  }
  
  .timer-preset {
    padding: 0.25rem 0.5rem !important;
    font-size: 0.75rem !important;
  }
  
  /* 10. 优化声音选择器 */
  .sound-selector .grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem !important;
  }
  
  /* 11. 简化自定义时间输入 */
  .custom-time-input .time-input-group input {
    width: 3rem !important;
    height: 2.5rem !important;
    font-size: 1rem !important;
  }
  
  /* 12. 优化相关工具部分 */
  .grid.grid-cols-2.md\:grid-cols-3.lg\:grid-cols-6 {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  
  .grid.grid-cols-2.md\:grid-cols-4 {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  
  /* 13. 减少信任指标显示 */
  .trust-indicator:nth-child(n+3) {
    display: none !important;
  }
  
  /* 14. 优化步骤说明部分 */
  .steps-container .step:nth-child(n+3) {
    display: none !important;
  }
  
  /* 15. 简化页脚链接 */
  .footer ul li:nth-child(n+4) {
    display: none !important;
  }
}

/* 针对更小屏幕的额外优化 */
@media (max-width: 480px) {
  
  /* 进一步减少内容 */
  .trending-timer:nth-child(n+3) {
    display: none !important;
  }
  
  .feature-card:nth-child(n+3) {
    display: none !important;
  }
  
  .review-card:nth-child(n+3) {
    display: none !important;
  }
  
  .faq-item:nth-child(n+4) {
    display: none !important;
  }
  
  /* 简化网格布局 */
  .grid.grid-cols-2 {
    grid-template-columns: 1fr !important;
  }
  
  /* 减少内边距 */
  .glass-card {
    padding: 1rem !important;
  }
  
  section {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
  }
}

/* 性能优化 - 减少重绘和回流 */
@media (max-width: 768px) {
  
  /* 使用transform3d启用硬件加速，但只用于必要元素 */
  .timer-progress-ring {
    transform: translate3d(0, 0, 0);
  }
  
  /* 优化字体渲染 */
  body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeSpeed;
  }
  
  /* 减少阴影复杂度 */
  .shadow-xl,
  .shadow-lg,
  .shadow-md {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
  }
  
  /* 简化渐变 */
  .bg-gradient-to-r,
  .bg-gradient-to-br {
    background: rgba(0, 0, 0, 0.2) !important;
  }
}

/* 触摸优化 */
@media (max-width: 768px) {
  
  /* 增加触摸目标大小 */
  .timer-preset,
  .control-btn,
  .sound-option {
    min-height: 44px !important;
    min-width: 44px !important;
  }
  
  /* 优化触摸反馈 */
  .timer-preset:active,
  .control-btn:active {
    opacity: 0.7;
    transform: scale(0.95);
  }
}

/* 内存优化 - 延迟加载非关键内容 */
@media (max-width: 768px) {
  
  /* 隐藏装饰性元素 */
  .feature-icon,
  .scenario-icon-container img {
    display: none !important;
  }
  
  /* 简化图标显示 */
  .use-case-mini:nth-child(n+3) {
    display: none !important;
  }
}

/* 电池优化 - 减少动画和复杂计算 */
@media (max-width: 768px) {
  
  /* 禁用所有CSS动画 */
  *,
  *::before,
  *::after {
    animation-duration: 0s !important;
    animation-delay: 0s !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
  }
  
  /* 保留必要的计时器动画 */
  .timer-progress-ring {
    transition: stroke-dashoffset 1s linear !important;
  }
}