/* ============================================================
   地图帮 · 视觉设计系统 (Design System v1)
   参考：xianxianbaobei.com/redeem —— 暖橙渐变 + 径向光晕背景 + 辉光阴影
   规范文档：dev_docs/设计规范-视觉系统_v1.md
   ============================================================ */

/* ---------- 设计令牌 Design Tokens ---------- */
:root {
    /* Bootstrap 基础变量（保留兼容） */
    --bs-blue: #0d6efd;
    --bs-indigo: #6610f2;
    --bs-purple: #6f42c1;
    --bs-pink: #d63384;
    --bs-red: #dc3545;
    --bs-orange: #fd7e14;
    --bs-yellow: #ffc107;
    --bs-green: #198754;
    --bs-teal: #20c997;
    --bs-cyan: #0dcaf0;
    --bs-white: #fff;
    --bs-gray: #6c757d;
    --bs-gray-dark: #343a40;
    --bs-gray-100: #f8f9fa;
    --bs-gray-200: #e9ecef;
    --bs-gray-300: #dee2e6;
    --bs-gray-400: #ced4da;
    --bs-gray-500: #adb5bd;
    --bs-gray-600: #6c757d;
    --bs-gray-700: #495057;
    --bs-gray-800: #343a40;
    --bs-gray-900: #212529;
    --bs-secondary: #6c757d;
    --bs-success: #16a34a;
    --bs-info: #2f7ff0;
    --bs-warning: #f59e0b;
    --bs-danger: #ef4444;
    --bs-light: #f8f9fa;
    --bs-dark: #1b1b21;
    --bs-secondary-rgb: 108,117,125;
    --bs-success-rgb: 22,163,74;
    --bs-info-rgb: 47,127,240;
    --bs-warning-rgb: 245,158,11;
    --bs-danger-rgb: 239,68,68;
    --bs-light-rgb: 248,249,250;
    --bs-dark-rgb: 27,27,33;
    --bs-white-rgb: 255,255,255;
    --bs-black-rgb: 0,0,0;
    --bs-body-color-rgb: 27,27,33;
    --bs-body-bg-rgb: 255,255,255;
    --bs-font-sans-serif: system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";
    --bs-font-monospace: SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;
    --bs-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));
    --bs-body-font-family: var(--bs-font-sans-serif);
    --bs-body-font-size: 1rem;
    --bs-body-font-weight: 400;
    --bs-body-line-height: 1.5;
    --bs-body-color: #1b1b21;
    --bs-body-bg: #fafafb;

    /* —— 品牌色 Brand —— */
    --accent-primary: #ff7b00;
    --accent-secondary: #ef6f00;
    --accent-dark: #e66a00;
    --accent-light: #fff3e8;
    --accent-glow: rgba(255, 123, 0, .22);
    --gold: #f0900f;

    /* —— 品牌渐变 Gradients —— */
    --accent-gradient: linear-gradient(135deg, #ff9a3c 0%, #ff7b00 55%, #ef6700 100%);
    --gold-gradient: linear-gradient(135deg, #ff9a3c 0%, #ff7b00 60%, #ef6700 100%);
    --bg-gradient: radial-gradient(900px 480px at 100% -8%, rgba(255, 123, 0, .07), transparent 60%),
                   radial-gradient(720px 480px at -8% 108%, rgba(255, 154, 60, .06), transparent 55%),
                   linear-gradient(180deg, #fdfcfb 0%, #fafafb 100%);

    /* —— 表面 Surfaces —— */
    --bg-base: #fafafb;
    --bg-card: #ffffff;
    --bg-elevated: #ffffff;
    --bg-soft: #fff8f3;
    --bg-hover: #fff6ee;

    /* —— 文字 Text —— */
    --text-primary: #1b1b21;
    --text-secondary: #5b5b66;
    --text-muted: #9a9aa6;

    /* —— 边框 Borders —— */
    --border-color: #ececf0;
    --border-soft: #f2f2f5;
    --border-strong: #e2e2e8;
    --border-hover: rgba(255, 123, 0, .5);

    /* —— 阴影 Shadow Scale —— */
    --shadow-sm: 0 1px 3px rgba(20, 20, 31, .06);
    --shadow-md: 0 8px 24px -10px rgba(20, 20, 31, .14);
    --shadow-lg: 0 22px 50px -18px rgba(20, 20, 31, .2);
    --shadow-glow-sm: 0 6px 18px -7px rgba(255, 123, 0, .42);
    --shadow-glow: 0 14px 34px -12px rgba(255, 123, 0, .45);

    /* —— 圆角 Radius Scale —— */
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-pill: 999px;

    /* —— 间距 Spacing Scale (4px 基准) —— */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-16: 64px;

    /* —— 字号阶梯 Type Scale —— */
    --fs-display: 40px;
    --fs-h1: 30px;
    --fs-h2: 24px;
    --fs-h3: 20px;
    --fs-body-lg: 16px;
    --fs-body: 14px;
    --fs-caption: 12px;

    /* —— 动效 Motion —— */
    --ease-out: cubic-bezier(.16, 1, .3, 1);
    --dur-fast: 150ms;
    --dur: 250ms;

    /* —— 层级 Z-index —— */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-modal: 1050;
    --z-toast: 1080;

    /* Bootstrap 主色对齐品牌橙 */
    --bs-primary: #ff7b00 !important;
    --bs-primary-rgb: 255, 123, 0 !important;
    --bs-link-color: #ff7b00 !important;
    --bs-link-hover-color: #e66a00 !important;
    --accent-on-dark: var(--accent-primary);
}

/* ============ 暗色模式 Dark Mode (P1：覆盖中性/表面/边框/阴影/底纹令牌；品牌橙不变) ============ */
:root.dark,
.dark {
    --bg-base: #0f141c;
    --bg-card: #1a2230;
    --bg-elevated: #222c3c;
    --bg-soft: rgba(255, 123, 0, .10);
    --bg-hover: rgba(255, 255, 255, .05);
    --bg-gradient: radial-gradient(900px 480px at 100% -8%, rgba(255, 123, 0, .10), transparent 60%),
                   radial-gradient(720px 480px at -8% 108%, rgba(255, 123, 0, .06), transparent 55%),
                   linear-gradient(180deg, #0f141c 0%, #0b0f16 100%);
    --text-primary: #f1f5f9;
    --text-secondary: #c2c8d2;
    --text-muted: #8b93a3;
    --border-color: rgba(255, 255, 255, .10);
    --border-soft: rgba(255, 255, 255, .06);
    --border-strong: rgba(255, 255, 255, .16);
    --border-hover: rgba(255, 123, 0, .55);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 12px rgba(0, 0, 0, .32);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, .45);
    --shadow-lg: 0 18px 48px rgba(0, 0, 0, .55);
    --accent-on-dark: #ff9a3c;
    /* Bootstrap 暗色对齐 */
    --bs-body-color: #f1f5f9;
    --bs-body-bg: #0f141c;
}

/* ============ 暗色 / 浅色切换开关 ============ */
.dtb-theme-toggle {
    position: fixed;
    left: 18px;
    bottom: 18px;
    z-index: var(--z-toast, 1080);
    width: 42px;
    height: 42px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-primary);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--dur-fast, 150ms) var(--ease-out, ease),
        box-shadow var(--dur-fast, 150ms) var(--ease-out, ease),
        border-color var(--dur-fast, 150ms) var(--ease-out, ease);
}
.dtb-theme-toggle:hover {
    transform: translateY(-2px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-lg);
}
.dtb-theme-toggle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ---------- 全局样式 ---------- */
body {
    font-family: var(--bs-body-font-family);
    font-size: var(--fs-body);
    font-weight: var(--bs-body-font-weight);
    line-height: var(--bs-body-line-height);
    color: var(--text-primary);
    background-color: var(--bg-base);
    background-image: var(--bg-gradient);
    background-attachment: fixed;
    background-repeat: no-repeat;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
}

