/* ============================================================
   响应式布局覆盖样式 - 3g.cx / 游戏门户
   在 app.min.css 之后加载，统一前台+后台布局
   ============================================================ */

/* ---------- 1. 解除框架限宽，恢复自然文档流 ---------- */
html, body { height: auto; min-height: 100%; }
body {
    background: #eef2f7;
    color: #333;
    -webkit-text-size-adjust: 100%;
}
.app.horizontal-layout.boxed,
.app.boxed {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
.app, .app > .layout, .content-wrap {
    height: auto !important;
    min-height: 100vh;
}
.app > .layout {
    display: block !important;
    overflow: visible !important;
}
.app > .layout > aside,
.app > .layout > section {
    display: block !important;
    height: auto !important;
    float: none !important;
    vertical-align: top !important;
}
.main-content, .app .layout { overflow: visible !important; }

/* wrapper 回归普通流，可自然滚动 */
.main-content .content-wrap .wrapper,
section .wrapper, aside .wrapper {
    position: static !important;
    height: auto !important;
    overflow: visible !important;
    padding: 16px !important;
}

/* 去掉无用的全屏 cover/overlay 占位 */
.cover, .overlay { display: none !important; }

/* 内容区最大宽度，避免超宽屏行过长 */
.main-content .content-wrap .wrapper { max-width: 1280px; margin: 0 auto; }

/* ---------- 2. 顶部导航：固定、通栏、美化 ---------- */
.header, .header.header-fixed,
.app > .header {
    position: sticky !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 54px !important;
    min-height: 54px !important;
    z-index: 1030 !important;
    background: #1a4f74 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: 0 2px 6px rgba(0,0,0,.18);
}
.app .header-fixed + .layout { padding-top: 0 !important; }
.header .navbar-brand {
    color: #fff !important;
    height: 54px;
    line-height: 34px;
    padding: 10px 15px;
    font-size: 17px;
    font-weight: 600;
}
.header .navbar-brand img { max-height: 34px; width: auto; }
.header .nav > li > a {
    color: #e8f1f8 !important;
    padding: 17px 14px !important;
    line-height: 20px;
    transition: background .2s, color .2s;
}
.header .nav > li > a:hover,
.header .nav > li.active > a {
    background: #143e5c !important;
    color: #fff !important;
}
.header .dropdown-menu a { color: #333 !important; }
.horizontal-layout .brand, .header .brand { width: auto !important; }
.header .navbar-collapse { float: none !important; }

/* ---------- 3. 补齐老 WAP 内容 class（原本无任何样式） ---------- */
.new, .end {
    background: #1a4f74;
    color: #fff;
    padding: 9px 12px;
    margin: 0 0 10px;
    font-weight: 600;
    border-radius: 3px 3px 0 0;
}
.menu {
    margin: 0 0 12px;
    background: #fff;
    border: 1px solid #dfe5ec;
    border-radius: 0 0 3px 3px;
    overflow: hidden;
}
.menu .menutuch {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid #eef1f5;
    background: #fff;
    color: #2b5f85;
    text-decoration: none;
    transition: background .15s;
}
.menu .menutuch:last-child { border-bottom: 0; }
.menu .menutuch:hover { background: #f2f7fb; color: #143e5c; text-decoration: none; }
.menu img, .menutuch img { max-width: 20px; height: auto; }
.page_nave {
    background: #fff;
    border: 1px solid #dfe5ec;
    padding: 10px;
    margin: 12px 0;
    text-align: center;
    border-radius: 3px;
}
.page_nave .page {
    display: inline-block;
    padding: 6px 11px;
    margin: 0 2px;
    background: #f4f7fa;
    border: 1px solid #dfe5ec;
    border-radius: 3px;
    color: #2b5f85;
}
.page_nave .page:hover { background: #1a4f74; color: #fff; text-decoration: none; }
.copyright {
    background: #143e5c;
    color: #cfe0ee;
    text-align: center;
    padding: 14px 10px;
    margin-top: 20px;
    font-size: 12px;
}
.copyright:empty::after { content: "© 3g.cx 游戏门户"; }
.fon {
    background: #fff;
    padding: 14px;
    border: 1px solid #dfe5ec;
    border-radius: 4px;
    margin-bottom: 12px;
}
.count { color: #e67e22; font-weight: 600; }
.chet { color: #d9534f; font-weight: 600; }
.levo_tuch {
    display: inline-block;
    padding: 8px 12px;
    color: #2b5f85;
}
.levo_tuch:hover { text-decoration: none; color: #143e5c; }

/* 按钮类：弹性布局替代老表格模拟 */
.button_razdel, .but_razdel, .dialog, .but_menu, .zap {
    display: flex !important;
    flex-wrap: wrap;
    gap: 6px;
    width: 100% !important;
    height: auto !important;
}
.dialog_m, .button_menu, .zap_b, .button_razdel {
    display: inline-block !important;
    flex: 1 1 130px;
    width: auto !important;
    min-width: 110px;
    padding: 9px 12px;
    text-align: center;
    background: #f4f7fa;
    border: 1px solid #cfd9e2;
    border-radius: 3px;
    color: #2b5f85;
    box-sizing: border-box;
}
.dialog_m:hover, .button_menu:hover, .zap_b:hover, .button_razdel:hover {
    background: #1a4f74; color: #fff; text-decoration: none;
}

/* ---------- 4. 表格与图片自适应 ---------- */
.wrapper table { max-width: 100%; }
.wrapper img { max-width: 100%; height: auto; }
.panel { margin-bottom: 14px; border: 1px solid #dfe5ec; border-radius: 4px; }
.panel-heading { background: #f7f9fc; }

/* ---------- 5. 响应式断点 ---------- */
/* 平板 768-991px */
@media (min-width: 768px) and (max-width: 991px) {
    .menu { display: grid; grid-template-columns: repeat(2, 1fr); }
    .menu .menutuch { border-bottom: 0; border-right: 1px solid #eef1f5; }
}
/* 桌面 >=992px */
@media (min-width: 992px) {
    .menu { display: grid; grid-template-columns: repeat(3, 1fr); }
    .menu .menutuch { border-bottom: 0; border-right: 1px solid #eef1f5; }
}
/* 宽屏 >=1200px */
@media (min-width: 1200px) {
    .menu { grid-template-columns: repeat(4, 1fr); }
}
/* 手机 <768px */
@media (max-width: 767px) {
    .header, .header.header-fixed { height: auto !important; min-height: 50px !important; }
    .header .navbar-brand { padding: 8px 12px; }
    .main-content .content-wrap .wrapper { padding: 12px !important; }
    .menu { grid-template-columns: 1fr !important; display: grid; }
    .dialog_m, .button_menu, .zap_b, .button_razdel { flex: 1 1 100%; }
    .header .nav > li > a { padding: 12px !important; }
}
/* 超窄屏 <=480px */
@media (max-width: 480px) {
    .header .navbar-brand { font-size: 15px; }
    .header .navbar-brand img { max-height: 28px; }
    .fon { padding: 10px; }
    .page_nave .page { padding: 5px 8px; margin: 0 1px; }
}

/* ============================================================
   6. 首页游戏列表 / 信息栏布局优化
   ============================================================ */

/* 内容区整体背景与内边距，避免贴边 */
.app > .layout { background: #eef2f7; }
.main-content .content-wrap .wrapper {
    background: #fff;
    border: 1px solid #dfe5ec;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}

/* 游戏列表标题：紧凑，去掉大留白 */
.game-list-heading {
    margin: 0 0 12px !important;
    border: 0 !important;
}
.game-list-heading .panel-heading {
    background: #1a4f74;
    color: #fff;
    padding: 10px 14px;
    border-radius: 4px !important;
}
.game-list-heading h5 { margin: 0; font-size: 15px; font-weight: 600; }

/* 游戏卡片：柔和背景、合理间距 */
.game-card {
    background: #f7f9fc;
    border: 1px solid #dfe5ec;
    border-radius: 5px;
    margin-bottom: 12px;
    overflow: hidden;
}
.game-card .panel-heading {
    background: #fff;
    padding: 14px;
    border-bottom: 1px solid #eef1f5;
}
.game-card .panel-heading a.h4 {
    display: inline-block;
    color: #1a4f74 !important;
    font-weight: 600;
    font-size: 16px;
}
.game-card .panel-heading font[color] { color: #1a4f74 !important; }
.game-card .avatar { width: 48px; height: 48px; border-radius: 6px; }
.game-card .panel-heading small {
    display: block;
    margin-top: 6px;
    color: #6b7b8c;
    line-height: 1.6;
    font-size: 12px;
}
.game-card .panel-heading .btn-danger {
    background: #e67e22;
    border-color: #d35400;
    font-size: 11px;
    padding: 3px 8px;
}

/* 操作区：两个按钮并排，去掉过高行距 */
.game-card-actions {
    display: flex;
    gap: 0;
    background: #fff;
}
.game-card-actions .list-group-item {
    flex: 1;
    text-align: center;
    padding: 11px 10px;
    color: #2b5f85;
    border: 0 !important;
    border-right: 1px solid #eef1f5 !important;
    border-radius: 0 !important;
}
.game-card-actions .list-group-item:last-child { border-right: 0 !important; }
.game-card-actions .list-group-item:hover { background: #1a4f74; color: #fff; text-decoration: none; }
.game-card-edit { padding: 0 14px 10px; text-align: right; font-size: 12px; }

/* 分页区紧凑 */
.page_nave { background: transparent; border: 0; padding: 4px 0; }

/* 信息栏：单列铺满，避免右侧空白 */
.menu-list { display: block !important; }
.menu-list .menutuch { border-bottom: 1px solid #eef1f5; }
.menu-list .menutuch:last-child { border-bottom: 0; }

/* 页脚版式收敛，避免像重复导航 */
.copyright {
    background: #143e5c;
    color: #cfe0ee;
    padding: 12px;
    margin-top: 24px;
}
.copyright:empty::after { content: "© 3g.cx 游戏门户 · 保留所有权利"; }
