/* ============================================================
   Arcaea Server · Nightcord Console
   世界计划 KND（25:00）风格 · 夜紫 / 玻璃 / 细线 / 框
   ============================================================ */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #0b0a10;
    --bg-soft: #121019;
    --bg-deep: #08070c;
    --panel: rgba(26, 22, 37, 0.82);
    --panel-solid: #17131f;
    --panel-soft: rgba(34, 29, 48, 0.6);
    --line: rgba(196, 176, 255, 0.11);
    --line-strong: rgba(196, 176, 255, 0.22);
    --line-bright: rgba(205, 185, 255, 0.36);

    --text: #f1edf9;
    --text-soft: #d7d0e8;
    --muted: #a49bbd;
    --dim: #746c8b;

    --accent: #a78be0;
    --accent-2: #cdb9ff;
    --accent-deep: #6f56a8;
    --rose: #d79bc8;
    --danger: #ff8098;
    --danger-soft: rgba(255, 128, 152, 0.12);
    --success: #8fe0c4;
    --success-soft: rgba(143, 224, 196, 0.12);
    --gold: #e8cf9b;

    --radius: 18px;
    --radius-lg: 24px;
    --radius-sm: 12px;

    --shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
    --shadow-soft: 0 16px 46px rgba(0, 0, 0, 0.32);
    --glow: 0 0 40px rgba(140, 110, 220, 0.18);

    --font-body: "Segoe UI Variable", "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
    --font-display: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
    --font-number: "Bahnschrift", "DIN Alternate", "Segoe UI", "PingFang SC", sans-serif;
}

html {
    height: 100%;
    scroll-behavior: smooth;
}

body {
    min-height: 100%;
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.app-body {
    background:
        radial-gradient(1100px 680px at 12% -12%, rgba(126, 92, 190, 0.24), transparent 62%),
        radial-gradient(900px 620px at 108% 4%, rgba(206, 139, 190, 0.12), transparent 58%),
        radial-gradient(800px 700px at 46% 120%, rgba(84, 66, 140, 0.16), transparent 62%),
        linear-gradient(180deg, #0c0b12 0%, #09080d 68%, #07060a 100%);
    background-attachment: fixed;
}

body.app-body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image:
        linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px),
        linear-gradient(rgba(255, 255, 255, 0.014) 1px, transparent 1px);
    background-size: 160px 160px, 160px 160px;
    mask-image: radial-gradient(120% 100% at 50% 0%, #000 20%, transparent 78%);
}

body.app-body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background: radial-gradient(120% 90% at 50% 0%, transparent 40%, rgba(0, 0, 0, 0.42) 100%);
}

a {
    color: var(--accent-2);
    text-decoration: none;
    transition: color 0.18s ease, opacity 0.18s ease;
}

a:hover {
    color: #e7dcff;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
}

img,
svg {
    display: block;
}

::selection {
    background: rgba(167, 139, 224, 0.35);
    color: #fff;
}

:focus-visible {
    outline: 2px solid rgba(205, 185, 255, 0.75);
    outline-offset: 2px;
}

/* ============================ 图标 / 头像 ============================ */

.icon {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

.avatar {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 50%;
    border: 1px solid var(--line-bright);
    background:
        radial-gradient(120% 120% at 30% 20%, rgba(205, 185, 255, 0.26), transparent 60%),
        linear-gradient(150deg, #362b4f, #1d1729);
    color: var(--accent-2);
    font-weight: 700;
    letter-spacing: 0.04em;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 8px 20px rgba(0, 0, 0, 0.28);
    user-select: none;
}

.avatar-xs { width: 26px; height: 26px; font-size: 11px; }
.avatar-sm { width: 34px; height: 34px; font-size: 13px; }
.avatar-lg { width: 58px; height: 58px; font-size: 22px; }
.avatar-xl { width: 84px; height: 84px; font-size: 32px; }

/* ---------- QQ 头像 ---------- */

.avatar-qq {
    position: relative;
    overflow: hidden;
}

.avatar-qq img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.frame-portrait-avatar.has-qq {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    overflow: hidden;
    font-size: 24px;
}

.frame-portrait-lg .frame-portrait-avatar.has-qq {
    width: 112px;
    height: 112px;
    font-size: 42px;
}

.frame-portrait-avatar.has-qq img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.qq-setting {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.qq-preview {
    flex: 0 0 auto;
}

.qq-setting .form {
    flex: 1;
    min-width: 240px;
}

/* ============================ 布局骨架 ============================ */

.app-shell {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    display: flex;
    flex-direction: column;
    width: 264px;
    padding: 22px 16px 18px;
    border-right: 1px solid var(--line);
    background:
        radial-gradient(90% 50% at 0% 0%, rgba(120, 88, 180, 0.18), transparent 60%),
        linear-gradient(180deg, rgba(20, 17, 28, 0.94), rgba(10, 9, 15, 0.97));
    backdrop-filter: blur(20px);
}

.sidebar::after {
    content: "";
    position: absolute;
    top: 0;
    right: -1px;
    width: 1px;
    height: 180px;
    background: linear-gradient(180deg, rgba(205, 185, 255, 0.6), transparent);
    opacity: 0.5;
}

.brand {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 4px 8px 18px;
    border-bottom: 1px solid var(--line);
    color: var(--text);
}

.brand:hover {
    color: var(--text);
}

.brand-mark {
    display: inline-flex;
    align-items: baseline;
    gap: 1px;
    font-family: var(--font-number);
    font-size: 27px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--accent-2);
    text-shadow: 0 0 26px rgba(167, 139, 224, 0.5);
}

.brand-colon {
    color: var(--rose);
    animation: blink 4s steps(1, end) infinite;
}

@keyframes blink {
    0%, 92%, 100% { opacity: 1; }
    94% { opacity: 0.2; }
    96% { opacity: 1; }
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.brand-text strong {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.06em;
}

.brand-text small {
    font-size: 9px;
    letter-spacing: 0.22em;
    color: var(--dim);
}

.side-nav {
    flex: 1;
    overflow-y: auto;
    padding: 14px 0 8px;
    scrollbar-width: thin;
    scrollbar-color: rgba(196, 176, 255, 0.18) transparent;
}

.nav-group {
    margin-bottom: 12px;
}

.nav-group-label {
    padding: 0 12px 7px;
    font-family: var(--font-number);
    font-size: 9px;
    letter-spacing: 0.24em;
    color: var(--dim);
}

.nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 11px;
    margin-bottom: 2px;
    border: 1px solid transparent;
    border-radius: 11px;
    color: var(--muted);
    font-size: 13.5px;
    overflow: hidden;
}

.nav-link .icon {
    width: 17px;
    height: 17px;
    opacity: 0.85;
}

.nav-link:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.035);
}

.nav-link.is-active {
    color: var(--text);
    border-color: var(--line-strong);
    background:
        linear-gradient(90deg, rgba(167, 139, 224, 0.18), rgba(167, 139, 224, 0.03)),
        rgba(255, 255, 255, 0.02);
    box-shadow: inset 3px 0 0 var(--accent-2), 0 6px 22px rgba(0, 0, 0, 0.2);
}

.nav-link.is-active .icon {
    color: var(--accent-2);
    opacity: 1;
}

.nav-glow {
    position: absolute;
    right: -24px;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(167, 139, 224, 0.22), transparent 70%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.nav-link:hover .nav-glow,
.nav-link.is-active .nav-glow {
    opacity: 1;
}

.nav-dot {
    width: 6px;
    height: 6px;
    margin-left: auto;
    border-radius: 50%;
    background: var(--rose);
    box-shadow: 0 0 10px rgba(215, 155, 200, 0.8);
}

.side-foot {
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

.side-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 9px;
    margin-bottom: 6px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.025);
}

.side-user-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.35;
}

.side-user-name {
    font-size: 13px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.side-user-meta {
    font-family: var(--font-number);
    font-size: 10.5px;
    color: var(--dim);
    letter-spacing: 0.04em;
}

.side-logout {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 12px;
    border-radius: 10px;
    color: var(--dim);
    font-size: 12.5px;
}

.side-logout:hover {
    color: var(--danger);
    background: var(--danger-soft);
}

.side-signature {
    padding: 9px 12px 0;
    font-family: var(--font-number);
    font-size: 9px;
    letter-spacing: 0.2em;
    color: rgba(116, 108, 139, 0.6);
}

.sidebar-scrim {
    position: fixed;
    inset: 0;
    z-index: 30;
    background: rgba(5, 4, 8, 0.66);
    backdrop-filter: blur(3px);
}

.app-main {
    display: flex;
    flex-direction: column;
    width: calc(100% - 264px);
    min-height: 100vh;
    margin-left: 264px;
}

/* ============================ 顶栏 ============================ */

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 92px;
    padding: 18px clamp(18px, 3.2vw, 42px);
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(11, 10, 16, 0.9), rgba(11, 10, 16, 0.65));
    backdrop-filter: blur(18px);
}

