/* ============================================================================
 *  《算法速胜 · 中微子捕捉计划》样式
 *  配色照文档 5.2：深空蓝 #0A0E27 + 冰蓝 #00E5FF + 切伦科夫光晕 #7DF9FF
 * ========================================================================== */

:root {
    --bg: #060A18;
    --bg2: #0A0E27;
    --ice: #00E5FF;
    --ice2: #7DF9FF;
    --gold: #FBBF24;
    --red: #F87171;
    --lime: #A3E635;
    --txt: #E6F6FF;
    --dim: #8FA8C8;
    --dim2: #5C7290;
    --line: rgba(0, 229, 255, .18);
    --panel: rgba(10, 22, 44, .82);
    --mono: 'JetBrains Mono', ui-monospace, Menlo, Consolas, 'Courier New', monospace;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--txt);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

#app {
    position: relative;
    /* ★ 平台布局是 <main class="p-main">{内容}</main>，而 .p-main 是 flex 行容器 →
       这里是它的 flex 子项，必须写 flex: 1 1 auto 才会撑满宽度
       （不写就只按内容宽度铺，右边会留一大块黑 ✓ 踩过） */
    flex: 1 1 auto;
    min-width: 0;
    /* ★ 不要用 height: 100vh —— 站点头部还有几十像素，加起来超过 100vh 就出滚动条 ✗
       改成"吃掉父容器剩余高度"，并把 body 的滚动整体关掉 ✓ */
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    touch-action: manipulation;
}

/* ------------------------------ 顶部状态栏 ------------------------------ */
#hud {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    row-gap: 4px;
    padding: 6px 10px;
    background: linear-gradient(180deg, rgba(6, 10, 24, .98), rgba(6, 10, 24, .72));
    border-bottom: 1px solid var(--line);
    font-size: 13px;
    position: relative;
    z-index: 30;
}

.hud-back {
    color: var(--ice);
    text-decoration: none;
    font-size: 18px;
    line-height: 1;
    padding: 5px 9px;
    border: 1px solid rgba(0, 229, 255, .35);
    border-radius: 8px;
    background: rgba(0, 229, 255, .08);
    flex: 0 0 auto;
}

.hud-lv { color: var(--dim); font-family: var(--mono); white-space: nowrap; }
.hud-lv b { color: var(--ice); font-size: 15px; }

.hud-chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--panel);
    font-family: var(--mono);
    flex: 0 1 auto;
    min-width: 0;
    white-space: nowrap;
}
.hud-chip i { font-style: normal; font-size: 12px; opacity: .9; }
.hud-chip b { font-size: 14px; }
.hud-chip.score b { color: var(--gold); }
.hud-chip.combo { border-color: rgba(251, 191, 36, .4); }
.hud-chip.combo b { color: var(--gold); }
.hud-chip.combo.hot { border-color: var(--gold); box-shadow: 0 0 14px rgba(251, 191, 36, .4); }
.hud-chip.noise b { color: var(--red); }
.hud-chip.pure b { color: var(--lime); }
.hud-chip.stage b { color: var(--ice2); }
.hud-chip.stage b.s2 { color: var(--gold); }

.hud-spacer { flex: 1 1 auto; }

.hud-btn {
    flex: 0 0 auto;
    width: 34px;
    height: 30px;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--txt);
    font-size: 15px;
    line-height: 1;
}
.hud-btn:active { background: rgba(0, 229, 255, .18); }

/* ------------------------------ 舞台 ------------------------------ */
#stage {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

/* 第一阶段：冰层 + 信号场 */
#field {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background:
        radial-gradient(1200px 500px at 50% 120%, rgba(0, 229, 255, .14), transparent 70%),
        linear-gradient(180deg, #050912 0%, #081426 42%, #061224 68%, #030A16 100%);
}
#field.hide { display: none; }

/* 冰层剖面：几条水平细线 + 底部传感器阵列 */
#field::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 34%;
    background:
        repeating-linear-gradient(180deg, rgba(125, 249, 255, .05) 0 1px, transparent 1px 26px),
        linear-gradient(0deg, rgba(0, 229, 255, .12), transparent);
    pointer-events: none;
}

/* 左侧冰层传感器阵列 */
#field::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 64px;
    background:
        repeating-linear-gradient(180deg, rgba(0, 229, 255, .55) 0 2px, transparent 2px 18px),
        linear-gradient(90deg, rgba(0, 229, 255, .22), transparent);
    box-shadow: 0 0 40px rgba(0, 229, 255, .22) inset;
    pointer-events: none;
}

/* 单颗中微子 */
.pt {
    position: absolute;
    left: 0;
    top: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px 8px 10px;
    border-radius: 999px;
    border: 1px solid rgba(125, 249, 255, .22);
    background: linear-gradient(90deg, rgba(10, 30, 60, .92), rgba(8, 20, 40, .72));
    box-shadow: 0 0 18px rgba(0, 229, 255, .12);
    cursor: pointer;
    will-change: transform;
    transition: border-color .15s, box-shadow .15s;
}
.pt.sel {
    border-color: var(--ice2);
    box-shadow: 0 0 26px rgba(125, 249, 255, .45), 0 0 0 1px rgba(125, 249, 255, .3);
}
.pt.bad { border-color: rgba(248, 113, 113, .75); }
.pt.done { opacity: 0; transition: opacity .25s; }
.pt.lost { opacity: .25; filter: grayscale(1); }

/* 粒子光球 */
.pt-orb {
    flex: 0 0 auto;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #fff, var(--ice2) 45%, rgba(0, 229, 255, .15) 75%);
    box-shadow: 0 0 12px var(--ice2);
}
.pt.hero .pt-orb { box-shadow: 0 0 16px var(--ice2), 0 0 28px rgba(125, 249, 255, .5); }