a {
    color: var(--accent-primary);
    text-decoration-color: rgba(255, 123, 0, .35);
}

a:hover {
    color: var(--accent-dark);
}

/* 品牌渐变文字 */
.gradient-text {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.text-secondary-soft { color: var(--text-secondary) !important; }
.text-muted-soft { color: var(--text-muted) !important; }

/* ---------- 导航栏 ---------- */
.navbar {
    position: relative;
    z-index: 1030; /* 高于任何 position:relative 的 section，确保下拉菜单不被 Hero 遮挡 */
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding-top: .5rem;
    padding-bottom: .5rem;
    background-color: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: saturate(180%) blur(8px);
    -webkit-backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid var(--border-soft);
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--text-primary) !important;
}

.navbar-nav .nav-link {
    font-weight: 500;
    font-size: 14px;
    transition: color 0.2s;
    color: var(--text-secondary) !important;
}

.navbar-nav .nav-link:hover {
    color: var(--accent-primary) !important;
}

.navbar-nav .nav-link.active {
    color: var(--accent-primary) !important;
    font-weight: 600;
}

.navbar-toggler {
    border-color: var(--border-strong);
}

.dropdown-menu {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 0.35rem 0;
}

.dropdown-item {
    font-size: 14px;
    padding: 0.5rem 1rem;
    color: var(--text-secondary);
    transition: all 0.15s;
}

