/* ============================================
   足球赛事情报网 - 响应式样式文件
   ============================================ */

/* 平板设备 (768px - 1024px) */
@media screen and (max-width: 1024px) {
    .hero-title {
        font-size: 36px;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
    
    .hero-stats {
        gap: 30px;
    }
    
    .stat-number {
        font-size: 36px;
    }
    
    .news-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
    
    .predictions-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

/* 移动设备 (481px - 767px) */
@media screen and (max-width: 768px) {
    /* 头部导航 */
    .main-nav {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--bg-white);
        transition: var(--transition);
        box-shadow: var(--shadow-md);
        overflow-y: auto;
    }
    
    .main-nav.active {
        left: 0;
    }
    
    .main-nav .nav-list {
        flex-direction: column;
        gap: 0;
        padding: 20px;
    }
    
    .main-nav a {
        display: block;
        padding: 15px 20px;
        border-bottom: 1px solid var(--border-color);
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }
    
    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
    
    .header-actions {
        gap: 10px;
    }
    
    .search-box {
        display: none;
    }
    
    .search-box.active {
        display: flex;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        padding: 15px;
        background: var(--bg-white);
        box-shadow: var(--shadow-md);
    }
    
    .search-box input {
        width: 100%;
    }
    
    /* 英雄横幅 */
    .hero-section {
        padding: 50px 0;
    }
    
    .hero-title {
        font-size: 28px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .stat-number {
        font-size: 32px;
    }
    
    /* 区块标题 */
    .section {
        padding: 40px 0;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    /* 新闻网格 */
    .news-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    /* 比赛过滤器 */
    .matches-filter {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 10px;
    }
    
    .filter-btn {
        white-space: nowrap;
    }
    
    /* 比赛卡片 */
    .match-card {
        flex-direction: column;
        gap: 15px;
    }
    
    .match-info {
        flex-direction: column;
        width: 100%;
    }
    
    .teams {
        flex-direction: column;
        width: 100%;
    }
    
    .team {
        width: 100%;
        justify-content: center;
    }
    
    .vs {
        padding: 10px 0;
    }
    
    /* 球队表格 */
    .teams-table {
        font-size: 14px;
    }
    
    .teams-table th,
    .teams-table td {
        padding: 10px 5px;
    }
    
    .team-logo {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }
    
    /* 预测卡片 */
    .predictions-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .prediction-teams {
        font-size: 16px;
    }
    
    /* CTA 区域 */
    .cta-section {
        padding: 40px 0;
    }
    
    .cta-content h2 {
        font-size: 24px;
    }
    
    .cta-content p {
        font-size: 16px;
    }
    
    .btn-cta {
        padding: 12px 30px;
        font-size: 16px;
    }
    
    /* 页脚 */
    .footer {
        padding: 40px 0 15px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    /* 弹窗 */
    .modal-content {
        margin: 20px;
        padding: 20px;
        max-width: 100%;
    }
    
    .modal h2 {
        font-size: 24px;
    }
}

/* 小屏幕移动设备 (320px - 480px) */
@media screen and (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .logo-text {
        font-size: 18px;
    }
    
    .logo-icon {
        font-size: 24px;
    }
    
    .btn-login,
    .btn-register {
        padding: 6px 15px;
        font-size: 14px;
    }
    
    .hero-title {
        font-size: 24px;
    }
    
    .hero-subtitle {
        font-size: 14px;
    }
    
    .stat-number {
        font-size: 28px;
    }
    
    .stat-label {
        font-size: 14px;
    }
    
    .section-title {
        font-size: 20px;
    }
    
    .news-image {
        height: 160px;
    }
    
    .news-content {
        padding: 15px;
    }
    
    .news-title {
        font-size: 16px;
    }
    
    .match-time {
        min-width: 60px;
    }
    
    .team-logo {
        width: 25px;
        height: 25px;
        font-size: 14px;
    }
    
    .team-name {
        font-size: 14px;
    }
    
    .score {
        font-size: 20px;
    }
    
    .teams-table {
        font-size: 12px;
    }
    
    .teams-table th,
    .teams-table td {
        padding: 8px 3px;
    }
    
    .prediction-card {
        padding: 15px;
    }
    
    .prediction-teams {
        font-size: 14px;
    }
    
    .prediction-value {
        font-size: 18px;
    }
    
    .form-group input {
        font-size: 14px;
        padding: 10px 12px;
    }
    
    .btn-submit {
        font-size: 16px;
        padding: 12px;
    }
}

/* 横屏移动设备 */
@media screen and (max-width: 768px) and (orientation: landscape) {
    .hero-section {
        padding: 40px 0;
    }
    
    .main-nav {
        height: auto;
        max-height: calc(100vh - 70px);
    }
}

/* 高分辨率移动设备 */
@media screen and (min-resolution: 192dpi) {
    .logo-icon,
    .team-logo,
    .search-btn {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* 打印样式 */
@media print {
    .header,
    .footer,
    .hero-section,
    .cta-section,
    .modal,
    .btn-login,
    .btn-register,
    .mobile-menu-btn,
    .search-box,
    .matches-filter {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    .container {
        max-width: 100%;
    }
    
    .section {
        page-break-inside: avoid;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #ecf0f1;
        --text-secondary: #bdc3c7;
        --bg-light: #2c3e50;
        --bg-white: #34495e;
        --border-color: #4a6278;
    }
    
    .header {
        background: var(--bg-white);
    }
    
    .match-card,
    .news-card,
    .prediction-card,
    .teams-table {
        background: var(--bg-white);
    }
    
    .modal-content {
        background: var(--bg-white);
    }
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