.topbar::after {
    content: "";
    position: absolute;
    left: clamp(18px, 3.2vw, 42px);
    bottom: -1px;
    width: 88px;
    height: 1px;
    background: linear-gradient(90deg, var(--accent-2), transparent);
}

.topbar-title {
    min-width: 0;
}

.topbar-title .eyebrow {
    display: block;
    margin-bottom: 3px;
}

.topbar-title h1 {
    font-family: var(--font-display);
    font-size: clamp(22px, 2.2vw, 28px);
    font-weight: 600;
    letter-spacing: 0.05em;
    line-height: 1.25;
}

.topbar-title p {
    margin-top: 3px;
    font-size: 12px;
    color: var(--dim);
    letter-spacing: 0.03em;
}

.topbar-side {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.night-clock {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.025);
    font-family: var(--font-number);
    font-size: 12px;
    letter-spacing: 0.12em;
    color: var(--text-soft);
}

.clock-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 10px rgba(143, 224, 196, 0.8);
    animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.45; transform: scale(0.82); }
}

.icon-btn {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.025);
    color: var(--muted);
    transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.icon-btn:hover {
    color: var(--text);
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.05);
}

.nav-toggle {
    display: none;
}

.topbar-logout:hover {
    color: var(--danger);
    border-color: rgba(255, 128, 152, 0.4);
    background: var(--danger-soft);
}

/* ---------- 通知 ---------- */

.notify {
    position: relative;
}

.notify-toggle {
    position: relative;
}

.notify-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--danger);
    color: #1a0d13;
    font-family: var(--font-number);
    font-size: 9px;
    font-weight: 700;
    line-height: 17px;
    text-align: center;
    box-shadow: 0 0 12px rgba(255, 128, 152, 0.55);
}

.notify-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 60;
    width: min(360px, calc(100vw - 32px));
    border: 1px solid var(--line-strong);
    border-radius: 16px;
    background: linear-gradient(165deg, rgba(32, 27, 46, 0.98), rgba(14, 12, 21, 0.99));
    box-shadow: var(--shadow);
    overflow: hidden;
}

.notify-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 15px;
    border-bottom: 1px solid var(--line);
}

.notify-head strong {
    font-size: 12px;
    letter-spacing: 0.08em;
}

.notify-read-all {
    padding: 0;
    border: 0;
    background: none;
    color: var(--accent-2);
    font-size: 11px;
    cursor: pointer;
}

.notify-read-all:hover {
    color: var(--text);
}

.notify-read-all:disabled {
    color: var(--dim);
    cursor: default;
}

.notify-list {
    max-height: 380px;
    overflow-y: auto;
}

.notify-item {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(196, 176, 255, 0.07);
}

.notify-item:last-child {
    border-bottom: 0;
}

.notify-item-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.notify-item-head strong {
    font-size: 12.5px;
    color: var(--text);
}

.notify-item-head span {
    flex: 0 0 auto;
    font-family: var(--font-number);
    font-size: 9.5px;
    color: var(--dim);
}

.notify-item p {
    margin-top: 5px;
    font-size: 11.5px;
    line-height: 1.7;
    color: var(--muted);
    word-break: break-word;
}

.notify-item.is-unread {
    background: rgba(167, 139, 224, 0.07);
}

.notify-item.is-unread .notify-item-head strong::before {
    content: "";
    display: inline-block;
    width: 5px;
    height: 5px;
    margin-right: 7px;
    border-radius: 50%;
    background: var(--accent-2);
    vertical-align: middle;
    box-shadow: 0 0 8px rgba(205, 185, 255, 0.7);
}

.notify-empty {
    padding: 28px 16px;
    text-align: center;
    font-size: 12px;
    color: var(--dim);
}

.notify-admin-body {
    margin-top: 3px;
    font-size: 11px;
    line-height: 1.6;
}

/* ============================ 内容区 ============================ */

.content {
    width: 100%;
    max-width: 1220px;
    margin: 0 auto;
    padding: clamp(22px, 3vw, 38px) clamp(16px, 3.2vw, 42px) 64px;
    flex: 1;
}

.page-stack {
    display: flex;
    flex-direction: column;
    gap: 22px;
    animation: rise 0.5s cubic-bezier(0.22, 0.8, 0.3, 1) both;
}

.page-stack > * {
    animation: rise 0.55s cubic-bezier(0.22, 0.8, 0.3, 1) both;
}

.page-stack > *:nth-child(2) { animation-delay: 0.05s; }
.page-stack > *:nth-child(3) { animation-delay: 0.1s; }
.page-stack > *:nth-child(4) { animation-delay: 0.15s; }
.page-stack > *:nth-child(5) { animation-delay: 0.2s; }

@keyframes rise {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.app-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 22px clamp(18px, 3.2vw, 42px) 30px;
    border-top: 1px solid var(--line);
    color: var(--dim);
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.footer-mark {
    font-family: var(--font-number);
    color: rgba(167, 139, 224, 0.55);
}

/* ============================ 通用排版 ============================ */

.eyebrow {
    font-family: var(--font-number);
    font-size: 9.5px;
    font-weight: 500;
    letter-spacing: 0.26em;
    color: var(--dim);
    text-transform: uppercase;
}

.mono {
    font-family: "Cascadia Mono", "SF Mono", Consolas, Menlo, monospace;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.06em;
}

.accent {
    color: var(--accent-2);
}

.grid {
    display: grid;
    gap: 22px;
}

.grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-wide-left {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
}

.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* ============================ 卡片 ============================ */

.card {
    position: relative;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        linear-gradient(165deg, rgba(32, 27, 45, 0.78), rgba(16, 14, 23, 0.9));
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(16px);
    overflow: hidden;
}

.card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 18px;
    right: 18px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(205, 185, 255, 0.28), transparent);
    opacity: 0.75;
}

.card-muted {
    background: linear-gradient(165deg, rgba(24, 21, 34, 0.7), rgba(14, 12, 20, 0.86));
}

.card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.card-head > div:first-child {
    min-width: 0;
}

.card-head h3 {
    margin-top: 3px;
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.card-head-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.card-head > .icon {
    width: 22px;
    height: 22px;
    color: var(--dim);
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
}

.text-link .icon {
    width: 14px;
    height: 14px;
    transition: transform 0.18s ease;
}

.text-link:hover {
    color: var(--accent-2);
}

.text-link:hover .icon {
    transform: translateX(3px);
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.028);
    color: var(--muted);
    font-size: 11px;
    white-space: nowrap;
}

.pill strong {
    color: var(--accent-2);
    font-family: var(--font-number);
}

.pill.is-ok {
    color: var(--success);
    border-color: rgba(143, 224, 196, 0.32);
    background: var(--success-soft);
}

.pill.is-warn {
    color: var(--danger);
    border-color: rgba(255, 128, 152, 0.32);
    background: var(--danger-soft);
}

.mini-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border: 1px solid rgba(232, 207, 155, 0.4);
    border-radius: 999px;
    background: rgba(232, 207, 155, 0.1);
    color: var(--gold);
    font-family: var(--font-number);
    font-size: 9px;
    letter-spacing: 0.12em;
    vertical-align: middle;
}

.mini-badge.is-muted {
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.05);
    color: var(--muted);
}

.mini-badge.is-warn {
    border-color: rgba(255, 128, 152, 0.4);
    background: var(--danger-soft);
    color: var(--danger);
}

/* ============================ 按钮 ============================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    border: 1px solid transparent;
    border-radius: 11px;
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.btn .icon {
    width: 17px;
    height: 17px;
}

.btn:disabled,
.btn.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, #8f6fd0, #b79aeb 55%, #c9a9ee);
    color: #171020;
    box-shadow: 0 12px 30px rgba(140, 110, 220, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.btn-primary:hover {
    color: #120c1b;
    transform: translateY(-1px);
    box-shadow: 0 16px 36px rgba(140, 110, 220, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-ghost {
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.035);
    color: var(--text-soft);
}

.btn-ghost:hover {
    border-color: var(--line-bright);
    background: rgba(255, 255, 255, 0.07);
    color: var(--text);
}

.btn-quiet {
    border-color: transparent;
    background: transparent;
    color: var(--muted);
}

.btn-quiet:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
}

.btn-danger {
    border-color: rgba(255, 128, 152, 0.32);
    background: linear-gradient(135deg, rgba(213, 70, 96, 0.9), rgba(255, 128, 152, 0.85));
    color: #1a0c11;
    font-weight: 700;
}

.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(255, 128, 152, 0.24);
}

.btn-sm {
    padding: 7px 13px;
    font-size: 12px;
    border-radius: 9px;
}

.btn-block {
    width: 100%;
    padding: 13px 20px;
    margin-top: 4px;
}

.inline-form {
    display: inline;
}

.inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* ============================ 表单 ============================ */

