/* ============================================================
 * dapanz cyber system · 全站样式
 * 设计文档 v0.3 §6 视觉规范
 *   - 背景 #05080a（深黑） + 微噪点
 *   - 主色 #00ff41（绿）/ 强调 #00e5ff（青）/ 警告 #ff2e2e / 琥珀 #ffb000
 *   - 等宽字体栈 JetBrains Mono / Fira Code / Consolas / monospace
 *   - 扫描线 CRT 默认开；body.cyber-classic 关闭
 *   - 文字 glow、blink 光标、输入聚焦 glow
 *   - 桌面 96vw × 92vh 终端；移动 13px 占满视口
 *   - 尊重 prefers-reduced-motion
 * ============================================================ */

:root {
    --bg: #05080a;
    --bg-soft: #0a1014;
    --bg-line: #0f1a1f;
    --fg: #00ff41;
    --fg-soft: #5fb37a;
    --accent: #00e5ff;
    --accent2: #00ff88;
    --warn: #ff2e2e;
    --amber: #ffb000;
    --dim: #1f3a2a;

    --glow-a: rgba(0, 229, 255, 0.05);
    --glow-b: rgba(0, 255, 65, 0.04);

    --terminal-bg: rgba(5, 8, 10, 0.92);
    --terminal-border: #1a3024;
    --terminal-glow: 0 0 22px rgba(0, 255, 65, 0.18), 0 0 60px rgba(0, 255, 65, 0.06);
    --header-bg: linear-gradient(180deg, #0d1714 0%, #0a1210 100%);
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.55);

    --mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Source Code Pro', Consolas,
            'DejaVu Sans Mono', 'PingFang SC', 'Microsoft YaHei', monospace;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    width: 100%;
    background: var(--bg);
    color: var(--fg);
    font-family: var(--mono);
    font-size: 14px;
    line-height: 1.55;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-font-smoothing: antialiased;
}

body {
    position: relative;
    background:
        radial-gradient(ellipse at top, var(--glow-a), transparent 60%),
        radial-gradient(ellipse at bottom, var(--glow-b), transparent 60%),
        var(--bg);
}

/* ---------- 噪点纹理 ---------- */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.04;
    z-index: 1;
    background-image:
        radial-gradient(rgba(255,255,255,0.7) 1px, transparent 1px);
    background-size: 3px 3px;
    mix-blend-mode: screen;
}

/* ---------- 扫描线 CRT 效果 ---------- */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    background:
        repeating-linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0) 0,
            rgba(0, 0, 0, 0) 2px,
            rgba(0, 255, 65, 0.025) 3px,
            rgba(0, 0, 0, 0) 4px
        );
    mix-blend-mode: screen;
    animation: scan-drift 8s linear infinite;
}

body.cyber-classic::after {
    display: none;
}

@keyframes scan-drift {
    from { background-position: 0 0; }
    to   { background-position: 0 100px; }
}

/* ---------- 终端窗口 ---------- */

.terminal {
    position: relative;
    z-index: 5;
    width: 96vw;
    min-height: 92vh;
    margin: 4vh auto 4vh;
    background: var(--terminal-bg);
    border: 1px solid var(--terminal-border);
    border-radius: 10px;
    box-shadow: var(--shadow), var(--terminal-glow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    backdrop-filter: blur(2px);
}

/* 顶部 logo + 标题栏（v0.7：取代原三键假窗口控件） */
.terminal-header {
    flex: 0 0 auto;
    background: var(--header-bg);
    border-bottom: 1px solid var(--terminal-border);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    user-select: none;
}

.terminal-logo {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 4px;
    color: var(--accent);
    font-family: var(--mono);
    font-size: 13px;
    letter-spacing: 0.6px;
    user-select: none;
    text-shadow: 0 0 6px rgba(0, 229, 255, 0.4);
}

.terminal-logo .logo-glyph {
    color: var(--fg);
    opacity: 0.85;
    font-size: 12px;
    text-shadow: 0 0 4px rgba(0, 255, 65, 0.5);
    animation: logo-pulse 2.4s ease-in-out infinite;
}

.terminal-logo .logo-text {
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
}

@keyframes logo-pulse {
    0%, 100% { opacity: 0.85; }
    50%      { opacity: 1; text-shadow: 0 0 8px rgba(0, 255, 65, 0.8); }
}

.terminal-title {
    flex: 1;
    text-align: center;
    color: var(--fg-soft);
    font-size: 13px;
    letter-spacing: 0.5px;
}

.terminal-title .user    { color: var(--accent); }
.terminal-title .colon   { color: var(--dim); margin: 0 4px; }
.terminal-title .path    { color: var(--fg); }

/* 输出区 */
.terminal-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 16px 22px;
    scroll-behavior: smooth;
}

.terminal-body::-webkit-scrollbar {
    width: 8px;
}
.terminal-body::-webkit-scrollbar-thumb {
    background: var(--dim);
    border-radius: 4px;
}
.terminal-body::-webkit-scrollbar-track {
    background: transparent;
}

.line {
    white-space: pre-wrap;
    word-break: break-word;
    margin: 2px 0;
    color: var(--fg);
    text-shadow: 0 0 6px rgba(0, 255, 65, 0.4);
}