.dropdown-item:hover {
    background: var(--bg-hover);
    color: var(--accent-primary);
}

.dropdown-divider {
    border-color: var(--border-soft);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 0, 0, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ---------- 标签页 Tabs ---------- */
/* 规范：未选中=次级灰文字；选中=主橙加粗 + 短橙色渐变下划线(辉光,圆角)；整行下置 1px 浅分隔 */
.ds-tabs {
    display: flex;
    align-items: center;
    gap: 2.25rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

.ds-tab {
    position: relative;
    padding: 0.8rem 0.1rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.2s;
}

.ds-tab:hover { color: var(--accent-primary); }
.ds-tab.active { color: var(--accent-primary); }

.ds-tab.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 3px;
    border-radius: var(--radius-pill);
    background: var(--accent-gradient);
    box-shadow: var(--shadow-glow-sm);
}

/* Bootstrap .nav-tabs 对齐同一规范（下划线指示器，去边框） */
.nav-tabs {
    border-bottom: 1px solid var(--border-color);
    gap: 0.4rem;
}

.nav-tabs .nav-link {
    position: relative;
    border: none;
    background: none;
    color: var(--text-secondary);
    font-weight: 600;
    padding: 0.7rem 0.9rem;
    margin-bottom: -1px;
    transition: color 0.2s;
}

.nav-tabs .nav-link:hover {
    color: var(--accent-primary);
    border: none;
    isolation: isolate;
}

.nav-tabs .nav-link.active {
    color: var(--accent-primary);
    background: none;
    border: none;
}

.nav-tabs .nav-link.active::after {
    content: "";
    position: absolute;
    left: 0.9rem;
    right: 0.9rem;
    bottom: 0;
    height: 3px;
    border-radius: var(--radius-pill);
    background: var(--accent-gradient);
    box-shadow: var(--shadow-glow-sm);
}

/* .nav-pills 胶囊态：选中填充品牌渐变 */
.nav-pills .nav-link {
    color: var(--text-secondary);
    border-radius: var(--radius-pill);
    font-weight: 600;
    transition: color 0.2s, background 0.2s;
}

.nav-pills .nav-link:hover { color: var(--accent-primary); }

.nav-pills .nav-link.active {
    background-image: var(--accent-gradient);
    background-color: var(--accent-primary);
    box-shadow: var(--shadow-glow-sm);
    color: #fff;
}

/* ---------- 卡片 / 表面 ---------- */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius);
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

.card-header {
    background-color: var(--bg-soft);
    border-bottom: 1px solid var(--border-color);
}

/* 通用表面工具类 */
.surface {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.surface-lift {
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.surface-lift:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-hover);
}

/* ---------- 内容卡片家族（《UI样式规范》第4节 卡片使用规范） ---------- */
.card-surface {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: var(--space-5) var(--space-6);
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.card-surface.is-lift:hover {
    transform: translateY(-3px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

.card-surface.is-soft {
    background: var(--bg-soft);
}

.card-surface.is-accent {
    background: linear-gradient(135deg, var(--bg-soft), var(--bg-card) 70%);
    border-color: var(--border-hover);
}

.card-surface.is-soon {
    background: linear-gradient(135deg, var(--bg-soft), var(--bg-card) 70%);
    border: 1px dashed var(--border-hover);
}

.card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-2);
}

.card-name {
    font-size: 17px;
    font-weight: 800;
    color: var(--text-primary);
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 var(--space-1);
}

.card-desc {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-muted);
    margin: 0;
}

