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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 40px;
}

.header h1 {
    font-size: 48px;
    font-weight: 800;
    color: white;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.subtitle {
    color: rgba(255,255,255,0.9);
    font-size: 18px;
    margin-top: 10px;
}

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

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    padding: 20px 0;
}

.game-card {
    display: block;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.game-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.25);
}

.game-image {
    position: relative;
    width: 100%;
    padding-top: 66.67%; /* 3:2 比例 */
    background: #f8f9fa;
    overflow: hidden;
}

.game-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.game-card:hover .game-image img {
    transform: scale(1.05);
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #667eea;
    opacity: 0;
    transition: all 0.3s ease;
}

.game-card:hover .play-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

.game-title {
    padding: 16px;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    text-align: center;
    background: #f8f9fa;
    border-top: 2px solid #667eea;
}

.footer {
    text-align: center;
    margin-top: 60px;
    padding: 30px;
    color: rgba(255,255,255,0.8);
    font-size: 14px;
}

.copyright {
    margin-top: 10px;
    font-size: 12px;
    opacity: 0.6;
}

.empty {
    text-align: center;
    padding: 80px 20px;
    color: white;
    font-size: 24px;
}

@media (max-width: 768px) {
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 15px;
    }
    
    .header h1 {
        font-size: 36px;
    }
    
    .subtitle {
        font-size: 16px;
    }
}

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

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

.game-card:nth-child(1) { animation-delay: 0.1s; }
.game-card:nth-child(2) { animation-delay: 0.15s; }
.game-card:nth-child(3) { animation-delay: 0.2s; }
.game-card:nth-child(4) { animation-delay: 0.25s; }
.game-card:nth-child(5) { animation-delay: 0.3s; }
.game-card:nth-child(6) { animation-delay: 0.35s; }
.game-card:nth-child(7) { animation-delay: 0.4s; }
.game-card:nth-child(8) { animation-delay: 0.45s; }
.game-card:nth-child(9) { animation-delay: 0.5s; }
.game-card:nth-child(10) { animation-delay: 0.55s; }