.line.echo {
    color: var(--accent);
    text-shadow: 0 0 6px rgba(0, 229, 255, 0.35);
}

.line.echo::before {
    content: '$ ';
    color: var(--fg);
    opacity: 0.85;
}

.line.error {
    color: var(--warn);
    text-shadow: 0 0 6px rgba(255, 46, 46, 0.45);
}

.line.warn {
    color: var(--amber);
    text-shadow: 0 0 6px rgba(255, 176, 0, 0.45);
}

.line.dim {
    color: var(--fg-soft);
    text-shadow: none;
}

.line.muted {
    color: var(--dim);
    text-shadow: none;
}

.line.line-trim-hint {
    color: var(--fg-soft);
    font-style: italic;
    opacity: 0.7;
    text-shadow: none;
}

.line.blog-title {
    color: var(--accent);
    font-weight: bold;
    margin-top: 8px;
}

/* markdown 风格：渲染在 .rendered 内 */
.rendered {
    color: var(--fg);
    text-shadow: 0 0 5px rgba(0, 255, 65, 0.25);
    line-height: 1.7;
    padding: 4px 0;
}

.rendered h1, .rendered h2, .rendered h3, .rendered h4 {
    color: var(--accent);
    text-shadow: 0 0 8px rgba(0, 229, 255, 0.4);
    margin: 14px 0 6px;
    font-weight: bold;
}

.rendered h1 { font-size: 1.4em; }
.rendered h2 { font-size: 1.2em; }
.rendered h3 { font-size: 1.08em; }
.rendered h4 { font-size: 1.0em; }

.rendered p { margin: 8px 0; }

.rendered blockquote {
    margin: 8px 0;
    padding: 6px 14px;
    border-left: 3px solid var(--accent);
    color: var(--fg-soft);
    background: rgba(0, 229, 255, 0.04);
}

.rendered code {
    background: rgba(0, 255, 65, 0.08);
    color: var(--fg);
    padding: 1px 6px;
    border-radius: 3px;
    font-family: var(--mono);
}

.rendered pre {
    background: var(--bg-soft);
    border: 1px solid var(--terminal-border);
    border-radius: 6px;
    padding: 10px 14px;
    overflow-x: auto;
    margin: 8px 0;
}

.rendered pre code {
    background: transparent;
    padding: 0;
}

.rendered ul, .rendered ol {
    margin: 6px 0;
    padding-left: 24px;
}

.rendered li { margin: 3px 0; }

.rendered a {
    color: var(--accent);
    text-decoration: underline dotted;
}

.rendered a:hover {
    color: var(--fg);
    text-shadow: 0 0 8px rgba(0, 229, 255, 0.6);
}

.rendered strong { color: var(--amber); }
.rendered em     { color: var(--fg-soft); }

/* 类型条 */
.line .tag {
    display: inline-block;
    padding: 0 6px;
    margin-right: 6px;
    background: rgba(0, 229, 255, 0.12);
    border: 1px solid rgba(0, 229, 255, 0.35);
    border-radius: 3px;
    color: var(--accent);
    font-size: 12px;
}

/* 输入行 */
.terminal-input-line {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    padding: 10px 22px 14px;
    border-top: 1px solid var(--terminal-border);
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0, 255, 65, 0.02) 100%);
    position: relative;
}

.terminal-input-line .prompt {
    color: var(--accent);
    margin-right: 8px;
    text-shadow: 0 0 6px rgba(0, 229, 255, 0.45);
    user-select: none;
    font-weight: bold;
}

.terminal-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--fg);
    font-family: var(--mono);
    font-size: inherit;
    caret-color: var(--fg);
    text-shadow: 0 0 5px rgba(0, 255, 65, 0.45);
    padding: 2px 0;
}

.terminal-input::selection {
    background: var(--accent);
    color: var(--bg);
}

/* 聚焦 glow */
.terminal-input-line.focused {
    box-shadow: inset 0 0 18px rgba(0, 255, 65, 0.08);
}

/* 光标 blink（当 input 为空时显示一个不可见占位字符闪烁） */
.cursor-blink::after {
    content: '▌';
    color: var(--fg);
    text-shadow: 0 0 8px rgba(0, 255, 65, 0.65);
    animation: blink 1s steps(2, start) infinite;
    margin-left: 1px;
}

@keyframes blink {
    to { visibility: hidden; }
}

/* 快捷命令条（v0.10.9） */
.terminal-quick {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 7px 22px;
    border-top: 1px solid rgba(0, 229, 255, 0.08);
    background: rgba(0, 0, 0, 0.22);
    font-size: 12px;
}
.terminal-quick .quick-label {
    color: var(--fg-soft);
    opacity: 0.75;
    margin-right: 2px;
    user-select: none;
    letter-spacing: 0.5px;
}
.terminal-quick .quick-btn {
    padding: 2px 12px;
    border: 1px solid var(--terminal-border);
    border-radius: 10px;
    color: var(--accent);
    text-decoration: none;
    background: rgba(0, 229, 255, 0.04);
    transition: color 0.15s, border-color 0.15s, background 0.15s, text-shadow 0.15s;
    -webkit-tap-highlight-color: rgba(0, 229, 255, 0.18);
}
.terminal-quick .quick-btn:hover,
.terminal-quick .quick-btn:focus {
    color: var(--fg);
    border-color: rgba(0, 229, 255, 0.5);
    background: rgba(0, 229, 255, 0.1);
    text-shadow: 0 0 8px rgba(0, 229, 255, 0.55);
    outline: none;
}
.terminal-quick .quick-btn:active {
    color: var(--amber);
    border-color: rgba(255, 176, 0, 0.5);
    background: rgba(255, 176, 0, 0.08);
}