.card-ico {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    border-radius: var(--radius);
    background: var(--accent-light);
    color: var(--accent-primary);
    margin-bottom: var(--space-3);
}

.card-ico.is-accent {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: var(--shadow-glow-sm);
}

.card-tag-accent {
    background: var(--accent-gradient);
    color: #fff;
}

/* ---------- 按钮 ---------- */
.btn {
    border-radius: var(--radius-sm);
}

.btn-primary,
.btn-gradient {
    background-color: var(--accent-primary);
    background-image: var(--accent-gradient);
    border: none;
    color: #fff;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-glow-sm);
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-primary:hover,
.btn-gradient:hover,
.btn-primary:focus-visible,
.btn-gradient:focus-visible {
    background-color: var(--accent-dark);
    background-image: var(--accent-gradient);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
    filter: saturate(1.05);
}

.btn-primary:active,
.btn-gradient:active {
    transform: translateY(0);
    box-shadow: var(--shadow-glow-sm);
}

.btn-primary:disabled,
.btn-primary.disabled {
    background-image: none;
    background-color: #ffc285;
    box-shadow: none;
}

.btn-outline-primary {
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    border-radius: var(--radius-sm);
    background: transparent;
    transition: all 0.2s;
}

.btn-outline-primary:hover {
    background-image: var(--accent-gradient);
    background-color: var(--accent-primary);
    border-color: transparent;
    color: #fff;
    box-shadow: var(--shadow-glow-sm);
}

.btn-success {
    background-image: linear-gradient(135deg, #22c55e, #16a34a);
    border: none;
}

.btn-success:hover {
    background-image: linear-gradient(135deg, #22c55e, #15803d);
    border: none;
}

/* ---------- 平台下载按钮 Platform Download Buttons ---------- */
/* 三色语义：橙=Windows主平台、绿=macOS、金=Linux
   与参考站底部「Windows / macOS / Linux 下载」按钮组语言一致 */
.btn-platform {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.72rem 1.6rem;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-sm);
    color: #fff;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-platform:hover {
    color: #fff;
    transform: translateY(-2px);
    filter: saturate(1.08) brightness(1.04);
}

.btn-platform:active {
    transform: translateY(0);
}

/* Windows — 品牌橙渐变 */
.btn-platform-win,
.btn-platform-orange {
    background-image: var(--accent-gradient);
    background-color: var(--accent-primary);
    box-shadow: var(--shadow-glow-sm);
}

.btn-platform-win:hover,
.btn-platform-orange:hover {
    box-shadow: var(--shadow-glow);
}

/* macOS — 绿色渐变 */
.btn-platform-mac,
.btn-platform-green {
    background-image: linear-gradient(135deg, #22c55e 0%, #16a34a 60%, #15803d 100%);
    background-color: #16a34a;
    box-shadow: 0 6px 18px -7px rgba(22, 163, 74, 0.55);
}

.btn-platform-mac:hover,
.btn-platform-green:hover {
    box-shadow: 0 14px 34px -12px rgba(22, 163, 74, 0.65);
}

/* Linux — 金色渐变 */
.btn-platform-linux,
.btn-platform-gold {
    background-image: linear-gradient(135deg, #fbbf24 0%, #f59e0b 55%, #d9930a 100%);
    background-color: #f59e0b;
    color: #1b1b21;
    box-shadow: 0 6px 18px -7px rgba(245, 158, 11, 0.55);
}

.btn-platform-linux:hover,
.btn-platform-gold:hover {
    color: #1b1b21;
    box-shadow: 0 14px 34px -12px rgba(245, 158, 11, 0.65);
}

/* 幽灵 / 已知道按钮 */
.btn-platform-ghost {
    background: rgba(27, 27, 33, 0.06);
    color: var(--text-secondary) !important;
    border: 1px solid var(--border-strong);
    box-shadow: none;
}

.btn-platform-ghost:hover {
    color: var(--text-primary) !important;
    background: rgba(27, 27, 33, 0.1);
    box-shadow: var(--shadow-sm);
}

/* ---------- 表单 ---------- */
.form-control,
.form-select {
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(255, 123, 0, 0.12);
}

.form-label {
    font-weight: 500;
    color: var(--text-primary);
}

/* ---------- 徽章 / 标签 ---------- */
.badge.bg-warning {
    background-image: var(--gold-gradient) !important;
    background-color: var(--gold) !important;
    color: #fff !important;
}

.badge.bg-primary {
    background-color: var(--accent-primary) !important;
}

.tag-accent {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-primary);
    background: var(--accent-light);
    border-radius: var(--radius-pill);
}

/* ---------- 警告框 ---------- */
.alert {
    border: 1px solid transparent;
    border-radius: var(--radius);
    box-shadow: none;
}

.alert-success {
    background-color: rgba(22,163,74,0.08);
    color: #15803d;
    border-color: rgba(22,163,74,0.2);
}

.alert-danger {
    background-color: rgba(239,68,68,0.08);
    color: #dc2626;
    border-color: rgba(239,68,68,0.2);
}

.alert-info {
    background-color: rgba(47,127,240,0.08);
    color: #2563eb;
    border-color: rgba(47,127,240,0.2);
}

.alert-warning {
    background-color: var(--accent-light);
    color: var(--accent-dark);
    border-color: rgba(255,123,0,0.2);
}

/* ---------- 地图相关样式 ---------- */
.map-container {
    position: relative;
    height: 100vh;
    width: 100%;
}

.search-panel {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1000;
    background: var(--bg-card);
    padding: 20px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    min-width: 350px;
    max-width: 400px;
}

/* ---------- 响应式设计 ---------- */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .search-panel {
        position: relative;
        top: auto;
        left: auto;
        margin: 20px;
        min-width: auto;
        max-width: none;
    }

    .map-container {
        height: calc(100vh - 200px);
    }
}

/* ---------- 动画效果 ---------- */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 区块依次入场 */
.reveal {
    animation: fadeUp 0.65s cubic-bezier(.16, 1, .3, 1) both;
}
.reveal-1 { animation-delay: .06s; }
.reveal-2 { animation-delay: .13s; }
.reveal-3 { animation-delay: .2s; }
.reveal-4 { animation-delay: .27s; }
.reveal-5 { animation-delay: .34s; }

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 橙色辉光呼吸 */
.pulse-glow {
    animation: pulseGlow 2.4s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 123, 0, 0); }
    50% { box-shadow: 0 0 18px 3px rgba(255, 123, 0, .45); }
}

