/* ============================================
   小游戏页面样式 (Games Page Styles)
   ============================================ */

/* ==================== 1. 页面布局和背景 ==================== */

/* 动态背景动画 */
@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 页面主体样式 */
body.landing {
    background: linear-gradient(-45deg, #fceeff, #e6f0ff, #fff5f7, #eef7ff) !important;
    background-size: 400% 400% !important;
    animation: gradientBG 15s ease infinite !important;
    color: #555;
    padding-top: 4em;
    overflow-x: hidden;
}

/* ==================== 2. 导航栏样式 ==================== */

/* 导航栏容器 */
#header {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(255, 182, 193, 0.2);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

/* Logo样式 */
#header h1 a {
    color: #ff9eb5;
    font-weight: bold;
}

/* 导航链接 - 初始状态改为粉色，提高可见性 */
#nav ul li a {
    color: #ff9eb5 !important;
    transition: color 0.3s;
}

/* 导航链接悬停效果 */
#nav ul li a:hover {
    color: #ff6b9d !important;
}

/* ==================== 3. 页面标题样式 ==================== */

header.major {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(255, 182, 193, 0.2);
    padding: 1.5em;
    margin: 2em auto;
    max-width: 1200px;
    width: 90%;
    text-align: center;
}

header.major h2 {
    color: #ff9eb5 !important;
    text-shadow: 1px 1px 0 #fff;
    margin-bottom: 0;
}

/* ==================== 4. 游戏容器样式 ==================== */

.games-container {
    max-width: 1200px;
    width: 90%;
    margin: 0 auto;
    padding: 2em 0;
}

/* ==================== 5. 游戏网格布局 ==================== */

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 25px;
    padding: 20px 0;
    justify-items: center;
}

/* ==================== 6. 游戏卡片样式 ==================== */

.game-card {
    width: 150px;
    height: 200px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 8px 20px rgba(174, 205, 255, 0.3);
    border: 2px solid #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.game-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(255, 158, 181, 0.4);
    border-color: #ff9eb5;
}

.game-card:active {
    transform: translateY(-4px);
}

/* ==================== 7. 游戏图标样式 ==================== */

.game-icon {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    background: linear-gradient(135deg, #ff9eb5, #aecdff);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(255, 158, 181, 0.3);
    overflow: hidden;
}

.game-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==================== 8. 游戏名称样式 ==================== */

.game-name {
    font-size: 1em;
    font-weight: bold;
    color: #333;
    text-align: center;
    margin-top: 5px;
    word-break: break-word;
    line-height: 1.3;
}

/* ==================== 9. 空状态样式 ==================== */

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 1.1em;
}

.empty-state::before {
    content: "🎮";
    display: block;
    font-size: 4em;
    margin-bottom: 20px;
}

/* ==================== 10. 响应式适配 ==================== */

@media (max-width: 768px) {
    header.major {
        margin: 1em auto;
        padding: 1em;
    }

    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 20px;
        padding: 15px 0;
    }

    .game-card {
        width: 120px;
        height: 170px;
        padding: 12px;
    }

    .game-icon {
        width: 80px;
        height: 80px;
        margin-bottom: 12px;
    }

    .game-name {
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .games-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }

    .game-card {
        width: 100%;
        max-width: 110px;
        height: 150px;
    }

    .game-icon {
        width: 70px;
        height: 70px;
    }
}