/* 状态栏 */
.terminal-status {
    flex: 0 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 22px;
    border-top: 1px solid var(--terminal-border);
    background: rgba(0, 0, 0, 0.35);
    font-size: 11.5px;
    color: var(--fg-soft);
    letter-spacing: 0.4px;
}

.terminal-status .left,
.terminal-status .right {
    display: flex;
    gap: 16px;
}

.terminal-status .pill {
    padding: 1px 8px;
    border: 1px solid var(--terminal-border);
    border-radius: 10px;
    color: var(--fg-soft);
    background: rgba(0, 255, 65, 0.03);
}

.terminal-status .pill.ok    { color: var(--fg);     border-color: rgba(0, 255, 65, 0.35); }
.terminal-status .pill.guest { color: var(--accent); border-color: rgba(0, 229, 255, 0.35); }
.terminal-status .pill.warn  { color: var(--amber);  border-color: rgba(255, 176, 0, 0.45); }

/* 提示按钮条（登录遮罩、命令面板） */
.modal {
    position: absolute;
    inset: 0;
    background: rgba(5, 8, 10, 0.78);
    backdrop-filter: blur(3px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 20;
}

.modal.open { display: flex; }

.modal-panel {
    width: min(440px, 90vw);
    background: var(--bg-soft);
    border: 1px solid var(--accent);
    border-radius: 8px;
    padding: 18px 20px;
    box-shadow: 0 0 30px rgba(0, 229, 255, 0.15);
}

.modal-panel h3 {
    margin: 0 0 12px;
    color: var(--accent);
    font-size: 1.05em;
    letter-spacing: 0.6px;
}

.modal-panel .row {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    align-items: center;
}

.modal-panel label {
    width: 80px;
    color: var(--fg-soft);
    font-size: 12px;
}

.modal-panel input {
    flex: 1;
    background: var(--bg);
    color: var(--fg);
    border: 1px solid var(--terminal-border);
    border-radius: 4px;
    padding: 6px 10px;
    font-family: var(--mono);
    font-size: 13px;
    outline: none;
}

.modal-panel input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 8px rgba(0, 229, 255, 0.4);
}

.modal-panel .actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 12px;
}

.modal-panel button {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 5px 14px;
    border-radius: 4px;
    font-family: var(--mono);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
}

.modal-panel button:hover {
    background: rgba(0, 229, 255, 0.1);
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.35);
}

.modal-panel button.primary {
    border-color: var(--fg);
    color: var(--fg);
}

.modal-panel button.primary:hover {
    background: rgba(0, 255, 65, 0.1);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.35);
}

.modal-hint {
    color: var(--fg-soft);
    font-size: 12px;
    margin-bottom: 8px;
}

.modal-error {
    color: var(--warn);
    font-size: 12px;
    min-height: 1em;
    margin-top: 4px;
}

/* 登录 modal 上下文行（时间 + 当前 IP） */
.login-context {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 6px;
    padding: 0 2px;
    font-size: 11px;
    letter-spacing: 0.3px;
    opacity: 0.85;
}

.login-context .login-time {
    color: var(--fg-soft);
    font-family: var(--mono);
}

.login-context .login-ip {
    color: var(--accent);
    font-family: var(--mono);
}

.login-context .login-ip #login-ip {
    color: var(--fg);
    opacity: 0.9;
}

/* 全屏覆盖层：matrix 雨 / hack 模拟 */
.overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 30;
    display: none;
    overflow: hidden;
}

.overlay.open { display: block; }

.overlay canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.overlay .overlay-title {
    position: absolute;
    top: 16px;
    left: 22px;
    color: var(--fg);
    text-shadow: 0 0 8px rgba(0, 255, 65, 0.6);
    font-size: 14px;
    letter-spacing: 0.6px;
    z-index: 2;
}

.overlay .overlay-hint {
    position: absolute;
    bottom: 16px;
    right: 22px;
    color: var(--fg-soft);
    font-size: 12px;
    z-index: 2;
}

.overlay.hack .overlay-content {
    position: absolute;
    inset: 50px 22px 50px;
    overflow: auto;
    color: var(--fg);
    font-size: 14px;
    line-height: 1.7;
    text-shadow: 0 0 6px rgba(0, 255, 65, 0.4);
    z-index: 2;
}

.overlay.hack .overlay-content .ln { white-space: pre; }

/* blog 文章列表条目 */
.blog-list-item {
    display: flex;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px dashed var(--terminal-border);
    align-items: baseline;
    flex-wrap: wrap;
}

.blog-list-item .bidx {
    color: var(--accent);
    width: 38px;
    text-align: right;
    flex: 0 0 auto;
}

.blog-list-item .btitle {
    flex: 1;
    color: var(--fg);
    min-width: 0;
}

.blog-list-item .btime {
    color: var(--fg-soft);
    font-size: 12px;
    flex: 0 0 auto;
}