.form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.field-row {
    display: flex;
    gap: 12px;
}

.field-row .field {
    flex: 1;
}

.recaptcha-wrap {
    display: flex;
    justify-content: center;
    margin: 2px 0;
    min-height: 78px;
}

.field label {
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 0.03em;
}

.field input,
.field select,
.field textarea,
.select,
.search-box input {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: rgba(9, 8, 14, 0.55);
    color: var(--text);
    font-size: 14px;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.field textarea {
    resize: vertical;
    min-height: 72px;
    line-height: 1.6;
}

.field input::placeholder,
.field textarea::placeholder,
.search-box input::placeholder {
    color: rgba(116, 108, 139, 0.75);
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.select:focus,
.search-box input:focus {
    border-color: rgba(205, 185, 255, 0.55);
    background: rgba(13, 11, 20, 0.75);
    box-shadow: 0 0 0 3px rgba(167, 139, 224, 0.16);
}

.hint {
    font-size: 11px;
    color: var(--dim);
}

.form-row {
    display: flex;
    gap: 14px;
}

.form-row .field {
    flex: 1;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 2px;
}

/* ---------- 开关 ---------- */

.switch {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 14px 15px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.025);
    cursor: pointer;
    user-select: none;
    transition: border-color 0.18s ease, background 0.18s ease;
}

.switch:hover {
    border-color: var(--line-bright);
    background: rgba(255, 255, 255, 0.04);
}

.switch input {
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    flex: 0 0 auto;
    width: 44px;
    height: 24px;
    margin: 0;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease;
}

.switch input::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--dim);
    transition: transform 0.18s ease, background 0.18s ease;
}

.switch input:checked {
    border-color: var(--line-bright);
    background: rgba(167, 139, 224, 0.38);
}

.switch input:checked::after {
    transform: translateX(20px);
    background: var(--accent-2);
}

.switch input:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(167, 139, 224, 0.22);
}

.switch-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.switch-text strong {
    font-size: 13px;
    font-weight: 600;
}

.switch-text small {
    font-size: 10.5px;
    line-height: 1.7;
    color: var(--dim);
}

.form-hint {
    margin-top: 12px;
    font-size: 10.5px;
    line-height: 1.8;
    color: var(--dim);
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 9px;
    flex: 1;
    min-width: 230px;
    padding: 0 13px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: rgba(9, 8, 14, 0.55);
    color: var(--dim);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.search-box:focus-within {
    border-color: rgba(205, 185, 255, 0.55);
    box-shadow: 0 0 0 3px rgba(167, 139, 224, 0.16);
}

.search-box .icon {
    width: 16px;
    height: 16px;
}

.search-box input {
    padding: 11px 0;
    border: none;
    background: transparent;
    box-shadow: none;
}

.search-box input:focus {
    box-shadow: none;
}

.select {
    width: auto;
    min-width: 160px;
    padding-right: 34px;
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--muted) 50%),
        linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position:
        calc(100% - 17px) calc(50% - 2px),
        calc(100% - 12px) calc(50% - 2px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

.copy-line {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--muted);
    font-size: 11px;
    transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.copy-btn .icon {
    width: 13px;
    height: 13px;
}

.copy-btn:hover {
    color: var(--accent-2);
    border-color: var(--line-bright);
    background: rgba(167, 139, 224, 0.1);
}

.copy-btn-icon {
    width: 28px;
    height: 28px;
    padding: 0;
    justify-content: center;
}

.copy-btn.is-copied {
    border-color: rgba(143, 224, 196, 0.42);
    background: var(--success-soft);
    color: var(--success);
}

/* ============================ 提示 / 空状态 ============================ */

.alert {
    padding: 12px 15px;
    border: 1px solid;
    border-radius: 11px;
    font-size: 13px;
    line-height: 1.6;
}

.alert-error {
    border-color: rgba(255, 128, 152, 0.4);
    background: var(--danger-soft);
    color: #ffb9c6;
}

.alert-success {
    border-color: rgba(143, 224, 196, 0.4);
    background: var(--success-soft);
    color: #b5f2df;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 46px 20px;
    text-align: center;
    color: var(--dim);
}

.empty-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin-bottom: 4px;
    border: 1px dashed var(--line-strong);
    border-radius: 50%;
    color: var(--dim);
}

.empty-state strong {
    color: var(--text-soft);
    font-size: 14px;
}

.empty-state p {
    font-size: 12px;
    max-width: 360px;
}

/* ============================ 页头 / 英雄区 ============================ */

.page-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    padding: clamp(26px, 3.4vw, 40px);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(110% 160% at 100% 0%, rgba(140, 108, 205, 0.22), transparent 58%),
        linear-gradient(150deg, rgba(35, 30, 50, 0.9), rgba(13, 11, 19, 0.96));
    box-shadow: var(--shadow);
    overflow: hidden;
}

.page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(
        115deg,
        rgba(255, 255, 255, 0.022) 0 1px,
        transparent 1px 18px
    );
    mask-image: linear-gradient(90deg, transparent 30%, #000 100%);
    pointer-events: none;
}

.page-hero-main {
    position: relative;
    z-index: 1;
    max-width: 620px;
}

.page-hero h2 {
    margin: 8px 0 10px;
    font-family: var(--font-display);
    font-size: clamp(25px, 3vw, 34px);
    font-weight: 600;
    letter-spacing: 0.05em;
    line-height: 1.35;
}

.page-hero p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.85;
}

.page-hero-side {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex: 0 0 auto;
}

.page-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.page-hero-mark {
    position: absolute;
    right: 18px;
    bottom: -52px;
    font-family: var(--font-display);
    font-size: 190px;
    line-height: 1;
    color: rgba(205, 185, 255, 0.045);
    pointer-events: none;
    user-select: none;
}

.big-number {
    font-family: var(--font-number);
    font-size: clamp(34px, 4vw, 52px);
    font-weight: 700;
    line-height: 1;
    color: var(--accent-2);
    letter-spacing: 0.02em;
    text-shadow: 0 0 34px rgba(167, 139, 224, 0.45);
    font-variant-numeric: tabular-nums;
}

.big-number-label {
    font-size: 10px;
    letter-spacing: 0.2em;
    color: var(--dim);
    text-transform: uppercase;
}

/* ============================ 首页英雄 ============================ */

.hero-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 36px;
    padding: clamp(28px, 4vw, 48px);
    border: 1px solid var(--line-strong);
    border-radius: 28px;
    background:
        radial-gradient(90% 140% at 96% 0%, rgba(167, 139, 224, 0.26), transparent 55%),
        radial-gradient(70% 100% at 18% 110%, rgba(215, 155, 200, 0.12), transparent 60%),
        linear-gradient(150deg, rgba(36, 30, 52, 0.94), rgba(12, 10, 18, 0.97));
    box-shadow: var(--shadow);
    overflow: hidden;
}

.hero-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(
        115deg,
        rgba(255, 255, 255, 0.022) 0 1px,
        transparent 1px 20px
    );
    mask-image: linear-gradient(90deg, transparent 25%, #000 100%);
    pointer-events: none;
}

.hero-copy {
    position: relative;
    z-index: 1;
    flex: 1;
    min-width: 0;
}

.hero-copy h2 {
    margin: 10px 0 12px;
    font-family: var(--font-display);
    font-size: clamp(27px, 3.6vw, 40px);
    font-weight: 600;
    letter-spacing: 0.05em;
    line-height: 1.3;
}

.hero-copy p {
    max-width: 520px;
    color: var(--muted);
    font-size: 13.5px;
    line-height: 1.9;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 11px;
    margin-top: 22px;
}

.hero-identity {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    min-width: 220px;
    padding: 22px 26px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(9, 8, 14, 0.42);
    backdrop-filter: blur(10px);
}

.hero-name {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.06em;
}

.hero-rank {
    display: flex;
    align-items: center;
    gap: 9px;
}

.hero-rank-label {
    font-size: 10px;
    letter-spacing: 0.14em;
    color: var(--dim);
    text-transform: uppercase;
}

.hero-frame-label {
    font-size: 11px;
    letter-spacing: 0.1em;
    color: var(--muted);
}

.hero-mark {
    position: absolute;
    right: 26px;
    bottom: -64px;
    font-family: var(--font-display);
    font-size: 220px;
    line-height: 1;
    color: rgba(205, 185, 255, 0.05);
    pointer-events: none;
    user-select: none;
}

/* ============================ 资料列表 ============================ */

.info-list {
    display: flex;
    flex-direction: column;
}

.info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(196, 176, 255, 0.07);
}

.info-row:last-child {
    border-bottom: none;
}

.info-row > span:first-child {
    color: var(--dim);
    font-size: 12px;
}

.info-row strong {
    font-size: 13px;
    font-weight: 600;
    text-align: right;
    word-break: break-all;
}

