/* ============================================================================
   金牛论坛 · 设计体系 v7.0  ——  LUMEN POLISH（精致化抛光层）
   ----------------------------------------------------------------------------
   必须排在 au-motion.css 之后加载（全站最后一个样式层，拥有最终否决权）。
   定位：不做推倒重来，在 AURORA v6 的骨架上做「顶级质感」打磨——
     1. 质感：卡片内侧高光 + 精细描边 + 悬浮抬升，告别"平面贴纸感"
     2. 排版：中文字距 / 标题字重 / 数字等宽，层级更清晰
     3. 焦点：统一 :focus-visible 金色对焦环，键盘可访性拉满
     4. Hero：高度收敛、遮罩加强、按钮与指示器精修
     5. 细节：滚动条 / 选区 / 分隔线 / 徽标 / 引用块 全链路统一
   只改视觉，不改任何功能、结构与路由。新增工具类一律 sa- 前缀。
   ============================================================================ */

/* ---------------------------------------------------------------------------
   0. 抛光令牌（在 AURORA 之上追加，不覆盖既有令牌）
   --------------------------------------------------------------------------- */
:root {
    --lp-card-hi: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, 0) 42%);
    --lp-line-soft: rgba(242, 237, 227, .07);
    --lp-ring: 0 0 0 3px rgba(214, 172, 92, .28);
    --lp-ring-err: 0 0 0 3px rgba(228, 119, 107, .30);
}

[data-theme="light"] {
    --lp-card-hi: linear-gradient(180deg, rgba(255, 255, 255, .85), rgba(255, 255, 255, 0) 42%);
    --lp-line-soft: rgba(35, 32, 26, .05);
    --lp-ring: 0 0 0 3px rgba(165, 124, 54, .22);
    --lp-ring-err: 0 0 0 3px rgba(196, 56, 46, .22);
}

/* ---------------------------------------------------------------------------
   1. 全局底子：背景 / 选区 / 滚动条 / 对焦环
   --------------------------------------------------------------------------- */

/* 顶部金色氛围光：让首屏不是死黑，而有一层"舞台追光" */
[data-theme="dark"] body::after {
    content: "";
    position: fixed;
    inset: -20% 0 auto 0;
    height: 46vh;
    pointer-events: none;
    z-index: 0;
    background: radial-gradient(58% 100% at 50% 0%, rgba(214, 172, 92, .075), transparent 70%);
}

::selection {
    background: rgba(214, 172, 92, .32);
    color: inherit;
}

/* 细滚动条（WebKit + Firefox），金色拇指，hover 提亮 */
html { scrollbar-width: thin; scrollbar-color: rgba(214, 172, 92, .38) transparent; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(214, 172, 92, .30);
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background-color: rgba(214, 172, 92, .55); }

/* 统一键盘对焦环（仅 :focus-visible，鼠标点击不打扰） */
:is(a, button, .btn, input, select, textarea, [tabindex]):focus-visible {
    outline: none !important;
    box-shadow: var(--lp-ring) !important;
    border-radius: var(--au-r-sm, 12px);
}

/* 全站文字渲染与数字排版 */
body {
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    font-variant-numeric: tabular-nums;
    letter-spacing: .005em;
}

/* 中文标题的呼吸感：标题统一收紧字重曲线、放大字距 */
h1, h2, h3, h4, .hero-title, .section-head h2, .section-head h3 {
    letter-spacing: .015em;
    text-wrap: balance;
}
p, .topic-excerpt, .footer-desc { text-wrap: pretty; }

/* ---------------------------------------------------------------------------
   2. 卡片质感统一（帖子卡 / 通用卡 / 侧栏卡）
      关键手法：1px 精细描边 + 顶部内侧高光 + hover 抬升 2px
   --------------------------------------------------------------------------- */
