/* ============================================
   足球预测分析平台 - 响应式样式文件
   版本：1.0
   最后更新：2026-03-07
   ============================================ */

/* 平板设备（768px - 1024px） */
@media screen and (max-width: 1024px) {
    .container {
        max-width: 960px;
    }
    
    .hero-title {
        font-size: 2.8rem;
    }
    
    .hero-stats {
        gap: var(--spacing-lg);
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .predictions-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
    
    .analysis-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

/* 移动设备（481px - 767px） */
@media screen and (max-width: 768px) {
    html {
        font-size: 14px;
    }
    
    .container {
        max-width: 720px;
    }
    
    /* 导航栏 */
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: var(--bg-primary);
        flex-direction: column;
        padding: var(--spacing-lg);
        gap: var(--spacing-md);
        transition: left var(--transition-base);
        overflow-y: auto;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .auth-buttons {
        flex-direction: column;
        width: 100%;
        margin-top: var(--spacing-md);
    }
    
    .auth-buttons .btn {
        width: 100%;
    }
    
    /* 主横幅 */
    .hero {
        padding: 120px 0 60px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-title .subtitle {
        font-size: 1.25rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-stats {
        flex-wrap: wrap;
        gap: var(--spacing-md);
    }
    
    .stat-item {
        flex: 1 1 40%;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .hero-cta {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .hero-cta .btn-large {
        width: 100%;
    }
    
    /* 区块 */
    section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    /* 筛选器 */
    .filter-bar {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-select {
        flex: 1;
    }
    
    /* 预测卡片 */
    .predictions-grid {
        grid-template-columns: 1fr;
    }
    
    /* 赛事卡片 */
    .match-card {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    .match-status {
        width: 100%;
    }
    
    .match-details {
        width: 100%;
        flex-direction: column;
    }
    
    .match-score {
        min-width: auto;
        width: 100%;
    }
    
    .match-meta {
        min-width: auto;
        width: 100%;
        text-align: center;
    }
    
    .match-actions {
        width: 100%;
        justify-content: center;
    }
    
    /* 分析网格 */
    .analysis-grid {
        grid-template-columns: 1fr;
    }
    
    /* 历史统计 */
    .history-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* 特性网格 */
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* CTA 区域 */
    .cta-section {
        padding: 60px 0;
    }
    
    .cta-content h2 {
        font-size: 1.75rem;
    }
    
    .cta-content p {
        font-size: 1rem;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .cta-buttons .btn-large {
        width: 100%;
    }
    
    /* 页脚 */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    /* 回到顶部 */
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1.25rem;
    }
    
    /* 表格 */
    .history-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .history-table {
        min-width: 600px;
    }
}

/* 小屏移动设备（320px - 480px） */
@media screen and (max-width: 480px) {
    html {
        font-size: 13px;
    }
    
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    /* 主横幅 */
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-title .subtitle {
        font-size: 1rem;
    }
    
    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stat-item {
        flex: 1 1 100%;
    }
    
    /* 预测卡片 */
    .prediction-card {
        padding: var(--spacing-md);
    }
    
    .match-teams {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    .team-logo {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .vs {
        padding: var(--spacing-sm) 0;
    }
    
    /* 分析卡片 */
    .analysis-card {
        padding: var(--spacing-lg);
    }
    
    .analysis-icon {
        font-size: 3rem;
    }
    
    /* 历史统计 */
    .history-stats {
        grid-template-columns: 1fr;
    }
    
    .history-stat-card {
        padding: var(--spacing-lg);
    }
    
    .stat-value {
        font-size: 2.5rem;
    }
    
    /* 特性网格 */
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .feature-icon {
        font-size: 3rem;
    }
    
    /* Tabs */
    .tabs {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        flex: 1 1 auto;
        padding: 0.5rem 1rem;
        font-size: 0.95rem;
    }
}

/* 横屏平板设备 */
@media screen and (max-width: 1024px) and (orientation: landscape) {
    .hero {
        padding: 100px 0 50px;
    }
    
    .hero-stats {
        gap: var(--spacing-md);
    }
}

/* 高分辨率设备优化 */
@media screen and (min-resolution: 192dpi),
       screen and (min-resolution: 2dppx) {
    .hero-bg {
        background-size: 200px 200px;
    }
}

/* 打印样式 */
@media print {
    .header,
    .hero-cta,
    .filter-bar,
    .tabs,
    .load-more-container,
    .back-to-top,
    .cta-section,
    .footer {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    section {
        page-break-inside: avoid;
    }
    
    .prediction-card,
    .match-card,
    .analysis-card {
        page-break-inside: avoid;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #1a252f;
        --bg-secondary: #2c3e50;
        --text-primary: #ecf0f1;
        --text-secondary: #bdc3c7;
    }
    
    .header {
        background-color: var(--bg-primary);
    }
    
    .prediction-card,
    .match-card,
    .analysis-card,
    .history-table {
        background-color: var(--bg-secondary);
    }
    
    .filter-select {
        background-color: var(--bg-primary);
        color: var(--text-primary);
        border-color: var(--text-secondary);
    }
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}
