@font-face {
  font-family: 'Press Start 2P';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/PressStart2P.woff2') format('woff2');
}

@font-face {
  font-family: 'Noto Color Emoji';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/NotoColorEmoji.0.woff2') format('woff2');
  unicode-range: U+1f1e6-1f1ff;
}
@font-face {
  font-family: 'Noto Color Emoji';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/NotoColorEmoji.1.woff2') format('woff2');
  unicode-range: U+200d, U+2620, U+26a7, U+fe0f, U+1f308, U+1f38c, U+1f3c1, U+1f3f3-1f3f4, U+1f6a9, U+e0062-e0063, U+e0065, U+e0067, U+e006c, U+e006e, U+e0073-e0074, U+e0077, U+e007f;
}
@font-face {
  font-family: 'Noto Color Emoji';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/NotoColorEmoji.2.woff2') format('woff2');
  unicode-range: U+a9, U+ae, U+200d, U+203c, U+2049, U+20e3, U+2122, U+2139, U+2194-2199, U+21a9-21aa, U+23cf, U+23e9-23ef, U+23f8-23fa, U+24c2, U+25aa-25ab, U+25b6, U+25c0, U+25fb-25fe, U+2611, U+2622-2623, U+2626, U+262a, U+262e-262f, U+2638, U+2640, U+2642, U+2648-2653, U+2660, U+2663, U+2665-2666, U+2668, U+267b, U+267e-267f, U+2695, U+269b-269c, U+26a0, U+26a7, U+26aa-26ab, U+26ce, U+26d4, U+2705, U+2714, U+2716, U+271d, U+2721, U+2733-2734, U+2747, U+274c, U+274e, U+2753-2755, U+2757, U+2764, U+2795-2797, U+27a1, U+27b0, U+27bf, U+2934-2935, U+2b05-2b07, U+2b1b-2b1c, U+2b55, U+3030, U+303d, U+3297, U+3299, U+fe0f, U+1f170-1f171, U+1f17e-1f17f, U+1f18e, U+1f191-1f19a, U+1f201-1f202, U+1f21a, U+1f22f, U+1f232-1f23a, U+1f250-1f251, U+1f310, U+1f3a6, U+1f3b5-1f3b6, U+1f3bc, U+1f3e7, U+1f441, U+1f499-1f49c, U+1f49f-1f4a0, U+1f4ac-1f4ad, U+1f4b1-1f4b2, U+1f4b9, U+1f4db, U+1f4f2-1f4f6, U+1f500-1f507, U+1f515, U+1f518-1f524, U+1f52f-1f53d, U+1f549, U+1f54e, U+1f5a4, U+1f5e8, U+1f5ef, U+1f6ab, U+1f6ad-1f6b1, U+1f6b3, U+1f6b7-1f6bc, U+1f6be, U+1f6c2-1f6c5, U+1f6d0-1f6d1, U+1f6d7, U+1f6dc, U+1f7e0-1f7eb, U+1f7f0, U+1f90d-1f90e, U+1f9d1-1f9d2, U+1f9e1, U+1fa75-1fa77, U+1faaf;
}
@font-face {
  font-family: 'Noto Color Emoji';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/NotoColorEmoji.3.woff2') format('woff2');
  unicode-range: U+200d, U+231a-231b, U+2328, U+23f0-23f3, U+2602, U+260e, U+2692, U+2694, U+2696-2697, U+2699, U+26b0-26b1, U+26cf, U+26d1, U+26d3, U+2702, U+2709, U+270f, U+2712, U+fe0f, U+1f302, U+1f321, U+1f392-1f393, U+1f3a9, U+1f3bd, U+1f3ee, U+1f3f7, U+1f3fa, U+1f451-1f462, U+1f484, U+1f489-1f48a, U+1f48c-1f48e, U+1f4a1, U+1f4a3, U+1f4a5, U+1f4b0, U+1f4b3-1f4b8, U+1f4bb-1f4da, U+1f4dc-1f4f1, U+1f4ff, U+1f508-1f514, U+1f516-1f517, U+1f526-1f529, U+1f52c-1f52e, U+1f550-1f567, U+1f56f-1f570, U+1f576, U+1f587, U+1f58a-1f58d, U+1f5a5, U+1f5a8, U+1f5b1-1f5b2, U+1f5c2-1f5c4, U+1f5d1-1f5d3, U+1f5dc-1f5de, U+1f5e1, U+1f5f3, U+1f6aa, U+1f6ac, U+1f6bd, U+1f6bf, U+1f6c1, U+1f6cb, U+1f6cd-1f6cf, U+1f6d2, U+1f6e0-1f6e1, U+1f6f0, U+1f97b-1f97f, U+1f9af, U+1f9ba, U+1f9e2-1f9e6, U+1f9ea-1f9ec, U+1f9ee-1f9f4, U+1f9f7-1f9ff, U+1fa71-1fa74, U+1fa79-1fa7b, U+1fa86, U+1fa8e-1fa8f, U+1fa91-1fa93, U+1fa96, U+1fa99-1faa0, U+1faa2-1faa7, U+1faaa-1faae;
}
@font-face {
  font-family: 'Noto Color Emoji';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/NotoColorEmoji.4.woff2') format('woff2');
  unicode-range: U+265f, U+26bd-26be, U+26f3, U+26f8, U+fe0f, U+1f004, U+1f0cf, U+1f380-1f384, U+1f386-1f38b, U+1f38d-1f391, U+1f396-1f397, U+1f399-1f39b, U+1f39e-1f39f, U+1f3a3-1f3a5, U+1f3a7-1f3a9, U+1f3ab-1f3b4, U+1f3b7-1f3bb, U+1f3bd-1f3c0, U+1f3c5-1f3c6, U+1f3c8-1f3c9, U+1f3cf-1f3d3, U+1f3f8-1f3f9, U+1f47e, U+1f4e2, U+1f4f7-1f4fd, U+1f52b, U+1f579, U+1f58c-1f58d, U+1f5bc, U+1f6f7, U+1f6f9, U+1f6fc, U+1f93f, U+1f941, U+1f945, U+1f947-1f94f, U+1f9e7-1f9e9, U+1f9f5-1f9f6, U+1fa70-1fa71, U+1fa80-1fa81, U+1fa83-1fa85, U+1fa87-1fa8a, U+1fa94-1fa95, U+1fa97-1fa98, U+1faa1, U+1faa9, U+1fadf;
}
@font-face {
  font-family: 'Noto Color Emoji';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/NotoColorEmoji.5.woff2') format('woff2');
  unicode-range: U+2693, U+26e9-26ea, U+26f1-26f2, U+26f4-26f5, U+26fa, U+26fd, U+2708, U+fe0f, U+1f301, U+1f303, U+1f306-1f307, U+1f309, U+1f310, U+1f3a0-1f3a2, U+1f3aa, U+1f3cd-1f3ce, U+1f3d5, U+1f3d7-1f3db, U+1f3df-1f3e6, U+1f3e8-1f3ed, U+1f3ef-1f3f0, U+1f488, U+1f492, U+1f4ba, U+1f54b-1f54d, U+1f5fa-1f5ff, U+1f680-1f6a2, U+1f6a4-1f6a8, U+1f6b2, U+1f6d1, U+1f6d5-1f6d6, U+1f6dd-1f6df, U+1f6e2-1f6e5, U+1f6e9, U+1f6eb-1f6ec, U+1f6f3-1f6f6, U+1f6f8, U+1f6fa-1f6fb, U+1f9bc-1f9bd, U+1f9ed, U+1f9f3, U+1fa7c;
}
@font-face {
  font-family: 'Noto Color Emoji';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/NotoColorEmoji.6.woff2') format('woff2');
  unicode-range: U+200d, U+2615, U+fe0f, U+1f32d-1f330, U+1f336, U+1f33d, U+1f344-1f37f, U+1f382, U+1f52a, U+1f7e9, U+1f7eb, U+1f942-1f944, U+1f950-1f96f, U+1f99e, U+1f9aa, U+1f9c0-1f9cb, U+1fad0-1fadc;
}
@font-face {
  font-family: 'Noto Color Emoji';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/NotoColorEmoji.7.woff2') format('woff2');
  unicode-range: U+200d, U+2600-2601, U+2603-2604, U+2614, U+2618, U+26a1, U+26c4-26c5, U+26c8, U+26f0, U+2728, U+2744, U+2b1b, U+2b50, U+fe0f, U+1f300, U+1f304-1f305, U+1f308, U+1f30a-1f30f, U+1f311-1f321, U+1f324-1f32c, U+1f331-1f335, U+1f337-1f33c, U+1f33e-1f344, U+1f3d4, U+1f3d6, U+1f3dc-1f3de, U+1f3f5, U+1f400-1f43f, U+1f490, U+1f4a7, U+1f4ae, U+1f525, U+1f54a, U+1f573, U+1f577-1f578, U+1f648-1f64a, U+1f6d8, U+1f940, U+1f980-1f9ae, U+1f9ba, U+1fa90, U+1faa8, U+1fab0-1fabf, U+1facd-1facf, U+1fae7;
}
@font-face {
  font-family: 'Noto Color Emoji';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/NotoColorEmoji.8.woff2') format('woff2');
  unicode-range: U+200d, U+2640, U+2642, U+2695-2696, U+26f7, U+26f9, U+2708, U+2764, U+27a1, U+fe0f, U+1f33e, U+1f373, U+1f37c, U+1f384-1f385, U+1f393, U+1f3a4, U+1f3a8, U+1f3c2-1f3c4, U+1f3c7, U+1f3ca-1f3cc, U+1f3eb, U+1f3ed, U+1f3fb-1f3ff, U+1f430, U+1f466-1f469, U+1f46b-1f478, U+1f47c, U+1f481-1f483, U+1f486-1f487, U+1f48b, U+1f48f, U+1f491, U+1f4bb-1f4bc, U+1f527, U+1f52c, U+1f574-1f575, U+1f57a, U+1f645-1f647, U+1f64b, U+1f64d-1f64e, U+1f680, U+1f692, U+1f6a3, U+1f6b4-1f6b6, U+1f6c0, U+1f6cc, U+1f91d, U+1f926, U+1f930-1f931, U+1f934-1f93a, U+1f93c-1f93e, U+1f977, U+1f9af-1f9b3, U+1f9b8-1f9b9, U+1f9bc-1f9bd, U+1f9cc-1f9cf, U+1f9d1-1f9df, U+1fa70, U+1fa82, U+1fac3-1fac5, U+1fac8, U+1faef;
}
@font-face {
  font-family: 'Noto Color Emoji';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/NotoColorEmoji.9.woff2') format('woff2');
  unicode-range: U+200d, U+2194-2195, U+2603, U+261d, U+2620, U+2639-263a, U+2665, U+26a1, U+26c4, U+270a-270d, U+2728, U+2763-2764, U+2b50, U+fe0f, U+1f31a-1f31f, U+1f32b, U+1f389-1f38a, U+1f3fb-1f3ff, U+1f440-1f450, U+1f463-1f465, U+1f479-1f47b, U+1f47d-1f480, U+1f485, U+1f48b-1f48c, U+1f493-1f49f, U+1f4a2, U+1f4a4-1f4a6, U+1f4a8-1f4ab, U+1f4af, U+1f525, U+1f573, U+1f590, U+1f595-1f596, U+1f5a4, U+1f5e3, U+1f600-1f644, U+1f648-1f64a, U+1f64c, U+1f64f, U+1f90c-1f925, U+1f927-1f92f, U+1f932-1f933, U+1f970-1f976, U+1f978-1f97a, U+1f9a0, U+1f9b4-1f9b7, U+1f9bb, U+1f9be-1f9bf, U+1f9d0, U+1f9e0-1f9e1, U+1fa75-1fa79, U+1fac0-1fac2, U+1fac6, U+1fae0-1fae6, U+1fae8-1faea, U+1faef-1faf8;
}

/* ===== 像素风 / MC 主题 ===== */
:root {
  --bg: #1a1c2c;
  --panel: var(--panel);
  --panel2: var(--panel2);
  --grass: #5dbd3e;
  --grass-d: #3d8b27;
  --dirt: #8a5a2b;
  --gold: #ffd83d;
  --red: #e64545;
  --cyan: #4dd0e1;
  --txt: #f4f4f4;
  --dim: #9aa0c3;
  --deep: #14162a;
}

/* sRGB 屏（Windows 常见）配色补偿：微提亮，弥补 sRGB 比 P3 偏暗偏灰。
   P3 屏（Mac）自动忽略本块，保持上面的原配色。 */
@media (color-gamut: srgb) {
  :root {
    --bg: #1e2134;
    --panel: #2b2f4b;
    --panel2: #3a3f69;
    --grass: #63c642;
    --grass-d: #41912a;
    --dirt: #90602e;
    --gold: #ffd83d;
    --red: #ec4a4a;
    --cyan: #53d6e6;
    --txt: #f8f8f8;
    --dim: #a5abcc;
    --deep: #1b1d32;
  }
}