@media (prefers-reduced-motion: reduce) {
    .fade-in, .reveal, .pulse-glow,
    .btn-primary, .btn-gradient, .surface-lift {
        animation: none !important;
        transition: none !important;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ---------- 自定义滚动条 ---------- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--border-soft);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #d8d8df;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

/* ---------- 阴影 / 圆角工具类 ---------- */
.shadow-soft { box-shadow: var(--shadow-sm) !important; }
.shadow-soft-md { box-shadow: var(--shadow-md) !important; }
.shadow-soft-lg { box-shadow: var(--shadow-lg) !important; }
.shadow-glow { box-shadow: var(--shadow-glow) !important; }
.rounded-token { border-radius: var(--radius) !important; }
.rounded-token-lg { border-radius: var(--radius-lg) !important; }

/* ---------- Footer样式 ---------- */
.footer-copyright {
    padding: 1.5rem 0;
    margin-top: 3rem;
    background-color: rgba(255, 255, 255, 0.6);
    border-top: 1px solid var(--border-soft);
    color: var(--text-muted);
    font-size: 0.82rem;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.footer-brand {
    display: flex;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--accent-primary);
}

.footer-copy {
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .footer-inner {
        flex-direction: column;
        text-align: center;
    }
}

/* ============================================================
   控制台 Console —— 用户中心统一外壳（多路由共享）
   左侧持久导航 + 右侧内容区；所有 section 复用同一套令牌
   ============================================================ */
.console-page { padding: 28px 0 56px; }

.console-shell {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- 顶部用户概要条 ---------- */
.console-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    background: var(--accent-gradient);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 22px 26px;
    box-shadow: var(--shadow-glow);
    margin-bottom: 22px;
}

.console-hero::after {
    content: "";
    position: absolute;
    right: -60px;
    top: -80px;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(255, 255, 255, .22), transparent 70%);
    pointer-events: none;
}

