/* v1.7.18.48 摸鱼小游戏页 — 容器宽 1400 跟排行榜/主题对齐，强制白底白天色（不再跟随 prefers-color-scheme:dark） */

/* 游戏页整体容器：1400px 居中，跟排行榜 .zn-rank-wrap 对齐 */
.zn-game-wrap {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0 16px 60px;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    color: #1e293b;
    background: transparent;
}

/* hero 段：白色，浅灰背景衬托 */
.zn-game-hero {
    padding: 20px 24px 10px;
    text-align: center;
    border-radius: 16px;
    margin-top: 16px;
}
.zn-game-hero-title {
    margin: 0 0 12px;
    font-size: 36px;
    font-weight: 900;
    color: #0f172a;
    letter-spacing: 1px;
    line-height: 1.2;
}
.zn-game-hero p,
.zn-game-hero > div {
    margin: 0 auto 28px;
    max-width: 720px;
    font-size: 15px;
    color: #64748b;
    line-height: 1.7;
}

/* 搜索框：浅灰胶囊白底，不再用黑底暗色 */
.zn-game-search-box {
    position: relative;
    max-width: 680px;
    margin: 0 auto;
}
.zn-game-search-box .zn-game-search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: #94a3b8;
    pointer-events: none;
}
.zn-game-search {
    width: 100%;
    height: 54px;
    padding: 0 20px 0 48px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    font-size: 15px;
    color: #334155;
    outline: none;
    transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}
.zn-game-search::placeholder { color: #94a3b8; }
.zn-game-search:focus { box-shadow: 0 6px 24px rgba(99, 102, 241, 0.18); border-color: #a5b4fc; }

/* 游戏网格 */
.zn-game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
    gap: 12px;
    margin: 24px 0;
}

/* 游戏按钮 — 白底浅边框（白天卡） */
.zn-game-grid .styled-button {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    background: #fff;
    border-radius: 8px;
    padding: 12px 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    border: 1px solid #e5e7eb;
    transition: 0.2s;
    cursor: pointer;
    text-align: left;
    width: 100%;
    font-size: 12.5px;
    font-weight: 500;
    color: #475569;
    min-width: 0;
    text-decoration: none;
}
.zn-game-grid .styled-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
    border-color: #a5b4fc;
    color: #6366f1;
}
.zn-game-grid .styled-button i.fa-gamepad {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eff6ff;
    border-radius: 6px;
    color: #3b82f6;
    font-size: 13px;
}
.zn-game-grid .game-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============ 游戏弹窗 ============ */
body.zn-modal-open {
    overflow: hidden !important;
    touch-action: none;
}

.zn-game-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.zn-game-modal-overlay.active {
    display: flex;
    opacity: 1;
}
.zn-game-modal-content {
    width: 85vw;
    height: 85vh;
    max-width: 1200px;
    background: #000;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.zn-game-modal-overlay.active .zn-game-modal-content {
    transform: scale(1);
}
.zn-game-modal-header {
    height: 44px;
    background: #1e293b;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 12px;
    border-bottom: 1px solid #334155;
    flex-shrink: 0;
}
.zn-game-modal-title {
    font-size: 14px;
    color: #f8fafc;
    font-weight: 500;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}
.zn-game-modal-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}
.zn-game-modal-actions button {
    background: rgba(255, 255, 255, 0.1);
    color: #f8fafc;
    border: none;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: 0.2s;
}
.zn-game-modal-actions button i {
    font-size: 16px;
    line-height: 1;
    display: inline-block;
}
.zn-game-modal-actions button:hover { background: rgba(255, 255, 255, 0.2); }
.zn-game-modal-actions .btn-close {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}
.zn-game-modal-actions .btn-close:hover {
    background: rgba(239, 68, 68, 0.4);
    color: #fff;
}
.zn-game-modal-body {
    flex: 1;
    position: relative;
    width: 100%;
    height: calc(100% - 44px);
    background: #000;
    overflow: hidden;
}
.zn-game-modal-body iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    background: #000;
}

/* 加载图标旋转 */
.zn-game-spin {
    display: inline-block;
    animation: znGameSpin 1s linear infinite;
}
@keyframes znGameSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.zn-no-search-result {
    grid-column: 1 / -1;
    padding: 40px 0;
    text-align: center;
    color: #94a3b8;
    font-size: 14px;
}

/* ============ 响应式 ============ */
@media (max-width: 768px) {
    .zn-game-hero { padding: 30px 15px 20px; }
    .zn-game-hero-title { font-size: 24px; }
    .zn-game-hero p,
    .zn-game-hero > div { font-size: 13px; margin-bottom: 20px; }
    .zn-game-search { height: 48px; font-size: 14px; }
    .zn-game-modal-content {
        width: 100%;
        height: 100%;
        border-radius: 0;
        transform: scale(1) translateY(100%);
        transition: transform 0.3s ease-out;
    }
    .zn-game-modal-overlay.active .zn-game-modal-content { transform: scale(1) translateY(0); }
    .zn-game-modal-actions button span { display: none; }
    .zn-game-modal-actions button { padding: 6px 12px; font-size: 16px; }
    .zn-game-modal-body { -webkit-overflow-scrolling: touch; }
}
@media (max-width: 640px) {
    .zn-game-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
    .zn-game-grid .styled-button { padding: 8px 6px; font-size: 11.5px; }
    .zn-game-grid .styled-button i.fa-gamepad { width: 20px; height: 20px; font-size: 11px; }
}

/* v1.7.18.48 强制白天色：删除 v18 的 prefers-color-scheme:dark 覆盖段，
   不再跟随系统夜间，始终白底浅蓝边。 */