/* ===== 主题个性化（玩家可切换界面配色）===== */
html[data-theme="forest"] { --bg:#14231a; --panel:#1f3526; --panel2:#2c4934; --deep:#0d1a12; }
html[data-theme="sakura"] { --bg:#2a1a26; --panel:#3a2536; --panel2:#4e3248; --deep:#1f1220; }
html[data-theme="night"] { --bg:#0d0f16; --panel:#171a28; --panel2:#232640; --deep:#080a10; }
html[data-theme="ocean"] { --bg:#10202e; --panel:#1a3042; --panel2:#274459; --deep:#0a1620; }
html[data-theme="twilight"] { --bg:#1a1830; --panel:#272442; --panel2:#36305c; --deep:#100f20; }

/* 主题选择面板 */
.theme-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-top:16px; }
.theme-opt { background:var(--panel2); border:2px solid transparent; border-radius:10px; padding:10px 6px; cursor:pointer; text-align:center; transition:border-color .15s; }
.theme-opt.active { border-color:var(--gold); }
.theme-swatch { height:42px; border-radius:8px; margin-bottom:8px; box-shadow:inset 0 0 0 2px rgba(0,0,0,.22); }
.theme-name { font-size:12px; color:var(--txt); font-weight:600; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--txt);
  font-family: "Noto Color Emoji", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; }
.px { font-family: "Press Start 2P", "Noto Color Emoji", monospace; }
.twemoji { width: 1em; height: 1em; vertical-align: -0.12em; }
.ico {
  width: 1.1em; height: 1.1em;
  padding: 0.3em;
  border-radius: 24%;
  box-sizing: content-box;
  display: inline-block;
  vertical-align: -0.15em;
  stroke-width: 2.6;
  border: 2px solid #141414;
  box-shadow: 0 3px 0 #141414;
}
.ico { color: #fff; }
.ico-btn { width: 1em; height: 1em; display: inline-block; vertical-align: -0.12em; margin-right: 2px; }
.logo-title .ico-btn, .round-label .ico-btn { width: 0.55em; height: 0.55em; margin-right: 6px; }
.rank-ico { width: 1em; height: 1em; vertical-align: -0.12em; }
.ico-red { background: linear-gradient(180deg, #ff8a8a, #e64545 55%, #b52f2f); }
.ico-orange { background: linear-gradient(180deg, #ffb066, #ff7b39 55%, #cc5a20); }
.ico-yellow { background: linear-gradient(180deg, #f0cf62, #e6bd2c 55%, #b89210); }
.ico-purple { background: linear-gradient(180deg, #c9a0ff, #9b6bff 55%, #7a3fd6); }
.ico-green { background: linear-gradient(180deg, #8fe06a, #5dbd3e 55%, #3d8b27); }
.ico-gold { background: linear-gradient(180deg, #eed671, #dfb626 55%, #c0930a); }
.ico-blue { background: linear-gradient(180deg, #8fb5ff, #5b8def 55%, #3a6cc4); }
.ico-teal { background: linear-gradient(180deg, #5eead4, #14b8a6 55%, #0f766e); }
.ico-cyan { background: linear-gradient(180deg, #8ce8f2, #4dd0e1 55%, #2fb8cc); }
.ico-grey { background: linear-gradient(180deg, #c9c9d6, #9a9fb0 55%, #70758a); }

#app { max-width: 480px; margin: 0 auto; min-height: 100vh; padding: 14px; position: relative; overflow: hidden; }

.screen { display: none; animation: fadein .25s; }
.screen.active { display: block; }
@keyframes fadein { from { opacity: 0; transform: translateY(8px);} to { opacity: 1; transform: none;} }

/* 升级公告栏 */
.notice-bar {
  display: flex; align-items: center; gap: 8px;
  margin-top: 10px; padding: 10px 12px;
  background: var(--panel); border: 3px solid #000;
  box-shadow: inset 0 0 0 3px var(--panel2), 0 4px 0 rgba(0,0,0,.4);
  border-radius: 4px; color: var(--txt);
  font-size: 13px; line-height: 1.5;
}
.notice-icon { font-size: 16px; flex-shrink: 0; }
.notice-text { flex: 1; min-width: 0; }
.notice-close {
  flex-shrink: 0; background: none; border: none;
  color: var(--dim); font-size: 15px; cursor: pointer;
  padding: 2px 4px; line-height: 1;
}
.notice-close:hover { color: var(--red); }

/* 面板 & 控件 */
.panel { background: var(--panel); border: 4px solid #000;
  box-shadow: inset 0 0 0 4px var(--panel2), 0 8px 0 rgba(0,0,0,.4);
  padding: 18px; border-radius: 4px; margin-top: 14px; }
.lbl { display:block; color: var(--dim); font-size: 13px; margin: 10px 0 6px; }
input, select { width: 100%; padding: 12px; font-size: 16px; background: var(--deep);
  color: var(--txt); border: 3px solid #000; border-radius: 4px; outline: none; }
input:focus, select:focus { border-color: var(--grass); }
.btn { display: block; width: 100%; margin-top: 12px; padding: 14px; font-size: 16px; font-weight: 700;
  color: #fff; background: var(--panel2); border: 3px solid #000; border-radius: 4px;
  box-shadow: 0 4px 0 #000; cursor: pointer; transition: transform .05s; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #000; }
.btn.primary { background: var(--grass); text-shadow: 1px 1px 0 rgba(0,0,0,.4); }
.btn.primary:active { background: var(--grass-d); }
.btn.big { font-size: 19px; padding: 16px; }
.btn.small { width: auto; display: inline-block; padding: 8px 14px; margin: 8px 0 0; font-size: 13px; }
.btn.ghost { background: transparent; color: var(--dim); box-shadow: none; }
.btn.share { background: var(--cyan); color: #1a1c2c; text-shadow: none; }
.room-code-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.btn-icon { background: var(--deep); border: 2px solid #000; border-radius: 8px; color: var(--gold); font-size: 22px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 6px; transition: color .15s, transform .08s, background .15s; }
.btn-icon:hover { color: #fff; background: var(--panel2); }
.btn-icon:active { transform: translateY(1px); }

/* ===== 新手引导 ===== */
.guide-overlay { position: fixed; inset: 0; z-index: 3000; }
.guide-spot { position: absolute; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .72); border: 3px solid var(--gold); border-radius: 10px; transition: all .25s ease; pointer-events: none; }
.guide-card { position: fixed; left: 50%; transform: translateX(-50%); bottom: 22px; width: min(88vw, 430px); background: var(--panel); border: 3px solid #000; box-shadow: inset 0 0 0 3px var(--panel2), 0 8px 0 rgba(0, 0, 0, .4); border-radius: 12px; padding: 18px 20px; z-index: 3001; }
.guide-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }

.guide-creeper { cursor: pointer; }
.guide-creeper.exploding { animation: creeperExplode 1.5s ease-out forwards !important; }
.guide-creeper.reviving { animation: creeperRevive .5s ease-out !important; }
@keyframes creeperRevive {
  0% { transform: scale(0.3); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes creeperExplode {
  0% { transform: scale(1); filter: brightness(1); }
  35% { transform: scale(1.05); filter: brightness(1.7); }
  55% { transform: scale(1.15); filter: brightness(3); }
  75% { transform: scale(1.3); filter: brightness(5); }
  90% { transform: scale(1.55); filter: brightness(7); opacity: 1; }
  100% { transform: scale(2.8); opacity: 0; filter: brightness(3); }
}
.creeper-boom {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: "Press Start 2P", monospace;
  font-size: 22px;
  color: #ff6b35;
  text-shadow: 3px 3px 0 #000;
  pointer-events: none;
  z-index: 10;
  animation: boomPop 1s ease-out forwards;
}
@keyframes boomPop {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
  35% { transform: translate(-50%, -50%) scale(1.5); opacity: 1; }
  70% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}

.guide-creeper { width: 36px; height: 63px; flex-shrink: 0; image-rendering: pixelated; filter: drop-shadow(0 3px 0 rgba(0,0,0,.35)); transform-origin: center bottom; animation: creeperHop 2.2s ease-in-out infinite; }
.guide-creeper .creeper-eye { transform-box: fill-box; transform-origin: center; animation: creeperBlink 3.5s infinite; }
@keyframes creeperHop {
  0%, 100% { transform: translateY(0); }
  30% { transform: translateY(-7px); }
  55% { transform: translateY(0); }
  78% { transform: translateY(-3px); }
}
@keyframes creeperBlink {
  0%, 46%, 54%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(0.12); }
}
.guide-title { font-size: 18px; font-weight: 900; color: var(--gold); }
.guide-text { font-size: 14px; color: var(--txt); line-height: 1.65; }
.guide-dots { display: flex; gap: 6px; justify-content: center; margin: 14px 0 4px; }
.guide-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); }
.guide-dot.active { background: var(--gold); }
.guide-actions { display: flex; gap: 10px; margin-top: 12px; }
.guide-btn { flex: 1; padding: 10px; font-size: 14px; font-weight: 700; border-radius: 8px; cursor: pointer; border: 2px solid #000; font-family: inherit; }
.guide-btn.skip { background: transparent; color: var(--dim); }
.guide-btn.next { background: var(--grass); color: #fff; text-shadow: 1px 1px 0 rgba(0,0,0,.3); }


/* 设置面板 */
.settings-list { margin-top: 8px; }
.setting-item { display: flex; align-items: center; gap: 12px; padding: 14px 12px; background: var(--deep); border: 2px solid #000; border-radius: 8px; margin-top: 10px; cursor: pointer; font-size: 15px; font-weight: 600; color: var(--txt); transition: background .15s; }
.setting-item:hover { background: var(--panel2); }
.si-ico { font-size: 18px; flex-shrink: 0; }
.accent-row { justify-content: space-between; }
.accent-toggle { display: flex; gap: 6px; }
.accent-btn { padding: 6px 10px; font-size: 13px; font-weight: 600; border: 2px solid #000; border-radius: 6px; background: var(--deep); color: var(--dim); cursor: pointer; transition: all .15s; }
.accent-btn.active { background: var(--grass); color: #fff; }

.hidden { display: none; }
.msg { color: var(--gold); font-size: 13px; margin-top: 10px; min-height: 18px; text-align: center; }
.foot { color: var(--dim); text-align: center; font-size: 12px; margin-top: 14px; }

/* LOGO */
.logo { text-align: center; padding-top: 26px; }
.logo-title { font-size: 44px; font-weight: 900; letter-spacing: 4px;
  text-shadow: 4px 4px 0 #000; color: var(--grass); }
.logo-title span { color: var(--gold); margin-left: 10px; }
.logo-sub { font-family: "Press Start 2P", "Noto Color Emoji", monospace; font-size: 16px; color: var(--dim); margin-top: 10px; }
.mob-parade { display: flex; justify-content: center; gap: 18px; margin: 22px 0 4px; }
.mob-parade .mob-holder { animation: hop 1.2s infinite; }
.mob-parade .mob-holder:nth-child(2) { animation-delay: .15s; }
.mob-parade .mob-holder:nth-child(3) { animation-delay: .3s; }
.mob-parade .mob-holder:nth-child(4) { animation-delay: .45s; }
.mob-parade .mob-holder:nth-child(5) { animation-delay: .6s; }
@keyframes hop { 0%,100% { transform: translateY(0);} 50% { transform: translateY(-8px);} }

/* 大厅 */
.room-code-box { text-align: center; }
.room-code { font-family: "Press Start 2P", "Noto Color Emoji", monospace; font-size: 32px; color: var(--gold);
  letter-spacing: 8px; text-shadow: 3px 3px 0 #000; margin-top: 6px; }
.lobby-players { display: flex; gap: 12px; margin-top: 16px; }
.slot { flex: 1; background: var(--deep); border: 3px solid #000; border-radius: 4px;
  padding: 12px 8px; text-align: center; }
.slot .who { font-size: 15px; font-weight: 700; margin-top: 8px; }
.slot .st { font-size: 12px; margin-top: 6px; color: var(--dim); }
.slot.ready .st { color: var(--grass); font-weight: 700; }
.slot.empty { opacity: .5; }

/* 对战 */
.vs-bar { display: flex; align-items: flex-start; justify-content: space-between;
  background: var(--panel); border: 4px solid #000; box-shadow: inset 0 0 0 4px var(--panel2);
  padding: 10px 12px; border-radius: 4px; }
.fighter { width: 40%; text-align: center; transition: filter .2s; }
.f-name { font-size: 13px; color: var(--dim); margin-top: 6px; white-space: nowrap; overflow: hidden; }
.f-score { font-family: "Press Start 2P", "Noto Color Emoji", monospace; font-size: 24px; color: var(--gold); margin-top: 6px;
  text-shadow: 2px 2px 0 #000; }
.f-combo { font-size: 13px; color: #ff7b39; height: 18px; font-weight: 700; }
.vs-mid { font-family: "Press Start 2P", "Noto Color Emoji", monospace; color: var(--red); font-size: 16px; padding-top: 26px;
  text-shadow: 2px 2px 0 #000; }
.dots { display: flex; gap: 4px; justify-content: center; margin-top: 8px; }
.dot { width: 10px; height: 10px; background: var(--deep); border: 2px solid #000; }
.dot.done { background: var(--grass); }
.dots .dot.hit { background: var(--grass); }
.dots .dot.miss { background: var(--red); }

.timer-bar { height: 14px; background: var(--deep); border: 3px solid #000; margin-top: 12px; }
#timer-fill { height: 100%; width: 100%; background: var(--grass); transition: width .1s linear; }
#timer-fill.low { background: var(--red); }
.q-count { text-align: center; color: var(--dim); font-size: 12px; margin-top: 8px; }

.word-card { position: relative; background: var(--panel); border: 4px solid #000;
  box-shadow: inset 0 0 0 4px var(--panel2); border-radius: 4px; margin-top: 10px;
  padding: 30px 16px; text-align: center; }
.word-prompt { font-size: 30px; font-weight: 800; word-break: break-all; text-shadow: 2px 2px 0 #000; padding: 0 40px; }
.ds-sentence { font-size: 16px; line-height: 1.8; text-align: left; word-break: break-word; color: var(--txt); font-weight: 500; }
#btn-tts { position: absolute; top: 8px; right: 8px; }

.options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.opt { padding: 16px 10px; font-size: 16px; font-weight: 700; background: var(--panel2);
  border: 3px solid #000; border-radius: 4px; box-shadow: 0 4px 0 #000; color: var(--txt); cursor: pointer; }
.opt:active { transform: translateY(3px); box-shadow: 0 1px 0 #000; }
.opt.correct { background: var(--grass); }
.opt.wrong { background: var(--red); }
.spell-box { display: flex; gap: 10px; align-items: center; justify-content: center; margin-top: 14px; }
.spell-box input { flex: 1; max-width: 360px; padding: 13px 14px; font-size: 18px; font-family: inherit; background: var(--panel2); color: var(--txt); border: 3px solid #000; border-radius: 10px; }
.spell-box input:focus { outline: none; border-color: var(--grass); }
.opt.dim { opacity: .55; }
.opt:disabled { cursor: default; }
.battle-hint { text-align: center; color: var(--dim); font-size: 12px; margin-top: 14px; }
.battle-mode-hint { text-align: center; color: #ffd83d; font-size: 15px; font-weight: 700; margin-bottom: 8px; min-height: 20px; }

/* MC 生物动画 */
.mob-holder { width: 64px; height: 64px; margin: 0 auto; position: relative; }
.mob-holder .px-mob { position: absolute; top: 0; left: 0; }
.fighter.me .mob-holder.attack { animation: lunge .3s; }
@keyframes lunge { 30% { transform: translateX(18px) scale(1.1);} }
.mob-holder.hurt { animation: hurt .4s; }
@keyframes hurt { 0%,100% { filter: none;} 25%,75% { filter: brightness(2) sepia(1) hue-rotate(-40deg) saturate(4);} 50% { transform: translateX(-4px);} }
.mob-holder.shake { animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-5px);} 50% { transform: translateX(5px);} 75% { transform: translateX(-3px);} }
.mob-holder.dead { filter: grayscale(1) opacity(.4); transition: filter .6s; }
.mob-holder.win { animation: winhop .5s infinite; }
@keyframes winhop { 0%,100% { transform: translateY(0) scale(1.15);} 50% { transform: translateY(-12px) scale(1.15);} }

/* 连击火 */
.combo-fire { position: absolute; inset: -10px; pointer-events: none; border-radius: 50%;
  box-shadow: 0 0 18px 4px rgba(255,120,30,.55); animation: fire .6s infinite alternate; }
@keyframes fire { to { box-shadow: 0 0 26px 8px rgba(255,160,30,.7);} }

/* 得分飘字 */
.float-score { position: absolute; font-family: "Press Start 2P", "Noto Color Emoji", monospace; font-size: 16px;
  color: var(--gold); text-shadow: 2px 2px 0 #000; animation: floatup 1s forwards; pointer-events: none; z-index: 5; }
@keyframes floatup { from { opacity: 1; transform: translateY(0);} to { opacity: 0; transform: translateY(-40px);} }

/* 结算 */
#over-banner { text-align: center; font-size: 30px; font-weight: 900; margin: 6px 0 4px; text-shadow: 3px 3px 0 #000; }
#over-banner.win { color: var(--gold); }
#over-banner.lose { color: var(--dim); }
#over-banner.draw { color: var(--cyan); }
.over-mobs { display: flex; justify-content: center; gap: 40px; margin: 14px 0; }
#over-table { margin-top: 8px; }
.over-row { display: flex; align-items: center; background: var(--deep); border: 3px solid #000;
  border-radius: 4px; padding: 10px 12px; margin-top: 8px; font-size: 14px; }
.over-row .nm { flex: 1.2; font-weight: 700; }
.over-row .sc { flex: 1; color: var(--gold); font-family: "Press Start 2P", "Noto Color Emoji", monospace; font-size: 16px; }
.over-row .dt { flex: 1.6; color: var(--dim); font-size: 12px; text-align: right; }

/* ================= 锦标赛 ================= */
.tour-slots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 12px 0;
}
.tour-slots .slot {
  border: 3px solid #3a3a3a;
  background: #262626;
  padding: 8px;
  text-align: center;
  box-shadow: inset 0 0 0 2px #1a1a1a;
}
.tour-slots .slot.empty { opacity: 0.45; border-style: dashed; }
.tour-slots .slot .who { font-size: 11px; margin-top: 6px; word-break: break-all; }

.tour-bracket {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: stretch;
  margin: 14px 0;
  flex-wrap: wrap;
}
.bracket-round {
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
  opacity: 0.55;
}
.bracket-round.active { opacity: 1; }
.bracket-rname {
  text-align: center;
  font-size: 10px;
  color: #ffd83d;
  margin-bottom: 2px;
  letter-spacing: 2px;
}
.match {
  border: 3px solid #3a3a3a;
  background: #222;
  min-width: 128px;
  position: relative;
  box-shadow: inset 0 0 0 2px #161616;
}
.match.playing { border-color: #ffd83d; box-shadow: 0 0 10px #ffd83d55, inset 0 0 0 2px #161616; }
.match.done { border-color: #4caf50; }
.m-p {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 8px;
  font-size: 11px;
  gap: 6px;
}
.m-p + .m-p { border-top: 2px solid #161616; }
.m-p .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 84px; }
.m-p .sc { color: #8ecfff; font-size: 12px; }
.m-p.win { background: #2e4d1e; }
.m-p.win .nm::after { content: ' ✔'; color: #7ee27e; }
.m-p.me .nm { color: #ffd83d; }
.m-live {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #e33;
  color: #fff;
  font-size: 8px;
  padding: 2px 4px;
  animation: blink 1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0.35; } }
.tour-status {
  text-align: center;
  font-size: 12px;
  color: #8ecfff;
  margin: 8px 0;
  min-height: 18px;
}
.round-label {
  text-align: center;
  font-size: 13px;
  color: #ffd83d;
  padding: 6px 0 2px;
  letter-spacing: 2px;
}

/* ================= 分享海报弹层 ================= */
#share-overlay {
  position: fixed;
  inset: 0;
  background: #000a;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99;
  padding: 16px;
}
#share-overlay.show { display: flex; }
.share-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  max-width: 92vw;
}
.share-box img {
  max-width: 100%;
  max-height: 68vh;
  border: 3px solid #3a3a3a;
  image-rendering: pixelated;
}
.share-tip {
  font-size: 12px;
  color: #9999aa;
}

/* ================= 首页房间列表 ================= */
.room-list-section {
  margin-top: 18px;
  border-top: 1px solid #2a2a3e;
  padding-top: 12px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}
.room-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 14px;
  color: #5bd75b;
}
.btn-sm {
  background: #2a2a3e;
  color: #aaa;
  border: 1px solid #3a3a4e;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  font-family: inherit;
}
.btn-sm:active { background: #3a3a4e; }
#home-room-list {
  max-height: 300px;
  overflow-y: auto;
}
.room-empty {
  display: block;
  text-align: center;
  color: #555577;
  font-size: 13px;
  padding: 20px 0;
}

/* ================= 房间列表 ================= */
.room-list-msg {
  text-align: center;
  color: #8888aa;
  font-size: 14px;
  padding: 20px 0;
}
.room-card {
  background: #1b1b2b;
  border: 2px solid #2a2a3e;
  border-radius: 6px;
  padding: 14px 16px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: border-color 0.2s;
  position: relative;
}
.room-card.spectating { border-color: #e8a33d; }
.rc-live { color: #e8a33d; font-weight: bold; }
.rc-watch-btn {
  margin-top: 4px;
  font-size: 12px;
  color: #fff;
  background: #e8a33d;
  border: none;
  border-radius: 4px;
  padding: 4px 10px;
  cursor: pointer;
  font-weight: bold;
}
.rc-actions {
  display: flex;
  gap: 4px;
  margin-top: 4px;
}
.rc-actions .rc-watch-btn { margin-top: 0; }
.rc-join-btn {
  font-size: 12px;
  color: #122012;
  background: #5bd75b;
  border: none;
  border-radius: 4px;
  padding: 4px 10px;
  cursor: pointer;
  font-weight: bold;
}
.room-card:hover, .room-card:active { border-color: #5bd75b; }
.rc-code {
  font-family: "Press Start 2P", "Noto Color Emoji", monospace;
  font-size: 24px;
  color: #5bd75b;
  min-width: 72px;
  text-align: center;
  letter-spacing: 4px;
}
.rc-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: #ccc;
  flex: 1;
}
.rc-book { color: #888; font-size: 12px; }
.rc-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-size: 12px;
  color: #666688;
}
.spectate-exit {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
}

/* ================= 观战弹幕 ================= */
#screen-battle { position: relative; }
.spectator-count {
  text-align: center;
  font-size: 13px;
  color: #8ecfff;
  margin: 4px 0;
}
.spectator-count b { color: #ffd83d; }
.danmaku {
  position: absolute;
  top: 6px;
  left: 0;
  right: 0;
  height: 120px;
  overflow: hidden;
  pointer-events: none;
  z-index: 50;
}
.danmaku-item {
  position: absolute;
  white-space: nowrap;
  font-size: 16px;
  font-weight: bold;
  color: #ffd83d;
  text-shadow: 1px 1px 2px #000;
  animation: danmaku-move 8s linear forwards;
}
.danmaku-item.spectator { color: #8ecfff; }
@keyframes danmaku-move {
  from { left: 100%; }
  to { left: -120%; }
}
.spectate-chat {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
#danmaku-input {
  flex: 1;
  padding: 10px;
  font-size: 14px;
  border: 2px solid #2a2a3e;
  border-radius: 6px;
  background: #151527;
  color: #fff;
  font-family: inherit;
}
.spectate-chat .btn { width: auto; margin-top: 0; padding: 10px 16px; }
.chat-log {
  margin-top: 8px;
  padding: 6px 10px;
  max-height: 110px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 6px;
  text-align: left;
  font-size: 13px;
  line-height: 1.5;
}
.chat-log-item { color: #ffd83d; word-break: break-word; }
.chat-log-item.spectator { color: #8ecfff; }

/* ================= 单词接龙 ================= */
.chain-rank {
  background: var(--panel);
  border: 3px solid #000;
  box-shadow: inset 0 0 0 3px var(--panel2);
  border-radius: 4px;
  padding: 8px;
  margin: 6px 0;
  max-height: 30vh;
  overflow-y: auto;
}
.cr-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 13px;
  margin-bottom: 3px;
}
.cr-item:last-child { margin-bottom: 0; }
.cr-item.me { background: #1a2a1a; outline: 2px solid var(--grass); }
.cr-item.out { opacity: 0.4; text-decoration: line-through; }
.cr-rank { min-width: 24px; text-align: center; font-size: 14px; }
.cr-name { flex: 1; color: #e8e8f0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-lives { font-size: 11px; letter-spacing: -1px; flex-shrink: 0; }
.cr-score { font-family: "Press Start 2P", "Noto Color Emoji", monospace; font-size: 16px; color: var(--cyan); }
.chain-turn-box { text-align: center; margin: 8px 0; }
.chain-turn { font-size: 16px; color: #ffd83d; font-weight: bold; }
.chain-letter { font-size: 14px; color: #ccc; margin-top: 4px; }
.chain-letter b { color: #5bd75b; font-size: 18px; }
.chain-words {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px;
  min-height: 60px;
  max-height: 40vh;
  overflow-y: auto;
  background: #151527;
  border: 2px solid #2a2a3e;
  border-radius: 6px;
  margin: 10px 0;
}
.chain-word {
  background: #1b1b2b;
  border: 1px solid #2a2a3e;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 13px;
  color: #8ecfff;
}
.chain-word.first { border-color: #5bd75b; color: #5bd75b; }
.chain-input-row { display: flex; gap: 8px; margin: 10px 0; }
#chain-input {
  flex: 1;
  padding: 12px;
  font-size: 16px;
  border: 2px solid #2a2a3e;
  border-radius: 6px;
  background: #151527;
  color: #fff;
  font-family: inherit;
}
#chain-input:disabled { opacity: 0.5; }
.chain-input-row .btn { width: auto; margin-top: 0; padding: 12px 20px; }

/* ================= 音效按钮 ================= */
.btn-mute {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--panel);
  border: 2px solid #000;
  border-radius: 16px;
  font-size: 14px;
  color: var(--txt);
  cursor: pointer;
  padding: 6px 12px;
  line-height: 1;
  font-family: inherit;
}
.btn-mute.muted {
  background: #3a2a2a;
  color: #f0b6b6;
  border-color: #e86a6a;
}

/* ================= 错题复习 ================= */
.wrong-empty {
  text-align: center;
  color: #5bd75b;
  font-size: 14px;
  padding: 12px 0;
}
.wrong-title {
  font-size: 14px;
  color: #ffd83d;
  margin: 14px 0 8px;
  padding-top: 12px;
  border-top: 1px solid #2a2a3e;
}
.wrong-item {
  background: #1a1a2a;
  border-left: 3px solid #e86a6a;
  padding: 8px 12px;
  margin-bottom: 6px;
  border-radius: 0 4px 4px 0;
  font-size: 13px;
}
.wrong-item.ok { border-left-color: #5bd75b; }
.wrong-item.ok .wi-word { color: #b6f0b6; }
.wi-word { color: #e8e8f0; margin-bottom: 2px; }
.wi-meaning { color: #8888aa; font-size: 12px; }
.wi-ans { font-size: 12px; color: #888; }
.wi-ans.ok { color: #5bd75b; }
.wi-wrong { color: #e86a6a; text-decoration: line-through; }
.wi-correct { color: #5bd75b; }

/* ================= 对战表情包 ================= */
.emoji-bar {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 8px;
}
.emoji-btn {
  background: #1a1a2e;
  border: 1px solid #2a2a3e;
  border-radius: 6px;
  font-size: 20px;
  padding: 4px 6px;
  cursor: pointer;
  transition: transform 0.1s;
}
.emoji-btn:active { transform: scale(1.3); background: #2a2a4e; }
.emoji-btn .ico-btn { width: 1.25em; height: 1.25em; }
.emoji-btn:nth-child(1) .ico-btn { color: #ffd83d; }
.emoji-btn:nth-child(2) .ico-btn { color: #c9c9c9; }
.emoji-btn:nth-child(3) .ico-btn { color: #ff7b39; }
.emoji-btn:nth-child(4) .ico-btn { color: #f7c948; }
.emoji-btn:nth-child(5) .ico-btn { color: #b388ff; }
.emoji-btn:nth-child(6) .ico-btn { color: #5dbd3e; }
.emoji-btn:nth-child(7) .ico-btn { color: #5b8def; }
.emoji-btn:nth-child(8) .ico-btn { color: #ff7b39; }
.surrender-btn { color: var(--dim); margin-top: 8px; }
.emoji-float {
  position: absolute;
  bottom: 10px;
  font-size: 28px;
  animation: emojiUp 1.5s ease-out forwards;
  pointer-events: none;
  z-index: 10;
}
@keyframes emojiUp {
  0%   { opacity: 1; transform: translateY(0) scale(0.5); }
  30%  { opacity: 1; transform: translateY(-30px) scale(1.2); }
  100% { opacity: 0; transform: translateY(-90px) scale(0.8); }
}

/* ================= 断线重连 ================= */
#reconnect-overlay {
  position: fixed;
  inset: 0;
  background: #000c;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}
.reconnect-msg {
  color: #ffd83d;
  font-size: 18px;
  animation: pulse 1s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ================= 收藏 & 生词本 ================= */
.btn-bookmark {
  background: none;
  border: 1px solid #3a3a4e;
  color: #ffd83d;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  margin-top: 4px;
  font-family: inherit;
}
.btn-bookmark:disabled { color: #5bd75b; border-color: #5bd75b; }
.btn-report {
  background: none;
  border: 1px solid #3a3a4e;
  color: #ff9d5c;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  margin-top: 4px;
  margin-left: 4px;
  font-family: inherit;
}
.bookmark-panel {
  margin: 20px auto;
  max-width: 440px;
}
.bm-title { font-size: 15px; color: #5bd75b; margin-bottom: 10px; }
.bm-empty { color: #666; font-size: 14px; text-align: center; padding: 30px 0; }
.bm-item {
  padding: 6px 8px;
  border-bottom: 1px solid #1a1a2e;
  font-size: 13px;
  color: #ccc;
  display: flex;
  align-items: center;
  gap: 8px;
}
.bm-item b { color: #8ecfff; }
.bm-item span { color: #555; min-width: 24px; }
.wb-count {
  color: #e86a6a !important;
  font-size: 12px;
  min-width: auto !important;
  font-weight: bold;
}
.bm-del {
  margin-left: auto;
  background: none;
  border: none;
  color: #e86a6a;
  cursor: pointer;
  font-size: 14px;
}

/* 好友系统 */
.fr-add-btn {
  font-size: 11px;
  color: #5bd75b;
  border: 1px solid #5bd75b;
  border-radius: 4px;
  padding: 1px 6px;
  background: none;
  cursor: pointer;
  margin-left: 4px;
}
.fr-report-btn {
  font-size: 11px;
  color: #e64545;
  border: 1px solid #e64545;
  border-radius: 4px;
  padding: 1px 6px;
  background: none;
  cursor: pointer;
  margin-left: 4px;
}
.friend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 8px;
  border-bottom: 1px solid #1a1a2e;
}
.fr-name { font-size: 14px; color: #ccc; }
.fr-status { font-size: 12px; color: #777; margin-top: 2px; }
.fr-status.on { color: #5bd75b; }
.fr-actions { display: flex; gap: 6px; }
.fr-btn {
  font-size: 12px;
  border: 1px solid #2a2a3e;
  border-radius: 4px;
  padding: 4px 8px;
  cursor: pointer;
  background: #1b1b2b;
  color: #ccc;
}
.fr-watch { color: #e8a33d; border-color: #e8a33d; }
.fr-del { color: #e86a6a; border-color: #e86a6a; }
.fr-add { color: #5bd75b; border-color: #5bd75b; }
.fr-chat { color: #8ecfff; border-color: #8ecfff; }
.fr-invite { color: #ffd83d; border-color: #ffd83d; }

/* 好友搜索 */
.friend-search-row { display: flex; gap: 8px; margin-bottom: 10px; }
#friend-search {
  flex: 1;
  padding: 10px;
  font-size: 14px;
  border: 2px solid #2a2a3e;
  border-radius: 6px;
  background: #151527;
  color: #fff;
  font-family: inherit;
}
#friend-search-results { margin-bottom: 10px; }

/* 聊天弹窗 */
.chat-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 16px;
}
.chat-overlay.hidden { display: none !important; }
.chat-card {
  background: #1a1e33;
  border: 2px solid #000;
  border-radius: 12px;
  width: 100%;
  max-width: 360px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
}
.chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #2a2a3e;
  font-weight: bold;
  color: #ffd83d;
}
.chat-close { background: none; border: none; color: #ccc; font-size: 18px; cursor: pointer; }
.chat-body { flex: 1; overflow-y: auto; padding: 12px; min-height: 200px; max-height: 50vh; }
.chat-msg { margin-bottom: 8px; display: flex; }
.chat-msg.me { justify-content: flex-end; }
.chat-bubble {
  max-width: 75%;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 14px;
  word-break: break-word;
  background: var(--panel);
  color: #eee;
}
.chat-msg.me .chat-bubble { background: #2a5a2a; color: #d0ffd0; }
.chat-input-row { display: flex; gap: 8px; padding: 10px; border-top: 1px solid #2a2a3e; }
#chat-input {
  flex: 1;
  padding: 14px 12px;
  font-size: 16px;
  border: 2px solid #2a2a3e;
  border-radius: 6px;
  background: #151527;
  color: #fff;
  font-family: inherit;
}
.chat-input-row .btn { width: auto; margin-top: 0; padding: 10px 16px; }

/* 世界频道（大厅聊天） */
.world-panel { margin-top: 14px; }
.world-tip { font-size: 11px; color: #8a8aa0; font-weight: normal; white-space: nowrap; }
.world-body {
  max-height: 200px;
  overflow-y: auto;
  background: #151527;
  border: 2px solid #2a2a3e;
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.world-empty { color: #666; font-size: 13px; text-align: center; padding: 18px 0; }
.world-msg { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; font-size: 13px; line-height: 1.5; word-break: break-word; }
.world-msg .wm-name { color: #8ecfff; font-weight: bold; flex-shrink: 0; }
.world-msg .wm-text { color: #eee; flex: 1; min-width: 4em; }
.world-msg .wm-time { color: #5a5a72; font-size: 10px; flex-shrink: 0; }
.world-msg.me .wm-name { color: #5bd75b; }
.wm-report {
  font-size: 10px;
  color: #e64545;
  border: 1px solid #e64545;
  border-radius: 3px;
  padding: 0 4px;
  background: none;
  cursor: pointer;
  flex-shrink: 0;
  margin-left: 4px;
  line-height: 1.5;
}
.world-msg.me .wm-text { color: #d0ffd0; }
.world-input-row { display: flex; gap: 8px; margin-top: 10px; }
#world-input {
  flex: 1;
  padding: 14px 12px;
  font-size: 16px;
  border: 2px solid #2a2a3e;
  border-radius: 6px;
  background: #151527;
  color: #fff;
  font-family: inherit;
}
.world-input-row .btn { width: auto; margin-top: 0; padding: 10px 16px; }
.world-input-row .at-btn {
  flex-shrink: 0;
  width: auto;
  margin-top: 0;
  padding: 10px 14px;
  font-size: 15px;
  font-weight: 700;
  background: var(--panel2);
  color: var(--cyan);
  border: 2px solid #000;
  border-radius: 6px;
  cursor: pointer;
}
.mention { color: var(--gold); font-weight: 700; background: rgba(255,216,61,.15); padding: 0 2px; border-radius: 3px; }

/* 邀请弹窗 */
.invite-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 210;
  padding: 20px;
}
.invite-overlay.hidden { display: none !important; }
.invite-card {
  background: #1a1e33;
  border: 2px solid #000;
  border-radius: 12px;
  padding: 24px;
  width: 100%;
  max-width: 320px;
  text-align: center;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
}
.invite-title { font-size: 18px; font-weight: bold; color: #ffd83d; margin-bottom: 12px; }
.invite-msg { font-size: 15px; color: #eee; margin-bottom: 20px; }
.invite-actions { display: flex; gap: 10px; }
.invite-actions .btn { flex: 1; margin-top: 0; }

/* 邀请选模式 */
.mode-select-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 12px 0;
}
.mode-select-btn {
  padding: 10px;
  font-size: 14px;
  border: 2px solid #2a2a3e;
  border-radius: 8px;
  background: #1b1b2b;
  color: #fff;
  cursor: pointer;
  font-family: inherit;
}
.mode-select-btn:hover { border-color: #5bd75b; }
.select-label {
  font-size: 13px;
  color: #8888aa;
  margin: 8px 0 4px;
  text-align: left;
}
.mode-select-btn.sel {
  border-color: #5bd75b;
  background: #1a2a1a;
  color: #5bd75b;
}
.invite-book-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border: 2px solid #2a2a3e;
  border-radius: 8px;
  background: #1b1b2b;
}
#invite-book-label {
  font-size: 14px;
  color: #5bd75b;
  font-weight: bold;
}
.invite-book-tip {
  font-size: 11px;
  color: #666;
  margin: 4px 0 8px;
  text-align: left;
}
#invite-book-select {
  width: 100%;
  padding: 10px;
  font-size: 14px;
  border: 2px solid #2a2a3e;
  border-radius: 8px;
  background: #1b1b2b;
  color: #fff;
  font-family: inherit;
}

/* 段位榜 */
.rb-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border-bottom: 1px solid #1a1a2e;
}
.rb-rank { font-size: 20px; min-width: 36px; text-align: center; font-weight: bold; }
.rb-name { font-size: 14px; color: #ccc; }
.rb-tier { color: #ffd83d; font-size: 12px; }
.rb-sub { font-size: 12px; color: #777; margin-top: 2px; }

/* ================= 听力挑战 ================= */
.listen-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 0;
}
.btn-icon.big {
  font-size: 36px;
  padding: 10px 14px;
  border-radius: 10px;
}
.listen-hint {
  color: #666688;
  font-size: 13px;
}

/* ================= 听力 PK 提示 ================= */
.word-prompt.listen-mode {
  font-size: 26px;
  letter-spacing: 2px;
}

/* ================= 排行榜 ================= */
.rank-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}
.rank-tab {
  flex: 1;
  background: #1a1a2e;
  border: 1px solid #2a2a3e;
  color: #999;
  padding: 8px 0;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
}
.rank-tab.active {
  background: #2a2a4e;
  border-color: #5bd75b;
  color: #5bd75b;
}
.rank-list {
  max-height: 60vh;
  overflow-y: auto;
  margin-bottom: 12px;
}
.rank-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-bottom: 1px solid #1a1a2e;
  font-size: 14px;
}
.rk-no {
  min-width: 32px;
  text-align: center;
  font-size: 16px;
}
.rk-name {
  flex: 1;
  color: #e8e8f0;
  font-weight: bold;
}
.rk-val {
  color: #8888aa;
  font-size: 12px;
}

/* ================= ICP 备案号 ================= */
.beian {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  color: #666;
  text-decoration: none;
}
.beian:hover {
  color: #888;
  text-decoration: underline;
}

/* ================= QQ 群入口 ================= */
.qq-group-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #1a1a3e 0%, #2a2a5e 100%);
  border: 1px solid #3a3a6e;
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 14px;
  text-decoration: none;
  transition: transform 0.15s, border-color 0.15s;
}
.qq-group-card:hover {
  transform: translateY(-1px);
  border-color: #5bd75b;
}
.qq-group-card:active {
  transform: scale(0.98);
}
.qq-icon {
  font-size: 22px;
  line-height: 1;
}
.qq-info {
  flex: 1;
}
.qq-title {
  font-size: 14px;
  font-weight: bold;
  color: #e8e8f0;
}
.qq-no {
  font-size: 12px;
  color: #8888aa;
  margin-top: 2px;
}
.qq-arrow {
  font-size: 20px;
  color: #5bd75b;
}

/* ================= 英英释义 ================= */
.word-prompt.english-mode {
  font-size: 22px;
  letter-spacing: 1px;
}
.opt-def {
  font-size: 13px !important;
  line-height: 1.4;
  text-align: left;
  padding: 10px 14px;
  min-height: 48px;
}

/* ================= 首页布局优化 ================= */
.panel-title {
  color: var(--gold);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 4px;
}
.advanced-toggle {
  text-align: center;
  color: var(--dim);
  font-size: 13px;
  padding: 10px 0 4px;
  margin-top: 12px;
  border-top: 2px dashed var(--panel2);
  cursor: pointer;
  user-select: none;
}
.advanced-toggle:hover { color: var(--cyan); }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { flex: 1; }
.feature-panel { padding: 14px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 6px;
  background: var(--deep);
  border: 3px solid #000;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  transition: transform .05s;
}
.feature:active { transform: translateY(2px); }
.feature .f-icon { font-size: 24px; line-height: 1; }
.feature .f-label { font-size: 12px; color: var(--txt); }

/* ================= 对局互动 ================= */
.quick-bar {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.quick-btn {
  flex: 0 0 auto;
  padding: 6px 12px;
  font-size: 12px;
  background: var(--deep);
  border: 2px solid #000;
  border-radius: 12px;
  color: var(--dim);
  cursor: pointer;
  font-family: inherit;
}
.quick-btn:active { transform: translateY(1px); color: var(--txt); }

.msg-float {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  color: #000;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  white-space: nowrap;
  font-weight: 700;
  animation: bubbleUp 2s ease-out forwards;
  pointer-events: none;
  z-index: 20;
}
.msg-float.self { background: var(--gold); }
@keyframes bubbleUp {
  0% { opacity: 0; transform: translate(-50%, 10px); }
  15% { opacity: 1; transform: translate(-50%, 0); }
  75% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -26px); }
}

.combo-shout {
  position: fixed;
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%) scale(.6);
  font-family: "Press Start 2P", "Noto Color Emoji", monospace;
  font-size: 16px;
  color: var(--gold);
  text-shadow: 3px 3px 0 #000;
  opacity: 0;
  pointer-events: none;
  z-index: 100;
  transition: all .2s;
  white-space: nowrap;
}
.combo-shout.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.combo-shout.me { color: var(--grass); }

/* ================= 看图选词 ================= */
.word-prompt.picture-mode {
  font-size: 72px;
  line-height: 1.2;
  letter-spacing: 0;
  text-align: center;
}

/* ================= 多人混战排名 ================= */
.battle-rank {
  background: var(--panel);
  border: 4px solid #000;
  box-shadow: inset 0 0 0 4px var(--panel2);
  border-radius: 4px;
  padding: 10px;
  max-height: 40vh;
  overflow-y: auto;
}
.br-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 14px;
  margin-bottom: 4px;
}
.br-item:last-child { margin-bottom: 0; }
.br-item.me { background: #1a2a1a; outline: 2px solid var(--grass); }
.br-item.lead .br-name { color: var(--gold); font-weight: 800; }
.br-rank { min-width: 26px; text-align: center; font-size: 15px; }
.br-name { flex: 1; color: #e8e8f0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.br-score { font-family: "Press Start 2P", "Noto Color Emoji", monospace; font-size: 16px; color: var(--cyan); }

/* ================= 模式卡片 ================= */
.mode-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.mode-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 10px;
  background: var(--deep);
  border: 3px solid #000;
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
  transition: border-color .1s, transform .05s;
}
.mode-card:active { transform: translateY(2px); }
.mode-card .mc-icon { font-size: 20px; }
.mode-card .mc-label { font-size: 13px; color: #ccc; }
.mode-card.active {
  border-color: var(--grass);
  background: #1a2a1a;
  box-shadow: 0 0 0 2px var(--grass) inset;
}
.mode-card.active .mc-label { color: #fff; font-weight: 700; }
.mode-card:last-child { grid-column: span 2; }

/* ================= 听力答完亮原词 ================= */
.word-prompt.listen-reveal {
  color: var(--gold);
  font-size: 28px;
  letter-spacing: 1px;
}


/* ================= 我的战绩 ================= */
.mr-stats {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.mr-stat {
  flex: 1;
  background: var(--deep);
  border: 2px solid #000;
  border-radius: 6px;
  padding: 10px 4px;
  text-align: center;
}
.mr-num { display: block; font-size: 22px; font-weight: 900; color: #fff; }
.mr-stat.win .mr-num { color: #5bd75b; }
.mr-stat.lose .mr-num { color: #e86a6a; }
.mr-label { font-size: 11px; color: #8888aa; }
.mr-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-bottom: 1px solid #1a1a2e;
}
.mr-tag { font-size: 20px; }
.mr-info { flex: 1; }
.mr-line1 { font-size: 14px; color: #e8e8f0; font-weight: 700; }
.mr-line2 { font-size: 12px; color: #8888aa; margin-top: 2px; }
.mr-item.win .mr-line1 { color: #b6f0b6; }
.mr-item.lose .mr-line1 { color: #f0b6b6; }

/* ================= 例句填空 ================= */
.word-prompt.example-mode {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.6;
  word-break: break-word;
  text-align: left;
  letter-spacing: 0;
}

/* ================= 我的战绩 - 本局单词 ================= */
.mr-words {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}
.mw-word {
  background: var(--deep);
  border: 1px solid #2a2a3e;
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 12px;
  color: #b6f0b6;
}
.mw-word i { font-style: normal; color: #8888aa; margin-left: 4px; }
.mw-word.wrong { color: #f0b6b6; border-color: #5a2a2a; }

/* ================= 随机匹配 ================= */
.btn.match {
  width: 100%;
  background: linear-gradient(135deg, #5bd75b 0%, #3dbd5b 100%);
  color: #0a1a0a;
  font-weight: 900;
  border-color: #000;
  margin-top: 8px;
}
.btn.match.matching {
  background: linear-gradient(135deg, #ffd83d 0%, #f0b030 100%);
  animation: matchPulse 1.2s infinite;
}
@keyframes matchPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .7; }
}

/* ================= 列表页优化 ================= */
.rank-list, .lobby-players, .battle-rank, .room-list {
  scrollbar-width: thin;
  scrollbar-color: #3a3a5e transparent;
}
.rank-list::-webkit-scrollbar, .lobby-players::-webkit-scrollbar, .battle-rank::-webkit-scrollbar, .room-list::-webkit-scrollbar {
  width: 6px;
}
.rank-list::-webkit-scrollbar-thumb, .lobby-players::-webkit-scrollbar-thumb, .battle-rank::-webkit-scrollbar-thumb, .room-list::-webkit-scrollbar-thumb {
  background: #3a3a5e;
  border-radius: 3px;
}
optgroup {
  background: #1a1a2e;
  color: #8888aa;
  font-style: normal;
  font-size: 13px;
}
select option {
  background: var(--deep);
  color: #e8e8f0;
}

/* ================= 头像设置 ================= */
.name-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.name-row input { flex: 1; }
.avatar-box {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  background: var(--deep);
  border: 3px solid #000;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.avatar-box .px-mob, .ap-item .px-mob {
  position: absolute;
  top: 4px;
  left: 4px;
}
.ap-item {
  position: relative;
  min-height: 52px;
}
.avatar-box:active { transform: scale(.95); }
.avatar-picker {
  margin-top: 8px;
  background: var(--deep);
  border: 3px solid #000;
  border-radius: 6px;
  padding: 10px;
}
.ap-title {
  font-size: 12px;
  color: #8888aa;
  margin-bottom: 8px;
  text-align: center;
}
.ap-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}
.ap-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 2px;
  border: 2px solid #000;
  border-radius: 4px;
  cursor: pointer;
  background: #1a1a2e;
}
.ap-item.active {
  border-color: var(--grass);
  box-shadow: 0 0 0 2px var(--grass) inset;
}
.ap-name { font-size: 11px; color: #ccc; }
.ap-item.active .ap-name { color: #5bd75b; }

/* ================= 折叠式词库列表 ================= */
.book-fold {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 420px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--deep);
  border: 3px solid #000;
  border-radius: 6px;
  padding: 6px;
}
.bf-group { border-radius: 4px; overflow: hidden; flex-shrink: 0; }
.bf-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 10px;
  background: #1a1a2e;
  color: #e8e8f0;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}
.bf-header:hover { background: #20203a; }
.bf-arrow { color: #8888aa; transition: transform .2s; }
.bf-group.open .bf-arrow { transform: rotate(180deg); }
.bf-body { display: none; padding: 4px; }
.bf-group.open .bf-body { display: block; }
.bf-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 10px 12px 16px;
  font-size: 15px;
  color: #ccc;
  border-radius: 3px;
  cursor: pointer;
}
.bf-rank {
  font-size: 14px;
  opacity: 0.9;
  flex-shrink: 0;
}
.bf-item:hover { background: #20203a; }
.bf-item.active {
  background: #1a2a1a;
  color: #5bd75b;
  font-weight: 700;
}

/* 头像框/选择面板里的像素图定位 */

/* ================= 界面优化 ================= */
.logo-slogan {
  margin-top: 8px;
  font-size: 13px;
  color: #8888aa;
  letter-spacing: 2px;
}
.online-count {
  margin-top: 6px;
  font-size: 12px;
  color: #8ecfff;
  cursor: pointer;
  display: inline-block;
  padding: 5px 12px;
  border: 1px solid #2a2a3e;
  border-radius: 12px;
  background: rgba(0,0,0,0.2);
}
.online-count b { color: #5bd75b; font-size: 14px; }
.oc-tip { color: #5bd75b; }

/* 首页连续打卡角标 */
.streak-chip {
  margin-top: 6px;
  font-size: 12px;
  color: #ffd83d;
  cursor: pointer;
  display: inline-block;
  padding: 5px 12px;
  border: 1px solid #4a3d1a;
  border-radius: 12px;
  background: rgba(0,0,0,0.2);
}
.streak-chip b { color: #ffd83d; font-size: 14px; }

/* 学习报告 */
.study-report { margin-bottom: 12px; }
.sr-loading { color: var(--dim); font-size: 13px; padding: 8px 0; }
.sr-head {
  background: linear-gradient(135deg, var(--panel2), var(--panel));
  border: 2px solid #000;
  border-radius: 6px;
  padding: 12px;
  text-align: center;
  margin-bottom: 10px;
}
.sr-streak { font-size: 16px; font-weight: 700; color: #fff; }
.sr-streak b { color: #ffd83d; font-size: 22px; }
.sr-sub { font-size: 12px; color: #9aa0c3; margin-top: 4px; }
.sr-cards { display: flex; gap: 8px; margin-bottom: 10px; }
.sr-card {
  flex: 1;
  background: var(--deep);
  border: 2px solid #000;
  border-radius: 6px;
  padding: 10px 4px;
  text-align: center;
}
.sr-num { display: block; font-size: 20px; font-weight: 900; color: #4dd0e1; }
.sr-label { font-size: 11px; color: #8888aa; }
.sr-week {
  background: var(--deep);
  border: 2px solid #000;
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 10px;
}
.sr-week-title { font-size: 13px; color: #ffd83d; margin-bottom: 10px; font-weight: 700; }
.sr-week-grid { display: flex; gap: 8px; }
.sr-week-item {
  flex: 1;
  text-align: center;
  background: #1f2340;
  border: 1px solid #000;
  border-radius: 5px;
  padding: 8px 2px;
}
.sr-week-item .sr-num { font-size: 18px; color: #fff; }
.sr-rank { font-size: 12px; color: #9aa0c3; margin-top: 10px; text-align: center; }
.sr-trend {
  background: var(--deep);
  border: 2px solid #000;
  border-radius: 6px;
  padding: 12px;
}
.sr-trend-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 150px;
}
.sr-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
}
.sr-bar {
  width: 100%;
  max-width: 22px;
  border-radius: 3px 3px 0 0;
  border: 1px solid #000;
  position: relative;
  min-height: 4px;
}
.sr-bar-val {
  position: absolute;
  top: -16px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 9px;
  color: #9aa0c3;
}
.sr-bar-date { font-size: 9px; color: #666; margin-top: 3px; }

/* 词汇量测试 */
.vt-layer {
  margin: 8px 0;
  text-align: center;
  font-size: 13px;
  color: #ffd83d;
  font-weight: 700;
}
.vt-head { text-align: center; padding: 8px 0 14px; }
.vt-big { font-size: 15px; color: var(--dim); }
.vt-num { font-size: 52px; font-weight: 900; color: #ffd83d; line-height: 1.2; text-shadow: 2px 2px 0 rgba(0,0,0,.5); }
.vt-sub { font-size: 12px; color: var(--dim); margin-top: 4px; }
.vt-tip { text-align: center; font-size: 13px; color: var(--dim); margin: 10px 0; }
.vt-layers-title { font-size: 13px; color: var(--gold); font-weight: 700; margin: 14px 0 10px; }
.vt-layers { display: flex; flex-direction: column; gap: 8px; }
.vt-layer-row { display: flex; align-items: center; gap: 8px; }
.vt-layer-name { width: 40px; flex-shrink: 0; font-size: 13px; color: var(--txt); }
.vt-bar { flex: 1; height: 14px; background: var(--deep); border: 2px solid #000; border-radius: 7px; overflow: hidden; }
.vt-bar-fill { height: 100%; border-radius: 5px; transition: width .4s; }
.vt-layer-rate { width: 42px; flex-shrink: 0; font-size: 12px; color: var(--dim); text-align: right; }
.vt-weak-title { font-size: 13px; color: #ff9d5c; font-weight: 700; margin: 16px 0 8px; }
.vt-weak { display: flex; flex-wrap: wrap; gap: 8px; }
.vt-notknow { background: #2a2a3e; color: #ff9d5c; }
.vt-wrong-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.vt-wrong-item { display: flex; align-items: center; gap: 10px; background: #1f2340; border: 2px solid #000; border-radius: 6px; padding: 9px 12px; }
.vt-wrong-en { font-weight: 700; color: #ff8a8a; font-size: 15px; flex-shrink: 0; }
.vt-wrong-zh { color: var(--txt); font-size: 14px; flex: 1; }
.vt-wrong-tag { font-size: 11px; color: #ff9d5c; background: #2a2a3e; padding: 2px 7px; border-radius: 4px; flex-shrink: 0; }
.vt-rank {
  text-align: center;
  font-size: 14px;
  color: var(--txt);
  background: #1f2340;
  border: 2px solid #000;
  border-radius: 6px;
  padding: 10px;
  margin: 10px 0;
}
.vt-rank b { color: var(--gold); }
.vt-compare {
  text-align: center;
  font-size: 14px;
  color: var(--txt);
  background: #1a2a1a;
  border: 2px solid #000;
  border-radius: 6px;
  padding: 10px;
  margin: 10px 0;
}
.vt-compare b { color: var(--cyan); }
.vt-compare-sub { font-size: 12px; color: var(--dim); margin-top: 4px; }
.vt-rank-title { font-size: 13px; color: var(--gold); font-weight: 700; margin: 14px 0 8px; }
.vt-rank-list { display: flex; flex-direction: column; gap: 4px; }
.vt-rank-box { margin: 8px 0; display: flex; flex-direction: column; gap: 4px; }
.ld-score { font-size: 22px; font-weight: 900; text-align: center; color: #fff; margin: 10px 0 4px; }
.ld-score b { color: #ffd83d; }
.ld-turn { font-size: 14px; text-align: center; color: #ffd83d; margin: 0 0 10px; font-weight: 700; }
.vt-rank-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: #1f2340;
  border: 1px solid #000;
  border-radius: 5px;
  font-size: 14px;
}
.vt-rank-row.me { background: #2a3a1a; border-color: var(--grass); }
.vt-rank-no { width: 28px; flex-shrink: 0; text-align: center; font-weight: 700; color: var(--dim); }
.vt-rank-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vt-rank-vocab { font-weight: 700; color: var(--gold); }
.vt-rank-tabs { display: flex; gap: 6px; margin: 12px 0 0; }
.vt-rank-tab {
  flex: 1;
  padding: 8px;
  background: #1f2340;
  border: 2px solid #000;
  border-radius: 6px;
  color: var(--dim);
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}
.vt-rank-tab.active { background: #2a3a1a; border-color: var(--grass); color: var(--txt); }

/* 新版本提示条 */
.update-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #2a3a2a;
  border-top: 2px solid #5bd75b;
  color: #d0ffd0;
  padding: 12px 16px;
  text-align: center;
  font-size: 14px;
  z-index: 300;
}
.update-btn {
  margin-left: 8px;
  background: #5bd75b;
  border: none;
  border-radius: 4px;
  padding: 6px 14px;
  color: #122012;
  font-weight: bold;
  cursor: pointer;
  font-family: inherit;
}

/* 在线玩家列表弹窗 */
.online-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 220;
  padding: 20px;
}
.online-overlay.hidden { display: none !important; }
.online-card {
  background: #1a1e33;
  border: 2px solid #000;
  border-radius: 12px;
  width: 100%;
  max-width: 320px;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
}
.online-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #2a2a3e;
  font-weight: bold;
  color: #8ecfff;
}
.online-list { flex: 1; overflow-y: auto; padding: 8px; min-height: 100px; }
.online-player {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  font-size: 14px;
  color: #ccc;
  border-bottom: 1px solid #1a1a2e;
}
.online-player:last-child { border-bottom: none; }
.op-invite {
  font-size: 12px;
  color: #ffd83d;
  border: 1px solid #ffd83d;
  border-radius: 4px;
  padding: 2px 8px;
  background: none;
  cursor: pointer;
}
/* 建议箱 */
.suggest-card { max-width: 340px; max-height: 75vh; }
.suggest-input-row { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-bottom: 1px solid #2a2a3e; }
.suggest-input-row textarea {
  width: 100%;
  background: var(--deep);
  border: 1px solid #3a3a4e;
  border-radius: 5px;
  color: #fff;
  -webkit-text-fill-color: #fff;
  caret-color: #fff;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  min-height: 76px;
  line-height: 1.5;
}
.suggest-input-row textarea::placeholder { color: #7a7f9e; -webkit-text-fill-color: #7a7f9e; }
.suggest-input-row textarea:focus { outline: none; border-color: #8ecfff; }
.suggest-list { flex: 1; overflow-y: auto; padding: 8px; min-height: 120px; }
.suggest-empty { text-align: center; color: var(--dim); padding: 24px 0; font-size: 13px; }
.suggest-item {
  background: var(--deep);
  border: 1px solid #2a2a3e;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
}
.suggest-text { color: #eee; font-size: 13px; line-height: 1.5; word-break: break-word; }
.suggest-meta { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11px; color: var(--dim); }
.suggest-name { color: #8ecfff; }
.suggest-item-reply { margin-top: 6px; padding: 6px 8px; background: rgba(77,208,225,.08); border-left: 2px solid var(--cyan); border-radius: 4px; font-size: 12px; color: var(--cyan); word-break: break-word; }
.suggest-vote {
  margin-top: 8px;
  background: none;
  border: 1px solid #3a3a4e;
  color: #ccc;
  border-radius: 4px;
  padding: 3px 12px;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
}
.suggest-vote:not(:disabled):hover { border-color: #ffd83d; color: #ffd83d; }
.suggest-vote.voted { color: #5bd75b; border-color: #5bd75b; }
.suggest-vote:disabled { cursor: default; opacity: 0.9; }
/* 反馈释义 */
.report-body { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; }
.report-word-display {
  font-size: 14px;
  color: #ffd83d;
  padding: 8px 10px;
  background: var(--deep);
  border: 1px solid #2a2a3e;
  border-radius: 5px;
  word-break: break-word;
}
.report-body input {
  background: var(--deep);
  border: 1px solid #3a3a4e;
  border-radius: 5px;
  color: #fff;
  -webkit-text-fill-color: #fff;
  caret-color: #fff;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
}
.report-body input::placeholder { color: #7a7f9e; -webkit-text-fill-color: #7a7f9e; }
.report-body input:focus { outline: none; border-color: #8ecfff; }
.report-body input[readonly] { color: #888; -webkit-text-fill-color: #888; }
.report-body .btn { width: 100%; }
.report-body select {
  background: var(--deep);
  border: 1px solid #3a3a4e;
  border-radius: 5px;
  color: #fff;
  -webkit-text-fill-color: #fff;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
}
.report-body select:focus { outline: none; border-color: #8ecfff; }
.report-list-title { padding: 10px 16px 4px; font-size: 12px; color: var(--dim); font-weight: bold; }
.report-list { flex: 1; overflow-y: auto; padding: 8px 12px; min-height: 100px; }
.report-item {
  background: var(--deep);
  border: 1px solid #2a2a3e;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
}
.report-item-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.report-item-word { color: #ffd83d; font-size: 15px; font-weight: bold; }
.report-item-zh { color: #ccc; font-size: 13px; }
.report-item-sug { color: #9aa0c3; font-size: 12px; margin-top: 4px; }
.report-item-reply { margin-top: 6px; padding: 6px 8px; background: rgba(77,208,225,.08); border-left: 2px solid var(--cyan); border-radius: 4px; font-size: 12px; color: var(--cyan); word-break: break-word; }
.panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
}
.panel-title::before, .panel-title::after {
  content: '';
  flex: 1;
  height: 2px;
  border-radius: 1px;
  background: linear-gradient(90deg, transparent, #3a3a5e);
}
.panel-title::after {
  background: linear-gradient(90deg, #3a3a5e, transparent);
}
.feature:hover {
  border-color: var(--grass);
  transform: translateY(-2px);
}
.feature { transition: transform .1s, border-color .1s; }
.mode-card:hover { border-color: #3a3a5e; }
.mode-card { transition: border-color .1s, transform .05s; }

/* 折叠列表 - 词库计数 */
.bf-count {
  background: #2a2a3e;
  color: #8888aa;
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 10px;
  margin-left: auto;
  margin-right: 8px;
}

/* 头像选择面板 - 像素图容器（避免和名字重叠） */
.ap-mob {
  position: relative;
  width: 44px;
  height: 44px;
  overflow: hidden;
}
.ap-mob .px-mob {
  position: absolute;
  top: 2px;
  left: 2px;
}
.ap-item {
  min-height: 60px;
}

/* ================= 全屏词库选择器 ================= */
.book-picker-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  font-size: 16px;
  background: var(--deep);
  color: var(--txt);
  border: 3px solid #000;
  border-radius: 4px;
  cursor: pointer;
}
.book-picker-btn:active { border-color: var(--grass); }
.bp-arrow { color: var(--dim); }
.book-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 16px;
}
.book-overlay.hidden { display: none; }
.book-panel {
  width: 100%;
  max-width: 420px;
  height: 80vh;
  background: var(--panel);
  border: 4px solid #000;
  box-shadow: inset 0 0 0 4px var(--panel2), 0 10px 0 rgba(0,0,0,.5);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.bp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  font-size: 16px;
  font-weight: 900;
  color: var(--gold);
  border-bottom: 2px solid #000;
  flex: 0 0 auto;
}
.bp-close {
  background: none;
  border: none;
  color: var(--dim);
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
}
.bp-close:hover { color: #fff; }
.book-panel .book-fold {
  max-height: none;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border: none;
  border-radius: 0;
}

/* ================= 选词对战 ================= */
.word-prompt.pick-mode {
  font-size: 20px;
  letter-spacing: 1px;
  color: var(--gold);
}

/* ================= 段位徽章 ================= */
.rank-badge {
  display: inline-block;
  margin-left: 6px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(0,0,0,.25);
  padding: 2px 8px;
  border-radius: 10px;
  vertical-align: middle;
}

/* ================= 选词对战 - 18 词网格 ================= */
.options.pick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  max-height: 55vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.pick-opt {
  padding: 10px 4px !important;
  font-size: 14px !important;
  text-align: center;
  min-height: 40px;
  word-break: break-word;
}
.pick-opt.picked {
  background: #1a2a1a;
  border-color: var(--grass);
  box-shadow: 0 0 0 2px var(--grass) inset;
  color: #5bd75b;
}
.pick-opt.taken {
  background: #1a1a1a;
  border-color: #333;
  color: #666;
  text-decoration: line-through;
  cursor: not-allowed;
  opacity: 0.55;
}
.pick-opt.done {
  background: #1a2a1a;
  border-color: var(--grass);
  color: #5bd75b;
  cursor: default;
}
.pick-opt.done.wrong {
  background: #2a1a1a;
  border-color: #e86a6a;
  color: #f0a0a0;
}

/* 选词弹窗 */
.pick-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.pick-modal-overlay.hidden { display: none !important; }
.pick-modal-card {
  background: #1a1e33;
  border: 2px solid #000;
  border-radius: 16px;
  padding: 20px;
  width: 100%;
  max-width: 340px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
}
.pick-modal-word {
  font-size: 24px;
  font-weight: bold;
  color: #ffd83d;
  text-align: center;
  margin-bottom: 16px;
  word-break: break-word;
}
.pick-modal-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pick-modal-options .opt {
  font-size: 16px;
  padding: 12px;
  text-align: center;
}

/* 选词观战：双人答题面板（分别显示双方各自的答题） */
.pick-spectate-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 10px 0 6px;
}
.pick-spectate-panel.hidden { display: none !important; }
.psp-card {
  background: #1a1e33;
  border: 2px solid #000;
  border-radius: 10px;
  padding: 10px;
  min-height: 120px;
}
.psp-name {
  font-size: 14px;
  font-weight: 900;
  color: #ffd83d;
  text-align: center;
  margin-bottom: 6px;
  word-break: break-word;
}
.psp-word {
  font-size: 18px;
  font-weight: bold;
  color: #fff;
  text-align: center;
  margin-bottom: 6px;
  word-break: break-word;
}
.psp-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}
.psp-opt {
  font-size: 12px;
  padding: 5px 4px;
  text-align: center;
  background: var(--deep);
  border: 1px solid #333;
  border-radius: 6px;
  color: #ccc;
  word-break: break-word;
  transition: all .15s;
}
.psp-opt.correct {
  background: #1a3a1a;
  border-color: var(--grass);
  color: #5bd75b;
}
.psp-opt.wrong {
  background: #3a1a1a;
  border-color: var(--red);
  color: #f0a0a0;
}
.psp-opt.dim { opacity: .45; }
.psp-result {
  margin-top: 6px;
  font-size: 14px;
  font-weight: bold;
  text-align: center;
  min-height: 18px;
}
.psp-result.ok { color: #5bd75b; }
.psp-result.bad { color: #f0a0a0; }

/* ================= 段位面板 ================= */
.rank-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #1a1a3e 0%, #2a2a5e 100%);
  border: 3px solid #000;
  border-radius: 8px;
  padding: 12px;
  margin-top: 10px;
}
.rank-icon {
  font-size: 36px;
  flex: 0 0 auto;
  line-height: 1;
}
.rank-info { flex: 1; min-width: 0; }
.rank-top {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.rank-name { font-size: 18px; font-weight: 900; color: #fff; }
.rank-book { font-size: 12px; color: #8888aa; }
.rank-progress {
  height: 8px;
  background: var(--deep);
  border-radius: 4px;
  overflow: hidden;
  margin: 8px 0 4px;
}
.rank-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #5bd75b, #ffd83d);
  border-radius: 4px;
  transition: width .3s;
}
.rank-desc { font-size: 12px; color: #ccc; }

/* ================= UI 统一优化（2026-08） ================= */
/* 统一可点元素的过渡 + hover 反馈 */
.btn, .feature, .mode-card, .opt, .quick-btn, .book-picker-btn {
  transition: transform .08s ease, border-color .12s ease, background .12s ease, filter .12s ease;
}
/* 移动端触摸会 sticky hover 导致「选中后一直亮」，hover 反馈仅在有悬停能力的设备（桌面）启用 */
@media (hover: hover) {
  .feature:hover, .mode-card:hover, .quick-btn:hover {
    transform: translateY(-2px);
    border-color: var(--grass);
  }
  .opt:hover:not(:disabled) { border-color: var(--grass); }
  .btn:hover:not(:disabled) { filter: brightness(1.1); }
}

/* 统一像素风圆角（6/8px → 4px） */
.mode-card, .avatar-box, .avatar-picker { border-radius: 4px; }
.rank-panel { border-radius: 4px; }

/* 词汇量答题页：进度条 */
.vt-progress {
  height: 12px;
  background: var(--deep);
  border: 3px solid #000;
  border-radius: 4px;
  margin: 12px 14px 0;
  overflow: hidden;
}
#vt-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--grass), var(--gold));
  transition: width .3s ease;
}

/* 词汇量结果页：按钮排布 + 段落分隔 */
#vt-result-body .btn-row { margin-top: 12px; }
#vt-result-body .btn-row .btn { margin-top: 0; }
.vt-layers-title { border-top: 2px dashed var(--panel2); padding-top: 16px; }
.vt-weak-title { border-top: 2px dashed var(--panel2); padding-top: 14px; }

/* 首页核心学习入口高亮 */
.feature.hot {
  border-color: var(--gold);
  background: linear-gradient(180deg, #2f2f3e, var(--deep));
}
.feature.hot .f-label { color: var(--gold); font-weight: 700; }
.feature.hot:hover { border-color: var(--gold); box-shadow: 0 0 12px rgba(255, 216, 61, .25); }

/* ===== 首页精简（2026-08） ===== */
/* 公告栏默认收起单行，点击展开 */
.notice-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.notice-bar.expanded .notice-text { white-space: normal; overflow: visible; }

/* 对战模式选择器（收进弹层） */
.mode-picker-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  font-size: 16px;
  background: var(--deep);
  color: var(--txt);
  border: 3px solid #000;
  border-radius: 4px;
  cursor: pointer;
}
.mode-picker-btn .bp-arrow { color: var(--dim); }
.mode-grid { margin-top: 8px; }

/* 世界频道折叠 */
.world-panel.collapsed .world-body,
.world-panel.collapsed .world-input-row { display: none; }
.world-panel .panel-title { cursor: pointer; }
.world-arrow { display: inline-block; transition: transform .2s; }
.world-panel:not(.collapsed) .world-arrow { transform: rotate(180deg); }

/* ===== 全界面统一打磨（2026-08 第二轮） ===== */
/* 圆角统一：卡片类 6px/5px → 4px */
.sr-head, .sr-card, .sr-week, .sr-trend, .sr-week-item,
.emoji-btn, .chat-log, #danmaku-input, .chain-words {
  border-radius: 4px;
}

/* 排行榜 tab 风格统一（和词汇量双榜 tab 一致） */
.rank-tab {
  border: 2px solid #000;
  background: #1f2340;
  color: var(--dim);
  font-weight: 700;
  transition: border-color .12s, background .12s, color .12s;
}
.rank-tab.active {
  background: #2a3a1a;
  border-color: var(--grass);
  color: var(--txt);
}

/* 列表项卡片化 + hover 反馈（排行榜/好友/段位榜） */
.rank-item, .friend-item, .rb-item {
  border-bottom: none;
  background: var(--deep);
  border: 1px solid #000;
  border-radius: 4px;
  margin-bottom: 6px;
  transition: border-color .12s, transform .08s;
}
.rank-item:hover, .friend-item:hover, .rb-item:hover {
  border-color: var(--grass);
  transform: translateX(3px);
}
.rank-sub-title { font-size: 13px; color: var(--gold); font-weight: 700; margin: 14px 0 8px; }
.vocab-rank-mode { display: flex; gap: 8px; margin: 4px 0 8px; }
.vrm-btn { flex: 1; padding: 8px; border: 2px solid #2a2a3e; border-radius: 6px; background: #151527; color: #ccc; font-size: 13px; cursor: pointer; }
.vrm-btn.active { border-color: var(--cyan); color: var(--cyan); background: rgba(77,208,225,.08); }
.rank-item.me { border-color: var(--grass); background: #1a2a1a; }

/* 答题页实时排名 */
.vt-live-rank { margin-top: 12px; }
.vt-live-toggle {
  display: flex; align-items: center; gap: 6px;
  width: 100%; padding: 9px 12px;
  background: #1f2340; border: 2px solid #000; border-radius: 4px;
  color: var(--txt); font-size: 13px; cursor: pointer; font-family: inherit;
}
.vt-live-toggle #vt-live-top { color: var(--gold); font-weight: 700; }
.vt-live-arrow { margin-left: auto; transition: transform .2s; }
.vt-live-arrow.open { transform: rotate(180deg); }
.vt-live-list {
  margin-top: 6px; background: var(--deep); border: 2px solid #000; border-radius: 4px;
  max-height: 220px; overflow-y: auto; padding: 6px;
}
.vt-live-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px; font-size: 13px; border-radius: 3px;
}
.vt-live-row.me { background: #1a2a1a; border: 1px solid var(--grass); }
.vt-live-no { width: 28px; text-align: center; font-weight: 700; color: var(--dim); flex-shrink: 0; }
.vt-live-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vt-live-vocab { font-weight: 700; color: var(--gold); flex-shrink: 0; }
.vt-live-empty { color: var(--dim); font-size: 12px; text-align: center; padding: 12px 0; }

/* 对战互动栏：默认弱化，专注答题，hover 才亮起 */
.emoji-bar, .quick-bar {
  opacity: .5;
  transition: opacity .2s;
}
.emoji-bar:hover, .quick-bar:hover { opacity: 1; }

/* 大厅：已准备玩家槽位高亮 */
.slot.ready {
  border-color: var(--grass);
  box-shadow: 0 0 10px rgba(93, 189, 62, .28);
}

/* ===== 首页重设计（2026-08 v2） ===== */
.home-topbar { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.home-brand { font-weight: 900; font-size: 26px; letter-spacing: 2px; color: var(--grass); text-shadow: 3px 3px 0 #000; margin: 0; line-height: 1.2; }
.seo-footer { padding: 12px 16px 24px; text-align: center; }
.seo-footer p { font-size: 11px; color: #6a6f7a; line-height: 1.6; margin: 4px auto; max-width: 640px; }
.home-brand span { color: var(--gold); }
.home-badges { display: flex; gap: 8px; }
.home-chip { display: flex; align-items: center; gap: 4px; font-size: 12px; padding: 5px 10px; background: var(--panel); border: 2px solid #000; border-radius: 4px; box-shadow: 0 2px 0 #000; color: var(--dim); cursor: pointer; }
.home-chip b { color: var(--gold); }
.lang-toggle { background: #2a7fd4; color: #fff; font-weight: 700; }

.lang-filter { display: block; margin: 8px 0; padding: 6px 12px; font-size: 12px; font-weight: 700; background: var(--panel2); color: var(--text); border: 2px solid #000; border-radius: 4px; cursor: pointer; }
.lang-filter:hover { background: var(--panel); }


/* 玩家/房间语言标识（EN=英文版 中=中文版） */
.rc-lang, .rk-lang { display: inline-block; font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 3px; margin-left: 6px; vertical-align: middle; }
.rc-lang.en, .rk-lang.en { background: #2a7fd4; color: #fff; }
.rc-lang.zh, .rk-lang.zh { background: #d43a3a; color: #fff; }
.rk-lang.admin { background: #e6a817; color: #1a1c2c; }

.english-mode-btn { flex-shrink: 0; padding: 4px 10px; font-size: 12px; font-weight: 700; background: #2a7fd4; color: #fff; border: 2px solid #000; border-radius: 4px; cursor: pointer; white-space: nowrap; box-shadow: 0 2px 0 #000; }
.english-mode-btn:active { transform: translateY(2px); box-shadow: none; }

.home-mecard { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px; background: var(--panel); border: 3px solid #000; border-radius: 6px; box-shadow: inset 0 0 0 3px var(--panel2), 0 5px 0 rgba(0,0,0,.4); }
.home-meinfo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.home-meinfo input { padding: 0; font-size: 17px; font-weight: 700; background: transparent; border: none; color: var(--txt); width: 100%; }
.home-meinfo input:focus { border: none; }
.home-merank { align-self: flex-start; font-size: 11px; padding: 2px 8px; background: linear-gradient(135deg,#1a1a3e,#2a2a5e); border: 1px solid #000; border-radius: 4px; color: var(--gold); }
.name-row { display: flex; align-items: center; gap: 8px; width: 100%; }
.name-row input { flex: 1; min-width: 0; }
.rename-ico { font-size: 14px; cursor: pointer; opacity: 0.55; flex-shrink: 0; }
.rename-ico:hover { opacity: 1; }
.home-mute { flex: 0 0 auto; width: 42px; height: 42px; font-size: 20px; background: var(--deep); border: 2px solid #000; border-radius: 6px; cursor: pointer; color: var(--gold); display: flex; align-items: center; justify-content: center; transition: color .15s, transform .08s, background .15s; }
.home-mute:hover { color: #fff; background: var(--panel2); }
.home-mute:active { transform: translateY(1px); }
.home-mute.muted { color: var(--red); }

.home-play { display: block; width: 100%; margin-top: 14px; padding: 18px; font-size: 21px; font-weight: 900; letter-spacing: 4px; color: #fff; background: var(--grass); border: 3px solid #000; border-radius: 6px; box-shadow: 0 6px 0 #000; cursor: pointer; text-shadow: 2px 2px 0 rgba(0,0,0,.4); font-family: inherit; }
.home-play:active { transform: translateY(4px); box-shadow: 0 2px 0 #000; background: var(--grass-d); }

.home-subrow { display: flex; gap: 10px; margin-top: 12px; }
.home-sub { flex: 1; padding: 12px; font-size: 14px; font-weight: 700; text-align: center; color: var(--txt); background: var(--panel2); border: 3px solid #000; border-radius: 5px; box-shadow: 0 4px 0 #000; cursor: pointer; font-family: inherit; transition: transform .08s, box-shadow .08s; }
.home-sub:active { transform: translateY(3px); box-shadow: 0 1px 0 #000; }
.home-sub.match { background: linear-gradient(135deg,#2a2a4e,var(--panel2)); color: #8ecfff; }
.home-sub.matching { color: #ff9d5c; border-color: #ff9d5c; }

.home-mode-label { margin-top: 18px; font-size: 12px; color: var(--dim); }
.mode-grid { display: flex; flex-wrap: nowrap; gap: 8px; margin-top: 8px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.mode-card { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; padding: 9px 14px; background: var(--deep); border: 2px solid #000; border-radius: 16px; cursor: pointer; user-select: none; white-space: nowrap; transition: border-color .12s, transform .08s; }
.mode-card .mc-icon { font-size: 16px; }
.mode-card .mc-label { font-size: 13px; color: #ccc; }
.mode-card.active { border-color: var(--grass); background: #1a2a1a; }
.mode-card.active .mc-label { color: #b6f0b6; font-weight: 700; }
.mode-card:last-child { grid-column: auto; }

.rank-panel { margin-top: 12px; }

.home-sec-title { margin-top: 20px; font-size: 13px; color: var(--gold); font-weight: 700; }
.learn-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-top: 10px; }
.learn-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px; background: linear-gradient(180deg,#2f2f3e,var(--deep)); border: 2px solid var(--gold); border-radius: 6px; cursor: pointer; font-family: inherit; transition: transform .08s, box-shadow .12s; }
.learn-card:active { transform: translateY(2px); }
.learn-card .lc-ico { font-size: 36px; line-height: 1; }
.learn-card .lc-lbl { font-size: 12px; color: var(--gold); font-weight: 700; }

.promo-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 10px; }
.util-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; margin-top: 10px; }
.util-card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 4px; background: var(--deep); border: 2px solid #000; border-radius: 5px; cursor: pointer; font-family: inherit; transition: border-color .12s, transform .08s; }
.util-card:active { transform: translateY(2px); }
.util-card .uc-ico { font-size: 30px; line-height: 1; }
.util-card .uc-lbl { font-size: 11px; color: var(--dim); }

.world-bar { margin-top: 20px; display: flex; align-items: center; justify-content: space-between; padding: 13px 14px; background: var(--panel); border: 3px solid #000; border-radius: 5px; box-shadow: inset 0 0 0 3px var(--panel2); cursor: pointer; font-size: 13px; color: var(--dim); }
.world-arrow { display: inline-block; transition: transform .2s; }
.world-arrow.open { transform: rotate(180deg); }
.world-body { border-radius: 4px; }

/* ===== 跨端体验优化（2026-08）===== */

/* 手机安全区（iPhone 刘海屏 / 底部 Home 条），避免内容被遮挡 */
#app {
  padding-top: max(14px, env(safe-area-inset-top));
  padding-bottom: max(20px, env(safe-area-inset-bottom));
}

/* 桌面端（宽屏）：像素风背景光晕 + 居中手机框，避免两侧空荡 */
@media (min-width: 640px) {
  html, body {
    background:
      linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px),
      radial-gradient(1100px 560px at 12% 8%, rgba(91, 215, 91, .10), transparent 55%),
      radial-gradient(900px 480px at 88% 92%, rgba(77, 208, 225, .09), transparent 55%),
      radial-gradient(700px 420px at 50% 40%, rgba(255, 216, 61, .05), transparent 60%),
      linear-gradient(180deg, var(--deep), var(--bg));
    background-size: 24px 24px, 24px 24px, auto, auto, auto, auto;
    background-attachment: fixed;
  }

  /* 飘浮的像素方块装饰（左右两侧，避免空荡） */
  body::before, body::after {
    content: '';
    position: fixed;
    z-index: 0;
    pointer-events: none;
  }
  body::before {
    left: 34px; top: 18%;
    width: 16px; height: 16px;
    background: rgba(91, 215, 91, .20);
    box-shadow:
      0 0 0 2px rgba(0, 0, 0, .30),
      26px 46px 0 rgba(255, 216, 61, .16), 26px 46px 0 2px rgba(0, 0, 0, .26),
      52px 96px 0 rgba(77, 208, 225, .18), 52px 96px 0 2px rgba(0, 0, 0, .28),
      78px 20px 0 rgba(230, 69, 69, .14), 78px 20px 0 2px rgba(0, 0, 0, .24);
    animation: floaty 6s ease-in-out infinite;
  }
  body::after {
    right: 34px; top: 26%;
    width: 20px; height: 20px;
    background: rgba(255, 216, 61, .17);
    box-shadow:
      0 0 0 2px rgba(0, 0, 0, .28),
      -28px 58px 0 rgba(91, 215, 91, .18), -28px 58px 0 2px rgba(0, 0, 0, .28),
      -56px 24px 0 rgba(77, 208, 225, .17), -56px 24px 0 2px rgba(0, 0, 0, .27);
    animation: floaty 7s ease-in-out infinite reverse;
  }
  @keyframes floaty {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-16px); }
  }


  #app {
    border-left: 3px solid #000;
    border-right: 3px solid #000;
    box-shadow: 0 0 80px rgba(0, 0, 0, .65);
    background: var(--bg);
  }
  /* 桌面端：鼠标可点的元素给指针 + 更明显的 hover */
  button, .mode-card, .feature, .util-card, .learn-card, .room-card, .bf-item, .rank-item, .friend-item, .rb-item {
    cursor: pointer;
  }
}
/* 飘浮单词装饰（桌面端两侧，移动端隐藏） */
.float-word {
  position: fixed;
  z-index: 0;
  pointer-events: none;
  display: none;
  font-family: "Press Start 2P", monospace;
  letter-spacing: 1px;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, .35);
  animation: floaty 8s ease-in-out infinite;
}
.float-word.fw-on { font-size: 17px; }
.float-word.fw-off { font-size: 11px; }
@media (min-width: 640px) {
  .float-word { display: block; }
}
/* 手机版：飘浮单词作为页面底部装饰 */
@media (max-width: 639px) {
  #float-words {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 22px;
    justify-content: center;
    align-items: center;
    padding: 18px 14px 44px;
  }
  .float-word {
    display: inline-block !important;
    position: static !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    animation: none !important;
    transform: translateY(var(--dy, 0));
  }
  .float-word.fw-on { font-size: 14px; }
  .float-word.fw-off { font-size: 11px; }
}



.teacher-badge { font-size: 12px; margin-left: 2px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.4)); }
.reviewer-badge { margin-right: 2px; }

.ld-hint { font-size: 14px; text-align: center; color: #9aa; margin: 0 0 6px; }

.title-badge { display: inline-block; font-size: 11px; font-weight: 700; color: #1a1c2c; background: linear-gradient(135deg, #ffd83d, #ffb300); padding: 1px 6px; border-radius: 6px; margin-right: 4px; vertical-align: 1px; }
.rank-title-badge { display: inline-block; font-size: 11px; font-weight: 700; color: #fff; background: linear-gradient(135deg, #ff8c00, #ff3d3d); padding: 1px 6px; border-radius: 6px; margin-right: 4px; vertical-align: 1px; }

.toggle-btn { background: var(--panel2); border: 1px solid #3a3a4e; color: #fff; border-radius: 4px; padding: 3px 12px; font-size: 12px; cursor: pointer; }

.util-card.promo-card { position: relative; border-color: #ffd83d; background: linear-gradient(135deg, #3a3010, #2a2410); }
.util-card.promo-cyan { border-color: #4dd0e1; background: linear-gradient(135deg, #10323a, #10242a); }
.promo-badge { position: absolute; top: 4px; right: 4px; font-size: 10px; font-weight: 700; color: #1a1c2c; background: #ffd83d; padding: 1px 6px; border-radius: 8px; }
.promo-badge-cyan { color: #08242a; background: #4dd0e1; }

.invite-body { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.invite-code-card { background: linear-gradient(135deg, #2a2410, #1f1a0a); border: 1px solid #ffd83d; border-radius: 12px; padding: 16px; text-align: center; }
.invite-code-label { font-size: 12px; color: #9aa0c3; font-weight: 700; }
.invite-code { font-size: 34px; font-weight: 700; letter-spacing: 8px; color: #ffd83d; padding: 10px 0; font-family: ui-monospace, monospace; }
.invite-rule { font-size: 13px; color: #c8cce8; text-align: center; line-height: 1.7; }
.invite-rule b { color: #ffd83d; }
.invite-qq { font-size: 12px; color: #9aa0c3; text-align: center; }
.invite-qq b { color: #4dd0e1; }
.invite-stats { display: flex; gap: 10px; }
.invite-stat { flex: 1; background: #262a44; border-radius: 10px; padding: 12px; text-align: center; }
.is-num { font-size: 24px; font-weight: 700; color: #ffd83d; }
.is-lbl { font-size: 12px; color: #9aa0c3; margin-top: 2px; }
.invite-list { max-height: 160px; overflow-y: auto; }
.invite-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; background: #262a44; border-radius: 8px; margin-bottom: 6px; font-size: 13px; }
.invite-row-ok { color: #5bd75b; font-size: 12px; }
.invite-empty { font-size: 12px; color: #888; text-align: center; padding: 12px; }
.invite-bind { border-top: 1px solid #333861; padding-top: 14px; }
.invite-bind-label { font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.invite-bind-col { display: flex; flex-direction: column; gap: 10px; }
#invite-code-input { width: 100%; background: #14162a; border: 1px solid #3a3a4e; border-radius: 10px; color: #fff; padding: 16px 12px; font-size: 24px; font-weight: 700; letter-spacing: 8px; text-transform: uppercase; text-align: center; }
#invite-code-input:focus { outline: none; border-color: #4dd0e1; }

.reviewer-body { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.reviewer-desc { font-size: 13px; color: #c8cce8; line-height: 1.7; }
.reviewer-steps { display: flex; flex-direction: column; gap: 8px; }
.reviewer-step { font-size: 13px; color: #c8cce8; line-height: 1.6; background: #262a44; border-radius: 8px; padding: 8px 10px; }
.reviewer-step b { color: #ffd83d; margin-right: 4px; }
.reviewer-reward { font-size: 13px; color: #ffd83d; line-height: 1.6; }
.reviewer-qq { font-size: 12px; color: #9aa0c3; line-height: 1.6; }
.reviewer-qq b { color: #4dd0e1; }

#rank-title-toggle { appearance: none; -webkit-appearance: none; width: 42px; height: 23px; background: #3a3a4e; border-radius: 12px; position: relative; cursor: pointer; transition: .2s; flex-shrink: 0; }
#rank-title-toggle:checked { background: #5bd75b; }
#rank-title-toggle::after { content: ''; position: absolute; top: 2px; left: 2px; width: 19px; height: 19px; background: #fff; border-radius: 50%; transition: .2s; }
#rank-title-toggle:checked::after { left: 21px; }

.me-badges { display: inline-flex; gap: 4px; align-items: center; margin-left: 2px; flex-wrap: wrap; }

.ms-size { display: inline-flex; align-items: center; gap: 3px; margin-left: auto; font-size: 11px; }
.ms-size button { background: #262a44; border: 1px solid #3a3a4e; color: #fff; border-radius: 4px; width: 18px; height: 18px; line-height: 1; cursor: pointer; font-size: 12px; padding: 0; flex-shrink: 0; }
.ms-size button:active { background: #333861; }
.ms-num { min-width: 18px; text-align: center; color: #ffd83d; font-weight: 700; }

/* 班级 */
.class-body { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.class-head { display: flex; justify-content: space-between; align-items: center; background: linear-gradient(135deg, #2b3a6e, #1e2a4a); border: 1px solid #3a4a7a; border-radius: 12px; padding: 12px 14px; }
.class-name { font-size: 16px; font-weight: 700; }
.class-code { font-size: 12px; color: #a5abcc; }
.class-members { display: flex; flex-direction: column; gap: 6px; max-height: 240px; overflow-y: auto; }
.class-member { display: flex; align-items: center; gap: 8px; background: #262a44; border: 1px solid transparent; border-radius: 10px; padding: 8px 10px; }
.class-member.top3 { background: linear-gradient(135deg, #3a3440, #2a2530); border-color: rgba(255, 216, 61, .35); }
.cm-avatar { width: 26px; height: 26px; border-radius: 50%; background: #333861; color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cm-rank { width: 20px; text-align: center; font-weight: 700; color: #ffd83d; }
.cm-name { flex: 1; }
.cm-points { color: #5bd75b; font-size: 12px; }
.class-empty { font-size: 13px; color: #9aa0c3; text-align: center; }
.self-built { font-size: 10px; color: #ffd83d; background: rgba(255,216,61,.15); border: 1px solid rgba(255,216,61,.4); padding: 1px 5px; border-radius: 4px; margin-left: 4px; }
.class-create, .class-join { display: flex; flex-direction: column; gap: 8px; }
.class-create input, .class-join input { width: 100%; box-sizing: border-box; background: #14162a; border: 1px solid #3a3a4e; border-radius: 10px; color: #fff; padding: 14px 12px; font-size: 16px; }

/* 中学小学版/班级 醒目卡片 */
.util-card.promo-green { border-color: #5bd75b; background: linear-gradient(135deg, #10301a, #10241a); }
.util-card.promo-blue { border-color: #4d7ce1; background: linear-gradient(135deg, #10203a, #10182a); }
.util-card.promo-card.on { box-shadow: 0 0 10px rgba(91,215,91,.5); }
.school-state { position: absolute; top: 4px; right: 4px; font-size: 10px; font-weight: 700; color: #1a1c2c; background: #9aa0c3; padding: 1px 6px; border-radius: 8px; }
.util-card.on .school-state { background: #5bd75b; }

.bf-units { margin: 2px 0 6px 4px; padding-left: 8px; border-left: 2px solid #333861; }
.bf-unit { font-size: 12px; color: #c8cce8; padding: 4px 6px; cursor: pointer; border-radius: 4px; }
.bf-unit:hover { background: #262a44; }
.bf-unit.active { color: #ffd83d; font-weight: 700; }

.class-join select, .class-create select { flex: 1; background: #14162a; border: 1px solid #3a3a4e; border-radius: 10px; color: #fff; padding: 12px 10px; font-size: 14px; }

.btn-mini { background: #262a44; border: 1px solid #3a3a4e; color: #c8cce8; border-radius: 6px; padding: 4px 10px; font-size: 12px; cursor: pointer; }
.btn-mini:hover { background: #333861; }
.teacher-class { display: flex; justify-content: space-between; align-items: center; background: #262a44; border-radius: 8px; padding: 8px 10px; margin-bottom: 6px; }
.tc-name { font-size: 13px; font-weight: 700; }
.tc-info { font-size: 12px; color: #9aa0c3; }

.btn-mini.danger { font-size: 11px; padding: 3px 8px; background: #e64545; color: #fff; border: none; border-radius: 6px; cursor: pointer; }
.btn.danger { background: #e64545; color: #fff; border: none; }

.listen-toggle { font-size: 12px; margin-left: 4px; opacity: .45; cursor: pointer; padding: 0 3px; }
.listen-toggle.on { opacity: 1; color: var(--gold); }
.class-sec-title { font-size: 12px; font-weight: 700; color: var(--dim); margin: 12px 0 6px; letter-spacing: .5px; }
.tc-rank { margin-right: 6px; }
.class-sec-card { background: #1e2238; border: 1px solid #333861; border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.class-sec-card .class-sec-title { margin: 0 0 8px; }

.school-setting { background: #1e2238; border: 1px solid #333861; border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.school-setting-title { font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.school-setting-row { display: flex; flex-direction: column; gap: 8px; }
.school-setting-row input { width: 100%; box-sizing: border-box; background: #14162a; border: 1px solid #3a3a4e; border-radius: 10px; color: #fff; padding: 16px 14px; font-size: 16px; }
.school-setting-row .btn { width: 100%; }
.school-setting-hint { font-size: 11px; color: #9aa0c3; margin-top: 6px; }
.classmates-title { font-size: 13px; font-weight: 700; margin: 10px 0 6px; }

/* ---------- 养成小游戏 ---------- */
.pet-panel {
  background: #1a1e33;
  border: 2px solid #000;
  border-radius: 12px;
  width: 100%;
  max-width: 320px;
  padding: 20px;
  text-align: center;
  position: relative;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
}
.pet-close {
  position: absolute;
  top: 12px;
  right: 14px;
  cursor: pointer;
  color: #8a8aa0;
  font-size: 18px;
}
.pet-close:hover { color: #fff; }
.pet-title {
  font-weight: bold;
  color: #8ecfff;
  margin-bottom: 8px;
}
.pet-form {
  font-size: 72px;
  line-height: 1;
  margin: 6px 0;
}
.pet-form.pet-levelup { animation: petLevelup 0.9s ease; }
@keyframes petLevelup {
  0% { transform: scale(1); }
  40% { transform: scale(1.4) rotate(-6deg); }
  70% { transform: scale(0.9); }
  100% { transform: scale(1); }
}
.pet-level {
  color: #ffd76a;
  font-weight: bold;
  font-size: 15px;
  margin-bottom: 8px;
}
.pet-exp-wrap { margin: 0 auto 12px; max-width: 240px; }
.pet-exp-bar {
  height: 10px;
  background: #2a2a3e;
  border: 1px solid #000;
  border-radius: 6px;
  overflow: hidden;
}
.pet-exp-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ffd76a, #ff9f43);
  transition: width 0.4s ease;
}
.pet-exp-text { color: #8a8aa0; font-size: 12px; margin-top: 4px; }
.pet-hint { color: #a8e6cf; font-size: 13px; margin: 8px 0; min-height: 18px; }
.pet-q { color: #fff; font-size: 22px; font-weight: bold; margin: 10px 0; }
.pet-opts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.pet-opt {
  background: #232741;
  border: 2px solid #000;
  border-radius: 8px;
  color: #eee;
  padding: 10px;
  cursor: pointer;
  font-size: 15px;
  transition: transform 0.08s;
}
.pet-opt:hover { transform: translateY(-1px); }
.pet-opt.pet-correct { background: #2e7d32; color: #fff; }
.pet-opt.pet-wrong { background: #b03a3a; color: #fff; }
.pet-opt.pet-dim { opacity: 0.5; }
.pet-skip {
  background: transparent;
  border: 1px solid #3a3a55;
  border-radius: 8px;
  color: #8a8aa0;
  padding: 6px 14px;
  cursor: pointer;
  font-size: 13px;
}
.pet-skip:hover { color: #fff; }

/* ---------- 打怪闯关（2D 向前闯关） ---------- */
.monster-screen { padding: 10px 14px 16px; }
.ms-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.ms-btn {
  background: transparent;
  border: 1px solid #3a3a55;
  border-radius: 8px;
  color: #8a8aa0;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 14px;
}
.ms-btn:hover { color: #fff; }
.ms-level { font-size: 16px; font-weight: bold; color: #ffd76a; }
.ms-code { text-align: center; color: #8a8aa0; font-size: 13px; margin-bottom: 6px; }
.ms-code b { color: #8ecfff; letter-spacing: 2px; }

/* 2D 卷轴场景 */
.ms-scene {
  position: relative;
  height: 200px;
  border: 2px solid #000;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(180deg, #6fc3ff 0%, #a5dcff 55%, #d8f1ff 100%);
  margin-bottom: 10px;
}
.ms-scene.shake { animation: msShake 0.3s ease; }
@keyframes msShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-3px); }
}
.ms-sky { position: absolute; top: 0; left: 0; right: 0; height: 58%; }
.ms-sun {
  position: absolute;
  top: 12px;
  right: 20px;
  width: 22px;
  height: 22px;
  background: #ffe066;
  border: 2px solid #f0b400;
  box-shadow: 0 0 0 5px rgba(255, 224, 102, 0.25), 0 0 26px 10px rgba(255, 224, 102, 0.4);
}
.ms-mountain {
  position: absolute;
  bottom: 4%;
  width: 110px;
  height: 62px;
  background: #6a9bc9;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  opacity: 0.7;
}
.ms-mountain::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #ffffff;
  clip-path: polygon(50% 0, 62% 28%, 50% 42%, 38% 28%);
  opacity: 0.9;
}
.ms-mountain.m1 { left: -12%; bottom: 5%; }
.ms-mountain.m2 { left: 46%; width: 72px; height: 46px; opacity: 0.5; }
.ms-cloud {
  position: absolute;
  top: 16%;
  left: 0;
  width: 8px;
  height: 8px;
  background: transparent;
  box-shadow:
    8px 0 0 #fff, 16px 0 0 #fff, 24px 0 0 #fff, 32px 0 0 #fff,
    0 8px 0 #fff, 8px 8px 0 #fff, 16px 8px 0 #fff, 24px 8px 0 #fff, 32px 8px 0 #fff, 40px 8px 0 #fff,
    8px 16px 0 #fff, 16px 16px 0 #fff, 24px 16px 0 #fff, 32px 16px 0 #fff;
  opacity: 0.95;
  animation: msCloud 26s linear infinite;
}
.ms-cloud.c2 { top: 40%; animation-duration: 32s; animation-delay: -10s; }
.ms-cloud.c3 { top: 7%; animation-duration: 40s; animation-delay: -20s; opacity: 0.7; }
@keyframes msCloud {
  from { transform: translateX(-70px); }
  to { transform: translateX(520px); }
}

.ms-ground {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 44%;
  background: #8a6b3d;
}
.ms-ground::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 16px;
  background: #5ba53a;
  border-bottom: 2px solid #3f7f2a;
}
.ms-ground::after {
  content: '';
  position: absolute;
  top: 16px;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    linear-gradient(90deg, transparent 0 18px, rgba(0,0,0,0.14) 18px 20px, transparent 20px 38px, rgba(0,0,0,0.14) 38px 40px),
    linear-gradient(0deg, transparent 0 14px, rgba(0,0,0,0.14) 14px 16px, transparent 16px 30px, rgba(0,0,0,0.14) 30px 32px);
}
.ms-grass {
  position: absolute;
  bottom: 44%;
  width: 6px;
  height: 16px;
  background: #4a9a2e;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  z-index: 1;
}
.ms-grass.g1 { left: 12%; }
.ms-grass.g2 { left: 52%; }
.ms-grass.g3 { left: 78%; }
.ms-flower {
  position: absolute;
  bottom: 44%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  z-index: 1;
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.2);
}
.ms-flower::after {
  content: '';
  position: absolute;
  top: 7px;
  left: 3px;
  width: 2px;
  height: 9px;
  background: #4a9a2e;
}
.ms-flower.f1 { left: 32%; background: #ff6b8a; }
.ms-flower.f2 { left: 66%; background: #ffd83d; }

/* 玩家角色（所有玩家） */
.ms-heroes {
  position: absolute;
  bottom: 10px;
  left: 10px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}
.ms-hero-slot { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.ms-hero-slot .ms-hero {
  position: relative;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}
.ms-hero-slot .ms-hero .px-mob { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.ms-hero-slot .ms-hero-name { font-size: 9px; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8); white-space: nowrap; max-width: 56px; overflow: hidden; text-overflow: ellipsis; line-height: 1; }
.ms-hero-slot.me .ms-hero-name { color: #ffd76a; }
.ms-hero-slot .ms-hero.attack { animation: msHeroAttack 0.38s ease; }
@keyframes msHeroAttack {
  0% { transform: translateX(0); }
  45% { transform: translateX(48px); }
  100% { transform: translateX(0); }
}
.ms-hero-slot .ms-hero.hurt { animation: msHeroHurt 0.4s ease; }
@keyframes msHeroHurt {
  0%, 100% { filter: none; }
  30% { transform: translateX(-8px); filter: brightness(2) sepia(1) hue-rotate(-40deg) saturate(4); }
  60% { transform: translateX(-4px); }
}

/* 怪物 */
.ms-enemy {
  position: absolute;
  bottom: 10px;
  right: 34px;
  z-index: 3;
  text-align: center;
}
.ms-enemy-name {
  font-size: 12px;
  font-weight: bold;
  color: #ff7b7b;
  margin-bottom: 2px;
}
.monster-sprite { display: inline-block; position: relative; width: 48px; height: 72px; transition: transform 0.15s; }
.monster-sprite .px-mob { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.ms-enemy.hurt { animation: msEnemyHurt 0.4s ease; }
@keyframes msEnemyHurt {
  0%, 100% { filter: none; }
  30% { transform: translateX(8px); filter: brightness(2) sepia(1) hue-rotate(-40deg) saturate(4); }
  60% { transform: translateX(4px); }
}
.monster-sprite.monster-dead { animation: monsterDead 0.7s ease; }
@keyframes monsterDead {
  0% { transform: translateX(0); opacity: 1; }
  30% { transform: translateX(-8px) rotate(-8deg); }
  60% { transform: translateX(8px) rotate(8deg); }
  100% { transform: translateY(14px) scale(0.7); opacity: 0.3; }
}

/* 状态 */
.ms-hp-wrap { max-width: 260px; margin: 0 auto 4px; }
.ms-hp-bar { height: 16px; background: #1a1a2e; border: 2px solid #000; border-radius: 8px; overflow: hidden; }
.ms-hp-fill { height: 100%; width: 100%; background: linear-gradient(90deg, #ff7b6b, #ff2d2d); transition: width 0.3s ease; }
.ms-hp-text { color: #8a8aa0; font-size: 12px; margin-top: 3px; text-align: center; }

.ms-heroes { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 4px 0; }
.mh-player {
  font-size: 13px;
  color: #ccc;
  background: #232741;
  border: 1px solid #000;
  border-radius: 8px;
  padding: 4px 10px;
}
.mh-player.me { color: #ffd76a; border-color: #ffd76a; }

.ms-timer { height: 6px; background: #2a2a3e; border-radius: 3px; overflow: hidden; margin: 8px 0; }
.ms-timer > div { height: 100%; width: 100%; background: linear-gradient(90deg, #ffd76a, #ff9f43); }

.ms-word-row { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 8px; }
.ms-word { font-size: 24px; font-weight: bold; color: #fff; }
.ms-tts { background: none; border: none; font-size: 20px; cursor: pointer; padding: 0; }

.ms-attacks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ms-attack {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(180deg, #ff9a3d, #ff7a1a);
  border: 2px solid #c85a00;
  border-radius: 12px;
  color: #fff;
  padding: 12px 12px;
  cursor: pointer;
  font-size: 15px;
  font-weight: bold;
  text-align: left;
  box-shadow: 0 3px 0 #b34f00, 0 5px 10px rgba(0, 0, 0, 0.25);
  transition: transform 0.1s, box-shadow 0.1s;
}
.ms-key {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  font-size: 14px;
  font-weight: bold;
}
.ms-opt-text { flex: 1; }
.ms-attack:hover { transform: translateY(-2px); }
.ms-attack:active { transform: translateY(1px); box-shadow: 0 1px 0 #b34f00; }
.ms-attack:disabled { cursor: default; opacity: 0.85; }
.ms-attack.correct { background: linear-gradient(180deg, #5ec26a, #4caf50); border-color: #2e7d32; box-shadow: 0 3px 0 #2e7d32; }
.ms-attack.wrong { background: linear-gradient(180deg, #e86a6a, #e05555); border-color: #a03030; box-shadow: 0 3px 0 #a03030; }
.ms-attack.dim { opacity: 0.55; }