/* 代码文本 */
.pt-code {
    font-family: var(--mono);
    font-size: 16px;
    line-height: 1.2;
    color: rgba(230, 246, 255, .55);
    letter-spacing: .01em;
    white-space: pre;          /* 桌面：一行不折（保持代码原样） */
    max-width: 100%;
}
.pt-code .c-ok { color: var(--gold); text-shadow: 0 0 8px rgba(251, 191, 36, .5); }
.pt-code .c-bad { color: var(--red); text-decoration: underline wavy rgba(248, 113, 113, .8); }
.pt-code .c-cur { color: #fff; background: rgba(0, 229, 255, .28); border-radius: 3px; }

/* 打对整行的蓝闪 */
.flash {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(600px 320px at 50% 60%, rgba(125, 249, 255, .38), transparent 70%);
}
.flash.on { animation: flashAnim .45s ease-out; }
@keyframes flashAnim {
    0% { opacity: 0; }
    25% { opacity: 1; }
    100% { opacity: 0; }
}

/* 飘字 */
.float {
    position: absolute;
    pointer-events: none;
    font-family: var(--mono);
    font-weight: 700;
    font-size: 18px;
    color: var(--gold);
    text-shadow: 0 0 12px rgba(251, 191, 36, .7);
    animation: floatUp .8s ease-out forwards;
}
@keyframes floatUp {
    0% { opacity: 0; transform: translateY(0) scale(.8); }
    25% { opacity: 1; transform: translateY(-10px) scale(1.1); }
    100% { opacity: 0; transform: translateY(-52px) scale(1); }
}

/* ------------------------------ 第二阶段：全屏速打 ------------------------------ */
#panel {
    position: absolute;
    inset: 0;
    padding: 14px 16px;
    overflow-y: auto;
    background: radial-gradient(900px 500px at 50% 0%, rgba(0, 229, 255, .1), transparent 70%), #060B1A;
}
#panel.hide { display: none; }

.s2-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
    font-size: 14px;
    color: var(--dim);
}
.s2-head b { color: var(--ice); font-size: 18px; }
.s2-head span { font-family: var(--mono); font-size: 12px; }
.s2-head em { margin-left: auto; font-style: normal; color: var(--gold); font-family: var(--mono); font-size: 12px; }

.s2-code {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(6, 14, 30, .8);
    padding: 12px 14px;
    font-family: var(--mono);
    font-size: 15px;
    line-height: 1.9;
}
.s2-line {
    white-space: pre;
    color: rgba(230, 246, 255, .34);
    border-radius: 6px;
    padding: 0 6px;
    margin: 0 -6px;
    transition: background .15s, color .15s;
}
.s2-line.sig { color: rgba(0, 229, 255, .55); }
.s2-line.cur {
    background: rgba(0, 229, 255, .1);
    color: var(--txt);
    box-shadow: inset 3px 0 0 var(--ice);
}
/* ★ 逐字符状态（第二阶段的打字反馈）：
   还没打的 = 暗；打对的 = 金；打错的 = 红；当前该打的那个 = 高亮光标 */
.s2-line .c-todo { color: rgba(230, 246, 255, .30); }
.s2-line.cur .c-todo { color: rgba(230, 246, 255, .42); }
.s2-line .c-ok { color: var(--gold); }
.s2-line .c-bad { color: var(--red); text-decoration: underline wavy; }
.s2-line .c-cur { background: rgba(0, 229, 255, .34); border-radius: 3px; color: #fff; }

.s2-ref {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px dashed rgba(0, 229, 255, .22);
    font-family: var(--mono);
    font-size: 13px;
    line-height: 1.8;
    color: rgba(230, 246, 255, .3);
    word-break: break-all;
}

/* ------------------------------ 提示气泡 ------------------------------ */
.toast {
    position: absolute;
    left: 50%;
    top: 16px;
    transform: translate(-50%, -6px);
    padding: 8px 16px;
    border-radius: 12px;
    background: rgba(6, 12, 26, .92);
    border: 1px solid var(--line);
    font-size: 14px;
    text-align: center;
    max-width: 88%;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s, transform .2s;
    z-index: 20;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* 底部玩法提示条：一直显示"现在该干什么"，孩子不用猜 ✓ */
.hint {
    position: absolute;
    left: 50%;
    bottom: 12px;
    transform: translateX(-50%);
    max-width: 94%;
    padding: 7px 16px;
    border-radius: 999px;
    background: rgba(6, 14, 30, .86);
    border: 1px solid rgba(0, 229, 255, .28);
    color: var(--ice2);
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
    z-index: 21;
    pointer-events: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hint b { color: var(--gold); }
.hint.off { display: none; }

/* 新手引导（自然的教学，不是说明书） */
.tut-step {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px;
    border-radius: 12px;
    background: rgba(0, 229, 255, .05);
    border: 1px solid var(--line);
    margin-bottom: 10px;
}
.tut-step .n {
    flex: 0 0 auto;
    width: 28px; height: 28px; line-height: 28px;
    text-align: center; border-radius: 50%;
    background: rgba(0, 229, 255, .16);
    color: var(--ice);
    font-weight: 700;
    font-family: var(--mono);
}
.tut-step .t { flex: 1 1 auto; font-size: 14px; line-height: 1.65; }
.tut-step .t b { color: var(--gold); }
.tut-step .t i { font-style: normal; color: var(--ice2); font-family: var(--mono); font-size: 12px; }

/* ------------------------------ 覆盖层 ------------------------------ */
#ov {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(3, 7, 16, .82);
    backdrop-filter: blur(3px);
    overflow-y: auto;
}
#ov.on { display: flex; }

.card {
    width: 100%;
    max-width: 780px;
    background: linear-gradient(180deg, rgba(12, 24, 46, .98), rgba(8, 16, 32, .98));
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 22px 24px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .6), 0 0 0 1px rgba(0, 229, 255, .06) inset;
}
.card h1 {
    margin: 0 0 6px;
    font-size: 24px;
    color: var(--txt);
}
.card h1 small { font-size: 12px; color: var(--dim2); font-family: var(--mono); margin-left: 6px; }
.card .sub { margin: 0 0 14px; color: var(--dim); font-size: 14px; line-height: 1.7; }
.card .sub b { color: var(--ice); }

.stats { display: flex; gap: 12px; margin: 12px 0; }
.stat {
    flex: 1 1 0;
    text-align: center;
    padding: 12px;
    border-radius: 12px;
    background: rgba(0, 229, 255, .06);
    border: 1px solid var(--line);
}
.stat b { display: block; font-size: 26px; color: var(--ice); font-family: var(--mono); }
.stat span { font-size: 12px; color: var(--dim); }

.tips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}
.tips span {
    font-size: 12px;
    color: var(--dim);
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(0, 229, 255, .05);
}
.card .hl { color: var(--lime); font-size: 13px; margin: 10px 0; }

