/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 顶部导航 */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 20px 0;
}

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

.title {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 语言切换按钮 */
.lang-switch {
    display: flex;
    gap: 10px;
}

.lang-btn {
    padding: 8px 20px;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 14px;
}

.lang-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.lang-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

/* 游戏列表 */
.games-list {
    margin: 40px 0;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* 游戏卡片 */
.game-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.25);
}

/* 游戏封面 */
.game-cover {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
}

/* 游戏内容区 */
.game-content {
    padding: 30px;
}

.game-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #2d3748;
}

/* 截图滚动区 */
.screenshots-container {
    margin: 20px 0;
    overflow: hidden;
}

.screenshots-scroll {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 10px 0;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: #667eea #f1f1f1;
}

.screenshots-scroll::-webkit-scrollbar {
    height: 8px;
}

.screenshots-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.screenshots-scroll::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

.screenshots-scroll::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}

.screenshot {
    min-width: 300px;
    height: 180px;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.screenshot:hover {
    transform: scale(1.05);
}

/* 游戏介绍 */
.game-description {
    margin: 20px 0;
    line-height: 1.8;
    color: #4a5568;
    font-size: 16px;
}

.game-info {
    background: #f7fafc;
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
}

.game-info p {
    margin: 8px 0;
    color: #4a5568;
}

.game-info strong {
    color: #2d3748;
    margin-right: 8px;
}

/* 按钮组 */
.game-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 25px;
}

.game-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.btn-steam {
    background: #1b2838;
    color: white;
}

.btn-steam:hover {
    background: #2a475e;
    transform: translateY(-2px);
}

.btn-baidu {
    background: #2932E1;
    color: white;
}

.btn-baidu:hover {
    background: #1f25b8;
    transform: translateY(-2px);
}

/* 页脚 */
.footer {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px 0;
    text-align: center;
    margin-top: 60px;
    color: #4a5568;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 15px;
    }

    .title {
        font-size: 24px;
    }

    .game-cover {
        height: 250px;
    }

    .game-content {
        padding: 20px;
    }

    .screenshot {
        min-width: 250px;
        height: 150px;
    }

    .game-buttons {
        flex-direction: column;
    }

    .game-btn {
        width: 100%;
        justify-content: center;
    }
}

/* 图片放大模态框 */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.image-modal.show {
    opacity: 1;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    cursor: default;
}

.modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    font-size: 40px;
    color: white;
    cursor: pointer;
    transition: transform 0.2s ease;
    z-index: 1001;
    user-select: none;
}

.modal-close:hover {
    transform: scale(1.2);
}

@media (max-width: 768px) {
    .modal-close {
        top: -30px;
        font-size: 30px;
    }
}

.game-cover-container {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
}

.fallback-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: bold;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

.fallback-cover span {
    max-width: 100%;
    word-wrap: break-word;
}
