/* ============================================================
   香港六合彩 — 皇金主题 (gold-forward 覆盖层)
   在 theme.css + pc.css 之后加载；仅作用于 body.gold-theme
   官方红蓝绿波色保持不变，金色由点缀提升为主导面
   ============================================================ */

/* ---------- 基础调色板：皇金黑 (默认) ---------- */
body.gold-theme {
  --bg:        #0a0905;
  --bg2:       #14110a;
  --bg3:       #1e1910;
  --bg4:       #2b2415;
  --line:      rgba(236,202,132,.12);
  --line2:     rgba(236,202,132,.24);
  --txt:       #f4ecda;
  --txt2:      #bcab83;
  --txt3:      #7c715a;
  --gold:      #edcb7e;
  --gold-deep: #c89a4a;
  --ok:        #4fc28a;
}

/* 鎏金棕 */
body.gold-theme[data-gold="bronze"] {
  --bg:        #0d0a05;
  --bg2:       #1a1308;
  --bg3:       #25190b;
  --bg4:       #342611;
  --line:      rgba(233,176,90,.13);
  --line2:     rgba(233,176,90,.26);
  --txt:       #f3e9d2;
  --txt2:      #c0a673;
  --txt3:      #837049;
  --gold:      #f0bd64;
  --gold-deep: #bd8633;
}

/* 玫瑰金 */
body.gold-theme[data-gold="rose"] {
  --bg:        #0b0807;
  --bg2:       #17110e;
  --bg3:       #221814;
  --bg4:       #30211b;
  --line:      rgba(235,190,165,.13);
  --line2:     rgba(235,190,165,.26);
  --txt:       #f5ebe3;
  --txt2:      #c2a594;
  --txt3:      #836e62;
  --gold:      #efc4a4;
  --gold-deep: #cb9476;
}

