/* ============================================================
   Nexora 风格首页（博栋教育 xl.bodong.com.cn）
   仅首页使用；全部选择器 .nxr- 前缀，不影响其他页面
   ============================================================ */

:root {
    --nxr-bg: 0 0% 100%;
    --nxr-fg: 210 14% 17%;
    --nxr-primary: 210 14% 17%;
    --nxr-primary-fg: 0 0% 100%;
    --nxr-secondary: 0 0% 96%;
    --nxr-muted: 0 0% 96%;
    --nxr-muted-fg: 184 5% 55%;
    --nxr-accent: 239 84% 67%;
    --nxr-accent-fg: 0 0% 100%;
    --nxr-border: 0 0% 90%;
    --nxr-font-display: 'Instrument Serif', 'Songti SC', 'SimSun', serif;
    --nxr-font-body: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    --nxr-shadow-dashboard: 0 25px 80px -12px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.06);
}

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

html, body { height: 100%; }

body {
    font-family: var(--nxr-font-body);
    color: hsl(var(--nxr-fg));
    background: hsl(var(--nxr-bg));
    -webkit-font-smoothing: antialiased;
}

/* ---------- 动画（替代 framer-motion fadeUp） ---------- */
@keyframes nxrFadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}
.nxr-anim {
    opacity: 0;
    animation: nxrFadeUp .8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@media (prefers-reduced-motion: reduce) {
    .nxr-anim { animation: none; opacity: 1; transform: none; }
}

/* ---------- 根布局：正常文档流滚动（内容不足一屏时撑满视口） ---------- */
.nxr-root {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, hsl(var(--nxr-bg)) 0%, hsl(var(--nxr-secondary)) 100%);
    position: relative;
}

.nxr-video {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
}

/* ---------- 导航 ---------- */
.nxr-nav {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
}
.nxr-logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}
.nxr-logo-img {
    display: block;
    height: 34px;
    width: auto;
    filter: drop-shadow(0 1px 3px rgba(255, 255, 255, .45));
}
.nxr-links {
    display: none;
    gap: 32px;
}
.nxr-links a {
    font-size: 14px;
    color: hsl(var(--nxr-muted-fg));
    text-decoration: none;
    transition: color .2s;
}
.nxr-links a:hover { color: hsl(var(--nxr-fg)); }

/* ---------- 按钮 ---------- */
.nxr-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: hsl(var(--nxr-primary));
    color: hsl(var(--nxr-primary-fg));
    border-radius: 9999px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: opacity .2s, transform .15s;
}
.nxr-btn-primary:hover { opacity: .85; }
.nxr-btn-primary:active { transform: scale(.98); }
.nxr-btn-lg { padding: 14px 26px; }

/* ---------- Hero 内容 ---------- */
.nxr-hero {
    position: relative;
    z-index: 10;
    flex: 1;
    display: flex;
    justify-content: center;
    min-height: 0;
}
.nxr-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 12px 16px 48px;
}

.nxr-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid hsl(var(--nxr-border) / .9);
    background: hsl(var(--nxr-bg) / .85);
    backdrop-filter: blur(6px);
    border-radius: 9999px;
    padding: 6px 16px;
    font-size: 13px;
    color: hsl(var(--nxr-muted-fg));
    margin-bottom: 18px;
    white-space: nowrap;
}

.nxr-headline {
    font-family: var(--nxr-font-display);
    font-weight: 400;
    text-align: center;
    font-size: clamp(40px, 7vw, 80px);
    line-height: .95;
    letter-spacing: -0.02em;
    color: hsl(var(--nxr-fg));
    max-width: 576px;
    text-shadow: 0 1px 12px rgba(255, 255, 255, .35);
}
.nxr-accent {
    font-family: var(--nxr-font-display);
    font-style: italic;
    font-weight: 400;
}

.nxr-sub {
    margin-top: 16px;
    text-align: center;
    font-size: clamp(15px, 2vw, 18px);
    color: hsl(var(--nxr-fg) / .78);
    max-width: 650px;
    line-height: 1.7;
    text-shadow: 0 1px 8px rgba(255, 255, 255, .4);
    padding: 0 8px;
}

