/* ============================================================
   实时请求大屏 - 全局样式 (自适应手机/PC)
   ============================================================ */
:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --cyan: #00e0ff;
    --bg: #f4f6fb;
    --card: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #e5e7eb;
    --danger: #ef4444;
    --success: #10b981;
    --radius: 12px;
    --shadow: 0 4px 20px rgba(0, 0, 0, .06);
    --nav-h: 64px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: none; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* ---------- 导航栏 ---------- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--nav-h);
    background: rgba(255, 255, 255, .9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}
.navbar .inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 20px;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}
.brand .logo {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
}
.nav-links { display: flex; align-items: center; gap: 18px; }
.nav-links a { color: var(--muted); font-size: 14px; }
.nav-links a:hover { color: var(--primary); }
.nav-user { display: flex; align-items: center; gap: 12px; }

/* ---------- 按钮 ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
    line-height: 1.4;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-outline { background: #fff; color: var(--text); border-color: var(--border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger { background: #fff; color: var(--danger); border-color: #fecaca; }
.btn-danger:hover { background: #fef2f2; }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--text); }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
.input, select.input, textarea.input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 11px 14px;
    font-size: 14px;
    color: var(--text);
    background: #fff;
    transition: border .2s, box-shadow .2s;
    font-family: inherit;
}
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.input:disabled { background: #f9fafb; color: var(--muted); }
.hint { font-size: 12px; color: var(--muted); margin-top: 5px; }
.error-text { font-size: 13px; color: var(--danger); margin-top: 6px; min-height: 1em; }

/* ---------- 卡片 ---------- */
.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px;
}
.card-title { font-size: 18px; font-weight: 700; margin: 0 0 6px; }
.card-sub { font-size: 13px; color: var(--muted); margin: 0 0 22px; }

/* ---------- 认证页布局 ---------- */
.auth-wrap {
    min-height: calc(100vh - var(--nav-h));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}
.auth-card { width: 100%; max-width: 420px; }

/* ---------- 落地页 ---------- */
.hero {
    text-align: center;
    padding: 70px 20px 50px;
    background: linear-gradient(180deg, #eef4ff 0%, var(--bg) 100%);
}
.hero h1 { font-size: 40px; margin: 0 0 16px; letter-spacing: -1px; }
.hero p { font-size: 17px; color: var(--muted); max-width: 620px; margin: 0 auto 30px; line-height: 1.7; }
.hero .cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.features { padding: 50px 20px 70px; }
.features h2 { text-align: center; font-size: 26px; margin-bottom: 36px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feat {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 26px;
}
.feat .icon { font-size: 30px; margin-bottom: 14px; }
.feat h3 { font-size: 17px; margin: 0 0 10px; }
.feat p { font-size: 14px; color: var(--muted); margin: 0; line-height: 1.7; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; font-size: 13px; white-space: nowrap; }
td { vertical-align: middle; }
.tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.tag-green { background: #d1fae5; color: #047857; }
.tag-gray { background: #f3f4f6; color: #6b7280; }
.tag-red { background: #fee2e2; color: #b91c1c; }
.tag-blue { background: #dbeafe; color: #1d4ed8; }

/* ---------- 代码块 ---------- */
.code-box {
    position: relative;
    background: #0b1220;
    color: #c9d7f1;
    border-radius: 8px;
    padding: 16px;
    font-family: "JetBrains Mono", Consolas, monospace;
    font-size: 13px;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
    line-height: 1.6;
}
.copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 5px 12px;
    font-size: 12px;
    cursor: pointer;
}
.copy-btn:hover { background: rgba(255, 255, 255, .22); }

/* ---------- 统计数字 ---------- */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
}
.stat .num { font-size: 26px; font-weight: 800; color: var(--primary); }
.stat .lbl { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* ---------- Toast ---------- */
#toast-wrap {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}
.toast {
    background: #1f2937;
    color: #fff;
    padding: 11px 22px;
    border-radius: 8px;
    font-size: 14px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .2);
    animation: toastIn .25s ease;
    max-width: 90vw;
}
.toast.success { background: #059669; }
.toast.error { background: #dc2626; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
    .grid { grid-template-columns: 1fr; }
    .stat-row { grid-template-columns: repeat(2, 1fr); }
    .hero h1 { font-size: 30px; }
    .nav-links a:not(.nav-keep) { display: none; }
}
@media (max-width: 480px) {
    .card { padding: 20px; }
    .stat-row { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .stat .num { font-size: 22px; }
    .container { padding: 0 14px; }
}

/* ---------- 工具类 ---------- */
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.text-muted { color: var(--muted); }
.text-center { text-align: center; }
.hidden { display: none !important; }
.spinner {
    width: 18px; height: 18px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
    display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }
