/* ============================================================
 * 魂兽模拟器 · 样式（移动优先，兼容电脑 480px 容器）
 * 主题：星斗大森林 · 生命之湖（蓝绿幽光）
 * ============================================================ */
[hidden] { display: none !important; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0;
  background: #0a1d1b;
  color: #e9f2ec;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  min-height: 100%;
}
#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: linear-gradient(180deg, #123431 0%, #0d2422 45%, #081816 100%);
  position: relative;
}
body::before {
  content: '';
  position: fixed;
  top: 0; left: 50%;
  width: 480px; max-width: 100%;
  height: 100%;
  transform: translateX(-50%);
  background:
    radial-gradient(1.5px 1.5px at 20% 15%, rgba(140,255,200,.45), transparent),
    radial-gradient(1.5px 1.5px at 80% 28%, rgba(120,220,255,.4), transparent),
    radial-gradient(1.5px 1.5px at 45% 60%, rgba(170,255,220,.3), transparent),
    radial-gradient(1.5px 1.5px at 70% 80%, rgba(120,255,230,.4), transparent),
    radial-gradient(1.5px 1.5px at 12% 86%, rgba(120,220,255,.35), transparent),
    radial-gradient(1.5px 1.5px at 55% 35%, rgba(255,235,170,.25), transparent);
  pointer-events: none;
  z-index: 0;
}

.view {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 20px 16px calc(28px + env(safe-area-inset-bottom));
}

/* ---------- 按钮 ---------- */
.btn {
  border: 1px solid #2c554d;
  background: linear-gradient(180deg, #1d443c, #143229);
  color: #e6f2ea;
  border-radius: 10px;
  padding: 11px 20px;
  font-size: 15px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.97); filter: brightness(1.18); }