.info-list.compact .info-row {
    padding: 8px 0;
}

.card-foot-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(196, 176, 255, 0.07);
}

.chip-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: 11.5px;
}

.chip-link .icon {
    width: 14px;
    height: 14px;
}

.chip-link:hover {
    color: var(--accent-2);
    border-color: var(--line-bright);
    background: rgba(167, 139, 224, 0.08);
}

/* ============================ 统计 ============================ */

.stat-row {
    display: flex;
    gap: 18px;
}

.stat-row-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.stat-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.stat-row-cards .stat-cell {
    padding: 18px 20px;
}

.stat-label {
    font-size: 10px;
    letter-spacing: 0.16em;
    color: var(--dim);
    text-transform: uppercase;
}

.stat-number {
    font-family: var(--font-number);
    font-size: clamp(24px, 2.6vw, 32px);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0.02em;
    font-variant-numeric: tabular-nums;
}

.stat-number.accent {
    color: var(--accent-2);
}

.stat-number-sm {
    font-size: 14px;
    line-height: 1.5;
    font-weight: 500;
}

.frame-bars {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(196, 176, 255, 0.07);
}

.frame-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.frame-bar-label {
    width: auto;
    flex: 0 0 108px;
    font-size: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.frame-bar-track {
    flex: 1;
    height: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.frame-bar-fill {
    display: block;
    width: var(--bar-width, 2%);
    height: 100%;
    border-radius: inherit;
    background: var(--frame, var(--accent));
    box-shadow: 0 0 12px var(--frame-line, rgba(167, 139, 224, 0.4));
    transition: width 0.6s ease;
}

.frame-bar-count {
    width: 30px;
    flex: 0 0 auto;
    text-align: right;
    font-family: var(--font-number);
    font-size: 11px;
    color: var(--dim);
}

.delta-note {
    margin-top: 14px;
    padding-top: 13px;
    border-top: 1px solid rgba(196, 176, 255, 0.07);
    font-size: 11.5px;
}

.delta-note.is-up,
.delta-badge.is-up {
    color: var(--success);
}

.delta-note.is-down,
.delta-badge.is-down {
    color: var(--danger);
}

.delta-badge {
    display: inline-flex;
    padding: 5px 11px;
    border: 1px solid currentColor;
    border-radius: 999px;
    font-family: var(--font-number);
    font-size: 12px;
    background: rgba(255, 255, 255, 0.03);
}

/* ============================ 潜力值段位 ============================ */

/* 12.000+ 的三个段位共用黑色系配色，以星数区分 */
.frame-grey   { --frame: #9aa0b5; --frame-soft: rgba(154, 160, 181, 0.13); --frame-line: rgba(154, 160, 181, 0.38); }
.frame-green  { --frame: #83cfa8; --frame-soft: rgba(131, 207, 168, 0.13); --frame-line: rgba(131, 207, 168, 0.38); }
.frame-blue   { --frame: #86aeea; --frame-soft: rgba(134, 174, 234, 0.14); --frame-line: rgba(134, 174, 234, 0.4); }
.frame-purple { --frame: #b394ef; --frame-soft: rgba(179, 148, 239, 0.15); --frame-line: rgba(179, 148, 239, 0.44); }
.frame-red    { --frame: #e28f9f; --frame-soft: rgba(226, 143, 159, 0.14); --frame-line: rgba(226, 143, 159, 0.42); }
.frame-black1 { --frame: #cfc6e8; --frame-soft: rgba(207, 198, 232, 0.09); --frame-line: rgba(207, 198, 232, 0.32); }
.frame-black2 { --frame: #e2daf8; --frame-soft: rgba(226, 218, 248, 0.11); --frame-line: rgba(226, 218, 248, 0.4); }
.frame-black3 { --frame: #f5efff; --frame-soft: rgba(245, 239, 255, 0.14); --frame-line: rgba(245, 239, 255, 0.55); }
.frame-hidden { --frame: #8d85a3; --frame-soft: rgba(141, 133, 163, 0.1); --frame-line: rgba(141, 133, 163, 0.34); }

.frame-text-grey   { color: #b7bcce; }
.frame-text-green  { color: #9fe0bd; }
.frame-text-blue   { color: #a3c4f5; }
.frame-text-purple { color: #cbb1ff; }
.frame-text-red    { color: #f0aab7; }
.frame-text-black1 { color: #d7cfea; }
.frame-text-black2 { color: #e9e2f8; }
.frame-text-black3 { color: #f8f4ff; }
.frame-text-hidden { color: #9c93b2; }

.frame-black3 .ptt-stars { color: var(--gold); }

.ptt-plate {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 13px;
    border: 1px solid var(--frame-line, var(--line-strong));
    border-radius: 11px;
    background:
        linear-gradient(160deg, var(--frame-soft, rgba(167, 139, 224, 0.14)), rgba(255, 255, 255, 0.02));
    color: var(--frame, var(--accent-2));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 8px 24px rgba(0, 0, 0, 0.24);
    font-family: var(--font-number);
    font-variant-numeric: tabular-nums;
    line-height: 1;
    white-space: nowrap;
    vertical-align: middle;
}

.ptt-value {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.ptt-value-text {
    font-size: 15px;
    letter-spacing: 0.08em;
}

.ptt-stars {
    font-size: 9px;
    letter-spacing: 0.08em;
    opacity: 0.9;
}

.ptt-plate-sm {
    padding: 4px 9px;
    border-radius: 8px;
    gap: 4px;
}

.ptt-plate-sm .ptt-value {
    font-size: 13.5px;
}

.ptt-plate-md {
    padding: 8px 14px;
    border-radius: 11px;
}

.ptt-plate-md .ptt-value {
    font-size: 22px;
}

.ptt-plate-lg {
    padding: 12px 19px;
    border-radius: 15px;
    gap: 9px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 14px 38px rgba(0, 0, 0, 0.34),
        0 0 34px var(--frame-soft, rgba(167, 139, 224, 0.14));
}

.ptt-plate-lg .ptt-value {
    font-size: 40px;
}

.ptt-plate-lg .ptt-value-text {
    font-size: 20px;
}

.ptt-plate-lg .ptt-stars {
    font-size: 13px;
}

.world-score-plate {
    color: var(--accent-2);
}

.world-score-tag {
    font-size: 9px;
    letter-spacing: 0.08em;
    color: var(--dim);
}

.ptt-plate.is-hidden {
    opacity: 0.55;
    border-style: dashed;
}

.frame-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border: 1px solid var(--frame-line, var(--line));
    border-radius: 999px;
    background: var(--frame-soft, rgba(255, 255, 255, 0.04));
    color: var(--frame, var(--muted));
    font-size: 10.5px;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.rank-badge {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    gap: 1px;
    min-width: 44px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.015));
    color: var(--accent-2);
    font-family: var(--font-number);
    font-size: 15px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 36px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    white-space: nowrap;
}

.rank-hash {
    font-size: 0.72em;
    opacity: 0.6;
}

.rank-badge.is-top1 {
    border-color: rgba(232, 207, 155, 0.52);
    background: linear-gradient(160deg, rgba(232, 207, 155, 0.2), rgba(232, 207, 155, 0.03));
    color: #f3e2bb;
    box-shadow: 0 0 26px rgba(232, 207, 155, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.rank-badge.is-top2 {
    border-color: rgba(214, 220, 236, 0.46);
    background: linear-gradient(160deg, rgba(214, 220, 236, 0.16), rgba(214, 220, 236, 0.02));
    color: #e6e9f4;
}

.rank-badge.is-top3 {
    border-color: rgba(215, 155, 200, 0.42);
    background: linear-gradient(160deg, rgba(215, 155, 200, 0.16), rgba(215, 155, 200, 0.02));
    color: #edbadc;
}

.rank-badge-sm {
    min-width: 38px;
    height: 30px;
    padding: 0 8px;
    border-radius: 8px;
    font-size: 12.5px;
    line-height: 30px;
}

.rank-badge-lg {
    min-width: 62px;
    height: 52px;
    padding: 0 14px;
    border-radius: 14px;
    font-size: 22px;
    line-height: 52px;
}

.rank-badge.is-empty {
    color: var(--dim);
    border-style: dashed;
}

/* ============================ 排名小列表 ============================ */

.rank-mini-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    list-style: none;
}

.rank-mini-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 10px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: var(--text);
}

.rank-mini-item:hover {
    color: var(--text);
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.035);
}

.rank-mini-main {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    line-height: 1.4;
}

.rank-mini-name {
    font-size: 13.5px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-mini-meta {
    font-size: 10.5px;
    color: var(--dim);
}

/* ============================ 快捷入口 ============================ */

.quick-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.quick-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.quick-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.022);
    color: var(--text-soft);
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.quick-link:hover {
    color: var(--text);
    transform: translateY(-2px);
    border-color: var(--line-bright);
    background: rgba(167, 139, 224, 0.07);
}

.quick-link > span:last-child {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.4;
}

.quick-link strong {
    font-size: 13px;
    font-weight: 600;
}

.quick-link small {
    font-size: 10.5px;
    color: var(--dim);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.quick-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: linear-gradient(160deg, rgba(167, 139, 224, 0.14), rgba(255, 255, 255, 0.01));
    color: var(--accent-2);
}

.quick-icon .icon {
    width: 18px;
    height: 18px;
}

/* ============================ 个人资料 ============================ */

.profile-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    padding: clamp(26px, 3.4vw, 40px);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(100% 150% at 100% 0%, rgba(167, 139, 224, 0.22), transparent 58%),
        linear-gradient(150deg, rgba(34, 29, 49, 0.94), rgba(12, 10, 18, 0.97));
    box-shadow: var(--shadow);
    overflow: hidden;
}

.profile-hero-main {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 20px;
    min-width: 0;
}

.profile-hero-copy h2 {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 7px 0 6px;
    font-family: var(--font-display);
    font-size: clamp(25px, 2.8vw, 34px);
    font-weight: 600;
    letter-spacing: 0.05em;
    line-height: 1.25;
}

.profile-hero-copy p {
    color: var(--muted);
    font-size: 12.5px;
}

.profile-hero-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 10px;
}

.profile-hero-side {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    flex: 0 0 auto;
}

.profile-rank-line {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--dim);
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.profile-mark {
    position: absolute;
    right: 20px;
    bottom: -60px;
    font-family: var(--font-display);
    font-size: 200px;
    line-height: 1;
    color: rgba(205, 185, 255, 0.045);
    pointer-events: none;
    user-select: none;
}

/* ============================ 段位进度 ============================ */

.frame-progress {
    display: flex;
    flex-direction: column;
    gap: 11px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(196, 176, 255, 0.07);
}

.frame-progress-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.frame-progress-current {
    font-family: var(--font-number);
    font-size: 30px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.frame-progress-next {
    font-size: 11px;
    color: var(--dim);
}

.progress-track {
    height: 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.progress-fill {
    display: block;
    width: var(--progress, 0%);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--frame, var(--accent)), var(--accent-2));
    box-shadow: 0 0 16px var(--frame-line, rgba(167, 139, 224, 0.4));
    transition: width 0.7s ease;
}

.frame-progress-note {
    font-size: 11.5px;
    color: var(--muted);
}

.frame-progress-note strong {
    font-family: var(--font-number);
    color: var(--text);
}

/* ============================ 说明列表 ============================ */

.note-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    list-style: none;
    color: var(--muted);
    font-size: 12.5px;
    line-height: 1.75;
}

.note-list li {
    display: flex;
    gap: 9px;
}

.note-dot {
    width: 5px;
    height: 5px;
    margin-top: 8px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px rgba(167, 139, 224, 0.7);
}

.note-footer {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(196, 176, 255, 0.07);
    color: var(--dim);
    font-size: 11px;
    line-height: 1.7;
}

.note-footer .icon {
    width: 15px;
    height: 15px;
    margin-top: 2px;
    flex: 0 0 auto;
}

/* ============================ 排行榜领奖台 ============================ */

.podium {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 16px;
    padding: 4px 0;
}

.podium-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 9px;
    flex: 1;
    max-width: 300px;
    padding: 26px 20px 22px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background:
        radial-gradient(100% 120% at 50% 0%, rgba(167, 139, 224, 0.14), transparent 62%),
        linear-gradient(165deg, rgba(32, 27, 45, 0.82), rgba(13, 11, 19, 0.9));
    color: var(--text);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.podium-card:hover {
    color: var(--text);
    transform: translateY(-3px);
    border-color: var(--line-bright);
}

.podium-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(
        115deg,
        rgba(255, 255, 255, 0.02) 0 1px,
        transparent 1px 16px
    );
    pointer-events: none;
}

.podium-1 {
    order: 2;
    padding-top: 40px;
    padding-bottom: 30px;
    border-color: rgba(232, 207, 155, 0.36);
    background:
        radial-gradient(100% 130% at 50% 0%, rgba(232, 207, 155, 0.16), transparent 62%),
        linear-gradient(165deg, rgba(40, 34, 44, 0.88), rgba(15, 12, 17, 0.94));
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.42), 0 0 36px rgba(232, 207, 155, 0.08);
}

.podium-2 { order: 1; }
.podium-3 { order: 3; }

.podium-label {
    position: relative;
    z-index: 1;
    font-family: var(--font-number);
    font-size: 10px;
    letter-spacing: 0.22em;
    color: var(--dim);
}

.podium-1 .podium-label {
    color: var(--gold);
}

.podium-avatar {
    width: 66px;
    height: 66px;
    font-size: 25px;
    position: relative;
    z-index: 1;
}

.podium-1 .podium-avatar {
    width: 78px;
    height: 78px;
    font-size: 30px;
    border-color: rgba(232, 207, 155, 0.5);
    color: #f3e2bb;
    background:
        radial-gradient(120% 120% at 30% 20%, rgba(232, 207, 155, 0.32), transparent 62%),
        linear-gradient(150deg, #3d3440, #1d1922);
}

.podium-name {
    position: relative;
    z-index: 1;
    max-width: 100%;
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.04em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================ 表格 ============================ */

.tier-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 16px;
}

.tier-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.022);
    color: var(--muted);
    font-size: 11px;
    transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.tier-chip span {
    font-family: var(--font-number);
    font-size: 10px;
    color: var(--dim);
}

.tier-chip:hover {
    color: var(--text);
    border-color: var(--line-strong);
}

.tier-chip.is-active {
    color: var(--text);
    border-color: var(--line-bright);
    background: rgba(167, 139, 224, 0.12);
    box-shadow: inset 0 0 0 1px rgba(205, 185, 255, 0.1);
}

.tier-chip.frame-grey,
.tier-chip.frame-green,
.tier-chip.frame-blue,
.tier-chip.frame-purple,
.tier-chip.frame-red,
.tier-chip.frame-black1,
.tier-chip.frame-black2,
.tier-chip.frame-black3,
.tier-chip.frame-hidden {
    border-color: var(--frame-line);
    color: var(--frame);
    background: var(--frame-soft);
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(9, 8, 14, 0.28);
}

.table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    font-size: 13px;
}

.table th,
.table td {
    padding: 11px 14px;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid rgba(196, 176, 255, 0.07);
}

.table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: rgba(16, 14, 23, 0.94);
    color: var(--dim);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    white-space: nowrap;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table tbody tr {
    transition: background 0.16s ease;
}

.table tbody tr:hover {
    background: rgba(255, 255, 255, 0.026);
}

.table tbody tr.is-me {
    background: linear-gradient(90deg, rgba(167, 139, 224, 0.13), rgba(167, 139, 224, 0.02));
    box-shadow: inset 3px 0 0 var(--accent-2);
}

.table-compact {
    min-width: 560px;
    font-size: 12.5px;
}

.table-compact th,
.table-compact td {
    padding: 9px 12px;
}

.player-cell {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.player-name {
    font-weight: 600;
    color: var(--text-soft);
}

.player-name:hover {
    color: var(--accent-2);
}

.player-email {
    display: block;
    margin-top: 2px;
    padding-left: 35px;
    font-size: 10px;
    color: var(--dim);
}

.muted-cell {
    color: var(--dim);
    font-size: 11.5px;
    white-space: nowrap;
}

.status-dot {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    white-space: nowrap;
}

.status-dot::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 8px currentColor;
}

.status-dot.is-ok {
    color: var(--success);
}

.status-dot.is-banned {
    color: var(--danger);
}

.badge {
    display: inline-flex;
    padding: 3px 9px;
    border: 1px solid;
    border-radius: 999px;
    font-size: 10px;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.badge-used {
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--dim);
}

.badge-unused {
    border-color: rgba(143, 224, 196, 0.34);
    background: var(--success-soft);
    color: var(--success);
}

/* ============================ 分页 ============================ */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: 18px;
}

.page-btn {
    display: inline-grid;
    place-items: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.025);
    color: var(--muted);
    font-family: var(--font-number);
    font-size: 12px;
    transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.page-btn:hover {
    color: var(--text);
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.05);
}

.page-btn.is-active {
    border-color: var(--line-bright);
    background: rgba(167, 139, 224, 0.18);
    color: var(--text);
    box-shadow: inset 0 0 0 1px rgba(205, 185, 255, 0.12);
}

.page-btn.is-disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.page-arrow .icon {
    width: 14px;
    height: 14px;
    transform: rotate(180deg);
}

.page-arrow.is-next .icon {
    transform: none;
}

.page-gap {
    padding: 0 3px;
    color: var(--dim);
    font-size: 11px;
}

/* ============================ 页签 / 后台子导航 ============================ */

.subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(9, 8, 14, 0.35);
    align-self: flex-start;
}

.subnav-link {
    padding: 7px 16px;
    border-radius: 8px;
    color: var(--muted);
    font-size: 12.5px;
}

.subnav-link:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
}

.subnav-link.is-active {
    color: var(--text);
    background: rgba(167, 139, 224, 0.18);
    box-shadow: inset 0 0 0 1px rgba(205, 185, 255, 0.12);
}

/* ---------- 后台工具页 ---------- */

.admin-content-tabs {
    align-self: flex-start;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.admin-player-head {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 16px;
    padding: 16px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.admin-player-main {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.admin-player-main strong {
    font-size: 17px;
}

.admin-player-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.admin-stat-row {
    margin-top: 16px;
}

.admin-links {
    margin: 12px 0 4px;
}

.admin-subtitle {
    margin: 20px 0 9px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-soft);
}

.admin-details {
    margin-top: 16px;
}

.admin-details summary {
    cursor: pointer;
    font-size: 12.5px;
    color: var(--accent-2);
    margin-bottom: 10px;
}

.admin-tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.admin-tool {
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.022);
}

.admin-tool-wide {
    grid-column: 1 / -1;
}

.admin-tool h4 {
    margin-bottom: 9px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-soft);
}

.admin-tool .form {
    gap: 10px;
}

.admin-tool .field label {
    font-size: 11px;
}

.admin-tool .form-hint {
    margin: 0;
}

.admin-tool .btn {
    align-self: flex-start;
}

.admin-hr {
    height: 0;
    margin: 14px 0;
    border: 0;
    border-top: 1px solid var(--line);
}

.diff-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    font-family: var(--font-number);
    font-size: 9.5px;
    letter-spacing: 0.04em;
}

.diff-tag.is-pst { color: #9fe0bd; border-color: rgba(131, 207, 168, 0.35); }
.diff-tag.is-prs { color: #a3c4f5; border-color: rgba(134, 174, 234, 0.35); }
.diff-tag.is-ftr { color: #cbb1ff; border-color: rgba(179, 148, 239, 0.4); }
.diff-tag.is-byd { color: #f0aab7; border-color: rgba(226, 143, 159, 0.4); }
.diff-tag.is-etr { color: #f3e2bb; border-color: rgba(232, 207, 155, 0.45); }

/* ---------- 数据导入 ---------- */

.alert-warn {
    border-color: rgba(232, 207, 155, 0.4);
    background: rgba(232, 207, 155, 0.1);
    color: #f3e2bb;
}

.import-warning {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.import-warning .icon {
    width: 17px;
    height: 17px;
    margin-top: 2px;
    flex: 0 0 auto;
}

.import-warning code {
    padding: 1px 5px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.07);
    font-size: 0.92em;
}

.import-file-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.import-file {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px;
    border: 1px dashed var(--line-strong);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.022);
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease;
}

.import-file:hover {
    border-color: var(--line-bright);
    background: rgba(167, 139, 224, 0.06);
}

.import-file strong {
    font-size: 15px;
}

.import-file small {
    color: var(--dim);
    font-size: 11px;
}

.import-file input[type="file"] {
    margin-top: 8px;
    font-size: 11px;
    color: var(--muted);
}

.import-file-name {
    margin-top: 2px;
    font-family: var(--font-number);
    font-size: 10.5px;
    color: var(--dim);
}

.import-status {
    min-height: 20px;
    margin-top: 12px;
    font-size: 12px;
    color: var(--muted);
    white-space: pre-wrap;
}

.import-status.is-ok { color: var(--success); }
.import-status.is-error { color: var(--danger); }
.import-status.is-busy { color: var(--accent-2); }

.import-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.import-select-all,
.import-section-all {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    color: var(--muted);
    cursor: pointer;
}

.import-section {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.import-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 9px;
}

.import-table-wrap {
    max-height: 430px;
    overflow-y: auto;
}

.import-conflicts {
    margin-top: 12px;
}

.import-conflict-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.import-conflict-select {
    min-width: 86px;
}

.import-result {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
    line-height: 1.7;
}

@media (max-width: 760px) {
    .import-file-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.field-row .field input + input {
    margin-top: 6px;
}

@media (max-width: 760px) {
    .admin-player-head {
        flex-wrap: wrap;
    }

    .admin-player-side {
        align-items: flex-start;
    }
}

.tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
}

.tabs a {
    padding: 5px 12px;
    border-radius: 7px;
    color: var(--muted);
    font-size: 11.5px;
}

.tabs a:hover {
    color: var(--text);
}

.tabs a.is-active {
    color: var(--text);
    background: rgba(167, 139, 224, 0.22);
}

/* ============================ #框画廊 ============================ */

.frame-feature {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding: clamp(26px, 3.6vw, 42px);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(90% 140% at 92% 0%, rgba(232, 207, 155, 0.1), transparent 55%),
        radial-gradient(80% 130% at 10% 110%, rgba(167, 139, 224, 0.16), transparent 58%),
        linear-gradient(150deg, rgba(34, 29, 48, 0.94), rgba(12, 10, 18, 0.97));
    box-shadow: var(--shadow);
    overflow: hidden;
}

.frame-feature-copy {
    position: relative;
    z-index: 1;
    max-width: 620px;
}

.frame-feature h2 {
    margin: 9px 0 11px;
    font-family: var(--font-display);
    font-size: clamp(25px, 3vw, 34px);
    font-weight: 600;
    letter-spacing: 0.05em;
    line-height: 1.35;
}

.frame-feature p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.85;
}

.frame-feature-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 11px;
    margin-top: 18px;
}

.frame-feature-visual {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    padding: 16px 22px;
}

.frame-feature-mark {
    position: absolute;
    right: 22px;
    bottom: -70px;
    font-family: var(--font-display);
    font-size: 240px;
    line-height: 1;
    color: rgba(205, 185, 255, 0.05);
    pointer-events: none;
    user-select: none;
}

.frame-portrait {
    position: relative;
    display: grid;
    place-items: center;
    width: 104px;
    height: 104px;
    border: 1px solid var(--frame-line, var(--line-strong));
    border-radius: 24px;
    background:
        radial-gradient(120% 120% at 30% 15%, var(--frame-soft, rgba(167, 139, 224, 0.14)), transparent 65%),
        linear-gradient(160deg, #1d1829, #100d17);
    box-shadow:
        inset 0 0 0 3px rgba(8, 7, 12, 0.72),
        inset 0 0 0 4px var(--frame-line, var(--line-strong)),
        0 16px 36px rgba(0, 0, 0, 0.38);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.frame-portrait-lg {
    width: 188px;
    height: 188px;
    border-radius: 32px;
    box-shadow:
        inset 0 0 0 5px rgba(8, 7, 12, 0.75),
        inset 0 0 0 7px var(--frame-line, var(--line-strong)),
        0 26px 60px rgba(0, 0, 0, 0.45),
        0 0 60px var(--frame-soft, rgba(167, 139, 224, 0.12));
}

.frame-portrait-rank {
    position: absolute;
    top: -11px;
    left: -11px;
    z-index: 2;
    display: inline-flex;
    align-items: baseline;
    gap: 1px;
    padding: 4px 9px;
    border: 1px solid var(--frame-line, var(--line-strong));
    border-radius: 9px;
    background: linear-gradient(160deg, #262035, #141019);
    color: var(--frame, var(--accent-2));
    font-family: var(--font-number);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}

.frame-portrait-lg .frame-portrait-rank {
    top: -15px;
    left: -15px;
    padding: 7px 14px;
    border-radius: 12px;
    font-size: 22px;
}

.frame-portrait-avatar {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 600;
    color: var(--frame, var(--accent-2));
    text-shadow: 0 0 24px var(--frame-soft, rgba(167, 139, 224, 0.2));
    line-height: 1;
}

.frame-portrait-lg .frame-portrait-avatar {
    font-size: 70px;
}

.frame-portrait-label {
    position: absolute;
    bottom: 7px;
    max-width: 92%;
    font-size: 9px;
    letter-spacing: 0.06em;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.frame-portrait-lg .frame-portrait-label {
    bottom: 14px;
    font-size: 11px;
}

.frame-card:hover .frame-portrait {
    transform: translateY(-2px) scale(1.02);
    box-shadow:
        inset 0 0 0 3px rgba(8, 7, 12, 0.72),
        inset 0 0 0 4px var(--frame-line, var(--line-strong)),
        0 20px 42px rgba(0, 0, 0, 0.42),
        0 0 32px var(--frame-soft, rgba(167, 139, 224, 0.14));
}

.tier-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(152px, 1fr));
    gap: 10px;
}

.tier-card {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 14px 14px 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.022);
    color: var(--muted);
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.tier-card:hover {
    color: var(--text);
    transform: translateY(-2px);
    border-color: var(--line-strong);
}

.tier-card.is-active {
    border-color: var(--line-bright);
    background: rgba(167, 139, 224, 0.1);
    box-shadow: inset 0 0 0 1px rgba(205, 185, 255, 0.1);
}

.tier-card.frame-grey,
.tier-card.frame-green,
.tier-card.frame-blue,
.tier-card.frame-purple,
.tier-card.frame-red,
.tier-card.frame-black1,
.tier-card.frame-black2,
.tier-card.frame-black3 {
    border-color: var(--frame-line);
    background: linear-gradient(165deg, var(--frame-soft), rgba(255, 255, 255, 0.015));
}

.tier-card-label {
    font-size: 10.5px;
    letter-spacing: 0.04em;
    color: var(--frame, var(--muted));
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tier-card-count {
    font-family: var(--font-number);
    font-size: 24px;
    line-height: 1.15;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.tier-card-range {
    font-size: 9px;
    letter-spacing: 0.03em;
    color: var(--dim);
}

.frame-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(286px, 1fr));
    gap: 12px;
}

.frame-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 17px;
    background:
        linear-gradient(160deg, rgba(31, 27, 43, 0.7), rgba(14, 12, 21, 0.82));
    color: var(--text);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.frame-card:hover {
    color: var(--text);
    transform: translateY(-2px);
    border-color: var(--line-bright);
    box-shadow: var(--shadow-soft);
}

.frame-card.is-me {
    border-color: var(--line-bright);
    background:
        linear-gradient(160deg, rgba(167, 139, 224, 0.12), rgba(14, 12, 21, 0.86));
    box-shadow: inset 3px 0 0 var(--accent-2);
}

.frame-card-main {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    gap: 2px;
}

.frame-card-name {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.frame-card-meta {
    font-size: 10px;
    color: var(--dim);
}

.frame-card-ptt {
    margin-top: 3px;
    font-family: var(--font-number);
    font-size: 17px;
    font-weight: 700;
    color: var(--text-soft);
    font-variant-numeric: tabular-nums;
}

.frame-card-ptt .stars {
    margin-left: 4px;
    font-size: 10px;
    color: var(--gold);
    letter-spacing: 0.05em;
}

.frame-card-ptt-label {
    margin-left: 5px;
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: var(--dim);
}

.frame-card-arrow {
    color: var(--dim);
    flex: 0 0 auto;
}

.frame-card-arrow .icon {
    width: 16px;
    height: 16px;
    transition: transform 0.18s ease, color 0.18s ease;
}

.frame-card:hover .frame-card-arrow .icon {
    color: var(--accent-2);
    transform: translateX(3px);
}

.frame-guide {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
}

.frame-guide-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.frame-guide-note {
    margin-top: 12px;
    font-size: 11.5px;
    color: var(--dim);
}

/* ============================ 图表 ============================ */

.chart-card {
    position: relative;
    padding: 22px 22px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(165deg, rgba(30, 26, 42, 0.78), rgba(14, 12, 21, 0.9));
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.chart-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 18px;
    right: 18px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(205, 185, 255, 0.28), transparent);
}

.chart-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.chart-title {
    margin-top: 3px;
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.chart-sub {
    margin-top: 4px;
    font-size: 11.5px;
    color: var(--dim);
    font-variant-numeric: tabular-nums;
}

.chart-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
}

.chart-tabs[hidden] {
    display: none;
}

.chart-tabs button {
    padding: 5px 12px;
    border: none;
    border-radius: 7px;
    background: transparent;
    color: var(--muted);
    font-size: 11.5px;
    transition: background 0.15s ease, color 0.15s ease;
}

.chart-tabs button:hover {
    color: var(--text);
    background: rgba(167, 139, 224, 0.14);
}

.chart-tabs button.active {
    color: var(--text);
    background: rgba(167, 139, 224, 0.24);
}

.ptt-chart {
    position: relative;
    width: 100%;
    min-height: 210px;
}

.ptt-chart svg {
    display: block;
    width: 100%;
    height: auto;
}

.chart-grid {
    stroke: rgba(196, 176, 255, 0.08);
    stroke-width: 1;
}

.chart-axis {
    fill: var(--dim);
    font-size: 11px;
    font-family: var(--font-body);
}

.chart-line {
    stroke: var(--accent-2);
    stroke-width: 2;
    stroke-linejoin: round;
    stroke-linecap: round;
    filter: drop-shadow(0 0 5px rgba(167, 139, 224, 0.5));
}

.chart-dot {
    fill: var(--accent-2);
    stroke: rgba(12, 10, 18, 0.9);
    stroke-width: 2;
}

.chart-crosshair {
    stroke: rgba(205, 185, 255, 0.3);
    stroke-width: 1;
    stroke-dasharray: 3 3;
}

.chart-hover-dot {
    fill: #fff;
    stroke: var(--accent);
    stroke-width: 2;
}

.chart-tooltip {
    position: absolute;
    z-index: 2;
    padding: 5px 9px;
    border: 1px solid rgba(167, 139, 224, 0.5);
    border-radius: 8px;
    background: rgba(14, 12, 21, 0.96);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
    color: var(--text);
    font-size: 11.5px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    pointer-events: none;
}

.chart-tooltip[hidden] {
    display: none;
}

.chart-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 210px;
    padding: 0 16px;
    color: var(--dim);
    font-size: 12px;
    text-align: center;
}

/* ============================ 登录 / 注册 ============================ */

body.auth-body {
    background:
        radial-gradient(1000px 700px at 8% 0%, rgba(126, 92, 190, 0.2), transparent 60%),
        radial-gradient(900px 600px at 110% 100%, rgba(206, 139, 190, 0.1), transparent 55%),
        linear-gradient(160deg, #0c0b12, #08070c 70%);
    min-height: 100vh;
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(420px, 0.85fr);
    min-height: 100vh;
}

.auth-visual {
    position: relative;
    display: flex;
    align-items: center;
    padding: clamp(36px, 6vw, 90px);
    overflow: hidden;
    border-right: 1px solid var(--line);
    background:
        radial-gradient(70% 90% at 20% 25%, rgba(167, 139, 224, 0.18), transparent 60%),
        linear-gradient(160deg, rgba(20, 17, 29, 0.9), rgba(10, 9, 15, 0.98));
}

.auth-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px),
        linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px);
    background-size: 120px 120px;
    mask-image: radial-gradient(90% 90% at 35% 40%, #000 10%, transparent 75%);
    pointer-events: none;
}

.auth-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
    pointer-events: none;
}

.auth-orb-a {
    top: -16%;
    right: -8%;
    width: 520px;
    height: 520px;
    background: radial-gradient(circle, rgba(167, 139, 224, 0.22), transparent 68%);
    animation: float 14s ease-in-out infinite;
}

.auth-orb-b {
    bottom: -20%;
    left: -10%;
    width: 460px;
    height: 460px;
    background: radial-gradient(circle, rgba(215, 155, 200, 0.14), transparent 68%);
    animation: float 18s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate3d(0, 0, 0); }
    50% { transform: translate3d(-18px, 22px, 0); }
}

.auth-visual-content {
    position: relative;
    z-index: 2;
    max-width: 620px;
    width: 100%;
}

.auth-kicker {
    font-family: var(--font-number);
    font-size: 10px;
    letter-spacing: 0.3em;
    color: var(--accent);
    text-transform: uppercase;
}

.auth-visual h1 {
    margin: 18px 0 18px;
    font-family: var(--font-display);
    font-size: clamp(34px, 4.6vw, 58px);
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: 0.06em;
    text-shadow: 0 0 60px rgba(167, 139, 224, 0.22);
}

.auth-visual p {
    max-width: 480px;
    color: var(--muted);
    font-size: 13.5px;
    line-height: 1.95;
}

.auth-clock {
    margin-top: 38px;
    font-family: var(--font-number);
    font-size: clamp(72px, 10vw, 132px);
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.02em;
    color: transparent;
    -webkit-text-stroke: 1px rgba(205, 185, 255, 0.28);
    opacity: 0.85;
    user-select: none;
}

.auth-clock span {
    color: rgba(215, 155, 200, 0.65);
    -webkit-text-stroke: 0;
}

.auth-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 24px;
}

.auth-tags span {
    padding: 5px 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--dim);
    font-family: var(--font-number);
    font-size: 9px;
    letter-spacing: 0.16em;
}

.auth-vertical {
    position: absolute;
    top: 12%;
    right: 26px;
    writing-mode: vertical-rl;
    font-family: var(--font-display);
    font-size: 13px;
    letter-spacing: 0.5em;
    color: rgba(164, 155, 189, 0.35);
    user-select: none;
}

.auth-corner {
    position: absolute;
    width: 90px;
    height: 90px;
    border-color: rgba(205, 185, 255, 0.2);
    border-style: solid;
    pointer-events: none;
}

.auth-corner-tl {
    top: 26px;
    left: 26px;
    border-width: 1px 0 0 1px;
}

.auth-corner-br {
    right: 26px;
    bottom: 26px;
    border-width: 0 1px 1px 0;
}

.auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px clamp(20px, 4vw, 56px);
    background: rgba(9, 8, 14, 0.55);
    backdrop-filter: blur(20px);
}

.auth-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 420px;
    padding: 34px 32px 30px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background:
        radial-gradient(100% 120% at 100% 0%, rgba(167, 139, 224, 0.12), transparent 55%),
        linear-gradient(165deg, rgba(30, 26, 42, 0.88), rgba(14, 12, 21, 0.94));
    box-shadow: var(--shadow);
    animation: rise 0.55s cubic-bezier(0.22, 0.8, 0.3, 1) both;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    color: var(--text);
}

.auth-brand:hover {
    color: var(--text);
}

.brand-mark-sm {
    font-size: 20px;
}

.auth-brand-text {
    font-size: 11px;
    letter-spacing: 0.16em;
    color: var(--dim);
    text-transform: uppercase;
}

.auth-title {
    font-family: var(--font-display);
    font-size: 27px;
    font-weight: 600;
    letter-spacing: 0.06em;
}

.auth-sub {
    margin: 7px 0 20px;
    color: var(--muted);
    font-size: 12.5px;
    line-height: 1.75;
}

.auth-card .alert {
    margin-bottom: 14px;
}

.auth-foot {
    margin-top: 18px;
    text-align: center;
    color: var(--dim);
    font-size: 12px;
}

.auth-foot a {
    margin-left: 4px;
    font-weight: 600;
    color: var(--accent-2);
}

.auth-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    color: var(--dim);
    font-size: 10.5px;
    line-height: 1.7;
}

.auth-note .icon {
    width: 14px;
    height: 14px;
    margin-top: 2px;
    flex: 0 0 auto;
    color: var(--accent);
}

/* ============================ 响应式 ============================ */

@media (max-width: 1180px) {
    .tier-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .stat-row-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-104%);
        transition: transform 0.25s cubic-bezier(0.22, 0.8, 0.3, 1);
        width: 282px;
        box-shadow: 30px 0 80px rgba(0, 0, 0, 0.5);
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    .app-main {
        width: 100%;
        margin-left: 0;
    }

    .nav-toggle {
        display: inline-grid;
    }

    .grid-2,
    .grid-wide-left {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-identity {
        align-self: stretch;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        min-width: 0;
    }

    .hero-identity .hero-name,
    .hero-identity .hero-frame-label {
        width: 100%;
    }

    .frame-feature {
        flex-direction: column;
        align-items: flex-start;
    }

    .frame-feature-visual {
        align-self: center;
    }

    .auth-shell {
        grid-template-columns: minmax(0, 1fr);
    }

    .auth-visual {
        display: none;
    }

    .auth-panel {
        min-height: 100vh;
    }
}

@media (max-width: 760px) {
    .topbar {
        min-height: 78px;
        padding: 14px 16px;
    }

    .topbar-title h1 {
        font-size: 21px;
    }

    .topbar-title p {
        display: none;
    }

    .night-clock {
        display: none;
    }

    .content {
        padding: 18px 14px 48px;
    }

    .card {
        padding: 18px;
    }

    .page-hero,
    .profile-hero,
    .frame-feature {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        padding: 24px 20px;
    }

    .page-hero-side,
    .profile-hero-side {
        align-items: flex-start;
    }

    .page-hero-mark,
    .profile-mark {
        font-size: 140px;
        right: 6px;
        bottom: -40px;
    }

    .stat-row-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .stat-row-cards .stat-cell {
        padding: 14px;
    }

    .quick-grid,
    .quick-grid-3 {
        grid-template-columns: minmax(0, 1fr);
    }

    .podium {
        flex-direction: column;
        align-items: stretch;
    }

    .podium-card {
        order: 0 !important;
        max-width: none;
        padding-top: 22px;
        padding-bottom: 22px;
    }

    .podium-1 {
        padding-top: 26px;
        padding-bottom: 26px;
    }

    .frame-gallery {
        grid-template-columns: minmax(0, 1fr);
    }

    .tier-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .profile-hero-main {
        flex-direction: column;
        align-items: flex-start;
    }

    .profile-hero-side {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
    }

    .field-row,
    .form-row {
        flex-direction: column;
    }

    .filter-bar {
        align-items: stretch;
    }

    .search-box,
    .select {
        width: 100%;
        min-width: 0;
    }

    .filter-bar .btn {
        flex: 1;
    }

    .frame-feature-visual {
        align-self: center;
    }

    .frame-portrait-lg {
        width: 158px;
        height: 158px;
    }

    .frame-portrait-lg .frame-portrait-avatar {
        font-size: 58px;
    }

    .auth-panel {
        padding: 22px 14px;
    }

    .auth-card {
        padding: 26px 20px 24px;
    }

    .app-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}

@media (max-height: 820px) and (min-width: 1025px) {
    .side-signature {
        display: none;
    }

    .nav-group {
        margin-bottom: 9px;
    }
}

@media (max-width: 460px) {
    .stat-row-cards {
        grid-template-columns: minmax(0, 1fr);
    }

    .notify-panel {
        position: fixed;
        top: 78px;
        right: 12px;
        left: 12px;
        width: auto;
    }

    .tier-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero-actions .btn,
    .page-actions .btn,
    .form-actions .btn {
        flex: 1;
    }

    .card-head {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* ============================ 封禁与申诉 ============================ */

/* ---- 解封申诉页（banned.php）---- */

.ban-brief {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin: 0 0 18px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--panel-soft);
}

.ban-brief-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 13px;
}

.ban-brief-label {
    flex: 0 0 72px;
    color: var(--dim);
    letter-spacing: 1px;
}

.appeal-alert strong {
    color: var(--danger);
}

.appeal-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    border: 1px solid var(--line-strong);
    color: var(--muted);
}

.appeal-status.is-pending {
    border-color: rgba(232, 207, 155, 0.45);
    background: rgba(232, 207, 155, 0.1);
    color: var(--gold);
}

.appeal-status.is-accepted {
    border-color: rgba(143, 224, 196, 0.45);
    background: var(--success-soft);
    color: var(--success);
}

.appeal-status.is-rejected {
    border-color: rgba(255, 128, 152, 0.45);
    background: var(--danger-soft);
    color: var(--danger);
}

.appeal-content {
    flex: 1 1 240px;
    min-width: 0;
    padding: 10px 14px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-sm);
    background: rgba(167, 139, 224, 0.08);
    color: var(--accent-2);
    font-size: 13px;
    line-height: 1.8;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ---- 申诉管理页（admin/appeals.php）---- */

.appeal-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.filter-chip {
    padding: 5px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: 12px;
    text-decoration: none;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.filter-chip:hover {
    color: var(--text);
    border-color: var(--line-strong);
}

.filter-chip.is-active {
    color: #14101f;
    background: linear-gradient(160deg, var(--accent-2), var(--accent));
    border-color: transparent;
    font-weight: 600;
}

.appeal-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 14px;
}

.appeal-item {
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--panel-soft);
}