.btn-row {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
    margin-top: 16px;
}
.btn {
    cursor: pointer;
    border-radius: 10px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    color: var(--txt);
    border: 1px solid var(--line);
    background: var(--panel);
    font-family: inherit;
}
.btn:active { transform: scale(.97); }
.btn.primary {
    background: linear-gradient(180deg, rgba(0, 229, 255, .9), rgba(0, 160, 200, .9));
    color: #041018;
    border-color: transparent;
    box-shadow: 0 6px 20px rgba(0, 229, 255, .25);
}

/* 关卡网格 */
.lv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
    gap: 8px;
    margin: 14px 0;
}
.lv {
    cursor: pointer;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 9px 10px;
    background: rgba(8, 20, 40, .7);
    transition: border-color .15s, transform .1s;
}
.lv:active { transform: scale(.98); }
.lv.cur { border-color: var(--ice); box-shadow: 0 0 18px rgba(0, 229, 255, .2); }
.lv.lock { opacity: .45; cursor: default; }
.lv-no { font-family: var(--mono); font-size: 11px; color: var(--dim2); }
.lv-name { font-size: 14px; font-weight: 600; margin: 2px 0; }
.lv-meta { font-size: 11px; color: var(--dim); font-family: var(--mono); }
.lv-diff { font-size: 10px; color: var(--gold); letter-spacing: 1px; }

/* 结算 */
.card.res { max-width: 620px; text-align: center; }
.res-grade {
    width: 84px;
    height: 84px;
    line-height: 84px;
    margin: 0 auto 10px;
    border-radius: 50%;
    font-size: 44px;
    font-weight: 800;
    font-family: var(--mono);
}
.res-grade.gS { color: #FDE047; background: radial-gradient(circle, rgba(253, 224, 71, .28), transparent 70%); box-shadow: 0 0 40px rgba(253, 224, 71, .5); }
.res-grade.gA { color: var(--ice2); background: radial-gradient(circle, rgba(125, 249, 255, .22), transparent 70%); box-shadow: 0 0 34px rgba(125, 249, 255, .4); }
.res-grade.gB { color: var(--lime); background: radial-gradient(circle, rgba(163, 230, 53, .18), transparent 70%); }
.res-grade.gC { color: var(--dim); background: radial-gradient(circle, rgba(143, 168, 200, .16), transparent 70%); }
.res-score { font-size: 40px; font-weight: 800; color: var(--ice); font-family: var(--mono); margin: 6px 0 12px; }
.res-score em { font-size: 14px; color: var(--dim); font-style: normal; margin-left: 4px; }
.res-rows { text-align: left; border-top: 1px solid var(--line); }
.res-rows > div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 2px;
    border-bottom: 1px solid rgba(0, 229, 255, .08);
    font-size: 13px;
}
.res-rows span { color: var(--dim); }
.res-rows b { font-family: var(--mono); color: var(--txt); }
.purity-tip { margin-top: 10px; color: var(--gold); font-size: 13px; }

/* 隐藏的打字输入框：手机上靠它弹键盘 */
#typein {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 1px;
    height: 1px;
    opacity: 0;
    border: 0;
    padding: 0;
    margin: 0;
    font-size: 16px;          /* 防止 iOS 放大 */
    pointer-events: none;
}

/* ------------------------------ 手机适配 ------------------------------ */
@media (max-width: 680px) {
    /* ★ 手机上长代码行（最长 43 字符）放不下一行 → 缩小字号 + 允许折行，
       否则粒子会横穿出屏幕右边（踩过：390 宽下直接溢出） */
    .pt { max-width: calc(100vw - 84px); }
    .pt-code {
        font-size: 11px;
        line-height: 1.35;
        white-space: pre-wrap;
        word-break: break-all;
    }
    .pt { padding: 6px 10px 6px 8px; gap: 8px; }
    .card { padding: 16px 14px; border-radius: 14px; }
    .card h1 { font-size: 20px; }
    .lv-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
    .s2-code { font-size: 12px; line-height: 1.8; }
    .res-score { font-size: 32px; }
    #hud { font-size: 11px; gap: 4px; padding: 4px 6px; }
    .hud-chip { padding: 2px 6px; }
    .hud-chip b { font-size: 12px; }
    .hud-btn { width: 30px; height: 26px; font-size: 13px; }
}

/* 超窄屏（≤380）：再压一档 */
@media (max-width: 380px) {
    .pt-code { font-size: 10px; }
    .pt { max-width: calc(100vw - 78px); }
}

/* 平台壳子适配：占满站点头部以下、隐藏页脚、整页不出滚动条 */
body {
    min-height: 0;
    height: 100vh;
    overflow: hidden;                 /* ★ 游戏页整页不滚动（之前会出滚动条 ✗） */
    display: flex;
    flex-direction: column;
}
.p-hud { z-index: 300; flex: 0 0 auto; }
.p-foot { display: none; }
.p-main {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    overflow: hidden;
}

/* ============================================================================
   V3 冰下气泡（第一阶段）：从底部升起，点一下就选中
   ========================================================================== */
.bub {
    position: absolute;
    left: 0;
    top: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px 9px 12px;
    border-radius: 999px;
    border: 1px solid rgba(125, 249, 255, .28);
    background: radial-gradient(120% 140% at 30% 20%, rgba(0, 229, 255, .20), rgba(8, 22, 44, .92) 62%);
    box-shadow: 0 0 22px rgba(0, 229, 255, .16), inset 0 0 18px rgba(125, 249, 255, .08);
    cursor: pointer;
    will-change: transform;
    transition: border-color .15s, box-shadow .15s, opacity .2s;
    max-width: min(92vw, 520px);
}
.bub.sel {
    border-color: var(--ice2);
    box-shadow: 0 0 30px rgba(125, 249, 255, .5), 0 0 0 1px rgba(125, 249, 255, .35);
}
.bub.hero { background: radial-gradient(120% 140% at 30% 20%, rgba(163, 230, 53, .16), rgba(8, 22, 44, .92) 62%); }
.bub.wrong { border-color: rgba(248, 113, 113, .9); }
.bub.shake { animation: bubShake .3s; }
@keyframes bubShake {
    0%, 100% { margin-left: 0; }
    20% { margin-left: -6px; }
    50% { margin-left: 6px; }
    80% { margin-left: -3px; }
}
.bub.done { opacity: 0; transform-origin: center; }
.bub.gone { opacity: 0; transform: scale(.7); }
.bub-orb {
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #fff, var(--ice2) 45%, rgba(0, 229, 255, .12) 78%);
    box-shadow: 0 0 14px var(--ice2);
}
.bub-code {
    font-family: var(--mono);
    font-size: 15px;
    line-height: 1.25;
    color: rgba(230, 246, 255, .5);
    white-space: pre;
    max-width: 100%;
}
.bub-code .c-auto { color: rgba(125, 249, 255, .75); }   /* 符号：系统自动补全 */
.bub-code .c-ok { color: var(--gold); text-shadow: 0 0 8px rgba(251, 191, 36, .5); }
.bub-code .c-cur { color: #fff; background: rgba(0, 229, 255, .3); border-radius: 3px; }
.bub-code .c-todo { color: rgba(230, 246, 255, .34); }

/* 一簇清完后的极光（休息 5 秒） */
#field.aurora::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(115deg, transparent 20%, rgba(125, 249, 255, .16) 42%, rgba(163, 230, 53, .10) 58%, transparent 80%);
    animation: auroraMove 5s ease-in-out;
}
@keyframes auroraMove {
    0% { opacity: 0; transform: translateX(-14%); }
    30% { opacity: 1; }
    100% { opacity: 0; transform: translateX(14%); }
}