.topic-card,
.bbs-card,
.sidebar-card {
    position: relative;
    border: 1px solid var(--au-line) !important;
    background:
        var(--lp-card-hi),
        var(--au-surface-solid, #181510);
    box-shadow: var(--au-sh-1);
    transition:
        transform var(--au-t) var(--au-ease),
        box-shadow var(--au-t) var(--au-ease),
        border-color var(--au-t) var(--au-ease);
}

[data-theme="dark"] .topic-card,
[data-theme="dark"] .bbs-card,
[data-theme="dark"] .sidebar-card {
    background:
        var(--lp-card-hi),
        #17140F;
}

/* 悬浮：抬升 + 金色微光描边（列表卡才有，静态卡不抖） */
.topic-card:hover {
    transform: translateY(-2px);
    border-color: var(--au-brand-ring) !important;
    box-shadow: var(--au-sh-3), 0 0 0 1px var(--au-brand-soft-2);
}

/* 帖子标题排版：更大字重、行高收紧、hover 金色过渡 */
.topic-card .topic-title {
    font-weight: 650;
    letter-spacing: .01em;
    line-height: 1.45;
    transition: color var(--au-t-fast) var(--au-ease);
}

/* 摘要与元信息：弱化但不失对比 */
.topic-card .topic-excerpt {
    color: var(--au-text-2);
    line-height: 1.72;
}

/* 头像描边：金圈更细腻 */
.avatar-sm, .avatar-md {
    box-shadow: 0 0 0 1px var(--au-brand-ring);
}

/* ---------------------------------------------------------------------------
   3. Hero 收敛与精修
   --------------------------------------------------------------------------- */
.hero-video-wrap {
    height: 62vh;
    min-height: 400px;
    max-height: 620px;
    border: 1px solid var(--au-brand-ring);
    box-shadow: var(--au-sh-4);
}

/* 遮罩加强下半部，标题与按钮永远可读 */
.hero-carousel .hero-overlay,
.hero-overlay {
    background:
        linear-gradient(180deg,
            rgba(14, 11, 8, .38) 0%,
            rgba(14, 11, 8, .16) 34%,
            rgba(14, 11, 8, .58) 66%,
            rgba(14, 11, 8, .88) 100%);
}

.hero-title {
    letter-spacing: .18em;
    text-shadow: 0 2px 28px rgba(0, 0, 0, .65), 0 0 60px rgba(214, 172, 92, .25);
}

.hero-subtitle { letter-spacing: .12em; }

/* 按钮：稍微收敛尺寸，更"贵" */
.btn-hero-primary {
    padding: 11px 28px;
    letter-spacing: .08em;
    box-shadow: 0 10px 30px -10px rgba(214, 172, 92, .75);
}
.btn-hero-ghost {
    padding: 11px 28px;
    background: rgba(20, 16, 10, .35);
    border-color: rgba(232, 199, 126, .55);
    backdrop-filter: blur(10px) saturate(140%);
}

/* 轮播指示器：更细的胶囊 + 计数器玻璃胶囊 */
.hero-dots { gap: 8px; }
.hero-dot {
    width: 22px;
    height: 3px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .35);
    border: none;
    transition: width var(--au-t) var(--au-ease), background var(--au-t) var(--au-ease);
}
.hero-dot.is-active {
    width: 40px;
    background: var(--au-brand, #D6AC5C);
    box-shadow: 0 0 12px rgba(214, 172, 92, .6);
}
.hero-counter {
    padding: 3px 12px;
    border-radius: 999px;
    background: rgba(14, 11, 8, .5);
    border: 1px solid rgba(242, 237, 227, .16);
    backdrop-filter: blur(8px);
    font-variant-numeric: tabular-nums;
    letter-spacing: .1em;
}

/* ---------------------------------------------------------------------------
   4. 顶栏导航精修
   --------------------------------------------------------------------------- */
.bbs-navbar .nav-link {
    letter-spacing: .02em;
    border-radius: var(--au-r-pill, 999px);
    transition: color var(--au-t-fast) var(--au-ease), background var(--au-t-fast) var(--au-ease);
}
.bbs-navbar .nav-link.active {
    background: var(--au-brand-soft);
    color: var(--au-brand) !important;
}

/* 搜索框：玻璃质感 + 聚焦金环 */
.lx-search .search-input,
.search-input {
    border-radius: var(--au-r-pill, 999px);
    transition: box-shadow var(--au-t-fast) var(--au-ease), border-color var(--au-t-fast) var(--au-ease);
}

/* ---------------------------------------------------------------------------
   5. 统计条：大数字 + 呼吸感分隔
   --------------------------------------------------------------------------- */
.stat-number {
    font-size: 28px !important;
    font-weight: 750;
    letter-spacing: -.01em;
    background: linear-gradient(180deg, var(--au-text-1) 30%, var(--au-brand) 130%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.stat-label { letter-spacing: .08em; }

/* ---------------------------------------------------------------------------
   6. 按钮体系统一
   --------------------------------------------------------------------------- */
.btn {
    font-weight: 600;
    letter-spacing: .03em;
    transition:
        transform var(--au-t-fast) var(--au-ease),
        box-shadow var(--au-t-fast) var(--au-ease),
        background var(--au-t-fast) var(--au-ease),
        border-color var(--au-t-fast) var(--au-ease),
        color var(--au-t-fast) var(--au-ease);
}
.btn:active { transform: translateY(1px) scale(.99); }

.btn-primary {
    box-shadow: 0 6px 18px -8px var(--au-brand-ring), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.btn-primary:hover { box-shadow: 0 10px 26px -8px var(--au-brand-ring), inset 0 1px 0 rgba(255, 255, 255, .22); }

.btn-ghost,
.btn-outline-secondary {
    border: 1px solid var(--au-line-strong);
}
.btn-ghost:hover {
    border-color: var(--au-brand-ring);
    color: var(--au-brand);
    background: var(--au-brand-soft);
}

/* 排序胶囊组（最新 / 热门 / 精华）：active 态加内高光 */
.btn-sm.btn-primary {
    box-shadow: 0 4px 12px -6px var(--au-brand-ring), inset 0 1px 0 rgba(255, 255, 255, .25);
}

/* ---------------------------------------------------------------------------
   7. 表单控件统一
   --------------------------------------------------------------------------- */
.form-control,
.form-select {
    border: 1px solid var(--au-line-strong);
    border-radius: var(--au-r-sm, 12px);
    transition: border-color var(--au-t-fast) var(--au-ease), box-shadow var(--au-t-fast) var(--au-ease), background var(--au-t-fast) var(--au-ease);
}
.form-control:focus,
.form-select:focus {
    border-color: var(--au-brand-ring);
    box-shadow: var(--lp-ring);
}
.form-control::placeholder { color: var(--au-text-3); }
.form-label { font-weight: 600; letter-spacing: .02em; }

/* ---------------------------------------------------------------------------
   8. 详情页：回复流 / 引用块 / 操作条
   --------------------------------------------------------------------------- */

/* 回复条目：hover 时整行微微提亮，边界感更柔 */
.reply-item {
    border-bottom: 1px solid var(--lp-line-soft);
    border-radius: var(--au-r-sm, 12px);
    transition: background var(--au-t) var(--au-ease);
}
.reply-item:hover { background: var(--au-surface-2); }

/* 楼层操作按钮（点赞 / 回复 / 举报）：chip 化 */
.reply-item .btn,
.topic-actions .btn {
    border-radius: 999px;
    padding-inline: 10px;
}

/* 图片 / 引用卡：统一圆角与描边 */
.reply-item img,
.topic-content img,
.quoted-card,
blockquote {
    border-radius: var(--au-r-md, 16px);
}
blockquote, .quoted-card {
    border: 1px solid var(--lp-line-soft);
    border-left: 3px solid var(--au-brand-ring);
}

/* ---------------------------------------------------------------------------
   9. 徽标 / 标签
   --------------------------------------------------------------------------- */
.tag-chip,
.sa-st-chip {
    transition: border-color var(--au-t-fast) var(--au-ease), background var(--au-t-fast) var(--au-ease);
}
.tag-chip:hover {
    border-color: var(--au-brand-ring);
    background: var(--au-brand-soft);
}

/* ---------------------------------------------------------------------------
   10. 页脚
   --------------------------------------------------------------------------- */
.bbs-footer {
    border-top: 1px solid var(--lp-line-soft);
    background:
        radial-gradient(60% 120% at 50% 0%, rgba(214, 172, 92, .045), transparent 70%),
        var(--au-bg-2, #151209);
}
.bbs-footer .footer-links a {
    border-radius: 999px;
    padding: 2px 10px;
    transition: background var(--au-t-fast) var(--au-ease), color var(--au-t-fast) var(--au-ease);
}
.bbs-footer .footer-links a:hover {
    background: var(--au-brand-soft);
    color: var(--au-brand);
}

/* ---------------------------------------------------------------------------
   11. 响应式微调（移动端收紧节奏）
   --------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .hero-video-wrap {
        height: 50vh;
        min-height: 320px;
        max-height: 460px;
        margin: var(--au-s-3, 12px) 0;
        border-radius: var(--au-r-md, 16px);
    }
    /* 移动端视频素材自带大字标题，整体遮罩加强，避免与界面文字打架 */
    .hero-carousel .hero-overlay,
    .hero-overlay {
        background:
            linear-gradient(180deg,
                rgba(14, 11, 8, .52) 0%,
                rgba(14, 11, 8, .42) 34%,
                rgba(14, 11, 8, .72) 66%,
                rgba(14, 11, 8, .92) 100%);
    }
    /* 视频素材的大字标语在画面上部，移动端取景下移，给界面文案让位 */
    .hero-carousel .hero-video, .hero-video { object-position: center 72%; }
    .hero-title { font-size: 1.7rem; letter-spacing: .14em; }
    .hero-content { padding: 0 var(--au-s-3, 12px) var(--au-s-5, 24px); }
    .hero-subtitle { color: rgba(255, 255, 255, .9); text-shadow: 0 1px 12px rgba(0, 0, 0, .8); }

    .topic-card,
    .bbs-card,
    .sidebar-card { padding: var(--au-s-4, 16px) !important; }

    .stat-number { font-size: 22px !important; }

    .main-content { padding: var(--au-s-4, 16px) 0 var(--au-s-5, 24px); }
}

@media (max-width: 400px) {
    .hero-video-wrap { height: 44vh; min-height: 280px; }
    .hero-title { font-size: 1.45rem; }
}

/* ---------------------------------------------------------------------------
   12. 动效尊重：减少动态偏好下关闭抛光层自带动效
   --------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .topic-card,
    .btn,
    .hero-dot { transition: none !important; }
}