.appeal-item.is-pending {
    border-color: rgba(232, 207, 155, 0.28);
    box-shadow: 0 0 24px rgba(232, 207, 155, 0.06) inset;
}

.appeal-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.appeal-item-meta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
}

.appeal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin: 14px 0 0;
}

.appeal-fact {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 13px;
    color: var(--text-soft);
}

.appeal-fact-label {
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--dim);
    text-transform: uppercase;
}

.appeal-item .appeal-content {
    margin-top: 14px;
}

.appeal-handled {
    margin-top: 12px;
    font-size: 12px;
    color: var(--dim);
}

.appeal-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.text-danger {
    color: var(--danger);
}

.text-ok {
    color: var(--success);
}

/* ---- 用户管理表格操作 ---- */

.action-group {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.foot-divider {
    margin: 0 8px;
    color: var(--dim);
}

/* ---- 封禁弹窗（原生 dialog）---- */

.ban-dialog {
    width: min(460px, calc(100vw - 32px));
    padding: 0;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: var(--panel-solid);
    color: var(--text);
    box-shadow: var(--shadow);
}

.ban-dialog::backdrop {
    background: rgba(8, 7, 12, 0.66);
    backdrop-filter: blur(4px);
}

.ban-dialog .form {
    padding: 24px 22px 22px;
    margin: 0;
    width: 100%;
}

.dialog-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.dialog-head h3 {
    margin: 4px 0 0;
    font-size: 18px;
    color: var(--text);
}

.dialog-head h3 span {
    color: var(--accent-2);
}

.dialog-close {
    transform: rotate(90deg);
}

.ban-dialog .form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

@media (max-width: 460px) {
    .ban-brief-label {
        flex-basis: 100%;
    }

    .appeal-item-head {
        flex-direction: column;
        align-items: flex-start;
    }
}
