/* 平板设备 (768px - 1024px) */
@media screen and (max-width: 1024px) {
    nav {
        padding: 1rem 3%;
    }
    
    main {
        padding: 2rem 3%;
    }
    
    .carousel {
        height: 350px;
    }
    
    .carousel-content h2 {
        font-size: 2rem;
    }
    
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 1.5rem;
    }
    
    .game-detail-container {
        flex-direction: column;
    }
    
    .game-info {
        margin-right: 0;
        margin-bottom: 2rem;
    }
}

/* 移动设备 (小于768px) */
@media screen and (max-width: 768px) {
    nav {
        flex-direction: column;
        padding: 1rem;
    }
    
    .logo-container {
        margin-bottom: 1rem;
    }
    
    .nav-menu {
        margin: 1rem 0;
        gap: 1rem;
    }
    
    .carousel {
        height: 300px;
    }
    
    .carousel-content h2 {
        font-size: 1.5rem;
    }
    
    .carousel-content p {
        font-size: 1rem;
        display: none; /* 在小屏幕上隐藏描述以节省空间 */
    }
    
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .game-card-content h3 {
        font-size: 1rem;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .review-form {
        flex-direction: column;
    }
    
    .form-group {
        margin-right: 0;
        margin-bottom: 1rem;
    }
}

/* 小屏幕移动设备 (小于480px) */
@media screen and (max-width: 480px) {
    .carousel {
        height: 250px;
    }
    
    .carousel-content h2 {
        font-size: 1.2rem;
    }
    
    .carousel-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    .game-detail-header {
        flex-direction: column;
        text-align: center;
    }
    
    .game-icon {
        margin-right: 0;
        margin-bottom: 1rem;
    }
}

/* 游戏播放页特定样式 */
.play-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    z-index: 2000;
    display: flex;
    flex-direction: column;
}

.game-iframe {
    flex: 1;
    width: 100%;
    border: none;
}

.play-controls {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: flex;
    gap: 1rem;
    z-index: 2001;
}

.control-btn {
    background-color: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: background-color 0.3s;
}

.control-btn:hover {
    background-color: rgba(255, 255, 255, 1);
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 2002;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.play-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 4px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 2rem;
}

.play-btn:hover {
    background-color: var(--secondary-color);
}