.nxr-cta-row {
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.nxr-play {
    width: 44px;
    height: 44px;
    border-radius: 9999px;
    background: hsl(var(--nxr-bg));
    color: hsl(var(--nxr-fg));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    text-decoration: none;
    transition: transform .15s, opacity .2s;
}
.nxr-play:hover { transform: scale(1.06); }

/* ---------- 仪表盘预览（纯代码） ---------- */
.nxr-dash {
    margin-top: 32px;
    width: 100%;
    max-width: 1024px;
}
.nxr-glass {
    border-radius: 16px;
    overflow: hidden;
    padding: 12px;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: var(--nxr-shadow-dashboard);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* 顶栏 */
.nxr-dash-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: hsl(var(--nxr-bg) / .92);
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 11px;
    user-select: none;
    pointer-events: none;
}
.nxr-dash-top a, .nxr-dash-top .nxr-dash-go { pointer-events: auto; }
.nxr-dash-brand { display: flex; align-items: center; gap: 6px; }
.nxr-dash-logo {
    width: 22px; height: 22px;
    border-radius: 6px;
    background: hsl(var(--nxr-accent));
    color: #fff;
    font-weight: 600;
    font-size: 12px;
    display: inline-flex; align-items: center; justify-content: center;
}
.nxr-dash-name { font-weight: 600; font-size: 11px; }
.nxr-chev { color: hsl(var(--nxr-muted-fg)); }
.nxr-dash-search {
    flex: 1;
    max-width: 300px;
    display: flex;
    align-items: center;
    gap: 6px;
    background: hsl(var(--nxr-secondary));
    border-radius: 9999px;
    padding: 5px 10px;
    color: hsl(var(--nxr-muted-fg));
    white-space: nowrap;
    overflow: hidden;
}
.nxr-kbd {
    margin-left: auto;
    font-size: 9px;
    background: hsl(var(--nxr-bg));
    border: 1px solid hsl(var(--nxr-border));
    border-radius: 4px;
    padding: 1px 4px;
}
.nxr-dash-top-right { display: flex; align-items: center; gap: 8px; }
.nxr-dash-go {
    background: hsl(var(--nxr-accent));
    color: #fff;
    border-radius: 9999px;
    padding: 5px 12px;
    font-size: 10px;
    font-weight: 500;
    text-decoration: none;
}
.nxr-dash-bell {
    width: 22px; height: 22px;
    border-radius: 9999px;
    background: hsl(var(--nxr-primary));
    color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
}
.nxr-dash-avatar {
    width: 22px; height: 22px;
    border-radius: 9999px;
    background: hsl(var(--nxr-secondary));
    border: 1px solid hsl(var(--nxr-border));
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: 600;
}

/* 主体两栏 */
.nxr-dash-body { display: flex; gap: 10px; margin-top: 10px; align-items: stretch; }

/* 侧边栏 */
.nxr-dash-side {
    width: 160px;
    flex: 0 0 160px;
    background: hsl(var(--nxr-bg) / .92);
    border-radius: 10px;
    padding: 10px 8px;
    display: none;
    flex-direction: column;
    gap: 2px;
    font-size: 11px;
    user-select: none;
}
.nxr-side-item {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px 8px;
    border-radius: 7px;
    color: hsl(var(--nxr-fg) / .8);
    text-decoration: none;
    transition: background .15s;
}
.nxr-side-item svg { flex: 0 0 auto; }
.nxr-side-item:hover { background: hsl(var(--nxr-secondary)); }
.nxr-side-item.active { background: hsl(var(--nxr-secondary)); color: hsl(var(--nxr-fg)); font-weight: 600; }
.nxr-side-item.dim { color: hsl(var(--nxr-muted-fg)); }
.nxr-side-badge {
    margin-left: auto;
    background: hsl(var(--nxr-accent));
    color: #fff;
    font-size: 9px;
    border-radius: 9999px;
    padding: 1px 6px;
}
.nxr-side-sec {
    margin-top: 10px;
    padding: 4px 8px 2px;
    font-size: 9px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: hsl(var(--nxr-muted-fg));
}

/* 主内容 */
.nxr-dash-main {
    flex: 1;
    min-width: 0;
    background: hsl(var(--nxr-secondary) / .55);
    border-radius: 10px;
    padding: 12px;
}
.nxr-dash-welcome { font-size: 13px; font-weight: 600; }
.nxr-dash-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
}
.nxr-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    padding: 4px 10px;
    font-size: 10px;
    background: hsl(var(--nxr-bg));
    border: 1px solid hsl(var(--nxr-border));
    color: hsl(var(--nxr-fg));
    text-decoration: none;
    white-space: nowrap;
    transition: border-color .15s;
}
.nxr-pill:hover { border-color: hsl(var(--nxr-muted-fg)); }
.nxr-pill.accent { background: hsl(var(--nxr-accent)); border-color: transparent; color: #fff; }
.nxr-pill-ghost { font-size: 10px; color: hsl(var(--nxr-muted-fg)); }

/* 双卡 */
.nxr-dash-cards {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}
.nxr-card {
    flex: 1 1 0;
    min-width: 0;
    background: hsl(var(--nxr-bg) / .95);
    border-radius: 10px;
    padding: 12px;
}
.nxr-card-head {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 500;
    color: hsl(var(--nxr-fg) / .85);
}
.nxr-card-head.between { justify-content: space-between; }
.nxr-check { color: hsl(152, 60%, 42%); }
.nxr-head-ops { display: inline-flex; gap: 8px; color: hsl(var(--nxr-muted-fg)); }
.nxr-card-amount {
    margin-top: 8px;
    font-size: clamp(22px, 3.4vw, 30px);
    font-weight: 600;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}
.nxr-cents { font-size: 12px; color: hsl(var(--nxr-muted-fg)); font-weight: 500; margin-left: 2px; }
.nxr-card-stats { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 10px; }
.nxr-stat { color: hsl(var(--nxr-muted-fg)); }
.nxr-stat.up { color: hsl(152, 60%, 38%); font-weight: 600; }
.nxr-stat.down { color: hsl(0, 65%, 55%); font-weight: 600; }
.nxr-chart { width: 100%; height: 64px; margin-top: 8px; display: block; }

.nxr-acct-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 2px;
    font-size: 12px;
    color: hsl(var(--nxr-fg) / .8);
}
.nxr-acct-row b { font-weight: 600; color: hsl(var(--nxr-fg)); font-variant-numeric: tabular-nums; }