.blog-list-item .btype {
    padding: 0 6px;
    background: rgba(0, 229, 255, 0.1);
    border: 1px solid rgba(0, 229, 255, 0.35);
    color: var(--accent);
    border-radius: 3px;
    font-size: 11px;
}

.blog-list-pager {
    margin: 8px 0;
    color: var(--fg-soft);
    font-size: 12px;
    display: flex;
    gap: 14px;
}

.blog-list-pager .pager-cmd {
    color: var(--accent);
    text-decoration: underline dotted;
    cursor: pointer;
}

/* ---------- cyber-link（可点击锚点）---------- */
a.cyber-link,
span.cyber-link {
    color: var(--accent);
    text-decoration: underline dotted;
    cursor: pointer;
    transition: color 0.15s, text-shadow 0.15s, background 0.15s;
    padding: 0 2px;
    border-radius: 2px;
    -webkit-tap-highlight-color: rgba(0, 229, 255, 0.18);
}

a.cyber-link:hover,
span.cyber-link:hover,
a.cyber-link:focus,
span.cyber-link:focus {
    color: var(--fg);
    background: rgba(0, 229, 255, 0.08);
    text-shadow: 0 0 8px rgba(0, 229, 255, 0.55);
    outline: none;
}

a.cyber-link:active,
span.cyber-link:active {
    color: var(--amber);
    background: rgba(255, 176, 0, 0.1);
}

/* ls 模块列表（整行可点击） */
.ls-row {
    margin: 2px 0;
}

a.cyber-link > .ls-marker {
    display: inline-block;
    width: 36px;
    color: var(--accent);
}

a.cyber-link > .ls-key {
    display: inline-block;
    width: 100px;
    color: var(--fg);
    font-weight: bold;
}

a.cyber-link > .ls-title {
    display: inline-block;
    width: 170px;
    color: var(--accent);
}

a.cyber-link > .ls-desc {
    color: var(--fg-soft);
    font-size: 12px;
}

/* games 列表 */
.game-row {
    margin: 2px 0;
    border-bottom: 1px dashed var(--terminal-border);
}

a.cyber-link.game-link {
    display: flex;
    gap: 10px;
    align-items: baseline;
    flex-wrap: wrap;
}

a.cyber-link.game-link > .g-idx {
    width: 38px;
    text-align: right;
    color: var(--accent);
    flex: 0 0 auto;
}

a.cyber-link.game-link > .g-title {
    flex: 1 1 200px;
    color: var(--fg);
    min-width: 0;
}

a.cyber-link.game-link > .g-team {
    color: var(--fg-soft);
    font-size: 12px;
    flex: 0 0 auto;
}

a.cyber-link.game-link > .g-state {
    padding: 0 6px;
    border-radius: 3px;
    font-size: 11px;
    border: 1px solid var(--terminal-border);
    flex: 0 0 auto;
}

