/* ===================================
   游戏页面移动端特殊样式
   games.html 专用移动端优化
   =================================== */

/* === 平板尺寸优化 (992px以下) === */
@media screen and (max-width: 992px) {
    .game-module {
        grid-template-columns: 1fr !important;
        text-align: center;
    }

    .game-module:nth-child(even) .game-module-image {
        order: 0; /* Reset order for stacked layout */
    }
    
    .game-module-image img {
        max-height: 450px;
        width: 100% !important;
        object-fit: contain;
    }
}

@media screen and (max-width: 768px) {
    
    /* === 游戏页面Hero区域优化 === */
    
    .hero {
        background: linear-gradient(135deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.6) 100%);
        position: relative;
    }
    
    .hero::after {
        background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.2) 100%);
    }
    
    .hero-title {
        background: linear-gradient(135deg, #E0B8A0, #FF6B35);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        font-size: 1.5rem !important; /* 严格遵循Hero标题规范 */
        text-shadow: none;
    }
    
    /* === 游戏模块区域优化 === */
    
    .game-modules-container {
        display: flex !important;
        flex-direction: column;
        gap: 2rem;
    }
    
    .game-module {
        background: linear-gradient(145deg, #1c1c1c, #111);
        border: 1px solid rgba(224, 184, 160, 0.2);
        border-radius: 20px;
        padding: 2rem !important;
        display: flex !important;
        flex-direction: column;
        gap: 2rem;
        position: relative;
        overflow: hidden;
    }
    
    .game-module::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(135deg, rgba(224, 184, 160, 0.03) 0%, transparent 60%);
        pointer-events: none;
    }
    
    .game-module:hover {
        transform: translateY(-5px);
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
        border-color: rgba(224, 184, 160, 0.4);
    }
    
    .game-module-image {
        order: 1;
        text-align: center;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .game-module-image img {
        width: 100% !important;
        max-width: 100%;
        height: auto !important;
        max-height: 400px;
        object-fit: contain;
        border-radius: 15px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
        transition: all 0.3s ease;
    }
    
    .game-module:hover .game-module-image img {
        transform: scale(1.05);
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
    }
    
    .game-module-content {
        order: 2;
        text-align: center;
        align-items: center !important;
    }
    
    .game-module-title {
        font-size: 1.3rem !important; /* 遵循Section标题规范 */
        color: var(--primary-color, #E0B8A0);
        margin-bottom: 1rem;
        font-weight: 700;
    }
    
    .game-module-description {
        color: rgba(255, 255, 255, 0.8);
        line-height: 1.6;
        margin-bottom: 1.5rem;
    }
    
    .game-module .cta-button {
        background: var(--primary-gradient, linear-gradient(135deg, #E0B8A0, #FF6B35));
        color: #000;
        font-weight: 600;
        padding: 0.8rem 2rem;
        border-radius: 25px;
        box-shadow: 0 4px 15px rgba(224, 184, 160, 0.3);
        transition: all 0.3s ease;
    }
    
    .game-module .cta-button:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(224, 184, 160, 0.4);
    }
    
    /* 游戏按钮容器移动端优化 */
    .game-buttons {
        display: flex !important;
        flex-direction: row;
        gap: 1rem;
        width: 100%;
        justify-content: center;
        align-items: center;
    }
    
    .game-buttons .cta-button {
        flex: 1;
        max-width: 200px !important;
        min-width: 120px !important;
        padding: 1rem 1.5rem !important;
        font-size: 0.9rem !important;
        text-align: center;
    }
    
    /* === 游戏分类标签优化 === */
    
    .game-categories-section {
        background: #050505;
        padding: 3rem 0;
        position: relative;
    }
    
    .game-categories-section::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: radial-gradient(circle at 70% 30%, rgba(224, 184, 160, 0.04) 0%, transparent 60%);
        pointer-events: none;
    }
    
    .category-tabs {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: center;
        margin-bottom: 2rem;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 25px;
        padding: 0.8rem;
    }
    
    .category-tab {
        background: transparent;
        border: none;
        color: rgba(255, 255, 255, 0.7);
        padding: 0.8rem 1.5rem;
        border-radius: 20px;
        font-size: 0.8rem !important;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.3s ease;
        white-space: nowrap;
        flex: 1;
        min-width: 80px;
        max-width: 120px;
    }
    
    .category-tab.active,
    .category-tab:hover {
        background: var(--primary-color, #E0B8A0);
        color: #000;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(224, 184, 160, 0.3);
    }
    
    .category-content {
        display: none;
    }
    
    .category-content.active {
        display: block;
    }
    
    .games-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem;
    }
    
    .game-card {
        background: linear-gradient(145deg, #1c1c1c, #111);
        border: 1px solid rgba(224, 184, 160, 0.15);
        border-radius: 15px;
        overflow: hidden;
        transition: all 0.3s ease;
        position: relative;
    }
    
    .game-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(135deg, rgba(224, 184, 160, 0.02) 0%, transparent 60%);
        pointer-events: none;
        z-index: 1;
    }
    
    .game-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
        border-color: rgba(224, 184, 160, 0.4);
    }
    
    .game-card-image {
        width: 100%;
        height: 120px;
        background: rgba(224, 184, 160, 0.1);
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        overflow: hidden;
    }
    
    .game-card-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: all 0.3s ease;
    }
    
    .game-card:hover .game-card-image img {
        transform: scale(1.1);
    }
    
    .game-card-icon {
        font-size: 2.5rem;
        color: var(--primary-color, #E0B8A0);
        z-index: 2;
    }
    
    .game-card-content {
        padding: 1rem;
        text-align: center;
        position: relative;
        z-index: 2;
    }
    
    .game-card-title {
        font-size: 0.9rem !important;
        font-weight: 600;
        color: #fff;
        margin-bottom: 0.5rem;
    }
    
    .game-card-description {
        font-size: 0.75rem !important;
        color: rgba(255, 255, 255, 0.7);
        margin-bottom: 1rem;
        line-height: 1.4;
    }
    
    .game-card-button {
        background: rgba(224, 184, 160, 0.1);
        border: 1px solid rgba(224, 184, 160, 0.3);
        color: var(--primary-color, #E0B8A0);
        padding: 0.5rem 1rem;
        border-radius: 15px;
        font-size: 0.75rem !important;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.3s ease;
        width: 100%;
    }
    
    .game-card-button:hover {
        background: var(--primary-color, #E0B8A0);
        color: #000;
        transform: translateY(-2px);
    }
    
    /* === FAQ区域优化 === */
    
    .seo-content {
        background: #000 !important;
        padding: 3rem 1rem !important;
        margin-top: 2rem !important;
    }
    
    .seo-content h2 {
        color: var(--primary-color, #E0B8A0) !important;
        text-align: center;
        margin-bottom: 2rem;
        font-size: 1.3rem !important; /* 遵循Section标题规范 */
    }
    
    .faq-section {
        max-width: 100% !important;
    }
    
    .faq-item {
        background: linear-gradient(145deg, #1c1c1c, #111) !important;
        border: 1px solid rgba(224, 184, 160, 0.15) !important;
        border-radius: 15px !important;
        padding: 1.5rem !important;
        margin-bottom: 1.5rem !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
        position: relative;
        overflow: hidden;
    }
    
    .faq-item::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(135deg, rgba(224, 184, 160, 0.02) 0%, transparent 60%);
        pointer-events: none;
    }
    
    .faq-item h3 {
        color: var(--primary-color, #E0B8A0) !important;
        font-size: 0.95rem !important;
        margin-bottom: 1rem !important;
        font-weight: 600;
        position: relative;
        z-index: 2;
    }
    
    .faq-item p {
        color: rgba(255, 255, 255, 0.8) !important;
        line-height: 1.6 !important;
        font-size: 0.8rem !important;
        position: relative;
        z-index: 2;
        margin: 0;
    }
    
    /* === 游戏优势展示 === */
    
    .game-advantages-section {
        background: #050505;
        padding: 3rem 0;
    }
    
    .advantages-grid {
        display: grid;
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }
    
    .advantage-card {
        background: linear-gradient(145deg, #1c1c1c, #111);
        border: 1px solid rgba(224, 184, 160, 0.15);
        border-radius: 15px;
        padding: 2rem;
        text-align: center;
        position: relative;
        overflow: hidden;
        transition: all 0.3s ease;
    }
    
    .advantage-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(135deg, rgba(224, 184, 160, 0.03) 0%, transparent 50%);
        pointer-events: none;
    }
    
    .advantage-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
        border-color: rgba(224, 184, 160, 0.4);
    }
    
    .advantage-icon {
        width: 70px;
        height: 70px;
        background: rgba(224, 184, 160, 0.1);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto 1.5rem;
        font-size: 1.8rem;
        color: var(--primary-color, #E0B8A0);
        position: relative;
        z-index: 2;
    }
    
    .advantage-title {
        font-size: 1rem !important;
        font-weight: 600;
        color: #fff;
        margin-bottom: 1rem;
        position: relative;
        z-index: 2;
    }
    
    .advantage-description {
        color: rgba(255, 255, 255, 0.8);
        line-height: 1.6;
        position: relative;
        z-index: 2;
    }
    
    /* === 热门游戏推荐 === */
    
    .popular-games-section {
        background: #000;
        padding: 3rem 0;
        position: relative;
    }
    
    .popular-games-section::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: radial-gradient(circle at 30% 70%, rgba(224, 184, 160, 0.04) 0%, transparent 60%);
        pointer-events: none;
    }
    
    .popular-games-carousel {
        display: flex;
        gap: 1rem;
        overflow-x: auto;
        padding: 1rem 0;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }
    
    .popular-game-card {
        flex: 0 0 250px;
        background: linear-gradient(145deg, #1c1c1c, #111);
        border: 1px solid rgba(224, 184, 160, 0.15);
        border-radius: 15px;
        overflow: hidden;
        scroll-snap-align: start;
        transition: all 0.3s ease;
    }
    
    .popular-game-card:hover {
        transform: scale(1.05);
        border-color: rgba(224, 184, 160, 0.4);
    }
    
    .popular-game-image {
        width: 100%;
        height: 140px;
        background: rgba(224, 184, 160, 0.1);
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .popular-game-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .popular-game-info {
        padding: 1rem;
        text-align: center;
    }
    
    .popular-game-name {
        font-size: 0.9rem !important;
        font-weight: 600;
        color: #fff;
        margin-bottom: 0.5rem;
    }
    
    .popular-game-rating {
        display: flex;
        justify-content: center;
        gap: 0.2rem;
        margin-bottom: 0.5rem;
    }
    
    .star {
        color: #FFD700;
        font-size: 0.8rem;
    }
    
    .popular-game-players {
        font-size: 0.75rem !important;
        color: rgba(255, 255, 255, 0.7);
    }
}

/* === 小屏手机特殊优化 (480px以下) === */
@media screen and (max-width: 480px) {
    
    .hero-title {
        font-size: 1.5rem !important; /* 严格遵循Hero标题规范 */
    }
    
    .game-module {
        padding: 1.5rem !important;
    }
    
    .game-module-image img {
        max-height: 300px !important;
        width: 100% !important;
        object-fit: contain;
    }
    
    .game-buttons .cta-button {
        padding: 0.7rem 1rem !important;
        font-size: 0.8rem !important;
        min-width: 100px !important;
        max-width: 150px !important;
    }
    
    .category-tabs {
        flex-direction: column;
        align-items: stretch;
        padding: 0.5rem;
    }
    
    .category-tab {
        flex: none;
        max-width: none;
        margin-bottom: 0.5rem;
    }
    
    .games-grid {
        grid-template-columns: 1fr !important;
    }
    
    .game-card-image {
        height: 100px;
    }
    
    .faq-item {
        padding: 1rem !important;
    }
    
    .advantage-card {
        padding: 1.5rem;
    }
    
    .advantage-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .popular-game-card {
        flex: 0 0 200px;
    }
    
    .popular-game-image {
        height: 120px;
    }
}

/* === 横屏模式特殊优化 === */
@media screen and (max-width: 768px) and (orientation: landscape) {
    
    .hero {
        min-height: 70vh !important;
    }
    
    .game-modules-container {
        gap: 1.5rem;
    }
    
    .game-module {
        flex-direction: row;
        align-items: center;
    }
    
    .game-module-image {
        flex: 0 0 45%;
        order: 1;
    }
    
    .game-module-content {
        flex: 1;
        order: 2;
        text-align: left;
        padding-left: 2rem;
    }
    
    .game-module:nth-child(even) .game-module-image {
        order: 2;
    }
    
    .game-module:nth-child(even) .game-module-content {
        order: 1;
        padding-left: 0;
        padding-right: 2rem;
    }
    
    .games-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    
    .advantages-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    /* 横屏模式按钮优化 */
    .game-buttons {
        flex-direction: row !important;
        gap: 1rem;
    }
    
    .game-buttons .cta-button {
        flex: 1;
        min-width: 120px;
        max-width: 200px;
    }
}