/* ---------- 全局氛围 ---------- */
body.gold-theme .pc-app {
  background:
    radial-gradient(1200px 620px at 78% -14%, rgba(237,203,126,.12), transparent 58%),
    radial-gradient(900px 520px at 6% 116%, rgba(200,154,74,.10), transparent 60%),
    var(--bg);
}
body.gold-theme ::-webkit-scrollbar-thumb { background: linear-gradient(180deg, var(--gold-deep), #5a4720); }

/* ---------- 顶部工具条 ---------- */
body.gold-theme .pc-utilbar {
  background: linear-gradient(180deg, #1a1408, #0c0a05);
  border-bottom: 1px solid var(--line2);
}
body.gold-theme .util-site { color: var(--gold-deep); letter-spacing: .1em; }

/* ---------- 顶栏：金箔质感 ---------- */
body.gold-theme .pc-head {
  background:
    linear-gradient(180deg, rgba(237,203,126,.07), transparent 42%),
    linear-gradient(180deg, #1c150b, #100c06);
  border-bottom: 1px solid transparent;
  border-image: linear-gradient(90deg, transparent, var(--gold-deep) 18%, var(--gold) 50%, var(--gold-deep) 82%, transparent) 1;
  box-shadow: 0 1px 0 rgba(237,203,126,.18), 0 10px 30px -18px rgba(0,0,0,.8);
}

/* 品牌标记：红 → 金 */
body.gold-theme .brand-mark {
  background:
    radial-gradient(120% 120% at 30% 20%, #fbe6a8, #edcb7e 38%, #c89a4a 78%, #8c6a2c);
  color: #3a2a08;
  box-shadow:
    0 4px 16px rgba(200,154,74,.5),
    inset 0 1px 0 rgba(255,255,255,.6),
    inset 0 -2px 6px rgba(120,86,28,.55);
  border: 1px solid rgba(255,238,190,.5);
}
body.gold-theme .brand-name { color: var(--txt); }
body.gold-theme .brand-name span {
  background: linear-gradient(90deg, var(--gold), #fff0c8, var(--gold));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* 倒计时段：金边微光 */
body.gold-theme .cd-seg {
  background: linear-gradient(180deg, #221a0d, #15100a);
  border: 1px solid var(--gold-deep);
  box-shadow: inset 0 1px 0 rgba(237,203,126,.16);
}
body.gold-theme .hc-time.is-done { color: var(--red); }

/* 头像金环 */
body.gold-theme .hu-avatar,
body.gold-theme .li-avatar,
body.gold-theme .profile-avatar {
  background: radial-gradient(120% 120% at 30% 22%, #2c2413, #1a150c);
  border: 1px solid var(--gold);
  box-shadow: 0 0 0 1px rgba(237,203,126,.18), inset 0 1px 0 rgba(237,203,126,.2);
}

/* ---------- 分类导航 / 标签：金调高亮 ---------- */
body.gold-theme .pc-side,
body.gold-theme .tabstrip,
body.gold-theme .page-bar { background: linear-gradient(180deg, #16110a, #100c06); }
body.gold-theme .side-item.is-active,
body.gold-theme .tabbtn.is-active,
body.gold-theme .page-tab.is-on,
body.gold-theme .slip-tab.is-on,
body.gold-theme .modal-tab.is-on {
  background: linear-gradient(180deg, rgba(237,203,126,.18), rgba(237,203,126,.05));
  border-color: var(--gold);
  box-shadow: inset 0 0 0 1px rgba(237,203,126,.25), 0 4px 14px -8px rgba(237,203,126,.5);
}

/* ---------- 公告走马灯：流光金字 ---------- */
/* 注意：text-clip 必须作用在真正含文字的 .um-text 上；
   作用在父级 .util-marquee 会让 -webkit-text-fill-color:transparent
   继承给子元素却没有对应裁切背景，导致文字隐形（= 看似无数据） */
body.gold-theme .util-marquee { color: var(--gold); }
body.gold-theme .util-marquee .um-text {
  background: linear-gradient(90deg, var(--gold-deep), #fff0c8 50%, var(--gold-deep));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* ---------- 左栏信用卡片：金箔描边 ---------- */
body.gold-theme .li-card {
  background:
    linear-gradient(165deg, rgba(237,203,126,.08), transparent 60%),
    linear-gradient(165deg, var(--bg3), var(--bg2));
  border: 1px solid var(--gold-deep);
  box-shadow: inset 0 1px 0 rgba(237,203,126,.14);
}
body.gold-theme .li-red { color: var(--gold); }

/* ---------- 号码盘 / 选项格：选中态更浓的金 ---------- */
body.gold-theme .lcell.is-on { background: linear-gradient(180deg, rgba(237,203,126,.14), rgba(237,203,126,.04)); box-shadow: inset 0 0 0 1px rgba(237,203,126,.3); }
body.gold-theme .opt.is-sel,
body.gold-theme .ht-cell.is-sel,
body.gold-theme .opttable .tcell.is-sel {
  background: linear-gradient(180deg, rgba(237,203,126,.2), rgba(237,203,126,.05));
  box-shadow: inset 0 0 0 1px var(--gold), 0 4px 16px -8px rgba(237,203,126,.55);
}
body.gold-theme .amt-input.has-val {
  background: rgba(237,203,126,.1);
  box-shadow: inset 0 0 0 1px rgba(237,203,126,.4);
}

/* ---------- 主操作按钮：抛光金条 ---------- */
body.gold-theme .btn-gold {
  background: linear-gradient(180deg, #fbe6a8 0%, #edcb7e 42%, #cf9f4e 100%);
  color: #3a2a08;
  box-shadow: 0 6px 18px -8px rgba(200,154,74,.7), inset 0 1px 0 rgba(255,255,255,.55), inset 0 -2px 5px rgba(120,86,28,.4);
}
body.gold-theme .slip-submit,
body.gold-theme .board-submit { letter-spacing: .06em; }

/* 选中球的描边环用主题金 */
body.gold-theme .ball.is-sel {
  box-shadow: 0 0 0 3px var(--bg2), 0 0 0 5px var(--gold), 0 6px 16px rgba(0,0,0,.5);
}

/* 分区标题左侧条 + 走马灯加点缀已由变量驱动，无需重复 */


/* ============================================================
   浅色模式 (gold-light) — 香槟金 / 象牙底 / 古铜金描边
   令牌整体反相：浅底 + 深字 + 加深的金 (保证对比度)
   官方红蓝绿波色球仍为彩底白字，无需改动
   ============================================================ */
body.gold-theme.gold-light[data-gold] {
  --line:      rgba(150,116,52,.18);
  --line2:     rgba(150,116,52,.32);
  --txt:       #2a2114;
  --txt2:      #6b5a3c;
  --txt3:      #79683f;   /* D5:亮底加深达 WCAG AA */
  --gold:      #b8893a;   /* 加深，作文字/描边可读 */
  --gold-deep: #8a6322;
  --ok:        #1f9d63;
  --pnl-pos:   #1668c8;   /* 亮底加深蓝(输赢正数) */
  --pnl-neg:   #cf2b2b;   /* 亮底加深红(输赢负数) */
  /* 兜底浅底；实际底色由文件末尾 data-bg 预设覆盖 */
  --bg:        #f4ead6;
  --bg2:       #fdf6e8;
  --bg3:       #fffbf2;
  --bg4:       #efe1c6;
}

/* 氛围光：暖金晕染 */
body.gold-light .pc-app {
  background:
    radial-gradient(1200px 640px at 80% -16%, rgba(184,137,58,.16), transparent 56%),
    radial-gradient(900px 520px at 4% 118%, rgba(212,176,110,.18), transparent 60%),
    var(--bg);
}
body.gold-light ::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #d9b975, #b8893a); }

/* 工具条 / 顶栏 / 侧栏 / 标签条：奶油浅面 */
body.gold-light .pc-utilbar {
  background: linear-gradient(180deg, #fbf5e8, #f1e8d6);
  border-bottom: 1px solid var(--line2);
}
body.gold-light .util-site { color: var(--gold-deep); }
body.gold-light .pc-head {
  background:
    linear-gradient(180deg, rgba(255,255,255,.7), transparent 48%),
    linear-gradient(180deg, #fdf8ee, #f4ebd8);
  box-shadow: 0 1px 0 rgba(184,137,58,.28), 0 10px 26px -18px rgba(120,90,30,.45);
}
body.gold-light .pc-side,
body.gold-light .tabstrip,
body.gold-light .page-bar { background: linear-gradient(180deg, #fbf6ec, #f3ead8); }

/* 品牌标记：抛光金不变，仍然抢眼 */
body.gold-light .brand-name { color: var(--txt); }
body.gold-light .brand-name span {
  background: linear-gradient(90deg, #9a6f28, #cf9f4e, #9a6f28);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
body.gold-light .util-marquee { color: var(--gold-deep); }
body.gold-light .util-marquee .um-text {
  background: linear-gradient(90deg, #9a6f28, #c8923a 50%, #9a6f28);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* 倒计时段 / 头像：浅底古铜边 */
body.gold-light .cd-seg {
  background: linear-gradient(180deg, #fffdf8, #f3e9d4);
  border: 1px solid var(--gold-deep);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}
body.gold-light .hu-avatar,
body.gold-light .li-avatar,
body.gold-light .profile-avatar {
  background: radial-gradient(120% 120% at 30% 22%, #fff8e8, #f0e3c8);
  border: 1px solid var(--gold);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
  color: var(--gold-deep);
}

/* 信用卡片：浅金箔 */
body.gold-light .li-card {
  background:
    linear-gradient(165deg, rgba(184,137,58,.12), transparent 60%),
    linear-gradient(165deg, #fffdf8, #f4ead6);
  border: 1px solid var(--gold-deep);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 6px 18px -12px rgba(120,90,30,.4);
}
body.gold-light .li-red { color: var(--gold-deep); }

/* 导航 / 标签选中态：浅金高亮 */
body.gold-light .side-item.is-active,
body.gold-light .tabbtn.is-active,
body.gold-light .page-tab.is-on,
body.gold-light .slip-tab.is-on,
body.gold-light .modal-tab.is-on {
  background: linear-gradient(180deg, rgba(184,137,58,.2), rgba(184,137,58,.07));
  border-color: var(--gold-deep);
  box-shadow: inset 0 0 0 1px rgba(184,137,58,.35), 0 4px 12px -8px rgba(184,137,58,.55);
  color: var(--txt);
}

/* 号码盘 / 选项格选中态：浅底实金描边 */
body.gold-light .lcell.is-on { background: linear-gradient(180deg, rgba(184,137,58,.16), rgba(184,137,58,.05)); box-shadow: inset 0 0 0 1px rgba(184,137,58,.42); }
body.gold-light .opt.is-sel,
body.gold-light .ht-cell.is-sel,
body.gold-light .opttable .tcell.is-sel {
  background: linear-gradient(180deg, rgba(184,137,58,.22), rgba(184,137,58,.06));
  box-shadow: inset 0 0 0 1px var(--gold-deep), 0 4px 14px -8px rgba(184,137,58,.6);
}
body.gold-light .amt-input.has-val {
  background: rgba(184,137,58,.12);
  box-shadow: inset 0 0 0 1px rgba(184,137,58,.5);
}

/* 主按钮：抛光金条在浅底依然适用，仅强化阴影 */
body.gold-light .btn-gold {
  background: linear-gradient(180deg, #f6dca0 0%, #dcae5e 45%, #b8893a 100%);
  color: #fff; text-shadow: 0 1px 1px rgba(120,86,28,.6);
  box-shadow: 0 6px 16px -8px rgba(184,137,58,.65), inset 0 1px 0 rgba(255,255,255,.5);
}
body.gold-light .btn-ghost { background: #fff; color: var(--txt2); }

/* 选中球描边环改用浅底 */
body.gold-light .ball.is-sel {
  box-shadow: 0 0 0 3px var(--bg2), 0 0 0 5px var(--gold-deep), 0 6px 16px rgba(120,90,30,.35);
}

/* 弹层 / 模态在浅底的遮罩调浅 */
body.gold-light .modal-mask,
body.gold-light .slip-mask { background: rgba(60,46,18,.32); }


/* ============================================================
   底色预设 (data-bg) — 用属性驱动而非运行时 setProperty，
   确保 var(--bg*) 消费者 (如 .lcell) 被正确重算重绘。
   置于文件末尾：与同特异度规则 (data-gold) 比较时靠源序取胜。
   ============================================================ */
/* 深色底 (gold-light 关闭时生效)；特异度 0,2,1 > data-gold 同级 → 靠源序后置取胜 */
body.gold-theme[data-bg="xuanhei"] { --bg:#060503; --bg2:#100d07; --bg3:#19140c; --bg4:#241d11; }
body.gold-theme[data-bg="zonghe"]  { --bg:#120c05; --bg2:#1f1609; --bg3:#2c1f0d; --bg4:#3a2b13; }
body.gold-theme[data-bg="dailan"]  { --bg:#070a12; --bg2:#101626; --bg3:#1a2336; --bg4:#26334c; }
body.gold-theme[data-bg="shimo"]   { --bg:#0c0c0d; --bg2:#171717; --bg3:#202022; --bg4:#2c2c2f; }

/* 浅色底 (gold-light 开启)；特异度 0,3,1 > 浅色基础块同级 → 靠源序后置取胜 */
body.gold-theme.gold-light[data-bg="ivory"] { --bg:#f6f0e4; --bg2:#fffdf8; --bg3:#ffffff; --bg4:#f1e7d4; }
body.gold-theme.gold-light[data-bg="champ"] { --bg:#f4ead6; --bg2:#fdf6e8; --bg3:#fffbf2; --bg4:#efe1c6; }
body.gold-theme.gold-light[data-bg="cloud"] { --bg:#eef0f2; --bg2:#f8f9fb; --bg3:#ffffff; --bg4:#e6e9ed; }