.g-state.state-released { color: #00ff41; border-color: rgba(0,255,65,0.4); background: rgba(0,255,65,0.08); }
.g-state.state-dev      { color: #00e5ff; border-color: rgba(0,229,255,0.4); background: rgba(0,229,255,0.08); }
.g-state.state-prep     { color: #ffb000; border-color: rgba(255,176,0,0.4); background: rgba(255,176,0,0.08); }
.g-state.state-paused   { color: #ff2e2e; border-color: rgba(255,46,46,0.4); background: rgba(255,46,46,0.08); }
.g-state.state-unknown  { color: var(--accent); }

.game-summery {
    color: var(--fg-soft);
    font-size: 12px;
    margin: 0 0 0 50px;
    padding: 2px 0 6px;
    border-bottom: 1px dashed var(--terminal-border);
}

/* games info 详情页 */
.game-detail {
    background: rgba(0, 229, 255, 0.04);
    border: 1px solid var(--terminal-border);
    border-radius: 6px;
    padding: 12px 16px;
    margin: 6px 0;
}

.game-detail .gd-row {
    display: flex;
    gap: 10px;
    padding: 4px 0;
    align-items: baseline;
}

.game-detail .gd-label {
    flex: 0 0 60px;
    color: var(--accent);
    text-shadow: 0 0 6px rgba(0, 229, 255, 0.4);
    font-size: 12px;
    letter-spacing: 1px;
}

.game-detail .gd-value {
    flex: 1;
    color: var(--fg);
    min-width: 0;
}

.game-detail .gd-name {
    color: var(--fg);
    font-weight: bold;
    text-shadow: 0 0 6px rgba(0, 255, 65, 0.4);
}

.game-detail .gd-content .gd-value {
    color: var(--fg-soft);
    font-size: 13px;
}

.gd-back {
    margin-top: 8px;
    font-size: 12px;
}

.action-sep {
    color: var(--dim);
    margin: 0 4px;
}

.boot-hint {
    margin-top: 8px;
    color: var(--accent);
}

/* 文章详情 */
.blog-read-meta {
    color: var(--fg-soft);
    font-size: 12px;
    margin: 4px 0 8px;
}

.blog-read-actions {
    margin-top: 10px;
    color: var(--accent);
    font-size: 12px;
}

/* 评论条目 */
.comment-item {
    padding: 8px 12px;
    border-left: 2px solid var(--accent);
    margin: 8px 0;
    background: rgba(0, 229, 255, 0.04);
}

.comment-item .cauthor {
    color: var(--accent);
    font-size: 12px;
}

.comment-item .ctime {
    color: var(--fg-soft);
    font-size: 11px;
    margin-left: 8px;
}

.comment-item .cbody {
    margin-top: 4px;
    color: var(--fg);
}

/* redirect 跳转提示 */
.line.redirect a {
    color: var(--accent);
    text-decoration: underline dotted;
}

.line.redirect a:hover {
    color: var(--fg);
}

/* ---------- 站点合规 footer（ICP / 公安备案） ---------- */
.cyber-footer {
    position: relative;
    z-index: 4;
    width: 96vw;
    margin: 0 auto 4vh;
    padding: 14px 18px 12px;
    border-top: 1px solid rgba(0, 229, 255, 0.08);
    color: #7a8a7a;
    font-family: var(--mono);
    font-size: 11.5px;
    line-height: 1.7;
    text-align: center;
    letter-spacing: 0.3px;
    text-shadow: none;
    user-select: text;
}

.cyber-footer-row {
    margin: 1px 0;
    color: #7a8a7a;
    text-shadow: none;
    word-break: break-word;
}

.cyber-footer-copy {
    color: #6f8270;
}

.cyber-footer-tagline {
    margin-top: 4px;
    color: #5a6a5a;
    font-size: 10.5px;
    letter-spacing: 0.6px;
    opacity: 0.85;
}

.cyber-footer-link {
    color: rgba(0, 229, 255, 0.75);
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-thickness: 1px;
    transition: color 120ms ease, text-shadow 120ms ease;
}

.cyber-footer-link:hover,
.cyber-footer-link:focus-visible {
    color: var(--accent);
    text-shadow: 0 0 6px rgba(0, 229, 255, 0.45);
    outline: none;
}

@media (prefers-reduced-motion: reduce) {
    .cyber-footer-link {
        transition: none;
    }
}

/* 备案盾牌小图标（公安备案） */
.cyber-footer-icon {
    display: inline-block;
    width: 14px;
    height: 14px;
    vertical-align: -2px;
    margin-right: 5px;
    border-radius: 2px;
    filter: drop-shadow(0 0 2px rgba(0, 229, 255, 0.30));
    transition: filter 120ms ease, transform 120ms ease;
}

a:hover .cyber-footer-icon,
a:focus-visible .cyber-footer-icon {
    filter: drop-shadow(0 0 4px rgba(0, 229, 255, 0.65));
    transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
    .cyber-footer-icon {
        transition: none;
    }
}

/* 响应式：移动端 */
@media (max-width: 720px) {
    html, body {
        font-size: 13px;
        overflow: auto;
    }
    .terminal {
        width: 100vw;
        height: 100vh;
        margin: 0;
        border-radius: 0;
        border: none;
    }
    body::before, body::after {
        display: none;
    }
    .terminal-body {
        padding: 12px 14px;
    }
    .terminal-input-line {
        padding: 8px 14px 12px;
    }
    .cyber-footer {
        width: 100vw;
        margin: 0;
        padding: 8px 10px 10px;
        font-size: 11px;
        border-top: 1px solid rgba(0, 229, 255, 0.08);
    }
    .cyber-footer-tagline {
        font-size: 10px;
    }
    .terminal-status .left .pill:nth-child(n+2) {
        display: none;
    }
    .terminal-status {
        padding: 4px 12px;
        font-size: 11px;
    }
    .modal-panel label {
        width: 64px;
    }
}

/* 较小高度 */
@media (max-height: 540px) {
    .terminal {
        height: 100vh;
        margin: 0;
        border-radius: 0;
        border: none;
    }
}

/* 减弱动效 */
@media (prefers-reduced-motion: reduce) {
    body::after {
        animation: none;
    }
    .cursor-blink::after {
        animation: none;
        opacity: 0.7;
    }
    .terminal-logo .logo-glyph {
        animation: none;
    }
    * {
        transition-duration: 0.01ms !important;
    }
}

/* 隐藏初始 banner 上的 favicon 抖动 */
::selection {
    background: var(--accent);
    color: var(--bg);
}
/* ============================================================
 * view.php 评论区（方案 B 2026-08-04，仅 blog 详情页）
 * 复用终端绿黑风格：.view-comment / .view-like / .view-comment-line 等
 * ============================================================ */
.view-comment {
    margin-top: 42px;
    padding-top: 22px;
    border-top: 1px dashed rgba(0, 229, 255, 0.25);
    font-family: var(--mono);
}

/* 顶栏：Like 按钮 + 评论输入行 */
.view-comment-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

/* Like 按钮 */
.view-like {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: rgba(0, 255, 65, 0.06);
    border: 1px solid rgba(0, 255, 65, 0.35);
    border-radius: 4px;
    color: #00ff41;
    font-family: var(--mono);
    font-size: 13px;
    letter-spacing: 0.4px;
    cursor: pointer;
    transition: all 120ms ease;
    text-shadow: 0 0 6px rgba(0, 255, 65, 0.35);
}
.view-like:hover:not(:disabled) {
    background: rgba(0, 255, 65, 0.12);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.35);
}
.view-like:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    border-color: rgba(0, 255, 65, 0.18);
}
.view-like .view-like-icon { color: #ff4d6d; }
.view-like .view-like-count { font-weight: bold; color: #00ff41; }
.view-like.liked {
    border-color: rgba(255, 77, 109, 0.45);
    color: #ff9dab;
    background: rgba(255, 77, 109, 0.06);
}
.view-like.liked .view-like-count { color: #ff9dab; }

/* Like 数字跳动动画 */
@keyframes view-like-pulse {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.6); color: #ff4d6d; text-shadow: 0 0 12px rgba(255, 77, 109, 0.9); }
    100% { transform: scale(1); }
}
.view-like-count.pulse {
    display: inline-block;
    animation: view-like-pulse 0.5s ease;
}

/* 评论输入行（主页终端输入行同款风格） */
.view-comment-form {
    flex: 1;
    min-width: 260px;
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0, 255, 65, 0.02) 100%);
    border: 1px solid var(--terminal-border);
    border-radius: 4px;
    transition: box-shadow 120ms ease;
}
.view-comment-form:focus-within {
    box-shadow: inset 0 0 18px rgba(0, 255, 65, 0.08);
}
.view-comment-prefix {
    color: var(--accent);
    margin-right: 8px;
    text-shadow: 0 0 6px rgba(0, 229, 255, 0.45);
    user-select: none;
    font-weight: bold;
    white-space: nowrap;
}
.view-comment-input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    outline: none;
    color: var(--fg);
    font-family: var(--mono);
    font-size: 13px;
    caret-color: var(--fg);
    text-shadow: 0 0 5px rgba(0, 255, 65, 0.45);
    padding: 2px 0;
}
.view-comment-input::selection { background: var(--accent); color: var(--bg); }
.view-comment-submit {
    margin-left: 10px;
    padding: 5px 14px;
    background: transparent;
    border: 1px solid rgba(0, 255, 65, 0.4);
    border-radius: 3px;
    color: #00ff41;
    font-family: var(--mono);
    font-size: 12.5px;
    letter-spacing: 0.4px;
    cursor: pointer;
    transition: all 120ms ease;
}
.view-comment-submit:hover {
    background: rgba(0, 255, 65, 0.12);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.35);
}