/* 第二阶段代码行：符号自动补全也用青色 */
.s2-line .c-auto { color: rgba(125, 249, 255, .6); }
/* V3 气泡爆破碎片 */
.spark {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #fff, var(--ice2) 60%);
    box-shadow: 0 0 10px var(--ice2);
    pointer-events: none;
    animation: sparkFly .52s ease-out forwards;
    z-index: 5;
}
@keyframes sparkFly {
    0% { opacity: 1; transform: translate(0, 0) scale(1); }
    100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(.4); }
}
.bub.pop {
    animation: bubPop .3s ease-out forwards;
}
@keyframes bubPop {
    0% { transform: scale(1); opacity: 1; }
    45% { transform: scale(1.12); opacity: .95; }
    100% { transform: scale(.5); opacity: 0; }
}
/* ============================================================================
   左侧「冰下深度」刻度（V3 · kk老师 2026-10-20）
   冰立方传感器真实深度：冰下 1450 ~ 2450 米（V3 文档 1.2）
   气泡从深处升起 → 下面数字大、上面数字小
   ========================================================================== */
#depth {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 66px;
    pointer-events: none;
    z-index: 3;
    font-family: var(--mono);
}
#depth b {
    position: absolute;
    left: 5px;
    top: 6px;
    font-size: 9px;
    font-weight: 400;
    letter-spacing: .18em;
    color: rgba(125, 249, 255, .45);
    writing-mode: vertical-rl;
    text-orientation: mixed;
}
#depth i {
    position: absolute;
    left: 7px;
    transform: translateY(-50%);
    font-style: normal;
    font-size: 10px;
    line-height: 1;
    color: rgba(125, 249, 255, .52);
    text-shadow: 0 0 8px rgba(0, 229, 255, .35);
    white-space: nowrap;
}
#depth i::after {
    content: '';
    display: block;
    margin-top: 3px;
    width: 22px;
    height: 1px;
    background: linear-gradient(90deg, rgba(125, 249, 255, .55), transparent);
}

/* 手机：刻度条窄一点、字号小一点 */
@media (max-width: 680px) {
    #depth { width: 54px; }
    #depth b { font-size: 8px; letter-spacing: .1em; }
    #depth i { font-size: 9px; }
    #depth i::after { width: 16px; }
}
/* ============================================================================
   V3 第二阶段：代码填空连连看
   ========================================================================== */
.fb-code {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(6, 14, 30, .8);
    padding: 12px 14px;
    overflow: auto;
}
.fb-line {
    display: flex;
    gap: 10px;
    font-family: var(--mono);
    font-size: 15px;
    line-height: 2.05;
    color: rgba(230, 246, 255, .72);
    white-space: pre;
}
.fb-line .ln { flex: 0 0 22px; text-align: right; color: var(--dim2); font-size: 12px; }
.fb-line .tx { flex: 1 1 auto; }
.fb-blank {
    display: inline-block;
    min-width: 56px;
    padding: 0 9px;
    margin: 0 2px;
    border-radius: 7px;
    border: 1px dashed var(--ice);
    color: var(--ice);
    text-align: center;
    background: rgba(0, 229, 255, .07);
    transition: all .15s;
}
.fb-blank.filled {
    border-style: solid;
    border-color: rgba(251, 191, 36, .7);
    color: var(--gold);
    background: rgba(251, 191, 36, .12);
}
.fb-pool {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}
.fb-cap {
    cursor: pointer;
    padding: 9px 18px;
    border-radius: 999px;
    border: 1px solid rgba(0, 229, 255, .3);
    background: linear-gradient(180deg, rgba(0, 229, 255, .14), rgba(0, 229, 255, .05));
    color: var(--txt);
    font-family: var(--mono);
    font-size: 15px;
    transition: transform .1s, opacity .15s;
}
.fb-cap:active { transform: scale(.95); }
.fb-cap.used { opacity: .22; pointer-events: none; }
.fb-cap.shake { animation: bubShake .34s; border-color: var(--red); }
.fb-tip { margin-top: 12px; color: var(--dim); font-size: 13px; }

/* 第一阶段：整行点亮后的样子 */
.bub-captured, .bub.captured .bub-code span.c-ok { color: var(--gold); text-shadow: 0 0 10px rgba(251, 191, 36, .55); }

