/* ==========================================================================
   游戏站独立样式表 (game-style.css) - 浅色全响应式 + 移动端抽屉菜单 + 扫光升级版
   ========================================================================== */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333333;
    background-color: #f8f9fa;
    overflow-x: hidden;
}

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

/* ==================== 1. 顶部导航 (自适应 & 动态扫光 Logo) ==================== */
.game-header {
    background-color: #ffffff;
    border-bottom: 1px solid #e9ecef;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.game-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 70px;
    padding-top: 10px;
    padding-bottom: 10px;
    position: relative;
}

.game-logo {
    display: inline-flex;
    align-items: center;
}

/* Logo / 站点名称流光扫光效果 */
.game-logo-a {
    font-size: 1.35rem;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: -0.5px;
    position: relative;
    display: inline-block;
    
    /* 渐变流光背景 */
    background: linear-gradient(110deg, #1a1a1a 0%, #1a1a1a 35%, #0066cc 45%, #66b2ff 50%, #0066cc 55%, #1a1a1a 65%, #1a1a1a 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    
    /* 循环扫光动画 */
    animation: logoShine 4s infinite linear;
    transition: transform 0.2s ease;
}

.game-logo-a:hover {
    transform: scale(1.03);
}

/* 扫光 Keyframes 定义 */
@keyframes logoShine {
    0% {
        background-position: 100% 0;
    }
    100% {
        background-position: -100% 0;
    }
}

/* 桌面端导航 */
.game-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.game-nav a {
    text-decoration: none;
    color: #4a5568;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.game-nav a:hover {
    color: #0066cc;
}

.game-nav .btn-play-nav {
    background-color: #0066cc;
    color: #ffffff;
    padding: 8px 18px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.25);
}

.game-nav .btn-play-nav:hover {
    background-color: #0052a3;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.35);
}

/* 移动端汉堡按钮（桌面端默认隐藏） */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 22px;
    z-index: 101;
}

.mobile-menu-toggle .bar {
    width: 100%;
    height: 3px;
    background-color: #1a1a1a;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* 汉堡按钮点击变为 X 的交叉动画 */
.mobile-menu-toggle.active .bar:nth-child(1) {
    transform: translateY(9.5px) rotate(45deg);
}
.mobile-menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}
.mobile-menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-9.5px) rotate(-45deg);
}

/* ==================== 2. 主体区与 iframe 游戏视口 ==================== */
.game-main {
    padding-top: 25px;
    padding-bottom: 50px;
}

.game-frame-section {
    width: 100%; /* 默认撑满父级容器 */
    margin-bottom: 25px;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    /* 使用 flex 居中对齐 */
    display: flex;
    justify-content: center;
    align-items: center;
    /* 增加动态宽高比支持，确保长宽比协调 */
    height: min(100vh, 780px);
    
}

.game-iframe {
    width: 100%;
    /* PC端默认高度 */
    height: 100%; 
    display: block;
    border: none;
}

/* ==================== 3. 面包屑与文章 Meta 信息栏 ==================== */
.game-meta-bar {
    margin: 20px 0;
    padding: 15px 20px;
    background-color: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.breadcrumb {
    font-size: 0.9rem;
    color: #6c757d;
    word-break: break-word;
}

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

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

.breadcrumb .sep {
    margin: 0 8px;
    color: #adb5bd;
}

.breadcrumb .current a {
    color: #495057;
    font-weight: 500;
}

.post-meta {
    font-size: 0.85rem;
    color: #6c757d;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    border-top: 1px dashed #e9ecef;
    padding-top: 8px;
}

/* ==================== 4. 游戏介绍卡片区 ==================== */
.game-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 35px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.game-info-block h1 {
    font-size: 1.8rem;
    color: #1a202c;
    margin-bottom: 20px;
    line-height: 1.3;
}

.game-info-block h2 {
    font-size: 1.4rem;
    color: #2d3748;
    margin-top: 25px;
    margin-bottom: 14px;
    border-left: 4px solid #0066cc;
    padding-left: 12px;
}

.game-info-block h3 {
    font-size: 1.2rem;
    color: #2d3748;
    margin-top: 25px;
    margin-bottom: 12px;
    border-left: 4px solid #2b6cb0;
    padding-left: 12px;
}

.game-info-block p {
    font-size: 1rem;
    color: #4a5568;
    margin-bottom: 16px;
    line-height: 1.75;
}

.game-info-block ul {
    margin-bottom: 20px;
    padding-left: 20px;
}

.game-info-block ul li {
    font-size: 1rem;
    color: #4a5568;
    margin-bottom: 8px;
    line-height: 1.6;
}

/* ==================== 5. 相关游戏推荐模块 ==================== */
.related-games-section {
    margin-top: 30px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    box-sizing: border-box;
    width: 100%;
    overflow: hidden; /* 防止任何子元素溢出 */
}

.related-title {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #1a202c;
    display: flex;
    align-items: center;
    gap: 8px;
    border-left: 4px solid #0066cc;
    padding-left: 12px;
}

.title-icon {
    font-size: 1.4rem;
    line-height: 1;
}

.related-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    width: 100%;
    box-sizing: border-box;
}