.console-hero-avatar {
    width: 68px;
    height: 68px;
    flex: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, .2);
    border: 2px solid rgba(255, 255, 255, .55);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    overflow: hidden;
}

.console-hero-avatar img { width: 100%; height: 100%; object-fit: cover; }

.console-hero-main { min-width: 0; flex: 1 1 240px; }

.console-hero-name {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -.3px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.console-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: .72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, .9);
    color: var(--accent-dark);
}

.console-hero-sub {
    margin: 6px 0 0;
    font-size: .85rem;
    opacity: .92;
}

.console-hero-points {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.console-hero-pt {
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .26);
    border-radius: var(--radius);
    padding: 9px 16px;
    min-width: 116px;
}

.console-hero-pt .k { font-size: .72rem; opacity: .9; }
.console-hero-pt .v { font-size: 1.4rem; font-weight: 800; line-height: 1.15; letter-spacing: -.5px; }

.console-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.console-hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .84rem;
    font-weight: 700;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, .95);
    color: var(--accent-dark);
    transition: transform .18s ease, box-shadow .2s ease;
}

.console-hero-btn:hover { color: var(--accent-dark); transform: translateY(-2px); box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .35); }
.console-hero-btn.ghost { background: rgba(255, 255, 255, .16); color: #fff; border: 1px solid rgba(255, 255, 255, .4); }
.console-hero-btn.ghost:hover { color: #fff; background: rgba(255, 255, 255, .26); }

/* ---------- 布局：左导航 + 右内容 ---------- */
.console-layout {
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.console-sidebar { position: sticky; top: 88px; }

.console-nav {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 10px;
}

.console-nav-title {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-muted);
    padding: 10px 12px 6px;
}

.console-nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: .92rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    transition: background .15s, color .15s;
    position: relative;
}

.console-nav-item .ic { width: 18px; text-align: center; color: var(--text-muted); transition: color .15s; flex: none; }
.console-nav-item:hover { background: var(--bg-hover); color: var(--accent-primary); }
.console-nav-item:hover .ic { color: var(--accent-primary); }

.console-nav-item.active {
    background: var(--accent-light);
    color: var(--accent-dark);
}

.console-nav-item.active .ic { color: var(--accent-primary); }

.console-nav-item.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: var(--radius-pill);
    background: var(--accent-gradient);
}

.console-nav-item .arrow { margin-left: auto; font-size: .72rem; color: var(--text-muted); }
.console-nav-divider { height: 1px; background: var(--border-soft); margin: 8px 6px; }

/* ---------- 内容区 ---------- */
.console-main { min-width: 0; display: flex; flex-direction: column; gap: 18px; }

.console-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 22px var(--space-6);
}

.console-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.console-panel-title { margin: 0; font-size: var(--fs-h3); font-weight: 700; color: var(--text-primary); }
.console-panel-desc { margin: 5px 0 0; font-size: .86rem; color: var(--text-secondary); }

/* ---------- 统计卡 ---------- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
    gap: 14px;
}

.stat-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-base);
    padding: 16px 18px;
}

.stat-card.accent { background: var(--bg-soft); border-color: rgba(255, 123, 0, .18); }
.stat-card .k { font-size: .78rem; color: var(--text-muted); margin-bottom: 7px; }
.stat-card .v { font-size: 1.35rem; font-weight: 800; color: var(--text-primary); letter-spacing: -.5px; line-height: 1.1; }
.stat-card.accent .v { color: var(--accent-dark); }
.stat-card .extra { font-size: .8rem; color: var(--text-secondary); margin-top: 7px; line-height: 1.55; }

/* ---------- 信息行（label : value） ---------- */
.info-list { display: flex; flex-direction: column; }
.info-line {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-soft);
    font-size: .9rem;
}
.info-line:last-child { border-bottom: none; }
.info-line .k { color: var(--text-muted); flex: none; }
.info-line .v { color: var(--text-primary); font-weight: 600; text-align: right; word-break: break-word; }

/* ---------- 数据表 ---------- */
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.data-table th {
    font-size: .76rem;
    font-weight: 700;
    color: var(--text-secondary);
    background: var(--bg-base);
    text-align: left;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}
.data-table th:first-child { border-top-left-radius: var(--radius-sm); }
.data-table th:last-child { border-top-right-radius: var(--radius-sm); }
.data-table td {
    font-size: .86rem;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-soft);
    color: var(--text-primary);
    vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr { transition: background .15s; }
