/* ===== 框架扩展：娱乐城 / 体育 / 促销 / 战绩 / 投注单 / VIP ===== */

/* 通用区块头 */
.sec-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; margin: 4px 0 14px;
}
.sec-head h3 { font-size: 18px; font-weight: 900; letter-spacing: .02em; }
.sec-head .sec-note { font-size: 12px; color: #8fa0cc; }

/* 代理中心：指标卡 */
.agent-kpis {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px; margin-bottom: 18px;
}
.agent-stat {
    background: var(--ao-bg2,#13224e); border: 1px solid color-mix(in srgb,var(--ao-accent,#ffd700) 24%,#12141a); border-radius: 10px; padding: 14px;
}
.agent-stat span { display: block; font-size: 11.5px; color: #8fa0cc; margin-bottom: 6px; }
.agent-stat b { font-size: 20px; color: var(--ao-accent,#ffd700); font-weight: 900; word-break: break-all; }

/* 筛选条 */
.filter-bar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    padding: 12px; background: #0f1838; border: 1px solid color-mix(in srgb,var(--ao-accent,#ffd700) 24%,#12141a);
    border-radius: 12px; margin-bottom: 14px;
}
.chip {
    padding: 7px 14px; border-radius: 8px; border: 1px solid color-mix(in srgb,var(--ao-accent,#ffd700) 24%,#12141a);
    background: var(--ao-bg2,#13224e); color: #aab6d6; font-size: 12.5px; font-weight: 700;
    cursor: pointer; white-space: nowrap;
}
.chip:hover { color: #fff; border-color: color-mix(in srgb,var(--ao-accent,#ffd700) 32%,#12141a); }
.chip.on { background: linear-gradient(135deg, var(--ao-accent,#ffd700), var(--ao-accent2,#ffb800)); color: #131b3a; border-color: transparent; }
.chip small { opacity: .65; font-weight: 600; margin-left: 4px; }

.filter-search {
    margin-left: auto; display: flex; align-items: center; gap: 8px;
}
.filter-search input, .filter-search select {
    padding: 8px 12px; border-radius: 8px; background: var(--ao-bg,#0b1430);
    border: 1px solid color-mix(in srgb,var(--ao-accent,#ffd700) 24%,#12141a); color: #fff; font-size: 12.5px; outline: none;
}
.filter-search input { width: 190px; }
.filter-search select { max-width: 190px; }

/* 游戏墙（竖版海报卡 · 参照 kingsgame / celsius 这一类站） */
.game-grid {
    display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px;
}
.game-card {
    position: relative; border-radius: 13px; overflow: hidden;
    background: var(--ao-bg2,#13224e); cursor: pointer;
    box-shadow: 0 5px 14px rgba(0,0,0,.32);
    transition: transform .18s, box-shadow .18s;
}
.game-card:hover { transform: translateY(-4px) scale(1.02); box-shadow: 0 14px 26px rgba(0,0,0,.45); }
.game-card::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 52%;
    background: linear-gradient(180deg, rgba(6,10,26,0) 0%, rgba(6,10,26,.62) 45%, rgba(6,10,26,.94) 100%);
    pointer-events: none; z-index: 2;
}
.game-card img {
    width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; background: var(--ao-bg,#0b1430);
    transition: transform .25s;
}
.game-card:hover img { transform: scale(1.04); }
.game-card .gc-name {
    position: absolute; left: 0; right: 0; bottom: 16px; z-index: 3;
    padding: 0 8px; font-size: 11.5px; font-weight: 600; color: #fff;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    text-shadow: 0 1px 4px rgba(0,0,0,.6);
}
.game-card .gc-prov {
    position: absolute; left: 0; right: 0; bottom: 5px; z-index: 3;
    padding: 0 8px; font-size: 9px; color: #b9c6e8;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.badge-na {
    position: absolute; top: 6px; left: 6px; z-index: 2;
    background: rgba(255, 71, 87, .92); color: #fff;
    font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 5px;
}
.empty-tip { grid-column: 1/-1; padding: 40px; text-align: center; color: #8fa0cc; font-size: 13px; }
.load-more { text-align: center; margin: 18px 0 6px; }

/* 首页「免费试玩」*/
.free-play-head {
    display: flex; align-items: center; justify-content: space-between;
    margin: 20px 0 10px; gap: 12px;
}
.fp-title { font-size: 15px; font-weight: 800; color: var(--ao-accent,#ffd700); letter-spacing: .02em; }
.fp-title em { font-style: normal; font-size: 11.5px; font-weight: 500; color: #8fa0cc; margin-left: 8px; }
.fp-all { font-size: 12px; color: #9fb0d6; text-decoration: none; border: 1px solid #26375f; padding: 5px 10px; border-radius: 8px; }
.fp-all:hover { color: #fff; border-color: var(--ao-accent,#ffd700); }
.free-card .gc-name { font-size: 10.5px; }
.free-card .gc-prov { font-size: 8.5px; }
@media (max-width: 1240px) { .game-grid { grid-template-columns: repeat(5, 1fr); } }
@media (max-width: 1000px) { .game-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 700px) { .game-grid { grid-template-columns: repeat(3, 1fr); } }

/* 嵌入游戏面板 */
.stage {
    display: none; margin-bottom: 16px;
    border: 1px solid var(--ao-bg3,color-mix(in srgb,var(--ao-accent,#ffd700) 32%,#12141a)); border-radius: 12px; overflow: hidden; background: var(--ao-bg,var(--ao-bg,#0b1430));
}
.stage.on { display: flex; flex-direction: column; }
.stage-bar {
    height: 42px; flex: 0 0 42px; display: flex; align-items: center; gap: 12px;
    padding: 0 14px; background: var(--ao-bg2,var(--ao-bg2,#13224e)); border-bottom: 1px solid var(--ao-bg3,color-mix(in srgb,var(--ao-accent,#ffd700) 24%,#12141a));
}
.stage-back { color: var(--ao-accent,#ffd700); font-size: 12.5px; font-weight: 700; cursor: pointer; }
.stage-name { font-size: 13.5px; font-weight: 700; }
.stage-tag {
    padding: 2px 8px; border-radius: 6px; font-size: 10.5px; font-weight: 700;
    color: var(--ao-accent,#ffd700); background: color-mix(in srgb,var(--ao-accent,#ffd700) 12%, transparent); border: 1px solid color-mix(in srgb,var(--ao-accent,#ffd700) 35%, transparent);
}
.stage-note {
    padding: 6px 14px; font-size: 11px; color: color-mix(in srgb,var(--ao-accent,#ffd700) 60%, #ffffff);
    background: color-mix(in srgb,var(--ao-accent,#ffd700) 7%, transparent); border-bottom: 1px solid color-mix(in srgb,var(--ao-accent,#ffd700) 15%, transparent);
}
.stage-body {
    height: 70vh; min-height: 420px; background: var(--ao-bg,#000);
    display: flex; align-items: center; justify-content: center; color: #aab6d6; font-size: 13px;
}
.stage-body iframe { width: 100%; height: 100%; border: none; display: block; }

.stage-tools { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.stage-btn {
    cursor: pointer; font-size: 11.5px; padding: 3px 9px; border-radius: 6px;
    border: 1px solid color-mix(in srgb,var(--ao-accent,#ffd700) 32%,#12141a); background: var(--ao-bg,#0b1430); color: #cfd8f5; user-select: none;
}
.stage-btn:hover { border-color: var(--ao-accent,#ffd700); color: #fff; }

/* 左下角小窗：点到别处时游戏继续播，不关闭 */
.stage.mini {
    position: fixed; left: 14px; bottom: 14px; z-index: 9500;
    width: 380px; margin: 0; border-radius: 12px;
    box-shadow: 0 14px 44px rgba(0, 0, 0, .65); background: var(--ao-bg,#0b1430);
}
.stage.mini .stage-note { display: none; }
.stage.mini .stage-back { display: none; }
.stage.mini .stage-bar { height: 36px; flex-basis: 36px; padding: 0 10px; gap: 8px; }
.stage.mini .stage-name {
    font-size: 12px; max-width: 150px; overflow: hidden;
    text-overflow: ellipsis; white-space: nowrap;
}
.stage.mini .stage-tag { display: none; }
.stage.mini .stage-body { height: 240px; min-height: 240px; }
.stage.mini .stage-body iframe { height: 240px; }

/* 体育页：小组赛/盘口小样式 */
.league-block { margin-bottom: 18px; }
.league-title {
    font-size: 13px; font-weight: 800; color: var(--ao-accent,#ffd700);
    padding: 8px 4px; letter-spacing: .04em;
}
.sport-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }

/* 促销页 */
.promo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.promo-card {
    background: linear-gradient(160deg, #16284f, #101f42);
    border: 1px solid #24386b; border-radius: 12px; padding: 18px;
}
.promo-card h4 { font-size: 16px; font-weight: 800; margin-bottom: 8px; }
.promo-card p { font-size: 12.5px; color: #aab6d6; line-height: 1.7; margin-bottom: 14px; }
.promo-cta {
    display: inline-block; padding: 9px 18px; border-radius: 20px;
    background: linear-gradient(90deg, #ff4d8d, #ff7a45); color: #fff;
    font-size: 12.5px; font-weight: 700; text-decoration: none; border: none; cursor: pointer;
}
.promo-card .promo-cta {
    display: inline-block; padding: 9px 18px; border-radius: 20px;
    background: linear-gradient(90deg, #ff4d8d, #ff7a45); color: #fff;
    font-size: 12.5px; font-weight: 700; text-decoration: none;
}

/* 战绩 / 表格 */
.data-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.data-table th {
    text-align: left; padding: 10px 12px; color: #8fa0cc; font-weight: 700;
    border-bottom: 1px solid color-mix(in srgb,var(--ao-accent,#ffd700) 24%,#12141a); font-size: 11.5px; letter-spacing: .04em;
}
.data-table td { padding: 11px 12px; border-bottom: 1px solid #16264a; color: #dfe6fb; }
.data-table tr:hover td { background: var(--ao-bg2,#13224e); }
.pill {
    display: inline-block; padding: 2px 8px; border-radius: 5px; font-size: 10.5px; font-weight: 700;
}
.pill-win { background: rgba(46, 213, 115, .16); color: #2ed573; }
.pill-lose { background: rgba(255, 71, 87, .16); color: #ff4757; }
.pill-wait { background: rgba(255, 215, 0, .16); color: var(--ao-accent,#ffd700); }

/* 提示条 */
.hint-bar {
    padding: 10px 14px; border-radius: 10px; font-size: 12px;
    background: rgba(108, 92, 231, .12); border: 1px solid rgba(108, 92, 231, .35);
    color: #cfd8f3; margin-bottom: 14px; line-height: 1.7;
}

@media (max-width: 1100px) {
    .game-grid { grid-template-columns: repeat(4, 1fr); }
    .promo-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- 联系我们 / 留言板 ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.contact-tg {
    display: inline-block; padding: 3px 10px; border-radius: 999px;
    background: #229ed9; color: #fff !important; font-weight: 800; text-decoration: none;
}
.contact-tg:hover { background: #1e8fc4; }
.contact-card {
    background: var(--ao-bg2,#13224e); border: 1px solid color-mix(in srgb,var(--ao-accent,#ffd700) 24%,#12141a); border-radius: 12px; padding: 14px 16px;
}
.contact-card h4 { font-size: 13px; color: var(--ao-accent,#ffd700); margin-bottom: 8px; font-weight: 800; }
.contact-card p { font-size: 13px; color: #dfe6fb; margin: 0 0 6px; word-break: break-all; }
.contact-card p a { color: #8fd3ff; }
.contact-note { font-size: 11.5px; color: #8fa0cc; line-height: 1.7; }

.msg-form {
    background: var(--ao-bg2,#13224e); border: 1px solid color-mix(in srgb,var(--ao-accent,#ffd700) 24%,#12141a); border-radius: 12px; padding: 14px 16px; margin-bottom: 14px;
}
.msg-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.msg-form label { display: block; font-size: 12px; color: #8fa0cc; margin-bottom: 10px; }
.msg-form input, .msg-form textarea {
    display: block; width: 100%; margin-top: 6px; padding: 9px 12px; border-radius: 9px;
    border: 1px solid color-mix(in srgb,var(--ao-accent,#ffd700) 32%,#12141a); background: var(--ao-bg,#0b1430); color: #fff; font-size: 13px; outline: none;
    font-family: inherit; resize: vertical;
}
.msg-form input:focus, .msg-form textarea:focus { border-color: var(--ao-accent,#ffd700); }
.msg-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.msg-list { display: flex; flex-direction: column; gap: 10px; }
.msg-item { background: var(--ao-bg2,#101d42); border: 1px solid color-mix(in srgb,var(--ao-accent,#ffd700) 24%,#12141a); border-radius: 12px; padding: 12px 14px; }
.msg-head { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 6px; }
.msg-head b { color: var(--ao-accent,#ffd700); }
.msg-head span { color: #8fa0cc; }
.msg-body { font-size: 13px; color: #dfe6fb; line-height: 1.75; white-space: pre-wrap; word-break: break-word; }
.msg-reply {
    margin-top: 10px; padding: 9px 11px; border-radius: 9px; font-size: 12.5px; line-height: 1.7;
    background: rgba(46, 213, 115, .1); border: 1px solid rgba(46, 213, 115, .35); color: #8ef0b0;
}
.msg-reply em { color: #2ed573; font-style: normal; font-weight: 700; }

@media (max-width: 980px) {
    .contact-grid { grid-template-columns: 1fr; }
    .msg-row { grid-template-columns: 1fr; }
}

/* === 游戏卡缩小 + 悬停红色高亮（2026-11-10） === */
/* 娱乐城墙：桌面 8 列（原 6 列，卡 178->136 宽） */
@media (min-width:1241px){ #grid{grid-template-columns:repeat(8,1fr) !important;gap:10px;} }
@media (max-width:1240px) and (min-width:1001px){ #grid{grid-template-columns:repeat(6,1fr) !important;} }
@media (max-width:1000px) and (min-width:701px){ #grid{grid-template-columns:repeat(5,1fr) !important;} }
@media (max-width:700px){ #grid{grid-template-columns:repeat(4,1fr) !important;gap:8px;} }

#grid .game-card{border-radius:10px;}
#grid .game-card .gc-name{font-size:10px;padding:0 8px;bottom:16px;}
#grid .game-card .gc-prov{font-size:8.5px;padding:0 8px;bottom:5px;}
@media (max-width:700px){
  #grid .game-card .gc-name{font-size:10.5px;}
  #grid .game-card .gc-prov{font-size:8px;}
}

/* 悬停：背面泛红 + 红色描边光晕 */
.game-card{border:1px solid rgba(255,255,255,.06);}
.game-card::before{
  content:""; position:absolute; inset:0; z-index:1; pointer-events:none; border-radius:inherit;
  background:radial-gradient(120% 85% at 50% 100%, rgba(255,42,74,.62) 0%, rgba(255,42,74,.18) 45%, rgba(255,42,74,0) 70%);
  opacity:0; transition:opacity .22s;
}
.game-card:hover{
  border-color:#ff2a4a;
  box-shadow:0 0 0 1px #ff2a4a, 0 12px 28px rgba(255,42,74,.42), 0 0 22px rgba(255,42,74,.30);
  transform:translateY(-3px);
}
.game-card:hover::before{opacity:1;}
.game-card:hover img{transform:scale(1.03);filter:brightness(1.07) saturate(1.08);}

/* === 卡片方图 + 文字下移（2026-11-10） === */
/* 原图多为 500x500/575x575 方图，塞进 3:4 竖框会被 cover 裁掉左右 25%（只看到半张脸） */
.game-card{display:flex;flex-direction:column;}
.game-card img{
  aspect-ratio:1/1 !important; object-fit:cover !important;
  width:100%; display:block; background:#0d1830;
}
.game-card::after{display:none !important;}   /* 底部渐变遮罩不再需要 */
.game-card .gc-name{
  position:static !important; left:auto !important; right:auto !important; bottom:auto !important;
  padding:7px 8px 0 !important; text-shadow:none !important; line-height:1.3;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.game-card .gc-prov{
  position:static !important; left:auto !important; right:auto !important; bottom:auto !important;
  padding:1px 8px 7px !important; line-height:1.3;
}
.game-card:hover{transform:translateY(-2px);}

/* v204 全站游戏卡：只留一行游戏名，厂商那行去掉 */
.game-card .gc-prov, .free-card .gc-prov, .ao-track .game-card .gc-prov{ display:none !important; }
.game-card .gc-name, .free-card .gc-name{
  bottom:8px !important; padding:0 8px !important; font-size:10.5px !important; line-height:1.2 !important;
}

/* ---- 试玩面板全屏（2026-11-11） ---- */
.stage:fullscreen, .stage:-webkit-full-screen {
    width: 100vw; height: 100vh; max-height: none;
    margin: 0; border: 0; border-radius: 0; background: var(--ao-bg,#0b1430);
}
.stage:fullscreen .stage-body, .stage:-webkit-full-screen .stage-body {
    height: auto; flex: 1 1 auto; min-height: 0;
}
.stage:fullscreen .stage-body iframe, .stage:-webkit-full-screen .stage-body iframe {
    width: 100%; height: 100%; display: block;
}
.stage:fullscreen.mini, .stage:-webkit-full-screen.mini {
    position: static; width: 100vw; border-radius: 0; box-shadow: none;
}

/* ao-btn-theme：按钮用独立的一组色，比页面底色更亮，保证不跟背景同色 */
.filter-bar .chip, .load-more .chip{
  background: color-mix(in srgb, var(--ao-btn, #ffd700) 30%, #0f1016) !important;
  border: 1px solid color-mix(in srgb, var(--ao-btn, #ffd700) 62%, transparent) !important;
  color: #ffffff !important;
}
.filter-bar .chip:hover{
  background: color-mix(in srgb, var(--ao-btn, #ffd700) 44%, #0f1016) !important;
  border-color: var(--ao-btn, #ffd700) !important;
}
.filter-bar .chip.on{
  background: linear-gradient(135deg,
      color-mix(in srgb, var(--ao-btn, #ffd700) 92%, #ffffff),
      var(--ao-btn, #ffd700)) !important;
  border-color: transparent !important;
  color: #0d1017 !important;
}
.filter-bar .chip small{ opacity:.85; }
.filter-search input, .filter-search select, #provSelect, #searchInput{
  background: color-mix(in srgb, var(--ao-btn, #ffd700) 22%, #0f1016) !important;
  border: 1px solid color-mix(in srgb, var(--ao-btn, #ffd700) 50%, transparent) !important;
  color: #ffffff !important;
}
.filter-search select option{ background:#12141c; color:#fff; }

/* 试玩画面跟随主题：iframe 底色 + 轻量色相旋转（跨域也能生效，属于父页面渲染层） */
.stage-body{
  background: color-mix(in srgb, var(--ao-accent,#ffd700) 34%, #0b0c10) !important;
  color: #fff !important;
}
.stage-body iframe{
  background: transparent !important;
  filter: hue-rotate(var(--ao-hue, 0deg));
  transition: filter .4s ease;
}
