/* 基础样式重置和变量 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --border-radius: 8px;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--dark-color);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

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

/* 隐藏类 */
.hidden {
    display: none !important;
}

/* 头部 */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    display: inline-block;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.back-btn {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.back-btn:hover {
    color: var(--primary-color);
}

/* 搜索 */
.search-container {
    position: relative;
    max-width: 400px;
    margin-left: auto;
}

.search-input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius);
    font-size: 16px;
    outline: none;
    transition: var(--transition);
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary-color);
}

/* 主内容 */
.main {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

/* 统计信息 */
.stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.stat-item {
    background: rgba(255, 255, 255, 0.9);
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow);
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
}

.stat-label {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 4rem 0;
    color: white;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 错误状态 */
.error, .no-results {
    text-align: center;
    padding: 4rem 2rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--border-radius);
    margin: 2rem 0;
    box-shadow: var(--shadow);
}

.error h2, .no-results h2 {
    color: var(--danger-color);
    margin-bottom: 1rem;
}

.retry-btn, .clear-search-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 16px;
    margin-top: 1rem;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
}

.retry-btn:hover, .clear-search-btn:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

/* 游戏详情页 */
.game-detail {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.game-header {
    display: flex;
    gap: 2rem;
    padding: 2rem;
    background: linear-gradient(45deg, #f8f9fa, #e9ecef);
}

.game-icon-large img {
    width: 120px;
    height: 120px;
    border-radius: var(--border-radius);
    object-fit: cover;
    box-shadow: var(--shadow);
}

.game-info h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.game-meta {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    background: var(--warning-color);
    color: white;
}

.status-badge.complete {
    background: var(--success-color);
}

.status-badge.incomplete {
    background: var(--danger-color);
}

/* 游戏内容 */
.game-content {
    padding: 2rem;
}

.game-content section {
    margin-bottom: 3rem;
}

.game-content h3 {
    margin-bottom: 1rem;
    color: var(--dark-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

/* 截图网格 */
.screenshot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.screenshot-item {
    text-align: center;
}

.screenshot-item img {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.screenshot-item p {
    margin-top: 0.5rem;
    color: var(--secondary-color);
    font-weight: 500;
}

/* 动作按钮 */
.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.play-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

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

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

.play-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.play-btn small {
    margin-top: 0.5rem;
    opacity: 0.8;
    font-size: 0.9rem;
}

/* 外部链接 */
.external-links h4 {
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.link-list {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.external-link {
    background: var(--light-color);
    color: var(--dark-color);
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    transition: var(--transition);
    border: 2px solid transparent;
}

.external-link:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 底部 */
.footer {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: auto;
}

.footer a {
    color: var(--primary-color);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .search-container {
        max-width: 100%;
        margin-top: 1rem;
    }
    
    .nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .game-header {
        flex-direction: column;
        text-align: center;
    }
    
    .game-info h1 {
        font-size: 2rem;
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
    }
    
    .link-list {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .main {
        padding: 1rem 0;
    }
    
    .game-content {
        padding: 1rem;
    }
    
    .screenshot-grid {
        grid-template-columns: 1fr;
    }
}

        /* 试玩按钮 - 优先显示 */
        .primary-actions {
            margin: 20px 0;
            padding: 20px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border-radius: 12px;
            box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
        }

        .primary-actions .action-buttons {
            display: flex;
            gap: 15px;
            justify-content: center;
            flex-wrap: wrap;
        }

        .primary-actions .play-btn {
            flex: 1;
            min-width: 200px;
            max-width: 280px;
            padding: 15px 20px;
            text-decoration: none;
            border-radius: 8px;
            text-align: center;
            font-weight: 600;
            font-size: 16px;
            color: white;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
        }

        .primary-actions .play-btn.primary {
            background: linear-gradient(135deg, #ff6b6b, #ee5a24);
            box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
        }

        .primary-actions .play-btn.secondary {
            background: linear-gradient(135deg, #4834d4, #6c5ce7);
            box-shadow: 0 4px 15px rgba(72, 52, 212, 0.4);
        }

        .primary-actions .play-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
        }

        .primary-actions .play-btn small {
            display: block;
            font-size: 12px;
            opacity: 0.9;
            margin-top: 4px;
        }

        /* 游戏截图 - 简化版 */
        .game-screenshots.compact {
            margin: 20px 0;
        }

        .game-screenshots.compact h3 {
            font-size: 18px;
            margin-bottom: 15px;
            color: #333;
        }

        .screenshot-grid.compact {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 15px;
        }

        .screenshot-grid.compact .screenshot-item {
            text-align: center;
        }

        .screenshot-grid.compact .screenshot-item img {
            width: 100%;
            height: 150px;
            object-fit: cover;
            border-radius: 8px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
            transition: transform 0.2s ease;
        }

        .screenshot-grid.compact .screenshot-item img:hover {
            transform: scale(1.02);
        }

        /* 游戏链接 - 折叠显示 */
        .game-links {
            margin-top: 30px;
            padding: 15px;
            background: #f8f9fa;
            border-radius: 8px;
        }

        .game-links details {
            cursor: pointer;
        }

        .game-links summary {
            font-weight: 600;
            color: #666;
            padding: 10px;
            border-radius: 6px;
            background: white;
            border: 1px solid #ddd;
            transition: all 0.2s ease;
        }

        .game-links summary:hover {
            background: #f0f0f0;
            border-color: #ccc;
        }

        .game-links .external-links {
            margin-top: 15px;
            padding: 15px;
            background: white;
            border-radius: 6px;
            border: 1px solid #eee;
        }

        .game-links .link-list {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
        }

        .game-links .external-link {
            padding: 8px 16px;
            background: #e9ecef;
            color: #495057;
            text-decoration: none;
            border-radius: 20px;
            font-size: 14px;
            transition: all 0.2s ease;
        }

        .game-links .external-link:hover {
            background: #dee2e6;
            transform: translateY(-1px);
        }

        /* 响应式优化 */
        @media (max-width: 768px) {
            .primary-actions .action-buttons {
                flex-direction: column;
            }
            
            .primary-actions .play-btn {
                min-width: auto;
                max-width: none;
            }
            
            .screenshot-grid.compact {
                grid-template-columns: 1fr;
            }
        }
.game-navigation {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin: 2rem 0;
    padding: 0 1rem;
}

.nav-button {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    color: var(--dark-color);
    max-width: 300px;
    min-height: 80px;
}

.nav-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 1);
}

.nav-button.prev-game {
    margin-right: auto;
}

.nav-button.next-game {
    margin-left: auto;
}

.nav-arrow {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 0 0.5rem;
}

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

.nav-icon {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    object-fit: cover;
    background: var(--light-color);
}

.nav-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.nav-label {
    font-size: 0.85rem;
    color: var(--secondary-color);
    font-weight: 500;
}

.nav-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark-color);
    line-height: 1.2;
}

@media (max-width: 768px) {
    .game-navigation {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .nav-button {
        margin: 0 !important;
        max-width: 100%;
    }
    
    .nav-button.next-game {
        order: -1;
    }
    
    .nav-text {
        text-align: left;
    }
}