/* 全局样式 */
:root {
    --primary-color: #4a90e2;
    --secondary-color: #2c3e50;
    --text-color: #333;
    --background-color: #f5f6fa;
    --header-height: 60px;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

/* 头部导航样式 */
.header {
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.logo-image {
    height: 40px;
    width: auto;
    margin-right: 10px;
}

.site-name {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    transition: color 0.3s ease;
}

.site-name:hover {
    color: #007bff;
}

.logo h1 {
    font-size: 24px;
    color: var(--primary-color);
    margin: 0;
}

.lang-toggle {
    background: none;
    border: 1px solid var(--primary-color);
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    color: var(--primary-color);
    transition: all var(--transition-speed);
}

.lang-toggle:hover {
    background-color: var(--primary-color);
    color: white;
}

/* 主要内容区域 */
.main-content {
    margin-top: var(--header-height);
    padding: 40px 20px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* 英雄区域样式 */
.hero-section {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #2c3e50, #1f143e);
    color: white;
    border-radius: 12px;
    margin-bottom: 40px;
}

.hero-section h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero-section .tagline {
    font-size: 1.4rem;
    margin-bottom: 25px;
    color: rgba(255, 255, 255, 0.9);
}

.hero-section .hero-description {
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.8);
}

/* 游戏区域样式 */
.games-section {
    margin-bottom: 60px;
}

.games-section h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2rem;
    color: var(--secondary-color);
}

/* 游戏卡片网格 */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, 478px);
    gap: 30px;
    padding: 20px;
    justify-content: center;
}

.popular-games {
    grid-template-columns: repeat(auto-fit, 478px);
}

.new-releases {
    grid-template-columns: repeat(auto-fit, 478px);
}

/* 游戏卡片链接样式 */
.game-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.3s ease;
}

.game-card-link:hover {
    transform: translateY(-5px);
}

.game-card-link:hover .game-card {
    transform: none;
}

/* 游戏卡片样式 */
.game-card {
    background: #1f143e;
    border-radius: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    width: 478px;
    margin: 0 auto;
}

/* 移除游戏卡片自身的悬停效果，因为现在由链接控制 */
.game-card:hover {
    transform: none;
}

/* 游戏预览区域样式 */
.game-preview {
    position: relative;
    width: 478px;
    height: 287px;
    background: #1f143e;
    overflow: hidden;
    border-radius: 0;
}

.game-preview iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 隐藏游戏控制栏 */
.game-preview::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50px; /* 控制栏高度 */
    background-color: #1f143e;
    z-index: 10;
    pointer-events: none; /* 允许点击穿透 */
    display: none; /* 默认隐藏，如果hideBar参数无效则启用 */
}

/* 游戏信息区域 */
.game-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: #1f143e;
}

.game-info h3 {
    font-size: 1.25rem;
    margin: 0;
    color: #ffffff;
    font-weight: 600;
}

.game-description {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0.5rem 0;
    line-height: 1.4;
}

.rating {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.rating-stars {
    display: flex;
    gap: 3px;
}

.rating-stars i {
    color: #ffd700;
    font-size: 0.9rem;
}

.rating-count {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

/* 响应式布局 */
@media (max-width: 768px) {
    .game-info h3 {
        font-size: 1.1rem;
    }
    
    .game-description {
        font-size: 0.85rem;
    }
    
    .rating-stars i {
        font-size: 0.8rem;
    }
    
    .rating-count {
        font-size: 0.8rem;
    }

    .game-card {
        width: 100%;
    }

    .game-preview {
        width: 100%;
        height: auto;
        padding-top: 60.04%;
    }

    .game-grid {
        grid-template-columns: 1fr;
    }

    .nav-container {
        padding: 0 15px;
    }

    .logo h1 {
        font-size: 20px;
    }

    .lang-toggle {
        padding: 6px 12px;
        font-size: 14px;
    }

    .hero-section {
        padding: 40px 15px;
    }

    .hero-section h2 {
        font-size: 2rem;
    }

    .hero-section .tagline {
        font-size: 1.2rem;
        margin-bottom: 20px;
    }

    .hero-section .hero-description {
        font-size: 1rem;
        padding: 0 15px;
    }

    .site-name {
        font-size: 20px;
    }
    
    .logo-image {
        height: 32px;
    }
}

/* 页脚样式 */
.footer {
    background-color: var(--secondary-color);
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        height: auto;
        padding: 10px;
    }

    .nav-links {
        flex-direction: column;
        text-align: center;
        gap: 10px;
        margin: 10px 0;
    }

    .hero-section h2 {
        font-size: 2rem;
    }

    .game-grid {
        grid-template-columns: 1fr;
        padding: 10px;
    }

    .game-card {
        margin-bottom: 20px;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.game-card {
    animation: fadeIn 0.5s ease-out;
}

/* 标签导航样式 */
.tab-nav {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    gap: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 10px;
    overflow-x: auto;
}

.tab-btn {
    font-size: 20px;
    font-weight: 600;
    color: var(--secondary-color);
    background: none;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    position: relative;
    transition: color 0.3s ease;
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #007bff;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.tab-btn:hover {
    color: #007bff;
}

.tab-btn.active {
    color: #007bff;
}

.tab-btn.active::after {
    transform: scaleX(1);
}

/* 标签内容区域 */
.tab-content {
    position: relative;
}

.tab-pane {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tab-pane.active {
    display: block;
    opacity: 1;
}

/* 移动端支持 */
@media (max-width: 768px) {
    .tab-nav {
        justify-content: flex-start;
        padding: 0 15px 10px;
    }
    
    .tab-btn {
        font-size: 18px;
        padding: 8px 15px;
        white-space: nowrap;
    }
} 