/* ==========================================================================
   common.css —— 全站基础样式与通用组件（v2）
   1. 变量 / 重置      2. 背景层        3. 导航栏与下拉菜单
   4. 侧边抽屉         5. 弹窗与表单    6. 按钮 / 徽章 / 表格
   7. Toast / 空状态   8. 响应式
   ========================================================================== */

/* ---------------- 1. 变量 / 重置 ---------------- */
:root {
    --bg: #040a15;
    --cyan: #22d3ee;
    --blue: #3b82f6;
    --violet: #8b5cf6;
    --gold: #fbbf24;
    --text: #e8f2ff;
    --muted: #7c92b4;
    --ok: #34d399;
    --danger: #f87171;
    --glass: rgba(9, 17, 31, 0.68);
    --glass-solid: rgba(10, 20, 38, 0.96);
    --line: rgba(120, 190, 255, 0.2);
    --nav-h: 64px;

    /* 字体 */
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                 "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", sans-serif;
    --font-mono: "SF Mono", "JetBrains Mono", "Cascadia Mono", Consolas, "Courier New", monospace;

    /* 透明导航：只保留极淡的压暗，让背景壁纸透上来 */
    --nav-scrim-top: rgba(4, 10, 21, 0.46);
    --nav-scrim-bottom: rgba(4, 10, 21, 0.10);
    --nav-blur: blur(9px) saturate(150%);
    --nav-hairline: rgba(120, 190, 255, 0.16);
}

*, *::before, *::after { box-sizing: border-box; }
a, a:link, a:visited, a:hover, a:active { color: inherit; text-decoration: none; }

/* 防止任何元素把页面撑出横向滚动 */
html { overflow-x: hidden; max-width: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-sans);
    font-size: 14.5px;
    line-height: 1.65;
    letter-spacing: 0.012em;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
    padding-bottom: 40px;
}

/* 数字统一等宽，避免跳动 */
.num, .data-table td.num, .stat-val, .mrb-score-val, .lb-score-val,
.badge-points, .lig-val, .key-mono, .cc-code {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
}

