/* 全局样式 */
:root {
    --primary-color: #4a6cfa;
    --secondary-color: #34c3ff;
    --dark-color: #1a1a2e;
    --light-color: #f5f5f7;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --gray-color: #6c757d;
    --light-gray: #e9ecef;
}

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

body {
    font-family: 'Noto Sans', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: var(--light-color);
}

html[lang="zh"] body {
    font-family: 'Noto Sans SC', sans-serif;
}

html[lang="ja"] body {
    font-family: 'Noto Sans JP', sans-serif;
}

html[lang="ko"] body {
    font-family: 'Noto Sans KR', sans-serif;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* 头部样式 */
header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
}

.language-selector-container {
    margin-left: 20px;
}

#language-selector {
    padding: 5px 10px;
    border-radius: 4px;
    border: 1px solid var(--light-gray);
    background-color: white;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
}

#language-selector:hover {
    border-color: var(--primary-color);
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo h1 a {
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

nav ul {
    display: flex;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: var(--dark-color);
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

nav ul li a:hover,
nav ul li a.active {
    background-color: var(--primary-color);
    color: white;
}

/* 英雄区域样式 */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    text-align: center;
    padding: 80px 0;
}

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

.hero p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
}

/* 游戏列表样式 */
.games {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
    color: var(--dark-color);
}

/* 筛选器样式 */
.filter-container {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.filter-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-btn {
    background-color: var(--light-gray);
    color: var(--gray-color);
    border: 2px solid transparent;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.9rem;
}

.filter-btn:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.filter-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 游戏卡片过渡动画 */
.game-card {
    transition: all 0.3s ease;
}

.game-card.hidden {
    display: none;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    min-height: 200px;
}

.game-grid.small {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.game-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.game-card.featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.game-thumbnail {
    height: 200px;
    background-color: var(--light-gray);
    position: relative;
    overflow: hidden;
}

.game-card.featured .game-thumbnail {
    height: 300px;
}

.game-thumbnail img,
.game-thumbnail-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.game-thumbnail-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.game-card:hover .game-thumbnail img,
.game-card:hover .game-thumbnail-bg {
    transform: scale(1.05);
}

.game-thumbnail.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--light-gray);
    color: var(--gray-color);
    font-size: 1.5rem;
}

.game-info {
    padding: 20px;
}

.game-info h3, .game-info h4 {
    margin-bottom: 10px;
    color: var(--dark-color);
}

.game-info p {
    color: var(--gray-color);
    margin-bottom: 15px;
}

.play-btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s ease;
}

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

/* 关于我们区域样式 */
.about {
    background-color: white;
    padding: 60px 0;
}

.about p {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    color: var(--gray-color);
}

/* 页脚样式 */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 30px 0;
    text-align: center;
}

/* 游戏页面样式 */
.game-page {
    background-color: var(--light-color);
}

.game-container {
    padding: 40px 0;
}

.game-title {
    text-align: center;
    margin-bottom: 20px;
    color: var(--dark-color);
}

.game-frame-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 宽高比 */
    background-color: #000;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    margin-bottom: 40px;
}

#game-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

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

.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 linear infinite;
    margin-bottom: 15px;
}

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

.game-info-header {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    text-align: center;
}

.game-info-header .game-title {
    margin-bottom: 10px;
}

.game-info-header .game-version {
    color: var(--gray-color);
    margin-bottom: 15px;
    font-style: italic;
}

.game-info-header .game-description {
    color: var(--gray-color);
    line-height: 1.6;
}

.related-games {
    padding: 40px 0;
}

.related-games h3 {
    margin-bottom: 25px;
    text-align: center;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .game-card.featured {
        grid-template-columns: 1fr;
    }
    
    .filter-container {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .filter-buttons {
        gap: 8px;
    }
    
    .filter-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    .hero {
        padding: 50px 0;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .game-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .filter-btn {
        width: 100%;
        max-width: 200px;
        padding: 10px 20px;
    }
    
    .hero h2 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    nav ul li {
        margin-left: 10px;
    }
    
    nav ul li a {
        padding: 6px 10px;
    }
} 