@media (max-width: 680px) {
    .fb-line { font-size: 12px; line-height: 1.95; }
    .fb-cap { padding: 8px 14px; font-size: 13px; }
    .fb-blank { min-width: 44px; }
}
/* 第一阶段气泡代码：未点击时全部半透明（没有"输入光标"效果） */
.bub-code .c-dim { color: rgba(230, 246, 255, .42); }
.bub.capturing { border-color: rgba(251, 191, 36, .7); box-shadow: 0 0 26px rgba(251, 191, 36, .35); }
/* V5：生命值 / 目标进度 */
.hud-chip.life b { color: #FB7185; letter-spacing: 1px; font-size: 13px; }
.hud-chip.prog { border-color: rgba(251, 191, 36, .4); }
.hud-chip.prog b { color: var(--gold); }
/* ============================================================================
   V5 单字点亮：整行只有 1 个字符是亮的，打对它亮点往后延展
   ========================================================================== */
.bub-code .c-dim { color: rgba(230, 246, 255, .30); }                       /* 还没轮到 */
.bub-code .c-ok { color: var(--gold); text-shadow: 0 0 9px rgba(251, 191, 36, .55); }  /* 已点亮 */
.bub-code .c-auto { color: rgba(125, 249, 255, .62); }                      /* 符号：自动点亮 */
.bub-code .c-cur {                                                          /* ★ 唯一亮点 */
    color: #0A1020;
    background: #FDE047;
    border-radius: 4px;
    padding: 0 2px;
    margin: 0 -1px;
    box-shadow: 0 0 14px rgba(253, 224, 71, .9), 0 0 26px rgba(251, 191, 36, .55);
    animation: litPulse 1s ease-in-out infinite;
}
@keyframes litPulse {
    0%, 100% { box-shadow: 0 0 12px rgba(253, 224, 71, .8), 0 0 22px rgba(251, 191, 36, .45); }
    50% { box-shadow: 0 0 20px rgba(253, 224, 71, 1), 0 0 34px rgba(251, 191, 36, .7); }
}
/* 打错时那个亮点闪红 */
.bub.wrong .c-cur { background: var(--red); color: #fff; box-shadow: 0 0 16px rgba(248, 113, 113, .9); }
/* ============================================================================
   第一阶段 → 第二阶段：「信号解析」过场
   ========================================================================== */
.analyze {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 25;
    pointer-events: none;
    background: radial-gradient(700px 420px at 50% 55%, rgba(0, 229, 255, .16), rgba(3, 8, 18, .92) 70%);
}
.analyze.on { display: flex; animation: anIn .3s ease-out; }
@keyframes anIn { from { opacity: 0; } to { opacity: 1; } }
.an-card { text-align: center; }
.an-icon { font-size: 44px; margin-bottom: 10px; animation: anPulse 1.2s ease-in-out infinite; }
@keyframes anPulse { 0%, 100% { transform: scale(1); opacity: .9; } 50% { transform: scale(1.12); opacity: 1; } }
.an-t1 { font-size: 22px; font-weight: 700; color: var(--ice2); letter-spacing: .06em; }
.an-t2 { margin-top: 6px; font-size: 13px; color: var(--dim); font-family: var(--mono); }
.an-bar {
    width: 260px;
    max-width: 70vw;
    height: 6px;
    margin: 16px auto 10px;
    border-radius: 999px;
    background: rgba(0, 229, 255, .12);
    overflow: hidden;
}
.an-bar i {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--ice), var(--ice2), var(--lime));
    box-shadow: 0 0 14px rgba(125, 249, 255, .8);
    animation: anBar 1.25s ease-out forwards;
}
@keyframes anBar { from { width: 0; } to { width: 100%; } }
.an-t3 { font-size: 13px; color: var(--dim); font-family: var(--mono); }
.an-t3.done { color: var(--lime); }
/* V5.1 气泡"咕嘟"冒出水面时的涟漪 */
.ripple {
    position: absolute;
    width: 22px;
    height: 22px;
    margin: -11px 0 0 -11px;
    border-radius: 50%;
    border: 2px solid rgba(125, 249, 255, .75);
    pointer-events: none;
    animation: rippleOut .72s ease-out forwards;
    z-index: 4;
}
@keyframes rippleOut {
    0% { transform: scale(.4); opacity: .9; }
    100% { transform: scale(3.2); opacity: 0; }
}
/* ============================================================================
   V5 第二阶段填空：左边代码（标准缩进）+ 右边竖排选项（Tab/Enter）
   ========================================================================== */
.fb-wrap { display: flex; gap: 16px; align-items: flex-start; }
.fb-code { flex: 1 1 auto; min-width: 0; }
.fb-side {
    flex: 0 0 190px;
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(0, 229, 255, .05);
    position: sticky;
    top: 0;
}
.fb-side-t {
    font-size: 12px;
    color: var(--dim);
    text-align: center;
    padding-bottom: 6px;
    border-bottom: 1px dashed rgba(0, 229, 255, .18);
    font-family: var(--mono);
}
.fb-side .fb-cap { width: 100%; text-align: center; }
.fb-cap.cur {
    border-color: var(--ice2);
    background: linear-gradient(180deg, rgba(125, 249, 255, .28), rgba(0, 229, 255, .12));
    box-shadow: 0 0 18px rgba(125, 249, 255, .45), inset 0 0 12px rgba(125, 249, 255, .18);
    transform: translateX(-3px);
}
@media (max-width: 680px) {
    .fb-wrap { flex-direction: column; }
    .fb-side { flex: 1 1 auto; width: 100%; flex-direction: row; flex-wrap: wrap; position: static; }
    .fb-side-t { width: 100%; }
    .fb-side .fb-cap { width: auto; flex: 1 1 40%; }
}
/* 填空选错时的扣分飘字 */
.fbfloat { z-index: 40; font-size: 16px; }
/* 填空选对/选错的飘分（+5 / -4）—— 升上去消失 */
.fbfloat {
    z-index: 45;
    font-size: 20px;
    font-weight: 800;
    font-family: var(--mono);
    text-shadow: 0 0 14px currentColor;
    animation: fbFloatUp .9s cubic-bezier(.2, .9, .3, 1) forwards !important;
}
@keyframes fbFloatUp {
    0%   { opacity: 0; transform: translate(-50%, 6px) scale(.7); }
    18%  { opacity: 1; transform: translate(-50%, -6px) scale(1.15); }
    60%  { opacity: 1; transform: translate(-50%, -34px) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -62px) scale(.92); }
}
/* 用户反馈面板（两个游戏共用） */
.gfb-vrow { display: flex; gap: 12px; margin: 6px 0 12px; }
.gfb-v {
    flex: 1 1 0;
    cursor: pointer;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(0, 229, 255, .05);
    color: var(--txt);
    font-size: 15px;
    font-family: inherit;
    transition: all .15s;
}
.gfb-v.on {
    border-color: var(--ice2);
    background: linear-gradient(180deg, rgba(125, 249, 255, .24), rgba(0, 229, 255, .1));
    box-shadow: 0 0 18px rgba(125, 249, 255, .35);
}
.gfb-text {
    width: 100%;
    min-height: 96px;
    resize: vertical;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: rgba(0, 0, 0, .35);
    color: var(--txt);
    font-size: 14px;
    line-height: 1.6;
    font-family: inherit;
    outline: none;
}
.gfb-text:focus { border-color: var(--ice2); box-shadow: 0 0 14px rgba(125, 249, 255, .25); }
.gfb-text.warn { border-color: var(--red); animation: bubShake .3s; }
/* ============================================================================
   V5 道具气泡（6 种）
   ========================================================================== */
