/* ============================================================
   夜航电竞护航平台 · 基础层
   设计语言：深紫 + 冰蓝 / 毛玻璃 / 大圆角 / 柔和微光
   ============================================================ */

:root {
    /* 背景 */
    --bg-0: #07050e;
    --bg-1: #0b0817;
    --bg-2: #120d24;
    --bg-3: #191230;

    /* 主色 */
    --purple: #8b5cf6;
    --purple-deep: #6d3fe0;
    --purple-soft: rgba(139, 92, 246, .16);
    --ice: #5fe1ff;
    --ice-deep: #35c6ea;
    --ice-soft: rgba(95, 225, 255, .12);

    /* 辅助 */
    --grey: #a9a3c2;
    --grey-2: #6f6889;
    --dark-teal: #39d0b0;
    --warn: #f5b544;
    --danger: #ff6b8a;
    --success: #46d6a0;

    /* 文字 */
    --text: #ecebf5;
    --text-2: #b9b3d0;
    --text-3: #837c9e;

    /* 线条 / 玻璃 */
    --line: rgba(255, 255, 255, .08);
    --line-strong: rgba(255, 255, 255, .14);
    --glass: rgba(255, 255, 255, .055);
    --glass-2: rgba(255, 255, 255, .085);
    --glass-3: rgba(255, 255, 255, .12);

    /* 圆角 */
    --r-card: 18px;
    --r-modal: 22px;
    --r-btn: 12px;
    --r-input: 10px;
    --r-pill: 999px;

    /* 阴影 */
    --shadow-out: 0 18px 46px rgba(4, 2, 12, .55), 0 2px 8px rgba(4, 2, 12, .35);
    --shadow-soft: 0 10px 28px rgba(4, 2, 12, .38);
    --shadow-in: inset 0 1px 0 rgba(255, 255, 255, .07), inset 0 -1px 0 rgba(0, 0, 0, .18);
    --glow-purple: 0 0 0 1px rgba(139, 92, 246, .22), 0 12px 40px rgba(109, 63, 224, .18);
    --glow-ice: 0 0 0 1px rgba(95, 225, 255, .2), 0 12px 36px rgba(53, 198, 234, .14);

    /* 动效 */
    --ease: cubic-bezier(.22, .68, .32, 1);
    --fast: .18s;
    --mid: .28s;

    --sidebar-w: 236px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
    margin: 0;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: radial-gradient(1200px 820px at 8% -12%, #241a4a 0%, transparent 58%),
                radial-gradient(980px 720px at 96% 4%, #0d3a4a 0%, transparent 52%),
                linear-gradient(160deg, var(--bg-1) 0%, var(--bg-0) 55%, #0a0716 100%);
    background-attachment: fixed;
    color: var(--text);
    font-size: 14px;
    line-height: 1.62;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    min-height: 100vh;
    overflow-x: hidden;
}

/* 背景装饰：光晕 + 网格噪点 */
.glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
    z-index: 0;
    opacity: .55;
}
.glow-1 { width: 520px; height: 520px; left: -180px; top: -160px; background: radial-gradient(circle, rgba(109, 63, 224, .55), transparent 68%); }
.glow-2 { width: 620px; height: 620px; right: -260px; bottom: -260px; background: radial-gradient(circle, rgba(53, 198, 234, .28), transparent 68%); }

.grid-noise {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: .5;
    background-image:
        linear-gradient(rgba(255, 255, 255, .022) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .022) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: radial-gradient(72% 60% at 50% 0%, #000 0%, transparent 85%);
    -webkit-mask-image: radial-gradient(72% 60% at 50% 0%, #000 0%, transparent 85%);
}

/* 排版 */
h1, h2, h3, h4, h5 { margin: 0; font-weight: 700; letter-spacing: -.01em; line-height: 1.3; }
h1 { font-size: 26px; }
h2 { font-size: 20px; }
h3 { font-size: 17px; }
h4 { font-size: 15px; }
p { margin: 0; }
a { color: var(--ice); text-decoration: none; transition: color var(--fast) var(--ease), opacity var(--fast) var(--ease); }
a:hover { color: #9aecff; }
img { max-width: 100%; display: block; }
ul, ol { margin: 0; padding-left: 18px; }

::selection { background: rgba(139, 92, 246, .38); color: #fff; }

/* 自定义滚动条 */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: rgba(255, 255, 255, .03); }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(139, 92, 246, .6), rgba(95, 225, 255, .35));
    border-radius: 99px;
    border: 2px solid transparent;
    background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, rgba(139, 92, 246, .85), rgba(95, 225, 255, .55)); background-clip: padding-box; }
* { scrollbar-width: thin; scrollbar-color: rgba(139, 92, 246, .55) rgba(255, 255, 255, .04); }

/* 玻璃材质核心 */
.glass,
.glass-card {
    background: linear-gradient(150deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .035));
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    backdrop-filter: blur(16px) saturate(140%);
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    box-shadow: var(--shadow-out), var(--shadow-in);
}

/* 渐变分割线 */
.divider {
    height: 1px;
    border: 0;
    margin: 18px 0;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, .35), rgba(95, 225, 255, .32), transparent);
}
.divider-soft { height: 1px; background: var(--line); margin: 14px 0; border: 0; }

/* 文本工具 */
.muted { color: var(--text-3); }
.dim { color: var(--text-2); }
.small { font-size: 12px; }
.strong { font-weight: 700; }
.mono { font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; letter-spacing: .01em; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ice { color: var(--ice); }
.purple { color: #b79bff; }
.ok { color: var(--success); }
.warnc { color: var(--warn); }
.dangerc { color: var(--danger); }

/* 布局工具 */
.row { display: flex; gap: 14px; align-items: center; }
.row-between { display: flex; gap: 14px; align-items: center; justify-content: space-between; }
.row-wrap { display: flex; flex-wrap: wrap; gap: 12px; }
.col { display: flex; flex-direction: column; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.gap-8 { gap: 8px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.hide { display: none !important; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }

/* 入场动画 */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn {
    from { opacity: 0; transform: translateY(10px) scale(.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes shimmer {
    0% { background-position: -420px 0; }
    100% { background-position: 420px 0; }
}
@keyframes pulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .45; transform: scale(.82); }
}
@keyframes floatY {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}
@keyframes spin { to { transform: rotate(360deg); } }

.anim-in { animation: fadeUp .5s var(--ease) both; }
.anim-in-1 { animation: fadeUp .5s var(--ease) .06s both; }
.anim-in-2 { animation: fadeUp .5s var(--ease) .12s both; }
.anim-in-3 { animation: fadeUp .5s var(--ease) .18s both; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* 骨架屏 */
.skeleton {
    border-radius: 10px;
    background: linear-gradient(90deg, rgba(255, 255, 255, .05) 25%, rgba(255, 255, 255, .11) 37%, rgba(255, 255, 255, .05) 63%);
    background-size: 420px 100%;
    animation: shimmer 1.4s infinite linear;
    min-height: 14px;
}
.skeleton-line { height: 12px; margin-bottom: 10px; }
.skeleton-card { height: 148px; border-radius: var(--r-card); }

@media (max-width: 1100px) {
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
    body { font-size: 13.5px; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    h1 { font-size: 22px; }
}
