/* ===== 响应式设计 ===== */

/* 平板设备 (768px - 1024px) */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1.5rem;
    }
    
    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

/* 移动设备 (最大768px) */
@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .main-nav {
        display: none;
        width: 100%;
        order: 3;
        margin-top: 1rem;
    }
    
    .main-nav.active {
        display: block;
    }
    
    .nav-list {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }
    
    .nav-link {
        display: block;
        padding: 1rem;
        text-align: center;
    }
    
    .search-container {
        order: 2;
        max-width: 100%;
        margin-top: 1rem;
    }
    
    .logo {
        order: 1;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .hero-actions .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1rem;
    }
    
    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 1rem;
    }
    
    .category-card {
        padding: 1.5rem 1rem;
    }
    
    .category-icon {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filter-controls {
        width: 100%;
    }
    
    .filter-select {
        flex: 1;
        min-width: 150px;
    }
    
    .modal-content {
        max-width: 100vw;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .modal-body {
        height: 100vh;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
        font-size: 1.25rem;
    }
    
    .game-card-image {
        height: 150px;
        font-size: 3rem;
    }
    
    .game-card-content {
        padding: 1rem;
    }
    
    .game-card-title {
        font-size: 1.1rem;
    }
    
    .game-card-description {
        font-size: 0.85rem;
    }
}

/* 小屏移动设备 (最大480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .section-title {
        font-size: 1.25rem;
    }
    
    .title-icon {
        font-size: 1.5rem;
    }
    
    .logo-text {
        font-size: 1.25rem;
    }
    
    .logo-icon {
        font-size: 1.5rem;
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .nav-link,
    .btn,
    .game-card,
    .category-card {
        -webkit-tap-highlight-color: rgba(99, 102, 241, 0.2);
    }
    
    .game-card:active,
    .category-card:active {
        transform: scale(0.98);
    }
}

/* 横屏模式 */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-title {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    .modal-body {
        height: 95vh;
    }
}

