﻿/* ============================================================
   临时手机号 · 用户页样式（野兽派 / Brutalism）
   粗黑边框 · 硬阴影 · 高饱和撞色 · 等宽数字 · 零圆角
   ============================================================ */

:root {
    --ink: #000000;
    --paper: #f4efe2;
    --white: #ffffff;
    --yellow: #ffde00;
    --pink: #ff4f9a;
    --blue: #2e5cff;
    --green: #00c153;
    --red: #ff3b30;
    --gray: #8a8578;
    --mono: "Cascadia Mono", ui-monospace, Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: "Arial Black", "Microsoft YaHei", system-ui, sans-serif;
    background-color: var(--paper);
    background-image: repeating-linear-gradient(
        45deg, transparent 0 22px, rgba(0, 0, 0, .045) 22px 24px);
    min-height: 100vh;
    color: var(--ink);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}

/* ---------- 卡片容器：白盒 + 粗边 + 硬阴影 ---------- */
.card {
    background: var(--white);
    border: 3px solid var(--ink);
    box-shadow: 10px 10px 0 var(--ink);
    width: 100%;
    max-width: 480px;
    padding: 30px 28px;
}

/* ---------- 品牌区 ---------- */
.brand { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }

.brand-icon {
    width: 52px; height: 52px;
    border: 3px solid var(--ink);
    background: var(--yellow);
    box-shadow: 4px 4px 0 var(--ink);
    display: flex; align-items: center; justify-content: center;
    font-size: 26px;
    flex-shrink: 0;
}

.brand h1 {
    font-size: 24px; font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.15;
}

.brand-sub {
    font-family: var(--mono);
    font-size: 11px; color: var(--ink);
    margin-top: 5px; letter-spacing: 2px;
    background: var(--ink); color: var(--paper);
    display: inline-block; padding: 2px 8px;
}

/* ---------- 表单 ---------- */
.field-label {
    display: block;
    font-size: 12px; font-weight: 900;
    text-transform: uppercase; letter-spacing: 2px;
    margin-bottom: 8px;
}

.input-row { display: flex; gap: 10px; }

input[type="text"], input[type="password"], input[type="number"] {
    flex: 1; min-width: 0;
    padding: 12px 14px;
    border: 3px solid var(--ink);
    border-radius: 0;
    font-family: var(--mono);
    font-size: 15px; font-weight: 700;
    color: var(--ink);
    outline: none;
    background: var(--white);
    transition: background .1s, box-shadow .1s;
}

input:focus {
    background: var(--yellow);
    box-shadow: 4px 4px 0 var(--ink);
}

.hint {
    font-family: var(--mono);
    font-size: 12px; color: var(--gray);
    margin-top: 12px; line-height: 1.7;
}

/* ---------- 按钮：硬阴影按压交互 ---------- */
.btn {
    padding: 11px 20px;
    border: 3px solid var(--ink);
    border-radius: 0;
    font-family: inherit;
    font-size: 14px; font-weight: 900;
    text-transform: uppercase; letter-spacing: 1px;
    cursor: pointer;
    white-space: nowrap;
    min-height: 44px;
    background: var(--white);
    color: var(--ink);
    box-shadow: 5px 5px 0 var(--ink);
    transition: transform .08s, box-shadow .08s, background .1s;
}

.btn:active:not(:disabled) {
    transform: translate(5px, 5px);
    box-shadow: 0 0 0 var(--ink);
}

.btn:disabled { opacity: .4; cursor: not-allowed; box-shadow: 5px 5px 0 var(--ink); }