.related-game-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    text-decoration: none;
    color: #2d3748;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 0; /* 关键：防止内部 flex / text 撑破网格容器 */
    box-sizing: border-box;
}

.game-item-icon {
    font-size: 1.2rem;
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

.game-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0; /* 允许文字在溢出时正常显示省略号 */
}

.related-game-item:hover {
    background-color: #0066cc;
    color: #ffffff;
    border-color: #0066cc;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 102, 204, 0.25);
}

.related-game-item:hover .game-item-icon {
    transform: scale(1.2) rotate(-8deg);
}

/* ==================== 6. 页脚 ==================== */
.game-footer {
    background-color: #ffffff;
    border-top: 1px solid #e9ecef;
    color: #6c757d;
    padding: 25px 0;
    font-size: 0.8rem;
    text-align: center;
    margin-top: 40px;
}

.game-footer a {
    color: #4a5568;
    text-decoration: none;
    font-weight: 500;
}

.game-footer a:hover {
    color: #0066cc;
}

/* ==================== 7. 全屏响应式适配 (Media Queries) ==================== */
/* 平板与大屏手机适配 (≤ 768px) */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    /* 显示移动端汉堡切换按钮 */
    .mobile-menu-toggle {
        display: flex;
    }

    /* 移动端菜单抽屉折叠展开逻辑 */
    .game-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #ffffff;
        flex-direction: column;
        padding: 15px 20px;
        gap: 12px;
        border-bottom: 1px solid #e9ecef;
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.05);
        z-index: 99;
    }

    .game-nav.active {
        display: flex;
    }

    .game-nav a {
        width: 100%;
        text-align: center;
        padding: 10px 0;
        font-size: 0.9rem;
    }

    .game-logo-a {
        font-size: 1.15rem;
    }

    .game-frame-section {
        /* 让容器宽度自适应 */
        /*width: 100%;*/
        /* 使用 min/max/vh 动态计算高度：取 70vh 和 500px 中的较小值，防止超出屏幕 */
        height: min(70vh, 750px); 
    }

    .game-card {
        padding: 20px;
    }

    .game-info-block h1 {
        font-size: 1.4rem;
    }

    .game-info-block h2 {
        font-size: 1.2rem;
    }

    .post-meta {
        gap: 10px;
        font-size: 0.8rem;
    }

    .related-games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .related-game-item {
        font-size: 0.88rem;
        padding: 10px 12px;
        gap: 6px;
        min-width: 0;
    }
    .game-item-icon {
        font-size: 1rem;
    }
}

/* 小屏手机适配 (≤ 480px) */
@media (max-width: 480px) {
    .game-main {
        padding-top: 15px;
        padding-bottom: 30px;
    }

    .game-frame-section {
        /* 增加动态宽高比支持，确保长宽比协调 */
        height: min(80vh, 650px);
    }

    .related-games-section {
        padding: 15px;
    }

    .related-title {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }

    /* 480px 以下超小屏强制改为单列卡片，彻底避免挤压溢出 */
    .related-games-grid {
        grid-template-columns: 1fr !important;
        gap: 8px;
    }

    .related-game-item {
        font-size: 0.85rem;
        padding: 10px;
        min-width: 0;
    }
}