.bub.pu-love   { border-color: rgba(244, 114, 182, .75); box-shadow: 0 0 26px rgba(244, 114, 182, .45); background: radial-gradient(120% 140% at 30% 20%, rgba(244, 114, 182, .3), rgba(8, 22, 44, .92) 62%); }
.bub.pu-love .bub-orb   { background: radial-gradient(circle at 35% 35%, #fff, #F472B6 45%, rgba(244, 114, 182, .2) 78%); box-shadow: 0 0 16px #F472B6; }
.bub.pu-time   { border-color: rgba(96, 165, 250, .75); box-shadow: 0 0 26px rgba(96, 165, 250, .45); }
.bub.pu-time .bub-orb   { background: radial-gradient(circle at 35% 35%, #fff, #60A5FA 45%, rgba(96, 165, 250, .2) 78%); box-shadow: 0 0 16px #60A5FA; }
.bub.pu-boom   { border-color: rgba(248, 113, 113, .8); box-shadow: 0 0 26px rgba(248, 113, 113, .5); }
.bub.pu-boom .bub-orb   { background: radial-gradient(circle at 35% 35%, #fff, #F87171 45%, rgba(248, 113, 113, .2) 78%); box-shadow: 0 0 16px #F87171; }
.bub.pu-x2     { border-color: rgba(251, 191, 36, .8); box-shadow: 0 0 26px rgba(251, 191, 36, .5); }
.bub.pu-x2 .bub-orb     { background: radial-gradient(circle at 35% 35%, #fff, #FBBF24 45%, rgba(251, 191, 36, .2) 78%); box-shadow: 0 0 16px #FBBF24; }
.bub.pu-shield { border-color: rgba(125, 249, 255, .85); box-shadow: 0 0 26px rgba(125, 249, 255, .5); }
.bub.pu-shield .bub-orb { background: radial-gradient(circle at 35% 35%, #fff, #7DF9FF 45%, rgba(125, 249, 255, .2) 78%); box-shadow: 0 0 16px #7DF9FF; }
.bub.pu-combo  { border-color: rgba(167, 139, 250, .85); box-shadow: 0 0 26px rgba(167, 139, 250, .5); }
.bub.pu-combo .bub-orb  { background: radial-gradient(circle at 35% 35%, #fff, #A78BFA 45%, rgba(167, 139, 250, .2) 78%); box-shadow: 0 0 16px #A78BFA; }
/* 道具气泡的代码字更大更亮，一眼看出是道具 */
.bub[class*="pu-"] .bub-code { font-weight: 700; letter-spacing: .06em; }
/* 50 关菜单：网格区域可滚动（否则超出一屏看不见后面关卡） */
.lv-grid {
    max-height: 52vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 6px;
    scrollbar-width: thin;
}
.lv-grid::-webkit-scrollbar { width: 8px; }
.lv-grid::-webkit-scrollbar-thumb { background: rgba(0, 229, 255, .3); border-radius: 4px; }
@media (max-width: 680px) {
    .lv-grid { max-height: 46vh; grid-template-columns: repeat(4, 1fr) !important; }
}
/* 准确率三档颜色（一眼看出好坏） */
#hPure.good { color: var(--lime); text-shadow: 0 0 10px rgba(163, 230, 53, .5); }
#hPure.warn { color: var(--gold); text-shadow: 0 0 10px rgba(251, 191, 36, .5); }
#hPure.bad  { color: var(--red);  text-shadow: 0 0 10px rgba(248, 113, 113, .5); }
/* ★ 填空空格：务必一眼看到（原来是虚线细边，太不显眼 ✗） */
.fb-blank {
    display: inline-block !important;
    min-width: 62px !important;
    padding: 1px 10px !important;
    margin: 0 3px !important;
    border-radius: 8px !important;
    border: 2px solid #FDE047 !important;
    background: rgba(253, 224, 71, .22) !important;
    color: #FDE047 !important;
    font-weight: 800 !important;
    text-align: center !important;
    box-shadow: 0 0 16px rgba(253, 224, 71, .45) !important;
    animation: blankPulse 1.3s ease-in-out infinite !important;
    vertical-align: baseline !important;
}
@keyframes blankPulse {
    0%, 100% { box-shadow: 0 0 12px rgba(253, 224, 71, .35); background: rgba(253, 224, 71, .16); }
    50%      { box-shadow: 0 0 24px rgba(253, 224, 71, .75); background: rgba(253, 224, 71, .30); }
}
.fb-blank.filled {
    border-color: rgba(163, 230, 53, .9) !important;
    background: rgba(163, 230, 53, .18) !important;
    color: #A3E635 !important;
    box-shadow: 0 0 16px rgba(163, 230, 53, .4) !important;
    animation: none !important;
}
/* ==== 用户反馈：浮动按钮（只在选关/结算显示）+ 独立浮层 ==== */
#btnFb {
    position: fixed !important;
    right: 14px;
    bottom: 14px;
    z-index: 9000;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    border: 1px solid rgba(125, 249, 255, .5);
    background: radial-gradient(circle at 35% 30%, rgba(0, 229, 255, .35), rgba(8, 22, 44, .95));
    color: #E6F6FF;
    box-shadow: 0 0 20px rgba(0, 229, 255, .35);
}
#btnFb:active { transform: scale(.92); }
.gfb-ov {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    overflow: auto;
    background: rgba(2, 6, 14, .8);
    z-index: 10000;
}
.gfb-ov.on { display: flex; }
.gfb-ov .card { max-width: 460px; width: 100%; }
/* ============================================================================
   🏆 排行榜
   ========================================================================== */
.rank-fab {
    position: fixed;
    right: 14px;
    bottom: 70px;
    z-index: 9000;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
    border: 1px solid rgba(251, 191, 36, .55);
    background: radial-gradient(circle at 35% 30%, rgba(251, 191, 36, .4), rgba(8, 22, 44, .95));
    box-shadow: 0 0 20px rgba(251, 191, 36, .4);
}
.rank-fab:active { transform: scale(.92); }
.rank-ov {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    overflow: auto;
    background: rgba(2, 6, 14, .82);
    z-index: 10000;
}
.rank-ov.on { display: flex; }
.rank-card {
    width: 100%;
    max-width: 460px;
    padding: 22px;
    border-radius: 16px;
    border: 1px solid rgba(251, 191, 36, .35);
    background: linear-gradient(180deg, rgba(20, 26, 46, .99), rgba(6, 14, 30, .99));
    color: #E6F6FF;
}
.rank-card h1 { margin: 0 0 4px; font-size: 20px; }
.rank-sub { margin: 0 0 14px; font-size: 13px; color: rgba(230, 246, 255, .65); }
.rank-list { max-height: 46vh; overflow-y: auto; }
.rank-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 10px;
    margin-bottom: 6px;
    background: rgba(0, 229, 255, .05);
    font-size: 15px;
}
.rank-row.top { background: rgba(251, 191, 36, .12); border: 1px solid rgba(251, 191, 36, .3); }
.rank-no { flex: 0 0 30px; text-align: center; font-weight: 700; }
.rank-name { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-time { flex: 0 0 auto; font-family: var(--mono); color: var(--gold); }
.rank-empty { padding: 26px 10px; text-align: center; color: rgba(230, 246, 255, .55); font-size: 14px; line-height: 1.7; }
.rank-mine {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(125, 249, 255, .1);
    border: 1px dashed rgba(125, 249, 255, .35);
    font-size: 14px;
    text-align: center;
}
.rank-btns { display: flex; gap: 10px; margin-top: 14px; }
.rank-btn {
    flex: 1 1 0;
    cursor: pointer;
    padding: 11px;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    border: 1px solid rgba(125, 249, 255, .3);
    background: rgba(0, 229, 255, .08);
    color: #E6F6FF;
}
.rank-btn.primary { background: linear-gradient(180deg, rgba(251, 191, 36, .3), rgba(251, 191, 36, .12)); border-color: rgba(251, 191, 36, .6); font-weight: 700; }
/* 排行榜每行可点（进入对方星舱） */
.rank-row { cursor: pointer; transition: transform .1s, background .15s; }
.rank-row:hover { background: rgba(0, 229, 255, .14); }
.rank-row:active { transform: scale(.985); }
/* 排行榜：登录才能进榜的提示 */
.rank-tip {
    margin: -6px 0 14px;
    padding: 8px 12px;
    border-radius: 9px;
    background: rgba(251, 191, 36, .1);
    border: 1px dashed rgba(251, 191, 36, .35);
    color: rgba(253, 224, 71, .92);
    font-size: 12.5px;
    line-height: 1.5;
}
.rank-tip b { color: #FDE047; }
/* HUD 精简：芯片显隐（平滑一点，不要突然消失） */
.hud-chip { transition: opacity .18s ease, transform .18s ease; }
/* ============================================================================
   气泡内代码防溢出（第 50 关那种 61 字符的超长行）
   原因：.bub-code 原来是 white-space:pre → 长行不折行，直接撑出气泡框 ✗
   ========================================================================== */
.bub {
    overflow: hidden;
    max-width: min(94vw, 540px);
}
.bub-code {
    white-space: pre-wrap !important;      /* 允许折行 ✓ */
    word-break: break-all !important;      /* 长标识符也强制折断 ✓ */
    overflow-wrap: anywhere !important;
    max-width: 100% !important;
    line-height: 1.28 !important;
}
@media (max-width: 680px) {
    .bub { max-width: calc(100vw - 86px); padding: 7px 12px 7px 9px; }
    .bub-code { font-size: 11px !important; }
}
/* ============================================================================
   打击感：冲击波 / 震屏 / 连锁大奖演出（kk老师 2026-10-21：之前感觉不到）
   ========================================================================== */
.shockwave {
    position: absolute;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, .95);
    box-shadow: 0 0 26px rgba(125, 249, 255, .9), inset 0 0 18px rgba(125, 249, 255, .6);
    pointer-events: none;
    z-index: 6;
    animation: shockOut .55s cubic-bezier(.15, .8, .3, 1) forwards;
}
@keyframes shockOut {
    0%   { transform: scale(.3); opacity: 1; border-width: 4px; }
    60%  { opacity: .7; }
    100% { transform: scale(4.2); opacity: 0; border-width: 1px; }
}

.shake-hard { animation: shakeHard .22s linear; }
@keyframes shakeHard {
    0%, 100% { transform: translate(0, 0); }
    20% { transform: translate(-4px, 2px); }
    40% { transform: translate(4px, -2px); }
    60% { transform: translate(-3px, -1px); }
    80% { transform: translate(3px, 1px); }
}

.spark-gold {
    width: 8px;
    height: 8px;
    background: radial-gradient(circle at 35% 35%, #fff, #FDE047 60%);
    box-shadow: 0 0 14px #FBBF24;
    z-index: 9998;
}

.chain-flash {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9990;
    background: radial-gradient(circle at 50% 55%, rgba(253, 224, 71, .55), rgba(251, 191, 36, .18) 45%, transparent 72%);
    animation: chainFlash .7s ease-out forwards;
}
@keyframes chainFlash {
    0% { opacity: 0; }
    15% { opacity: 1; }
    100% { opacity: 0; }
}

.chain-banner {
    position: fixed;
    left: 50%;
    top: 42%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    pointer-events: none;
    font-size: 42px;
    font-weight: 900;
    letter-spacing: .08em;
    color: #FDE047;
    text-align: center;
    text-shadow: 0 0 24px rgba(251, 191, 36, .95), 0 0 60px rgba(251, 191, 36, .6), 0 4px 0 rgba(120, 53, 15, .5);
    animation: chainBanner 1.5s cubic-bezier(.2, .9, .3, 1) forwards;
}
.chain-banner em {
    display: block;
    margin-top: 8px;
    font-size: 26px;
    font-style: normal;
    color: #FEF3C7;
}
@keyframes chainBanner {
    0%   { opacity: 0; transform: translate(-50%, -50%) scale(.4) rotate(-6deg); }
    18%  { opacity: 1; transform: translate(-50%, -50%) scale(1.18) rotate(2deg); }
    32%  { transform: translate(-50%, -50%) scale(1) rotate(0deg); }
    75%  { opacity: 1; }
    100% { opacity: 0; transform: translate(-50%, -72%) scale(1.05); }
}
@media (max-width: 680px) {
    .chain-banner { font-size: 30px; }
    .chain-banner em { font-size: 19px; }
}
/* 手机版：气泡触摸区加大、手指好点（第一阶段点到就爆） */
@media (pointer: coarse) {
    .bub { min-height: 46px; padding: 11px 16px 11px 13px; }
    .bub-orb { width: 18px; height: 18px; }
    .bub-code { font-size: 12px !important; }
}
/* ============================================================================
   盲打算法（第三种第二阶段玩法，kk老师 2026-10-21）
   特点：屏幕上只有光标，没有任何代码提示
   ========================================================================== */
.bl-wrap { display: flex; gap: 16px; align-items: flex-start; }
.bl-main { flex: 1 1 auto; min-width: 0; }
.bl-done {
    max-height: 44vh;
    overflow-y: auto;
    margin-bottom: 6px;
}
.bl-line {
    display: flex;
    gap: 10px;
    font-family: var(--mono);
    font-size: 14px;
    line-height: 1.9;
    padding: 1px 6px;
    border-radius: 5px;
    white-space: pre-wrap;
    word-break: break-all;
}
.bl-line .ln { flex: 0 0 24px; text-align: right; color: var(--dim2); font-size: 12px; }
.bl-line .tx { flex: 1 1 auto; }
.bl-line.ok   { color: rgba(163, 230, 53, .92); }
.bl-line.auto { color: rgba(125, 249, 255, .85); background: rgba(0, 229, 255, .06); }
.bl-line.wrong { color: var(--red); background: rgba(248, 113, 113, .10); text-decoration: line-through; }

.bl-cur {
    display: flex;
    gap: 10px;
    align-items: center;
    font-family: var(--mono);
    font-size: 15px;
    line-height: 2.2;
    padding: 6px 8px;
    border-radius: 8px;
    border: 1px solid rgba(125, 249, 255, .45);
    background: rgba(0, 229, 255, .07);
    box-shadow: 0 0 18px rgba(125, 249, 255, .18);
}
.bl-cur .ln { flex: 0 0 24px; text-align: right; color: var(--ice); font-size: 12px; }
.bl-cur .tx { flex: 1 1 auto; display: flex; align-items: center; }
.bl-caret {
    color: #FDE047;
    font-size: 18px;
    animation: caretBlink .9s step-end infinite;
    text-shadow: 0 0 12px rgba(253, 224, 71, .9);
}
@keyframes caretBlink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: .15; } }
.bl-input {
    flex: 1 1 auto;
    min-width: 0;
    background: transparent;
    border: none;
    outline: none;
    color: #E6F6FF;
    font-family: var(--mono);
    font-size: 15px;
    caret-color: #FDE047;
    padding: 0 4px;
}
.bl-tip { margin-top: 8px; font-size: 12.5px; color: var(--dim); }
.bl-tip b { color: var(--gold); }
.bl-fin {
    margin: 18px 0;
    text-align: center;
    font-size: 18px;
    color: var(--lime);
    font-weight: 700;
}

.bl-side {
    flex: 0 0 190px;
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(0, 229, 255, .05);
}
.bl-stat {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 13px;
    color: var(--dim);
    font-family: var(--mono);
}
.bl-stat b { font-size: 16px; color: var(--gold); }
.bl-prog { text-align: center; font-size: 13px; color: var(--ice); padding: 4px 0 2px; }
.bl-auto-btn {
    cursor: pointer;
    padding: 11px 8px;
    border-radius: 10px;
    border: 1px solid rgba(251, 191, 36, .6);
    background: linear-gradient(180deg, rgba(251, 191, 36, .28), rgba(251, 191, 36, .1));
    color: #FDE047;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
}
.bl-auto-btn:active { transform: scale(.96); }
.bl-giveup {
    cursor: pointer;
    padding: 8px;
    border-radius: 9px;
    border: 1px solid rgba(148, 163, 184, .3);
    background: transparent;
    color: var(--dim);
    font-size: 13px;
    font-family: inherit;
}
@media (max-width: 680px) {
    .bl-wrap { flex-direction: column; }
    .bl-side { flex: 1 1 auto; width: 100%; flex-direction: row; flex-wrap: wrap; }
    .bl-stat { flex: 1 1 30%; }
    .bl-line, .bl-input { font-size: 12px; }
}
/* 盲打：复制代码按钮 */
.bl-copy-btn {
    cursor: pointer;
    padding: 9px 8px;
    border-radius: 9px;
    border: 1px solid rgba(125, 249, 255, .45);
    background: rgba(0, 229, 255, .10);
    color: var(--ice);
    font-size: 13px;
    font-family: inherit;
}
.bl-copy-btn:active { transform: scale(.96); }
/* 盲打：提交按钮（原「放弃」位置） */
.bl-submit-btn {
    cursor: pointer;
    padding: 11px 8px;
    border-radius: 10px;
    border: 1px solid rgba(163, 230, 53, .65);
    background: linear-gradient(180deg, rgba(163, 230, 53, .30), rgba(163, 230, 53, .10));
    color: #D9F99D;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
}
.bl-submit-btn:active { transform: scale(.96); }
/* 盲打榜：零补全标记 / 补全次数 */
.rank-nofill {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 6px;
    border-radius: 999px;
    font-size: 10.5px;
    background: rgba(163, 230, 53, .22);
    color: #D9F99D;
    border: 1px solid rgba(163, 230, 53, .45);
}
.rank-time em { font-style: normal; font-size: 11px; color: var(--dim); margin-left: 4px; }
/* 盲打：顶部只读的函数签名（孩子知道在打哪个函数，但不用打它） */
.bl-sig {
    display: flex;
    gap: 10px;
    font-family: var(--mono);
    font-size: 15px;
    line-height: 2;
    padding: 4px 8px;
    margin-bottom: 4px;
    border-radius: 8px;
    background: rgba(125, 249, 255, .08);
    border-left: 3px solid var(--ice2);
    color: var(--ice);
    white-space: pre-wrap;
    word-break: break-all;
}
.bl-sig .ln { flex: 0 0 24px; text-align: right; color: var(--dim2); font-size: 12px; }
.bl-sig .tx { flex: 1 1 auto; }
/* 盲打：提交错的行，下面显示"正确：原代码"（照着核对，不用再打第二次） */
.bl-line.fix {
    color: rgba(163, 230, 53, .9);
    background: rgba(163, 230, 53, .07);
    font-size: 13px;
    margin-top: -2px;
    margin-bottom: 3px;
}
.bl-line.fix .ln { color: rgba(163, 230, 53, .6); font-size: 11px; }