.data-table tbody tr:hover { background: var(--bg-hover); }
.data-table .num { font-variant-numeric: tabular-nums; }
.data-table .pos { color: #16a34a; font-weight: 700; }
.data-table .neg { color: #ef4444; font-weight: 700; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---------- 通用胶囊标签 ---------- */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    font-size: .74rem;
    font-weight: 700;
    line-height: 1.4;
    white-space: nowrap;
}
.pill-brand { color: var(--accent-dark); background: var(--accent-light); }
.pill-success { color: #047857; background: #d1fae5; }
.pill-danger { color: #b91c1c; background: #fee2e2; }
.pill-warning { color: #b45309; background: #fef3c7; }
.pill-info { color: #1d4ed8; background: #dbeafe; }
.pill-muted { color: var(--text-secondary); background: #f1f2f4; }

/* ---------- 空态 ---------- */
.empty-state {
    text-align: center;
    padding: 44px 20px;
    color: var(--text-secondary);
}
.empty-state .ico {
    width: 60px;
    height: 60px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: var(--accent-light);
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}
.empty-state .title { font-size: 1rem; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
.empty-state .desc { font-size: .86rem; line-height: 1.6; max-width: 360px; margin: 0 auto 16px; }

/* ---------- 骨架屏 ---------- */
.skeleton {
    background: linear-gradient(100deg, #eef0f2 30%, #f6f7f9 50%, #eef0f2 70%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.3s ease-in-out infinite;
    border-radius: var(--radius-sm);
}
.skeleton-line { height: 14px; margin-bottom: 10px; }
.skeleton-line.w-60 { width: 60%; }
.skeleton-line.w-40 { width: 40%; }
.skeleton-row { height: 56px; margin-bottom: 10px; border-radius: var(--radius-sm); }

@keyframes skeletonShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ---------- 行内加载圈（深色，用于浅底按钮/区块） ---------- */
.spinner-dark {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 123, 0, .25);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
}

/* 按钮 loading 态 */
.btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid rgba(255, 255, 255, .55);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ---------- Toast 轻提示 ---------- */
.toast-host {
    position: fixed;
    top: 76px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}
.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 240px;
    max-width: 360px;
    padding: 12px 16px;
    border-radius: var(--radius);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    font-size: .88rem;
    color: var(--text-primary);
    pointer-events: auto;
    animation: toastIn .28s cubic-bezier(.16, 1, .3, 1) both;
}
.toast.leaving { animation: toastOut .25s ease forwards; }
.toast .ico { width: 20px; text-align: center; flex: none; }
.toast.success { border-color: rgba(22, 163, 74, .35); }
.toast.success .ico { color: #16a34a; }
.toast.error { border-color: rgba(239, 68, 68, .35); }
.toast.error .ico { color: #ef4444; }
.toast.info .ico { color: var(--accent-primary); }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(24px); }
    to { opacity: 1; transform: none; }
}
@keyframes toastOut {
    to { opacity: 0; transform: translateX(24px); }
}

/* ---------- 控制台响应式 ---------- */
@media (max-width: 992px) {
    .console-layout { grid-template-columns: 1fr; }
    .console-sidebar { position: static; }
    .console-nav { display: flex; gap: 4px; overflow-x: auto; padding: 8px; -webkit-overflow-scrolling: touch; }
    .console-nav-title, .console-nav-divider { display: none; }
    .console-nav-item { white-space: nowrap; padding: 9px 14px; }
    .console-nav-item.active::before { display: none; }
    .console-nav-item .arrow { display: none; }
}

@media (max-width: 768px) {
    .console-shell { padding: 0 14px; }
    .console-hero { padding: 18px; }
    .console-panel { padding: 18px 16px; }
    .console-panel-head { flex-direction: column; }
    .info-line { flex-direction: column; gap: 4px; }
    .info-line .v { text-align: left; }
    .toast-host { left: 14px; right: 14px; }
    .toast { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
    .skeleton, .toast, .spinner-dark, .btn.is-loading::after { animation: none !important; }
}

/* ---------- 会员权益信息流 ---------- */
.benefit-flow {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.benefit-col {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-base);
    padding: 16px 18px;
}

.benefit-col-title {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 12px;
}
.benefit-col-sub { font-size: .82rem; font-weight: 600; color: var(--text-secondary); }

.benefit-ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.benefit-ul li {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: .88rem;
    line-height: 1.5;
    color: var(--text-primary);
}
.benefit-ul li i {
    flex: none;
    margin-top: 3px;
    font-size: .76rem;
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-pill);
    background: #d1fae5;
    color: #047857;
}
.benefit-ul.unlock li i { background: var(--accent-light); color: var(--accent-dark); }

.benefit-maxed {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 4px;
    color: var(--text-secondary);
}
.benefit-maxed i { font-size: 1.6rem; color: var(--gold); }
.benefit-maxed p { margin: 0; font-size: .9rem; line-height: 1.5; }

/* 补差价升级横幅（权益页内，支持页内直接支付） */
.upgrade-callout {
    margin-top: 16px;
    padding: 16px 20px;
    border-radius: var(--radius);
    background: var(--bg-soft);
    border: 1px solid rgba(255, 123, 0, .22);
}
.upgrade-callout-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.upgrade-callout-title { font-size: .98rem; font-weight: 800; color: var(--text-primary); display: flex; align-items: center; gap: 8px; }
.upgrade-callout-title i { color: var(--accent-primary); }
.upgrade-callout-desc { margin-top: 5px; font-size: .84rem; color: var(--text-secondary); line-height: 1.5; }
.upgrade-callout-side { display: flex; align-items: center; gap: 14px; }
.upgrade-callout-price { font-size: 1.5rem; font-weight: 800; color: var(--accent-dark); letter-spacing: -.5px; }

/* 升级页内支付区 */
.upgrade-pay { margin-top: 16px; padding-top: 16px; border-top: 1px dashed rgba(255, 123, 0, .28); }
.upgrade-pay-methods { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.upgrade-pay-label { font-size: .84rem; font-weight: 600; color: var(--text-secondary); }
.pay-method-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.pay-method-btn:hover { border-color: var(--border-hover); }
.pay-method-btn.active { border-color: var(--accent-primary); background: var(--accent-light); color: var(--accent-dark); }
.upgrade-pay-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-left: auto;
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    background: #07c160;
    color: #fff;
    font-size: .9rem;
    font-weight: 700;
    transition: filter .15s, opacity .15s;
}
.upgrade-pay-btn:hover { filter: brightness(1.04); }
.upgrade-pay-btn:disabled { opacity: .6; cursor: not-allowed; }
.upgrade-pay-btn.alipay-mode { background: #1677ff; }
.upgrade-qr { display: none; margin-top: 14px; text-align: center; }
.upgrade-qr.show { display: block; }
.upgrade-qr-img img { max-width: 200px; border-radius: var(--radius-sm); border: 1px solid var(--border-color); padding: 8px; background: #fff; }
.upgrade-qr-hint { margin: 8px 0 0; font-size: .82rem; color: var(--text-secondary); }

/* 普通 / 高级 对比表 */
.cmp-table th.cmp-feat, .cmp-table td.cmp-feat { text-align: left; font-weight: 600; color: var(--text-primary); }
.cmp-table th.cmp-plan { text-align: center; }
.cmp-table td.cmp-val { text-align: center; }
.cmp-table th.cmp-plan-hl, .cmp-table td.cmp-val-hl { background: var(--bg-soft); }
.cmp-table th.cmp-plan-hl { color: var(--accent-dark); }
.cmp-yes { color: #047857; font-size: .95rem; }
.cmp-no { color: var(--text-muted); }
.cmp-price { color: var(--accent-dark); font-weight: 800; font-variant-numeric: tabular-nums; }
.cmp-all { color: #047857; font-weight: 700; }
.cmp-text { color: var(--text-secondary); }

.benefits-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }

@media (max-width: 768px) {
    .benefit-flow { grid-template-columns: 1fr; }
    .upgrade-callout-row { flex-direction: column; align-items: stretch; }
    .upgrade-callout-side { justify-content: space-between; }
    .upgrade-pay-methods { flex-direction: column; align-items: stretch; }
    .upgrade-pay-btn { margin-left: 0; width: 100%; justify-content: center; }
    .benefits-cta .btn { flex: 1 1 auto; }
}