/* 评论区分隔标题 */
.view-comment-divider {
    color: #5a7a5a;
    font-size: 12px;
    letter-spacing: 0.5px;
    margin: 6px 0 10px;
    user-select: none;
}

/* 评论列表（新→旧） */
.view-comment-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.view-comment-line {
    font-size: 13px;
    line-height: 1.7;
    padding: 5px 0;
    border-bottom: 1px dashed rgba(0, 229, 255, 0.12);
    word-break: break-word;
}
.view-comment-line .vcl-time { color: #5a7a5a; font-size: 11.5px; margin-right: 6px; }
.view-comment-line .vcl-sep  { color: #3a5a3a; margin: 0 6px; }
.view-comment-line .vcl-content { color: #c8d8c8; }
.view-comment-empty {
    color: #5a7a5a;
    font-size: 12.5px;
    padding: 8px 0;
}

/* 终端内评论条目（cyber.js renderBlogComment，终端版保留作者名） */
.blog-comment-item {
    font-size: 13px;
    line-height: 1.7;
    padding: 4px 0;
    border-bottom: 1px dashed rgba(0, 229, 255, 0.10);
    word-break: break-word;
}
.blog-comment-item .bcmt-time   { color: #5a7a5a; font-size: 11.5px; margin-right: 8px; }
.blog-comment-item .bcmt-auther { color: #00e5ff; margin-right: 8px; }
.blog-comment-item .bcmt-content { color: #c8d8c8; }

/* ============================================================
 * v0.11 A 档纯前端升级（theme / boot / glitch / games / konami）
 * ============================================================ */

/* ---------- A3 主题：body[data-theme] 变量覆盖 ---------- */
body[data-theme="amber"] {
    --bg: #0d0803;
    --bg-soft: #161007;
    --bg-line: #241a0d;
    --fg: #ffb000;
    --fg-soft: #c9a05e;
    --accent: #ffd000;
    --accent2: #ff7a00;
    --warn: #ff3b3b;
    --amber: #ffb000;
    --dim: #4a3415;
    --terminal-bg: rgba(13, 8, 3, 0.94);
    --terminal-border: #3d2c12;
    --terminal-glow: 0 0 22px rgba(255, 176, 0, 0.20), 0 0 60px rgba(255, 176, 0, 0.07);
    --header-bg: linear-gradient(180deg, #1c1409 0%, #140e06 100%);
    --glow-a: rgba(255, 208, 0, 0.06);
    --glow-b: rgba(255, 122, 0, 0.05);
}
body[data-theme="blueice"] {
    --bg: #030810;
    --bg-soft: #071019;
    --bg-line: #0d1c2b;
    --fg: #7fd4ff;
    --fg-soft: #6fa3c4;
    --accent: #00e5ff;
    --accent2: #4da6ff;
    --warn: #ff5f5f;
    --amber: #ffc46b;
    --dim: #16324a;
    --terminal-bg: rgba(3, 8, 16, 0.94);
    --terminal-border: #16324a;
    --terminal-glow: 0 0 22px rgba(0, 229, 255, 0.20), 0 0 60px rgba(77, 166, 255, 0.08);
    --header-bg: linear-gradient(180deg, #0a1626 0%, #060e1a 100%);
    --glow-a: rgba(0, 229, 255, 0.06);
    --glow-b: rgba(77, 166, 255, 0.05);
}
body[data-theme="pinkneon"] {
    --bg: #0d0208;
    --bg-soft: #170710;
    --bg-line: #26101c;
    --fg: #ff4d6d;
    --fg-soft: #d48a9e;
    --accent: #ff9dab;
    --accent2: #ff2eaa;
    --warn: #ff2e5f;
    --amber: #ffb000;
    --dim: #461528;
    --terminal-bg: rgba(13, 2, 8, 0.94);
    --terminal-border: #3d1226;
    --terminal-glow: 0 0 22px rgba(255, 46, 170, 0.22), 0 0 60px rgba(255, 77, 109, 0.08);
    --header-bg: linear-gradient(180deg, #1d0a14 0%, #140610 100%);
    --glow-a: rgba(255, 46, 170, 0.07);
    --glow-b: rgba(255, 77, 109, 0.06);
}

/* ---------- A1 开机自检（终端内联版，2026-08-05 主上改版） ----------
 * 旧版：全屏覆盖层（boot-overlay）。主上令：去掉覆盖层，改为终端命令行内联输出。
 * boot 期间隐藏下方 UI（快捷条/输入行/状态栏），完成后偏移淡入。
 */
body.boot-pending .terminal-quick,
body.boot-pending .terminal-input-line,
body.boot-pending .terminal-status {
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
}
/* boot 完成：animation 独立播放（2026-08-05：reduced=true 时 transition 插值不可靠，改 keyframes）
 * bootRise 自带 from/to，不依赖 boot-pending 的旧值捕获，必播淡入上移。 */
body.boot-done .terminal-quick,
body.boot-done .terminal-input-line,
body.boot-done .terminal-status {
    opacity: 1;
    transform: translateY(0);
    animation: bootRise 0.45s ease both;
}
@keyframes bootRise {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
/* transition 常驻（兜底：非 reduced 环境平滑过渡） */
.terminal-quick,
.terminal-input-line,
.terminal-status {
    transition: opacity 0.45s ease, transform 0.45s ease;
}
.boot-line { color: var(--fg-soft); }
.boot-line.ok { color: var(--fg); text-shadow: 0 0 6px rgba(0, 255, 65, 0.4); }
.terminal-input:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* ---------- A4 Glitch 故障字（RGB 分离 + 偶发抖动） ---------- */
.terminal-logo .logo-text.glitch {
    position: relative;
    display: inline-block;
}
.terminal-logo .logo-text.glitch::before,
.terminal-logo .logo-text.glitch::after {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
}
.terminal-logo .logo-text.glitch::before {
    color: #ff2e2e;
    text-shadow: 2px 0 0 rgba(255, 46, 46, 0.9);
    animation: glitch-a 3.7s infinite steps(1);
}
.terminal-logo .logo-text.glitch::after {
    color: #00e5ff;
    text-shadow: -2px 0 0 rgba(0, 229, 255, 0.9);
    animation: glitch-b 4.3s infinite steps(1);
}
@keyframes glitch-a {
    0%, 88%, 100% { opacity: 0; transform: translate(0, 0); }
    90% { opacity: 0.85; transform: translate(-2px, 1px); }
    92% { opacity: 0.7; transform: translate(2px, -1px); }
    94% { opacity: 0; transform: translate(0, 0); }
    96% { opacity: 0.8; transform: translate(-1px, 2px); }
    98% { opacity: 0; transform: translate(0, 0); }
}
@keyframes glitch-b {
    0%, 90%, 100% { opacity: 0; transform: translate(0, 0); }
    92% { opacity: 0.8; transform: translate(2px, -1px); }
    94% { opacity: 0.7; transform: translate(-2px, 1px); }
    96% { opacity: 0; transform: translate(0, 0); }
    98% { opacity: 0.85; transform: translate(1px, -2px); }
}

/* ---------- A5 hack 彩蛋进度条 ---------- */
.hack-bar-label { color: var(--fg-soft); margin-right: 8px; }
.hack-bar { color: var(--accent); letter-spacing: 1px; }
.hack-bar-pct { color: var(--fg-soft); margin-left: 8px; }

/* ---------- A7 终端小游戏 ---------- */
.game-area {
    margin: 10px 0 14px;
    padding: 10px 12px;
    border: 1px dashed var(--terminal-border);
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.25);
    font-family: var(--mono);
    color: var(--fg);
    max-width: 680px;
}
.game-head {
    font-size: 12px;
    color: var(--fg-soft);
    margin-bottom: 8px;
    letter-spacing: 0.4px;
}
.game-board {
    margin: 0;
    font-size: 14px;
    line-height: 1.3;
    letter-spacing: 0;
    white-space: pre;
    color: var(--fg);
    text-shadow: 0 0 6px rgba(0, 255, 65, 0.35);
}
.game-score-line { font-size: 12px; color: var(--fg-soft); margin-top: 8px; }
.game-score { color: var(--accent); font-weight: bold; }
.game-over {
    margin-top: 8px;
    font-size: 13px;
    color: var(--warn);
    text-shadow: 0 0 6px rgba(255, 46, 46, 0.5);
}
.hidden { display: none; }

/* 2048 棋盘 */
.board-2048 {
    display: grid;
    grid-template-columns: repeat(4, 72px);
    gap: 6px;
    justify-content: start;
}
.tile {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    border: 1px solid var(--terminal-border);
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.35);
    color: var(--fg-soft);
    user-select: none;
    box-sizing: border-box;
}
.tile.t2, .tile.t4 { color: var(--fg); text-shadow: 0 0 6px rgba(0, 255, 65, 0.3); }
.tile.t8, .tile.t16 { color: var(--amber); text-shadow: 0 0 6px rgba(255, 176, 0, 0.3); }
.tile.t32, .tile.t64 { color: var(--accent2); text-shadow: 0 0 8px rgba(0, 229, 255, 0.35); }
.tile.t128, .tile.t256 { color: var(--accent); text-shadow: 0 0 10px rgba(0, 229, 255, 0.5); border-color: var(--accent); }
.tile.t512, .tile.t1024 {
    color: #fff;
    text-shadow: 0 0 12px rgba(255, 46, 170, 0.7);
    border-color: var(--accent2);
    background: rgba(255, 46, 170, 0.12);
}
.tile.t2048 {
    color: #fff;
    text-shadow: 0 0 14px rgba(255, 46, 46, 0.8);
    border-color: var(--warn);
    background: rgba(255, 46, 46, 0.15);
}

/* ---------- A8 say 语音朗读结果 ---------- */
.ok-text { color: var(--fg); text-shadow: 0 0 6px rgba(0, 255, 65, 0.45); }
.line.ok { color: var(--fg); text-shadow: 0 0 8px rgba(0, 255, 65, 0.7); }

/* ---------- A9 Konami 全屏彩蛋 ---------- */
.overlay.konami {
    position: fixed;
    inset: 0;
}
.overlay .konami-title {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    font-size: clamp(28px, 7vw, 72px);
    font-weight: 800;
    letter-spacing: 0.25em;
    color: var(--fg);
    text-shadow: 0 0 18px rgba(0, 255, 65, 0.9), 0 0 60px rgba(0, 229, 255, 0.6);
    animation: konami-pulse 2.2s ease-in-out infinite;
    pointer-events: none;
    user-select: none;
}
@keyframes konami-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(1.06); opacity: 0.85; }
}
.overlay.fade-out {
    opacity: 0;
    transition: opacity 0.8s ease;
}

/* 移动端适配 */
@media (max-width: 720px) {
    .board-2048 { grid-template-columns: repeat(4, 60px); gap: 4px; }
    .tile { width: 60px; height: 60px; font-size: 16px; }
    .game-board { font-size: 11px; }
}

/* 减弱动效 */
@media (prefers-reduced-motion: reduce) {
    .terminal-logo .logo-text.glitch::before,
    .terminal-logo .logo-text.glitch::after { animation: none; opacity: 0; }
    .overlay .konami-title { animation: none; }
}

/* ============================================================
   HACK GAME 彩蛋 · 专用样式
   ============================================================ */

/* 追踪进度条（底部常驻） */
.hack-track-bar-container {
    position: fixed;
    bottom: 48px;
    left: 0;
    right: 0;
    background: #0a0e14;
    border-top: 1px solid #1a3a1a;
    padding: 8px 16px;
    z-index: 50;
    font-family: 'Courier New', monospace;
    font-size: 13px;
}
.hack-track-bar {
    color: #33ff00;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    letter-spacing: 0.5px;
}
.hack-track-bar.critical {
    animation: blink-crit 0.5s infinite alternate;
}
@keyframes blink-crit {
    from { opacity: 1; }
    to   { opacity: 0.5; }
}
.track-label { color: #ffcc00; margin-right: 6px; }
.track-pct   { font-weight: bold; margin-left: 6px; }
.track-time  { margin-left: 8px; }

/* 端口项目（点击菜单） */
.hack-port-menu {
    margin: 4px 0;
    border: 1px solid #1a3a1a;
    padding: 4px 0;
}
.hack-port-item {
    padding: 3px 12px;
    cursor: pointer;
    transition: background 0.1s;
}
.hack-port-item:hover {
    background: #1a3a1a;
    color: #33ff00;
}
.port-num  { color: #ffcc00; }
.port-num2 { color: #ff8800; }
.port-name { color: #33ff00; }
.port-desc { font-size: 12px; }

/* 端口颜色标签 */
.port-ssh  { color: #00ccff; }
.port-db   { color: #ff66ff; }
.port-web  { color: #66ff66; }
.port-win  { color: #ff9933; }
.port-file { color: #cc99ff; }
.port-mail { color: #99ccff; }

/* 危险/成功/警告辅助类 */
.line.danger  { color: #ff3333; }
.line.success { color: #00ffcc; }
.line.accent  { color: #ffcc00; }
.line.warn    { color: #ffcc00; }

/* 节点切换按钮 */
.track-switch-btn {
    background: #0d1f0d;
    color: #33ff00;
    border: 1px solid #33ff00;
    padding: 3px 10px;
    cursor: pointer;
    font-size: 12px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    transition: background 0.15s;
}
.track-switch-btn:hover {
    background: #1a3a1a;
}

/* 结果页大字体 */
.result-big {
    font-size: 18px;
    letter-spacing: 2px;
}