/* 表格 */
.nxr-table-wrap {
    margin-top: 12px;
    background: hsl(var(--nxr-bg) / .95);
    border-radius: 10px;
    padding: 12px;
}
.nxr-table-title { font-size: 11px; font-weight: 600; margin-bottom: 6px; }
.nxr-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.nxr-table th {
    text-align: left;
    font-weight: 500;
    color: hsl(var(--nxr-muted-fg));
    padding: 4px 6px;
    border-bottom: 1px solid hsl(var(--nxr-border));
}
.nxr-table td {
    padding: 7px 6px;
    border-bottom: 1px solid hsl(var(--nxr-border) / .6);
    color: hsl(var(--nxr-fg) / .85);
    white-space: nowrap;
}
.nxr-table tr:last-child td { border-bottom: none; }
.nxr-table th:nth-child(2), .nxr-table td:nth-child(2) { white-space: normal; }
.nxr-status {
    display: inline-block;
    border-radius: 9999px;
    padding: 2px 8px;
    font-size: 9px;
    font-weight: 500;
}
.nxr-status.ok { background: hsl(152, 55%, 94%); color: hsl(152, 60%, 32%); }
.nxr-status.pending { background: hsl(43, 96%, 92%); color: hsl(38, 92%, 38%); }

/* ---------- 响应式 ---------- */
@media (min-width: 768px) {
    .nxr-nav { padding: 20px 48px; }
    .nxr-links { display: flex; }
    .nxr-content { padding: 16px 24px 56px; }
}
@media (min-width: 1024px) {
    .nxr-nav { padding: 20px 80px; }
    .nxr-dash-side { display: flex; }
    .nxr-glass { padding: 16px; }
}
@media (min-width: 1280px) {
    .nxr-headline { font-size: 80px; }
}

/* 小屏：仪表盘信息密度优化 */
@media (max-width: 640px) {
    .nxr-badge { font-size: 11px; padding: 5px 12px; margin-bottom: 12px; }
    .nxr-sub { margin-top: 10px; }
    .nxr-cta-row { margin-top: 14px; }
    .nxr-dash { margin-top: 20px; }
    .nxr-dash-search { display: none; }
    .nxr-dash-name { display: none; }
    .nxr-dash-cards { flex-direction: column; }
    .nxr-table th:nth-child(1), .nxr-table td:nth-child(1) { display: none; }
    .nxr-nav-cta { padding: 8px 14px; font-size: 13px; }
    .nxr-logo-img { height: 28px; }
    body { overflow-x: hidden; }
}

/* 弱动效兜底：无视频时保留渐变背景（视频已由 JS 移除） */
@media (prefers-reduced-motion: reduce) {
    .nxr-video { display: none; }
}