.btn-primary { background: var(--yellow); }
.btn-primary:hover:not(:disabled) { background: #ffe94d; }

.btn-swap { background: var(--pink); }
.btn-swap:hover:not(:disabled) { background: #ff6cab; }

.btn-outline { background: var(--white); }
.btn-outline:hover:not(:disabled) { background: #efece2; }

.btn-lg { width: 100%; padding: 15px; font-size: 16px; min-height: 52px; }

/* 加载态：黑色旋转方块 */
.btn-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn-loading::after {
    content: ""; position: absolute; top: 50%; left: 50%;
    width: 16px; height: 16px; margin: -8px 0 0 -8px;
    border: 3px solid var(--ink);
    animation: brutspin .6s steps(4) infinite;
}
@keyframes brutspin { to { transform: rotate(360deg); } }

/* ---------- 状态面板 ---------- */
#panel { animation: fadeUp .25s steps(5); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; } }

.stats { display: flex; gap: 14px; margin-bottom: 22px; }

.stat {
    flex: 1; text-align: center;
    background: var(--white);
    border: 3px solid var(--ink);
    box-shadow: 5px 5px 0 var(--ink);
    padding: 14px 8px 12px;
}

.stat-v {
    font-family: var(--mono);
    font-size: 24px; font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--ink);
}

.stat-v.warn { background: var(--yellow); display: inline-block; padding: 0 6px; }
.stat-v.danger { background: var(--red); color: var(--white); display: inline-block; padding: 0 6px; }

.stat-l {
    font-size: 11px; font-weight: 900;
    text-transform: uppercase; letter-spacing: 1px;
    color: var(--gray); margin-top: 5px;
}

/* ---------- 号码卡：黑底黄字视觉核心 ---------- */
.phone-card {
    position: relative;
    background: var(--ink);
    border: 3px solid var(--ink);
    box-shadow: 8px 8px 0 var(--yellow), 8px 8px 0 3px var(--ink);
    padding: 28px 20px;
    text-align: center;
    margin: 4px 4px 26px;
}

/* 装饰图章 */
.stamp {
    position: absolute; top: -14px; right: -10px;
    transform: rotate(6deg);
    background: var(--pink);
    border: 3px solid var(--ink);
    color: var(--ink);
    font-family: var(--mono); font-size: 11px; font-weight: 700;
    letter-spacing: 2px;
    padding: 3px 10px;
}

.phone-label {
    font-family: var(--mono);
    font-size: 11px; color: var(--yellow);
    letter-spacing: 5px; margin-bottom: 12px;
}

.phone-num-row {
    display: flex; align-items: center; justify-content: center; gap: 12px;
}

.phone-num {
    font-family: var(--mono);
    font-variant-numeric: tabular-nums;
    font-size: 34px; font-weight: 700;
    letter-spacing: 2px;
    color: var(--yellow);
    word-break: break-all;
    line-height: 1.2;
}

.phone-num.empty { color: #56534a; font-size: 26px; letter-spacing: 8px; }

.copy-btn {
    background: var(--white);
    border: 3px solid var(--ink);
    color: var(--ink);
    border-radius: 0;
    padding: 5px 12px;
    font-family: inherit; font-size: 12px; font-weight: 900;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 3px 3px 0 var(--yellow), 3px 3px 0 3px var(--ink);
    transition: transform .08s, box-shadow .08s;
    flex-shrink: 0;
}
.copy-btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }

.phone-meta {
    font-family: var(--mono);
    font-size: 13px; color: #bdb9ae;
    margin-top: 14px;
}

/* ---------- 操作区 ---------- */
.actions { display: flex; flex-direction: column; gap: 12px; }

/* ---------- 使用规则 ---------- */
.rules {
    margin-top: 24px; padding-top: 18px;
    border-top: 3px dashed var(--ink);
    list-style: none;
}

.rules li {
    font-family: var(--mono);
    font-size: 12px; color: #56534a;
    line-height: 2;
    padding-left: 20px; position: relative;
}

.rules li::before { content: "■"; position: absolute; left: 0; color: var(--ink); }

/* ---------- Toast：黑条黄字 ---------- */
.toast {
    position: fixed; top: 24px; left: 50%;
    transform: translateX(-50%);
    max-width: calc(100vw - 40px);
    padding: 12px 22px;
    border: 3px solid var(--ink);
    border-radius: 0;
    font-family: var(--mono);
    font-size: 13px; font-weight: 700;
    box-shadow: 6px 6px 0 var(--ink);
    z-index: 999;
    animation: toastIn .2s steps(4);
    word-break: break-all;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, -10px); } to { opacity: 1; transform: translate(-50%, 0); } }

.toast.ok { background: var(--ink); color: var(--yellow); }
.toast.err { background: var(--red); color: var(--white); }

/* ---------- 页脚 ---------- */
.page-footer {
    margin-top: 28px;
    font-family: var(--mono);
    font-size: 11px; color: var(--ink);
    letter-spacing: 3px; text-transform: uppercase;
}

/* ---------- 响应式 ---------- */
@media (max-width: 560px) {
    body { padding: 16px 10px; }
    .card { padding: 22px 18px; box-shadow: 7px 7px 0 var(--ink); }
    .brand h1 { font-size: 20px; }
    .phone-num { font-size: 26px; }
    .btn { padding: 12px 14px; }
}

/* ---------- 会话状态条（认证体系） ---------- */
.session-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 10px 12px;
    border: 3px solid var(--ink);
    background: var(--yellow);
    box-shadow: 4px 4px 0 var(--ink);
}

.session-dot {
    width: 10px; height: 10px;
    background: var(--green);
    border: 2px solid var(--ink);
    flex-shrink: 0;
}

.session-text {
    font-family: var(--mono);
    font-size: 12px; font-weight: 700;
    letter-spacing: 1px;
    flex: 1;
}

.btn-logout {
    padding: 6px 14px;
    border: 3px solid var(--ink);
    border-radius: 0;
    background: var(--white);
    font-family: inherit;
    font-size: 12px; font-weight: 900;
    text-transform: uppercase; letter-spacing: 1px;
    cursor: pointer;
    transition: transform .05s;
}

.btn-logout:active { transform: translate(2px, 2px); box-shadow: none; }

/* ---------- hidden 属性全局保障 ----------
   部分 display 样式（如 .login-overlay 的 flex）会覆盖 UA 对 [hidden] 的 display:none，
   导致隐藏失效（登录遮罩挡住界面/按钮不可点）。此规则强制 hidden 优先。 */
[hidden] { display: none !important; }