::selection { background: rgba(34, 211, 238, .32); color: #fff; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(56, 189, 248, .28); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(56, 189, 248, .5); }

/* ---------------- 2. 背景层 ---------------- */
.global-bg { position: fixed; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
/* 压暗层：偏上更暗一点保证文字可读，整体调淡让壁纸更明显 */
.global-bg-overlay {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(4, 10, 21, .62) 0%, rgba(4, 10, 21, .44) 34%, rgba(4, 10, 21, .58) 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(56, 189, 248, .05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(56, 189, 248, .05) 1px, transparent 1px);
    background-size: 48px 48px;
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 15%, #000 20%, transparent 85%);
    mask-image: radial-gradient(ellipse 80% 60% at 50% 15%, #000 20%, transparent 85%);
}

.aurora {
    position: fixed;
    inset: -20%;
    z-index: 0;
    pointer-events: none;
    filter: blur(90px);
    opacity: .6;
    background:
        radial-gradient(38% 40% at 20% 8%, rgba(34, 211, 238, .30), transparent 70%),
        radial-gradient(34% 38% at 78% 4%, rgba(139, 92, 246, .28), transparent 70%);
    animation: drift 18s ease-in-out infinite alternate;
}
@keyframes drift {
    from { transform: translate3d(-2%, -1%, 0) scale(1); }
    to { transform: translate3d(2%, 1%, 0) scale(1.08); }
}

/* ---------------- 通用毛玻璃卡片 ----------------
   注意：导航栏与侧边栏单独控制，才能做到透出背景壁纸 */
.panel, .product-card, .login-card, .stat-card, .modal, .glass {
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    background: var(--glass) !important;
    border: 1px solid var(--line) !important;
}

/* ---------------- 3. 导航栏（透明，能看到背景壁纸） ---------------- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 200;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    height: var(--nav-h);
    padding: 0 20px;
    /* 只保留极淡的上下渐变压暗 + 轻度模糊，壁纸清晰透出 */
    background: linear-gradient(180deg, var(--nav-scrim-top), var(--nav-scrim-bottom)) !important;
    backdrop-filter: var(--nav-blur) !important;
    -webkit-backdrop-filter: var(--nav-blur) !important;
    border: 0 !important;
    border-bottom: 1px solid var(--nav-hairline) !important;
    border-radius: 0 !important;
    box-shadow: 0 8px 26px -22px rgba(0, 0, 0, .95);
}

.nav-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.nav-right { display: flex; align-items: center; gap: 8px; }

/* ---- Logo / 品牌区（点击返回首页） ---- */
.nav-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 4px 8px 4px 4px;
    margin-left: -4px;
    border-radius: 12px;
    color: #fff;
    transition: background .18s, transform .18s;
}
/*a.nav-brand:hover { background: rgba(255, 255, 255, .1); }*/
/*a.nav-brand:active { transform: scale(.98); }*/

/* logo 卡片：深色透明导航上更干净 */
.brand-logo {
    flex: none;
    display: grid;
    place-items: center;
    height: 38px;
    padding: 3px 5px;
    border-radius: 10px;
    transition: box-shadow .22s, transform .22s;
}
.brand-logo img {
    display: block;
    height: 28px;
    width: auto;
    max-width: 100px;
    object-fit: contain;
    border-radius: 4px;
}
/*a.nav-brand:hover .brand-logo,*/
/*.as-brand-link:hover .brand-logo {*/
/*    box-shadow: 0 5px 20px rgba(34, 211, 238, .45), 0 0 0 1px rgba(34, 211, 238, .45);*/
/*    transform: scale(1.04);*/
/*}*/

.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.brand-title {
    font-size: 19.5px;
    font-weight: 800;
    letter-spacing: .04em;
    color: #fff;
    text-shadow: 0 1px 10px rgba(0, 0, 0, .5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.brand-sub {
    margin-top: 3px;
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: .16em;
    color: rgba(188, 219, 255, .7);
    white-space: nowrap;
}

/* 尺寸变体 */
.brand-logo.sm { height: 47px; padding: 0px 4px; border-radius: 9px; }
.brand-logo.sm img { height: 47px; max-width: 86px; }
.brand-logo.xl { height: 58px; padding: 5px 8px; border-radius: 15px; }
.brand-logo.xl img { height: 46px; max-width: 165px; }

.mobile-menu-btn {
    display: none;
    place-items: center;
    width: 36px;
    height: 36px;
    background: rgba(8, 18, 34, .42);
    border: 1px solid var(--nav-hairline);
    border-radius: 9px;
    color: #fff;
    cursor: pointer;
    padding: 0;
    flex: none;
    transition: .18s;
}
.mobile-menu-btn:hover { background: rgba(34, 211, 238, .18); border-color: rgba(34, 211, 238, .5); }

/* 导航按钮：统一尺寸，避免菜单变多后挤压；带一层淡底保证透明导航上也可读 */
.btn-nav {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 13px;
    background: rgba(8, 18, 34, .42);
    border: 1px solid rgba(120, 190, 255, .26);
    border-radius: 9px;
    color: #cfe6ff;
    font-size: 13.5px;
    font-weight: 500;
    letter-spacing: .02em;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    backdrop-filter: blur(6px);
    transition: .18s;
}
.btn-nav:hover { background: rgba(34, 211, 238, .2); color: #fff; border-color: rgba(34, 211, 238, .55); }
.btn-nav.danger { border-color: rgba(248, 113, 113, .35); color: var(--danger); }
.btn-nav.danger:hover { background: rgba(248, 113, 113, .18); }
.btn-nav.gold { border-color: rgba(251, 191, 36, .45); color: var(--gold); }
.btn-nav.gold:hover { background: rgba(251, 191, 36, .2); }

.badge-points {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 14px;
    border-radius: 9px;
    background: rgba(6, 26, 20, .5);
    border: 1px solid rgba(52, 211, 153, .32);
    color: var(--ok);
    font-weight: 700;
    font-size: 14.5px;
    white-space: nowrap;
    backdrop-filter: blur(6px);
}

/* 未读小红点 */
.badge-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 17px;
    height: 17px;
    padding: 0 5px;
    border-radius: 99px;
    background: linear-gradient(120deg, #f87171, #ef4444);
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1;
}
.badge-dot.hidden { display: none; }

/* ---------------- 下拉菜单（菜单栏收纳） ---------------- */
.dropdown { position: relative; }

.dropdown-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    min-width: 196px;
    padding: 7px;
    display: none;
    flex-direction: column;
    gap: 2px;
    background: rgba(7, 16, 30, .88);
    border: 1px solid rgba(120, 190, 255, .24);
    border-radius: 13px;
    box-shadow: 0 24px 50px rgba(0, 0, 0, .6);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    z-index: 400;
}
.dropdown.open .dropdown-menu { display: flex; animation: dropIn .18s ease-out; }
.dropdown.open > .btn-nav { background: rgba(34, 211, 238, .22); color: #fff; border-color: rgba(34, 211, 238, .6); }

@keyframes dropIn {
    from { opacity: 0; transform: translateY(-8px) scale(.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #d3e4fa;
    font-size: 14.5px;
    font-family: inherit;
    letter-spacing: .015em;
    text-align: left;
    cursor: pointer;
    transition: .15s;
}
.dropdown-item:hover { background: rgba(34, 211, 238, .18); color: #fff; }
.dropdown-item .di { width: 18px; flex: none; text-align: center; font-size: 15px; }
.dropdown-item .di-count {
    margin-left: auto;
    font-size: 11px;
    color: var(--muted);
}
.dropdown-item.danger { color: var(--danger); }
.dropdown-item.danger:hover { background: rgba(248, 113, 113, .18); }
.dropdown-divider { height: 1px; margin: 5px 4px; background: rgba(255, 255, 255, .1); }

/* ---------------- 4. 侧边抽屉 ---------------- */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .6);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s;
}
.sidebar-overlay.active { opacity: 1; pointer-events: auto; }

.sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    max-width: 86vw;
    height: 100vh;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    /* 抽屉同样透明，能透出壁纸 */
    background: linear-gradient(180deg, rgba(6, 14, 28, .88), rgba(3, 8, 18, .93)) !important;
    backdrop-filter: blur(20px) saturate(140%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(140%) !important;
    border: 0 !important;
    border-right: 1px solid var(--nav-hairline) !important;
    border-radius: 0 !important;
    transition: left .3s cubic-bezier(.2, .8, .2, 1);
    box-shadow: 10px 0 40px rgba(0, 0, 0, .55);
}
.sidebar.active { left: 0; }
.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    flex: none;
}
.sidebar-header .nav-brand { padding: 0; margin: 0; gap: 9px; }
.sidebar-header .brand-title { font-size: 15px; }
.btn-close {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    flex: none;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 8px;
    color: #9ecdf8;
    font-size: 15px;
    cursor: pointer;
    padding: 0;
    transition: .16s;
}
.btn-close:hover { background: rgba(248, 113, 113, .18); border-color: rgba(248, 113, 113, .4); color: #fff; }

.sidebar-content { padding: 16px; display: flex; flex-direction: column; gap: 7px; overflow-y: auto; }
.sidebar-group-title {
    margin: 12px 0 2px;
    padding: 0 6px;
    font-size: 11.5px;
    letter-spacing: 1.5px;
    color: #4f6b90;
    font-weight: 700;
}
.sidebar-group-title:first-child { margin-top: 0; }

.btn-sidebar {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 14px;
    background: rgba(56, 189, 248, .07);
    border: 1px solid rgba(56, 189, 248, .18);
    border-radius: 10px;
    color: #9ecdf8;
    font-size: 14.5px;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: .18s;
}
.btn-sidebar:hover { background: rgba(56, 189, 248, .16); color: #fff; }
.btn-sidebar .di { width: 18px; text-align: center; flex: none; }
.btn-sidebar.danger { border-color: rgba(248, 113, 113, .3); color: var(--danger); }
.btn-sidebar.danger:hover { background: rgba(248, 113, 113, .13); }
.btn-sidebar.gold { border-color: rgba(251, 191, 36, .3); color: var(--gold); }

.sidebar-points {
    padding: 13px;
    margin-bottom: 6px;
    border-radius: 10px;
    text-align: center;
    font-weight: 700;
    background: rgba(52, 211, 153, .1);
    color: var(--ok);
    border: 1px solid rgba(52, 211, 153, .22);
}
/* 抽屉里的会员徽标 */
.sidebar-vip {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 6px 0 2px;
}

/* ---------------- 5. 弹窗与表单 ---------------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, .66);
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity .28s;
}
.modal-overlay.active { display: flex; opacity: 1; }

.modal {
    width: 100%;
    max-width: 440px;
    max-height: 88vh;
    overflow-y: auto;
    padding: 26px;
    border-radius: 18px;
    border: 1px solid rgba(56, 189, 248, .26) !important;
    background: linear-gradient(165deg, rgba(18, 32, 56, .97), rgba(8, 16, 30, .99)) !important;
    box-shadow: 0 40px 100px -20px rgba(0, 0, 0, .9);
    transform: translateY(14px) scale(.98);
    transition: transform .28s cubic-bezier(.2, .8, .2, 1);
}
.modal-overlay.active .modal { transform: translateY(0) scale(1); }
.modal h3 { margin: 0 0 18px; font-size: 18px; color: #fff; }
.modal h2 { margin: 0 0 12px; font-size: 21px; color: #fff; }

.modal-lg { max-width: 660px; }
.modal-xl { max-width: 860px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; flex-wrap: wrap; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 7px; }

.input-box {
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(0, 0, 0, .32);
    border: 1px solid rgba(86, 140, 200, .26);
    color: #fff;
    outline: none;
    font-size: 14px;
    font-family: inherit;
    transition: .2s;
}
.input-box:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34, 211, 238, .12); }
.input-box:disabled { color: var(--muted); cursor: not-allowed; background: rgba(0, 0, 0, .12); }
.input-box::placeholder { color: #57708f; }
textarea.input-box { resize: vertical; min-height: 90px; line-height: 1.6; }

select.input-box {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2322d3ee' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 36px;
    cursor: pointer;
}
select.input-box option { background-color: #0a1426; color: var(--text); }

/* 系统确认框 */
.sys-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, .6);
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity .3s;
    pointer-events: none;
}
.sys-modal-overlay.active { opacity: 1; pointer-events: auto; }
.sys-modal {
    width: 90%;
    max-width: 400px;
    padding: 24px;
    border-radius: 16px;
    background: linear-gradient(165deg, rgba(20, 35, 60, .97), rgba(10, 20, 38, .99));
    border: 1px solid rgba(56, 189, 248, .25);
    box-shadow: 0 40px 100px -20px rgba(0, 0, 0, .9);
    transform: scale(.95);
    transition: transform .3s;
}
.sys-modal-overlay.active .sys-modal { transform: scale(1); }
.sys-modal-title { margin: 0 0 14px; font-size: 18px; font-weight: 600; color: #fff; }
.sys-modal-content { font-size: 14.5px; color: #cfe1f8; line-height: 1.65; margin-bottom: 22px; }
.sys-modal-footer { display: flex; justify-content: flex-end; gap: 12px; }
.sys-btn { padding: 10px 20px; border-radius: 10px; font-size: 14px; font-family: inherit; cursor: pointer; transition: .2s; border: 0; font-weight: 500; }
.sys-btn-cancel { background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .15); color: #9ecdf8; }
.sys-btn-confirm { background: linear-gradient(120deg, #22d3ee, #3b82f6); color: #04121f; font-weight: 700; }
.sys-btn-danger { background: linear-gradient(120deg, #f87171, #ef4444); color: #fff; }

/* ---------------- 6. 按钮 / 徽章 / 表格 ---------------- */
.btn-submit, .btn-danger, .btn-cancel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: .18s;
    white-space: nowrap;
}
.btn-submit { background: linear-gradient(120deg, #22d3ee, #3b82f6); color: #04121f; font-weight: 700; border: 0; }
.btn-submit:hover { filter: brightness(1.1); }
.btn-submit:disabled { opacity: .55; cursor: not-allowed; filter: none; }
.btn-submit.gold { background: linear-gradient(120deg, #fbbf24, #f59e0b); color: #000; }
.btn-submit.ok { background: linear-gradient(120deg, #34d399, #10b981); color: #04121f; }
.btn-submit.violet { background: linear-gradient(120deg, #a78bfa, #8b5cf6); color: #fff; }
.btn-danger { background: rgba(248, 113, 113, .14); border: 1px solid rgba(248, 113, 113, .4); color: var(--danger); }
.btn-danger:hover { background: rgba(248, 113, 113, .24); }
.btn-cancel { background: transparent; border: 1px solid rgba(255, 255, 255, .2); color: #9ecdf8; }
.btn-cancel:hover { background: rgba(255, 255, 255, .07); }

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 11px;
    margin-right: 5px;
    background: transparent;
    border: 1px solid rgba(56, 189, 248, .3);
    border-radius: 7px;
    color: #9ecdf8;
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    transition: .16s;
    white-space: nowrap;
}
.action-btn:hover { background: rgba(56, 189, 248, .12); color: #fff; }
.action-btn.gold { border-color: rgba(251, 191, 36, .42); color: var(--gold); }
.action-btn.ok { border-color: rgba(52, 211, 153, .42); color: var(--ok); }
.action-btn.danger { border-color: rgba(248, 113, 113, .3); color: var(--danger); }

.chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 11px;
    border-radius: 99px;
    font-size: 16px;
    background: rgba(56, 189, 248, .1);
    border: 1px solid rgba(56, 189, 248, .24);
    color: #9ecdf8;
    white-space: nowrap;
}
.chip.gold { background: rgba(251, 191, 36, .12); border-color: rgba(251, 191, 36, .3); color: var(--gold); }
.chip.ok { background: rgba(52, 211, 153, .12); border-color: rgba(52, 211, 153, .3); color: var(--ok); }
.chip.danger { background: rgba(248, 113, 113, .12); border-color: rgba(248, 113, 113, .3); color: var(--danger); }
.chip.violet { background: rgba(139, 92, 246, .14); border-color: rgba(139, 92, 246, .32); color: #c4b5fd; }

.table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.data-table th, .data-table td { padding: 11px 12px; border-bottom: 1px solid rgba(255, 255, 255, .05); text-align: left; vertical-align: middle; }
.data-table th { color: var(--muted); font-weight: 500; font-size: 12.5px; white-space: nowrap; }
.data-table tbody tr:hover td { background: rgba(255, 255, 255, .025); }

/* ---------------- 7. Toast / 空状态 ---------------- */
.toast-container {
    position: fixed;
    top: 26px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    pointer-events: none;
}
.toast {
    padding: 12px 24px;
    border-radius: 12px;
    background: rgba(15, 28, 50, .96);
    border: 1px solid rgba(56, 189, 248, .3);
    color: #fff;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(10px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .5);
    animation: toastIn .3s forwards;
    max-width: min(92vw, 460px);
}
.toast.success { border-color: rgba(52, 211, 153, .5); color: var(--ok); }
.toast.error { border-color: rgba(248, 113, 113, .5); color: var(--danger); }
@keyframes toastIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.empty-state {
    padding: 42px 20px;
    text-align: center;
    color: #55688a;
    font-size: 14px;
}
.empty-state .ei { font-size: 40px; display: block; margin-bottom: 12px; opacity: .7; }

/* 页脚提示 */
.page-foot { text-align: center; color: #4f6b90; font-size: 12.5px; padding: 26px 20px 40px; }

/* ---------------- 共用：中奖名单 ---------------- */
.winner-list { display: flex; flex-direction: column; gap: 9px; max-height: 56vh; overflow-y: auto; padding-right: 4px; }
.winner-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 11px;
    background: rgba(251, 191, 36, .05);
    border: 1px solid rgba(251, 191, 36, .16);
}
.winner-row.me { background: rgba(52, 211, 153, .1); border-color: rgba(52, 211, 153, .38); }
.winner-row .wr-avatar {
    width: 34px; height: 34px; flex: none; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 14px; color: #04121f;
    background: linear-gradient(140deg, #fbbf24, #f59e0b);
}
.winner-row .wr-name { font-weight: 700; color: #fff; font-size: 14px; }
.winner-row .wr-sub { font-size: 11.5px; color: var(--muted); }
.winner-row .wr-key {
    margin-left: auto; text-align: right;
    font-family: "SF Mono", Consolas, monospace;
    font-size: 12.5px; color: var(--gold);
    word-break: break-all;
}
.winner-row .wr-pts { font-size: 11.5px; color: var(--ok); margin-top: 3px; }

/* ---------------- 共用：通知条目 ---------------- */
.notice-item {
    position: relative;
    padding: 16px 18px 16px 21px;
    border-radius: 13px;
    background: rgba(12, 22, 40, .62);
    border: 1px solid rgba(120, 190, 255, .13);
    margin-bottom: 11px;
    cursor: pointer;
    transition: .18s;
    overflow: hidden;
}
.notice-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 13px;
    bottom: 13px;
    width: 3px;
    border-radius: 99px;
    background: rgba(120, 190, 255, .2);
    transition: .2s;
}
.notice-item.unread::before {
    background: linear-gradient(180deg, #fbbf24, #f59e0b);
    box-shadow: 0 0 12px rgba(251, 191, 36, .55);
}
.notice-item:hover {
    border-color: rgba(120, 190, 255, .42);
    background: rgba(18, 32, 54, .76);
    transform: translateX(2px);
}
.notice-item .ni-top { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.notice-item .ni-title {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    line-height: 1.45;
    letter-spacing: .015em;
}
.notice-item .ni-time {
    font-size: 11.5px;
    color: #6b85a6;
    margin-left: auto;
    letter-spacing: .03em;
    font-variant-numeric: tabular-nums;
}
.notice-item .ni-preview {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.78;
    color: #9db4d2;
    letter-spacing: .015em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* 通知详情弹窗 */
.notice-head { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 18px; }
.notice-head .nh-ico {
    width: 44px;
    height: 44px;
    flex: none;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 21px;
    background: linear-gradient(140deg, rgba(251, 191, 36, .24), rgba(245, 158, 11, .1));
    border: 1px solid rgba(251, 191, 36, .34);
    box-shadow: 0 0 22px -8px rgba(251, 191, 36, .8);
}
.notice-head .nh-title {
    font-size: 19px;
    font-weight: 800;
    color: #fff;
    line-height: 1.45;
    letter-spacing: .02em;
    text-shadow: 0 1px 12px rgba(0, 0, 0, .4);
}
.notice-head .nh-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 7px;
    font-size: 12px;
    color: #8ba6c8;
    letter-spacing: .02em;
    font-variant-numeric: tabular-nums;
}

/* 通知正文：按中文阅读习惯优化行高、字距与两端对齐 */
.notice-body {
    position: relative;
    padding: 18px 20px;
    border-radius: 13px;
    background: linear-gradient(180deg, rgba(6, 14, 28, .52), rgba(6, 14, 28, .32));
    border: 1px solid rgba(120, 190, 255, .12);
    border-left: 3px solid rgba(251, 191, 36, .55);
    font-size: 15px;
    line-height: 2.05;
    letter-spacing: .035em;
    color: #dbe8fa;
    text-align: justify;
    text-justify: inter-character;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    word-break: break-word;
    font-feature-settings: "palt" 1;
    max-height: 48vh;
    overflow-y: auto;
    scrollbar-width: thin;
}

/* ---------------- 文字排版优化 ---------------- */
h1, h2, h3, h4 { line-height: 1.38; letter-spacing: .02em; color: #fff; font-weight: 800; }
p { line-height: 1.75; }
strong, b { color: #fff; font-weight: 700; }
small, .text-sm { font-size: 12px; color: var(--muted); }
.mono, code, kbd { font-family: var(--font-mono); letter-spacing: 0; }

.modal h3 {
    font-size: 18.5px;
    font-weight: 800;
    letter-spacing: .035em;
    line-height: 1.4;
}
.modal h2 { font-size: 21px; letter-spacing: .03em; }

.form-group label {
    font-size: 12.5px;
    letter-spacing: .05em;
    color: #8ba6c8;
    font-weight: 500;
}
.input-box { font-size: 14.5px; letter-spacing: .02em; }
.input-box::placeholder { letter-spacing: .02em; }

.data-table { font-variant-numeric: tabular-nums; }
.data-table th { font-weight: 600; letter-spacing: .06em; color: #8aa4c6; }
.data-table td { line-height: 1.55; letter-spacing: .015em; }

.chip { font-weight: 600; letter-spacing: .03em; }
.action-btn { font-weight: 600; letter-spacing: .02em; }
.btn-submit, .btn-danger, .btn-cancel { letter-spacing: .03em; font-weight: 700; }
.sys-modal-content { letter-spacing: .02em; line-height: 1.8; }
.empty-state { letter-spacing: .04em; }

/* 渐变标题用 drop-shadow（background-clip:text 下 text-shadow 会糊成实心影） */
.hero .title, .lb-header h1, .teacher-head h1, .header h1 {
    filter: drop-shadow(0 2px 16px rgba(0, 0, 0, .65)) drop-shadow(0 1px 3px rgba(0, 0, 0, .5));
}
.hero .subtitle, .lb-header p, .teacher-head p, .header p {
    text-shadow: 0 1px 10px rgba(0, 0, 0, .75), 0 0 2px rgba(0, 0, 0, .6);
}

/* ==================== QQ 风格会员徽标（VIP 红 / SVIP 金） ==================== */
.qq-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    height: 19px;
    padding: 0 7px 0 5px;
    border-radius: 6px;
    font-size: 10.5px;
    font-weight: 900;
    letter-spacing: .07em;
    line-height: 1;
    position: relative;
    white-space: nowrap;
    flex: none;
    overflow: hidden;
    vertical-align: middle;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 2px 9px rgba(0, 0, 0, .42);
}
.qq-badge .qv-c { font-size: 10px; line-height: 1; position: relative; z-index: 1; }
.qq-badge b { position: relative; z-index: 1; font-weight: 900; }
.qq-badge::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, .48), rgba(255, 255, 255, 0) 58%);
    pointer-events: none;
}
.qq-badge.vip {
    background: linear-gradient(135deg, #ff7a85 0%, #ef2233 46%, #b3121f 100%);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .55);
}
.qq-badge.svip {
    background: linear-gradient(135deg, #fff3a6 0%, #ffd028 44%, #e79b00 100%);
    color: #6b3f00;
    border: 1px solid rgba(255, 255, 255, .72);
}
.qq-badge.svip .qv-c { color: #8a5200; }

.qq-badge.sm { height: 16px; font-size: 9px; padding: 0 5px 0 4px; border-radius: 5px; }
.qq-badge.sm .qv-c { font-size: 8px; }
.qq-badge.lg { height: 25px; font-size: 12.5px; padding: 0 11px 0 8px; border-radius: 7px; }
.qq-badge.lg .qv-c { font-size: 12px; }

/* 会员头像外框（红 / 金） */
.is-vip .lb-avatar, .is-vip .po-avatar { box-shadow: 0 0 0 2px #ef2233, 0 0 14px rgba(239, 34, 51, .55); }
.is-svip .lb-avatar, .is-svip .po-avatar { box-shadow: 0 0 0 2px #ffd028, 0 0 16px rgba(255, 208, 40, .6); }

/* ==================== 勋章 ==================== */
.medal {
    position: relative;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 26px;
    line-height: 1;
    flex: none;
    overflow: hidden;
    box-shadow:
        inset 0 2px 5px rgba(255, 255, 255, .55),
        inset 0 -8px 14px rgba(0, 0, 0, .3),
        0 6px 16px rgba(0, 0, 0, .38);
}
.medal::before {
    content: "";
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, .45);
    pointer-events: none;
}
.medal::after {
    content: "";
    position: absolute;
    top: -40%;
    left: -70%;
    width: 55%;
    height: 180%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .7), transparent);
    transform: rotate(22deg);
    opacity: 0;
    pointer-events: none;
}
.medal-wrap:hover .medal::after { animation: medalShine .85s ease-out; }
@keyframes medalShine {
    0% { left: -70%; opacity: 0; }
    35% { opacity: .95; }
    100% { left: 130%; opacity: 0; }
}

.medal.gold { background: radial-gradient(circle at 32% 26%, #fff2b8, #f7c948 42%, #b47c00 100%); }
.medal.silver { background: radial-gradient(circle at 32% 26%, #ffffff, #cfd8e3 42%, #8494a8 100%); }
.medal.bronze { background: radial-gradient(circle at 32% 26%, #ffe0bd, #d98a4a 42%, #8a4c1c 100%); }
.medal.red { background: radial-gradient(circle at 32% 26%, #ffb3ae, #ef4444 42%, #9b1c1c 100%); }
.medal.violet { background: radial-gradient(circle at 32% 26%, #e0ccff, #8b5cf6 42%, #5b21b6 100%); }
.medal.blue { background: radial-gradient(circle at 32% 26%, #cfe6ff, #3b82f6 42%, #1e40af 100%); }
.medal.green { background: radial-gradient(circle at 32% 26%, #d6f7df, #22c55e 42%, #15803d 100%); }
.medal.teal { background: radial-gradient(circle at 32% 26%, #ccfbf1, #14b8a6 42%, #0f766e 100%); }
.medal.blackgold {
    background: radial-gradient(circle at 32% 26%, #6b7280, #1f2937 45%, #000000 100%);
    box-shadow:
        inset 0 0 0 2px rgba(251, 191, 36, .8),
        inset 0 2px 5px rgba(255, 255, 255, .28),
        0 6px 18px rgba(0, 0, 0, .55);
}
.medal-wrap { position: relative; display: inline-flex; flex-direction: column; align-items: center; gap: 7px; }
.medal.locked { filter: grayscale(1) brightness(.62); }
.medal-check {
    position: absolute;
    right: -3px;
    bottom: -3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 11px;
    background: linear-gradient(140deg, #34d399, #059669);
    color: #04121f;
    font-weight: 900;
    box-shadow: 0 0 0 2px rgba(9, 17, 31, .9);
}

/* ---------------- 8. 响应式 ---------------- */
@media (max-width: 900px) {
    .desktop-only { display: none !important; }
    .mobile-menu-btn { display: grid; }
}

@media (max-width: 768px) {
    :root { --nav-h: 58px; }
    .navbar { padding: 0 12px; }
    .nav-brand { gap: 8px; padding: 3px 6px 3px 3px; }
    .brand-logo { height: 34px; padding: 3px 4px; border-radius: 9px; }
    .brand-logo img { height: 24px; max-width: 80px; }
    .brand-title { font-size: 14.5px; letter-spacing: .02em; }
    .brand-sub { display: none; }
    .badge-points { height: 32px; padding: 0 10px; font-size: 13px; }
    .btn-nav { height: 32px; padding: 0 10px; font-size: 12.5px; }
    .modal { padding: 20px; border-radius: 15px; }
    .modal h3 { font-size: 17px; }
    .notice-body { font-size: 14.5px; line-height: 1.95; padding: 15px 16px; }
    .notice-head .nh-title { font-size: 17px; }
    .toast-container { top: 14px; width: 92vw; }
    .toast { width: 100%; justify-content: center; }
}

@media (max-width: 420px) {
    .brand-text { display: none; }
    .brand-logo { height: 32px; }
    .brand-logo img { height: 20px; max-width: 64px; }
}
