/**
 * 游戏集锦 - 主要样式文件
 * 定义全局样式和共用样式
 */

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

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

a {
    text-decoration: none;
    color: #0066cc;
}

ul {
    list-style: none;
}

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

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

/* 按钮 */
.btn {
    display: inline-block;
    background-color: #0066cc;
    color: #fff;
    padding: 10px 20px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #0055aa;
}

/* 头部样式 */
header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 24px;
    color: #0066cc;
}

nav ul {
    display: flex;
}

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

nav ul li a {
    color: #555;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

nav ul li a:hover {
    color: #0066cc;
    background-color: #f0f7ff;
}

nav ul li a.active {
    color: #0066cc;
    background-color: #e6f2ff;
}

/* 主要内容区域 */
main {
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* 页面标题 */
.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-header h2 {
    font-size: 32px;
    color: #333;
    margin-bottom: 10px;
}

.page-header p {
    color: #777;
    font-size: 18px;
}

/* 游戏卡片网格 */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

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

/* 游戏卡片 */
.game-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.game-thumbnail {
    position: relative;
    height: 0;
    padding-bottom: 75%; /* 4:3 比例 */
    overflow: hidden;
    cursor: pointer;
}

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

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.game-thumbnail:hover .game-overlay {
    opacity: 1;
}

.play-btn {
    background-color: #0066cc;
    color: #fff;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.play-btn:hover {
    background-color: #0055aa;
}

.game-info {
    padding: 15px;
}

.game-info h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: #333;
}

.game-meta {
    display: flex;
    justify-content: space-between;
    color: #777;
    font-size: 14px;
}

.star-icon {
    color: #f8d64e;
    margin-right: 2px;
}

/* 分区标题 */
.game-section {
    margin-bottom: 50px;
}

.game-section h2 {
    font-size: 24px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
    color: #333;
}

/* 无游戏提示 */
.no-games {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    background-color: #fff;
    border-radius: 8px;
    color: #777;
    font-size: 18px;
}

/* 页脚样式 */
footer {
    background-color: #333;
    color: #fff;
    padding-top: 40px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 0 20px 30px;
}

.footer-section {
    flex: 1;
    margin-right: 30px;
    min-width: 200px;
}

.footer-section:last-child {
    margin-right: 0;
}

.footer-section h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #fff;
}

.footer-section p {
    color: #bbb;
    margin-bottom: 15px;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section ul li a {
    color: #bbb;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: #fff;
}

.footer-bottom {
    background-color: #222;
    padding: 15px 0;
    text-align: center;
}

.footer-bottom p {
    color: #999;
    font-size: 14px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        padding: 15px;
    }
    
    .logo {
        margin-bottom: 15px;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    nav ul li {
        margin: 5px 10px;
    }
    
    .game-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .footer-section {
        flex: 0 0 100%;
        margin-right: 0;
        margin-bottom: 30px;
    }
}

@media (max-width: 480px) {
    .game-grid {
        grid-template-columns: 1fr;
    }
    
    .page-header h2 {
        font-size: 24px;
    }
    
    .page-header p {
        font-size: 16px;
    }
}

/* 图片加载警告样式 */
.img-load-warning {
    background-color: #fff3cd;
    color: #856404;
    padding: 10px 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: opacity 1s;
} 