.btn-primary {
  border: 1px solid #63d9a0;
  background: linear-gradient(180deg, #93e8bd, #42c184);
  color: #06241a;
  font-weight: 700;
}
.btn-big { width: 100%; padding: 14px 20px; font-size: 17px; border-radius: 12px; }
.btn-danger { border-color: #7a3a35; color: #ffb8b0; }
.btn-back {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid #2c554d;
  background: linear-gradient(180deg, #1d443c, #143229);
  color: #e6f2ea;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- 首页 ---------- */
#view-home { justify-content: center; gap: 12px; }
.home-hero { text-align: center; margin-top: -16px; }
.home-title {
  margin: 0;
  font-size: 34px;
  letter-spacing: 4px;
  background: linear-gradient(180deg, #d2ffe6, #6ad8a0 55%, #2f8f6a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 26px rgba(86,220,150,.22);
}
.home-sub { color: #9ccbb8; font-size: 13px; margin-top: 6px; letter-spacing: 1px; }
.home-count {
  background: rgba(96,225,170,.08);
  border: 1px solid rgba(96,225,170,.3);
  border-radius: 20px;
  padding: 8px 14px;
  color: #7fe2ae;
  font-size: 12px;
  white-space: nowrap;
}
.home-count b { font-size: 13px; color: #b9ffd8; }
.home-lv {
  width: 100%;
  background: rgba(15,40,37,.85);
  border: 1px solid #244a43;
  border-radius: 12px;
  padding: 12px 16px;
}
.lv-head { display: flex; align-items: center; gap: 8px; }
.lv-name { color: #84a598; font-size: 13px; }
.lv-lv { color: #b9ffd8; font-size: 16px; font-weight: 700; }
.lv-bonus { color: #7fd4c8; font-size: 11px; margin-left: 4px; }
.lv-exp-line { margin-top: 7px; color: #9ccbb8; font-size: 12px; text-align: center; }
.lv-bar { height: 10px; background: #1d3a35; border-radius: 5px; overflow: hidden; margin-top: 8px; }
.lv-bar-fill { height: 100%; background: linear-gradient(90deg, #4cd68a, #a4e8c6); border-radius: 5px; width: 0%; transition: width .3s; }
.home-btns { width: 100%; display: flex; flex-direction: column; gap: 12px; }
.home-link-btns { width: 100%; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.home-link-btns .btn { font-size: 13px; padding: 10px 4px; white-space: nowrap; }
.settings-body { width: 100%; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.set-card { background: rgba(15,40,37,.85); border: 1px solid #244a43; border-radius: 12px; padding: 12px 14px; }
.set-card .set-row { justify-content: space-between; }
.set-card .speed-label { margin-bottom: 4px; }
.about-body { width: 100%; padding: 14px; }
.about-text {
  background: rgba(15,40,37,.85);
  border: 1px solid #244a43;
  border-radius: 12px;
  padding: 16px;
  font-size: 14px;
  line-height: 2;
  color: #d2e6da;
}
.about-text b { color: #8ff0bc; }
.home-speed {
  width: 100%;
  max-width: 260px;
  background: rgba(15,40,37,.85);
  border: 1px solid #244a43;
  border-radius: 12px;
  padding: 8px 14px;
}
.speed-label { display: flex; justify-content: space-between; align-items: center; color: #84a598; font-size: 13px; }
.speed-label b { color: #6ad8a0; }
.speed-range { width: 100%; margin-top: 6px; accent-color: #42c184; }
.qr-area { width: 100%; text-align: center; margin-top: 10px; }
.qr-text { color: #9ccbb8; font-size: 12.5px; margin-bottom: 6px; }
.qr-img { width: 132px; height: 132px; border-radius: 10px; background: #fff; padding: 5px; }

/* ---------- 开关 ---------- */
.set-row { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.set-label { font-size: 15px; color: #d2e6da; }
.set-switch { position: relative; display: inline-block; width: 48px; height: 26px; }
.set-switch input { opacity: 0; width: 0; height: 0; }
.track {
  position: absolute; inset: 0;
  background: #1d3a35;
  border: 1px solid #2c554d;
  border-radius: 13px;
  transition: background .2s;
}
.track::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #84a598;
  transition: transform .2s, background .2s;
}
.set-switch input:checked + .track { background: #3fbf7f; border-color: #3fbf7f; }
.set-switch input:checked + .track::after { transform: translateX(22px); background: #fff; }

/* ---------- 游戏 ---------- */
#view-game { padding-top: 0; padding-bottom: 16px; }
.game-top {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 12px 8px 4px;
}
.game-title {
  font-size: 20px;
  letter-spacing: 2px;
  color: #a8f0cd;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  max-width: 100%;
  text-overflow: clip;
}
.btn-pause {
  position: absolute;
  right: 4px; top: 10px;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid #2c554d;
  background: linear-gradient(180deg, #1d443c, #143229);
  color: #e6f2ea;
  font-size: 17px;
  cursor: pointer;
}
.btn-pause:active { transform: scale(.94); }

/* 属性区：第一行 血脉/寿命/战力系数 · 第二行 修为+境界/总战力 */
.attr-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-top: 6px;
}
.attr-card {
  background: linear-gradient(180deg, rgba(23,58,54,.92), rgba(13,40,37,.92));
  border: 1px solid #2c554d;
  border-radius: 12px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-height: 68px;
}
.attr-card:nth-child(-n+3) { grid-column: span 2; }
.attr-xq, .attr-combat { grid-column: span 3; min-height: 84px; }
.attr-name { color: #84a598; font-size: 11.5px; letter-spacing: 1px; }
.attr-rank { color: #6ad8a0; font-weight: 700; font-size: 13px; letter-spacing: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.attr-val { color: #d7ffe9; font-size: 22px; font-weight: 700; line-height: 1.15; white-space: nowrap; }
.attr-sub { color: #6f8f83; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.attr-xq .attr-xq-val { font-size: 24px; }
.attr-combat .attr-combat-val { font-size: 24px; color: #ffe3a3; }
.attr-beast .attr-beast-sub { color: #9fd8c0; font-size: 12px; }
.attr-blood { color: #b9ffd8; font-size: 19px; letter-spacing: 0; }
.attr-life, .attr-age { font-size: 22px; }
.attr-age { color: #ffe3a3; }
.attr-coef { color: #d7ffe9; }
.attr-life.immortal { color: #ffd98a; text-shadow: 0 0 10px rgba(255,200,120,.35); }

/* 日志 */
.log-box {
  width: 100%;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  background: rgba(9,30,28,.72);
  border: 1px solid #1e3a35;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
  -webkit-overflow-scrolling: touch;
}
.log-item {
  font-size: 13.5px;
  line-height: 1.5;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(35,74,64,.35);
  color: #cfe4d8;
}
.log-item.year{ background: rgba(35,74,64,.16); color: #9cbfae; font-size: 12.5px; }
.log-item.brk { background: rgba(76,200,140,.13); border: 1px solid rgba(76,200,140,.4); color: #a6ecc8; }
.log-item.ev1 { background: rgba(110,210,200,.11); border: 1px solid rgba(110,210,200,.3); color: #c4ece0; }
.log-item.ev2 { background: rgba(160,190,255,.12); border: 1px solid rgba(160,190,255,.35); color: #d3ddff; }
.log-item.ev3 { background: rgba(120,200,255,.13); border: 1px solid rgba(120,200,255,.4); color: #c0e8ff; }
.log-item.ev4 { background: rgba(230,190,120,.16); border: 1px solid rgba(230,190,120,.45); color: #ffe2b0; }
.log-item.huan{ background: rgba(255,160,210,.15); border: 1px solid rgba(255,160,210,.45); color: #ffd5ea; }
.log-item.rare{ background: rgba(255,190,120,.14); border: 1px solid rgba(255,190,120,.4); color: #ffd6a8; }
.log-item.red {
  background: rgba(255,70,70,.15);
  border: 1px solid rgba(255,80,80,.5);
  color: #ff9c9c;
  font-weight: 700;
}
.log-item.rainbow {
  background: linear-gradient(90deg, rgba(255,110,110,.3), rgba(255,220,110,.3), rgba(110,230,140,.3), rgba(110,200,255,.3), rgba(200,150,255,.3));
  background-size: 400% 100%;
  border: 1px solid rgba(255,255,255,.4);
  color: #fff;
  font-weight: 700;
  animation: rainbowShift 1.2s linear infinite;
}
@keyframes rainbowShift { 0% { background-position: 0% 0; } 100% { background-position: 400% 0; } }
.log-item.god { background: rgba(255,225,130,.18); border: 1px solid rgba(255,225,130,.5); color: #fff3cf; font-weight: 700; }
.log-item.dead{ background: rgba(200,80,70,.16); border: 1px solid rgba(200,80,70,.45); color: #ffb5ab; }

/* 不同修为段不同颜色（十年/百年/千年/万年/十万/百万） */
.log-item.year.ridx1 { color: #a9e8ac; }
.log-item.year.ridx2 { color: #82e2d3; }
.log-item.year.ridx3 { color: #8fbdff; }
.log-item.year.ridx4 { color: #ffc37a; }
.log-item.year.ridx5 { color: #ffe08a; }
.log-item.year.ridx6 { color: #ffe9b0; text-shadow: 0 0 8px rgba(255,230,150,.4); }
#attr-realm.realm-1 { color: #9fe8a0; }
#attr-realm.realm-2 { color: #7fe0d2; }
#attr-realm.realm-3 { color: #86b8ff; }
#attr-realm.realm-4 { color: #ffc37a; }
#attr-realm.realm-5 { color: #ffd873; text-shadow: 0 0 10px rgba(255,210,120,.35); }
#attr-realm.realm-6 { color: #ffe9b0; text-shadow: 0 0 12px rgba(255,225,160,.5); }

/* ---------- 结算 ---------- */
#view-settle { justify-content: center; padding-top: 8px; padding-bottom: 8px; }
.settle-box {
  width: 100%;
  background: rgba(15,40,37,.9);
  border: 1px solid #244a43;
  border-radius: 16px;
  padding: 18px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.settle-title { text-align: center; font-size: 22px; font-weight: 700; color: #b9ffd8; }
.settle-title.god { color: #fff3cf; text-shadow: 0 0 26px rgba(255,225,130,.55); }
.settle-wuhun { text-align: center; color: #9ccbb8; font-size: 13.5px; line-height: 1.7; }
.settle-wuhun b { color: #ffd0a8; }
.settle-rows { display: flex; flex-direction: column; }
.s-row {
  display: flex; justify-content: space-between;
  padding: 6px 4px;
  border-bottom: 1px dashed #26423c;
  font-size: 14px;
}
.s-row:last-child { border-bottom: none; }
.s-row span { color: #84a598; }
.s-row b { color: #e9f2ec; }
.settle-god {
  text-align: center;
  font-size: 14px;
  color: #fff3cf;
  background: linear-gradient(180deg, rgba(255,225,130,.2), rgba(255,225,130,.06));
  border: 1px solid rgba(255,225,130,.5);
  border-radius: 10px;
  padding: 10px;
  letter-spacing: 1px;
}
.settle-xinwu { font-size: 12.5px; color: #ffd0a8; line-height: 1.6; text-align: center; }
.settle-xinwu.warn { color: #ffb0a8; font-weight: 700; }
.settle-rank {
  background: rgba(96,225,170,.08);
  border: 1px solid rgba(96,225,170,.3);
  border-radius: 10px;
  padding: 7px;
  color: #7fe2ae;
  font-size: 13px;
  text-align: center;
  line-height: 1.5;
}
.settle-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 2px; }
.settle-btns .btn-big { padding: 11px 6px; font-size: 15px; border-radius: 10px; }

/* ---------- 排行榜 ---------- */
.page-view { padding: 0 !important; }
.page-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px 10px;
  background: #0d2825;
  border-bottom: 1px solid #244a43;
  position: sticky;
  top: 0;
  z-index: 5;
}
.page-title { flex: 1; text-align: center; font-size: 19px; color: #6ad8a0; margin: 0; letter-spacing: 2px; }
.btn-close {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid #2c554d;
  background: #153631;
  color: #9ccbb8;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  flex: none;
}
.btn-close:active { transform: scale(.92); }
.tabs { display: flex; gap: 8px; padding: 10px 14px 4px; width: 100%; }
.tabs-small { padding-top: 4px; }
.tabs-small .tab { font-size: 12px; padding: 6px 0; }
.tab {
  flex: 1;
  border: none;
  border-radius: 9px;
  padding: 8px 0;
  background: #153631;
  color: #84a598;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.tab.active { background: linear-gradient(180deg, #8fe6ba, #42c184); color: #06241a; }
.lb-note { padding: 6px 14px 0; font-size: 12px; color: #7fe2ae; width: 100%; }
.lb-body { padding: 8px 14px 30px; width: 100%; }
.lb-tip { text-align: center; color: #6f8f83; padding: 30px 0; font-size: 14px; }
.lb-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #14312d;
  border: 1px solid #244a43;
  border-radius: 10px;
  padding: 8px 10px;
  margin-bottom: 6px;
}
.lb-row.me { box-shadow: 0 0 0 2px #42c184 inset; background: rgba(66,193,132,.12); }
.lb-rank {
  flex: none;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: #1d3a35;
  color: #84a598;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  line-height: 26px;
}
.lb-rank.top { background: #2f8f6a; color: #eafff4; }
.lb-rank.top.r1 { background: #ff3b30; }
.lb-rank.top.r2 { background: #ff9f2e; }
.lb-rank.top.r3 { background: #ffd166; }
.lb-user { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }
.lb-avatar { width: 28px; height: 28px; border-radius: 50%; flex: none; }
.lb-name { font-size: 14px; color: #d2e6da; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-score { font-size: 15px; font-weight: 700; color: #b9ffd8; flex: none; white-space: nowrap; }
.lb-time { font-size: 11px; color: #6f8f83; flex: none; }

/* ---------- 遮罩/弹层 ---------- */
.mask {
  position: fixed;
  inset: 0;
  background: rgba(4,14,13,.72);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mask-box {
  width: 300px;
  max-width: 86vw;
  background: #0d2825;
  border: 1px solid #2c554d;
  border-radius: 16px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 8px 40px rgba(0,0,0,.5);
}
.mask-title { text-align: center; font-size: 20px; color: #6ad8a0; font-weight: 700; letter-spacing: 2px; }
.mask-info { text-align: center; color: #9ccbb8; font-size: 13px; }
.mask-box .set-row { justify-content: center; padding: 4px 0; }
.review-box { width: 320px; max-width: 88vw; max-height: 80vh; }
.review-log {
  flex: 1;
  min-height: 200px;
  max-height: 55vh;
  overflow-y: auto;
  background: rgba(9,30,28,.75);
  border: 1px solid #1e3a35;
  border-radius: 10px;
  padding: 10px;
  font-size: 12.5px;
  line-height: 1.7;
  color: #d2e6da;
  -webkit-overflow-scrolling: touch;
}
.review-log .rv-brk { color: #a6ecc8; }
.review-log .rv-ev1 { color: #c4ece0; }
.review-log .rv-ev2 { color: #d3ddff; }
.review-log .rv-ev3 { color: #c0e8ff; }
.review-log .rv-ev4 { color: #ffe2b0; }
.review-log .rv-huan { color: #ffd5ea; }
.review-log .rv-god { color: #fff3cf; font-weight: 700; }
.review-log .rv-dead { color: #ffb5ab; }
.review-log .rv-rare { color: #ffd6a8; }
.review-log .rv-red { color: #ff9c9c; font-weight: 700; }
.review-log .rv-rainbow {
  background: linear-gradient(90deg, #ff8f8f, #ffdc8f, #8ff0b0, #8fd0ff, #d0a0ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 700;
}
.review-log .rv-year { color: #7f9a90; }
.review-log .rv-ridx1 { color: #a9e8ac; }
.review-log .rv-ridx2 { color: #82e2d3; }
.review-log .rv-ridx3 { color: #8fbdff; }
.review-log .rv-ridx4 { color: #ffc37a; }
.review-log .rv-ridx5 { color: #ffe08a; }
.review-log .rv-ridx6 { color: #ffe9b0; }

/* ---------- 电脑端 ---------- */
@media (min-width: 520px) {
  body { background: #06120f; }
}

/* 滚动条美化 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: #2c554d; border-radius: 3px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 高阶血脉增益（点赞/投币/关注） ---------- */
.btn-follow {
  border-color: #6ad8a0;
  color: #a8f0cd;
  margin-bottom: 12px;
  font-size: 14px;
  padding: 12px 16px;
}
.follow-box { width: 320px; max-width: 88vw; }
.follow-rows { display: flex; flex-direction: column; gap: 10px; }
.follow-action { display: flex; justify-content: space-between; align-items: center; text-align: left; padding: 13px 16px; font-size: 14px; }
.fb-state { font-size: 13px; }
.fb-state.done { color: #6cdb8a; }
.fb-state.todo { color: #7a968a; }
.fb-total { font-size: 15px; color: #6ad8a0; font-weight: 700; }

/* ---------- 成就系统 ---------- */
.home-ach-row { width: 100%; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin-bottom: 6px; }
.ach-tip { text-align: center; color: #6ad8a0; font-size: 12px; margin-bottom: 12px; }
.ach-total {
  text-align: center; color: #6ad8a0; font-size: 16px; font-weight: 700;
  margin: 6px 14px 10px; padding: 9px;
  width: calc(100% - 28px);
  background: rgba(96,225,170,.08);
  border: 1px solid rgba(96,225,170,.3);
  border-radius: 12px;
}
.ach-list {
  display: flex; flex-direction: column; gap: 14px;
  padding: 6px 16px 30px;
  width: 100%;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
}
.ach-list::-webkit-scrollbar { width: 6px; }
.ach-list::-webkit-scrollbar-thumb { background: #42c184; border-radius: 3px; }
.ach-list::-webkit-scrollbar-track { background: #12322d; border-radius: 3px; }
.ach-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #2c554d;
  border-radius: 14px;
  padding: 16px 18px;
  background: linear-gradient(180deg, #16362f, #102a25);
  box-shadow: 0 2px 10px rgba(0,0,0,.25);
}
.ach-item.done { border-color: #42c184; background: linear-gradient(180deg, #12352b, #0d2a22); box-shadow: 0 2px 14px rgba(66,193,132,.16); }
.ach-name { font-size: 17px; font-weight: 700; letter-spacing: 1px; }
.ach-item.done .ach-name { color: #a8f0cd; }
.ach-item.todo .ach-name { color: #84a598; }
.ach-bonus { font-size: 13px; white-space: nowrap; }
.ach-item.done .ach-bonus { color: #6cdb8a; }
.ach-item.todo .ach-bonus { color: #5c7a6e; }

/* ---------- 成就达成面包屑提示 ---------- */
.ach-toast {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 99;
  text-align: center;
  padding: 12px 16px;
  background: linear-gradient(180deg, #b9ffd8, #42c184);
  color: #06241a;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  transform: translateY(-100%);
  transition: transform .35s ease;
  box-shadow: 0 4px 16px rgba(0,0,0,.35);
}
.ach-toast.show { transform: translateY(0); }

#btn-ach { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 9px 10px; }
#btn-ach > span:first-child { font-size: 17px; line-height: 1.3; }
.ach-btn-tip { font-size: 10px; color: #6ad8a0; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
#btn-guard {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  padding: 9px 8px; opacity: .85; border-color: #2c554d;
}
#btn-guard > span:first-child { font-size: 17px; line-height: 1.3; }
#btn-guard.on {
  opacity: 1; border-color: #6ad8a0; color: #b9ffd8;
  background: linear-gradient(180deg, #1d5c46, #103d2e);
  box-shadow: 0 0 12px rgba(106, 216, 160, .35);
}

/* ---------- 手动模式 ---------- */
.manual-tip {
  width: 100%;
  text-align: center;
  color: #7fd4c8;
  font-size: 13px;
  padding: 6px 0 2px;
}
.set-tip { margin-top: 6px; color: #7a968a; font-size: 12px; }

/* ============ 高光时刻 ============ */
.hl-list { width: 100%; padding: 12px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; min-height: 0; }
.hl-empty { color: #7a968a; text-align: center; padding: 40px 10px; font-size: 13px; line-height: 1.8; }
.hl-row {
  width: 100%;
  background: rgba(15,40,37,.85);
  border: 1px solid #2c554d;
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
}
.hl-row:active { background: rgba(28,58,52,.95); }
.hl-top { display: flex; align-items: center; gap: 8px; }
.hl-time { color: #9ccbb8; font-size: 12px; white-space: nowrap; }
.hl-title { color: #b9ffd8; font-size: 14px; font-weight: 700; flex: 1; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hl-badge { font-size: 11px; padding: 2px 7px; border-radius: 8px; white-space: nowrap; }
.hl-badge.god { background: rgba(255,225,130,.2); color: #fff3cf; border: 1px solid rgba(255,225,130,.45); }
.hl-badge.fail { background: rgba(255,100,90,.18); color: #ffb5ab; border: 1px solid rgba(255,110,100,.45); }
.hl-badge.dead { background: rgba(120,160,150,.15); color: #b9cec4; border: 1px solid rgba(120,160,150,.35); }
.hl-badge.pause { background: rgba(180,160,90,.15); color: #e0d0a0; border: 1px solid rgba(180,160,90,.35); }
.hl-sub { margin-top: 6px; color: #b9cec4; font-size: 12px; line-height: 1.6; }
.hl-sub b { color: #ffd6a8; }

.mask-box.hl-box { width: 320px; max-width: 88vw; max-height: 80vh; display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
.mask-box.hl-box .mask-head { flex-shrink: 0; }
.mask-box.hl-box .review-log { flex: 1; min-height: 0; }
.mask-box.hl-box .btn { flex-shrink: 0; width: 100%; }
.hl-sub-line { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.hl-sub { margin-top: 0; }
.hl-export-btn {
  flex-shrink: 0; margin-left: auto;
  font-size: 12px; padding: 5px 12px; border-radius: 15px;
  border: 1px solid #3d7d70; background: rgba(96,200,170,.16); color: #9fddc8;
  white-space: nowrap; cursor: pointer;
}
.hl-export-btn:active { background: rgba(96,200,170,.3); }
.mask-head { display: flex; align-items: center; gap: 6px; width: 100%; }
.mask-head .mask-title { flex: 1; text-align: center; margin: 0; }
#hl-toast {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%);
  z-index: 99; max-width: 82vw;
  background: rgba(13,40,37,.94); border: 1px solid #3d7d70; border-radius: 20px;
  color: #eaf4ee; font-size: 13px; padding: 9px 16px;
  box-shadow: 0 4px 14px rgba(0,0,0,.35);
  pointer-events: none; text-align: center;
}
#hl-img-mask { align-items: center; justify-content: center; background: rgba(6,14,13,.96); padding: 12px; }
.hl-img-box { width: min(94vw, 460px); height: 92vh; max-height: 92vh; display: flex; flex-direction: column; gap: 10px; }
.hl-img-head { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.hl-img-tip { flex: 1; color: #d3e5dc; font-size: 13px; text-align: center; }
.hl-img-scroll {
  flex: 1; min-height: 0; overflow: auto; background: #fff; border-radius: 10px;
  -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
}
.hl-img-scroll img { display: block; width: 100%; height: auto; user-select: none; -webkit-user-select: none; }
.hl-img-box .btn { flex-shrink: 0; }

/* 保底说明弹窗 */
.guard-rows { display: flex; flex-direction: column; gap: 5px; width: 100%; color: #d2e6da; font-size: 13px; padding: 2px 0; }
.guard-row { background: rgba(25,54,49,.6); border-radius: 8px; padding: 5px 10px; text-align: left; }
.guard-row b { color: #b9ffd8; }
.mask-info b.gold { color: #ffe3a3; }

.follow-grp { color:#a8f0cd; font-size: 12px; font-weight: 700; letter-spacing: 1px; margin: 4px 0 0; }
button:disabled { opacity: .45; filter: grayscale(.35); }

/* 首页排行榜按钮：不换行 */
#btn-rank { white-space: nowrap; overflow: hidden; font-size: clamp(12px, 4.2vw, 16px); padding: 12px 6px; letter-spacing: 0; }
