/**
 * 潮汐量化 · 全站设计系统
 * 对齐首页 liquidGlassAgency：黑底、液态玻璃、衬线标题
 */

:root {
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-elevated: rgba(255, 255, 255, 0.05);
    --bg-hover: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.68);
    --text-muted: rgba(255, 255, 255, 0.45);
    --accent: #ffffff;
    --accent-hover: #e8e8e8;
    --accent-soft: rgba(255, 255, 255, 0.08);
    --accent-glow: rgba(255, 255, 255, 0.18);
    --gold: #c9a962;
    --gold-hover: #dbbe78;
    --gold-soft: rgba(201, 169, 98, 0.14);
    --vip-purple: #a78bfa;
    --success: #34d399;
    --warning: #c9a962;
    --danger: #f87171;
    --border: rgba(255, 255, 255, 0.12);
    --border-strong: rgba(255, 255, 255, 0.22);
    --radius: 9999px;
    --radius-lg: 20px;
    --radius-sm: 9999px;
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.35);
    --shadow-hover: 0 16px 48px rgba(0, 0, 0, 0.45);
    --font-heading: "Noto Serif SC", "Songti SC", "SimSun", Georgia, serif;
    --font-display: "Noto Serif SC", "Songti SC", "SimSun", Georgia, serif;
    --font-body: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
    --layout-max-width: 1440px;
    --nav-offset: 88px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: #000;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    letter-spacing: 0.01em;
}

.site-main {
    padding-top: var(--nav-offset);
    min-height: calc(100vh - 200px);
}

h1, h2, h3, h4, .navbar-brand, .page-header h1,
.section-toolbar-title h2,
.home-section-heading h2 {
    font-family: var(--font-heading);
    font-style: italic;
    font-weight: 400;
    letter-spacing: -0.03em;
}

a {
    color: rgba(255, 255, 255, 0.85);
    transition: color 0.2s ease, opacity 0.2s ease;
}
a:hover {
    color: #fff;
}

/* —— 悬浮玻璃导航 —— */
.navbar {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: auto !important;
    min-height: 0;
    padding: 16px 0 0;
    background: transparent !important;
    border-bottom: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
.navbar-inner {
    height: auto !important;
    min-height: 56px;
    align-items: center;
    gap: 12px;
    padding: 0 24px;
    max-width: 1440px;
}
.nav-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.navbar-logo-mark {
    flex-shrink: 0;
    width: auto;
    min-width: 4.5rem;
    height: 48px;
    padding: 0 16px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-style: italic;
    font-size: 18px;
    letter-spacing: 0.06em;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
}
.navbar-logo-mark:hover { color: #fff; }
.navbar-brand {
    display: none;
}
.nav-links-glass {
    border-radius: 999px;
    padding: 4px 6px;
    display: flex;
    align-items: center;
    gap: 2px;
}
.nav-links a {
    color: rgba(255, 255, 255, 0.88);
    font-size: 13px;
    font-weight: 500;
    position: relative;
    padding: 8px 12px;
    border-radius: 999px;
}
.nav-links a:hover,
.nav-links a.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}
.nav-links a.active::after {
    display: none;
}
.nav-search-box {
    border: none;
    border-radius: 999px;
    background: transparent;
}
.nav-search-form .nav-search-box {
    background: rgba(255, 255, 255, 0.01);
}
.nav-search-box:focus-within {
    background: rgba(255, 255, 255, 0.06);
}
.nav-right-link {
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 13px;
    font-weight: 500;
}
.nav-cta-solid {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #fff !important;
    color: #000 !important;
    border-radius: 999px !important;
    padding: 8px 14px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    border: none !important;
    text-decoration: none !important;
}
.nav-cta-solid:hover {
    background: #f2f2f2 !important;
    color: #000 !important;
}

.nav-vip-btn {
    background: #fff;
    color: #000 !important;
    border-radius: 999px;
    font-weight: 600;
    box-shadow: none;
}
.nav-vip-btn:hover {
    background: #f2f2f2;
    color: #000 !important;
}

.nav-member-vip,
.nav-member-svip,
.nav-member-trial,
.nav-member-badge {
    border-radius: 999px !important;
}
.nav-member-vip {
    background: rgba(167, 139, 250, 0.25);
    box-shadow: none;
}
.nav-member-svip {
    background: rgba(201, 169, 98, 0.28);
    box-shadow: none;
}
.nav-member-trial {
    background: rgba(56, 189, 248, 0.28);
    box-shadow: none;
}
.nav-member-badge .member-icon {
    display: none;
}
.nav-member-badge .member-text::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    margin-right: 6px;
    vertical-align: middle;
    opacity: 0.9;
}

.nav-wallet-btn {
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.85);
}
.nav-wallet-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.nav-user-trigger {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
}
.nav-user-menu {
    background: rgba(10, 10, 10, 0.92);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
}

/* —— 按钮 —— */
.btn {
    font-family: var(--font-body);
    font-weight: 600;
    border-radius: 999px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn:active {
    transform: translateY(1px) scale(0.99);
}
.btn-primary {
    background: #fff;
    color: #000;
    border: none;
    box-shadow: none;
}
.btn-primary:hover {
    background: #f0f0f0;
    color: #000;
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.12);
}
.btn-outline {
    border: none;
    color: #fff;
    background: rgba(255, 255, 255, 0.01);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1);
    position: relative;
}
.btn-outline.liquid-glass,
.btn-outline {
    backdrop-filter: blur(8px);
}
.btn-outline:hover {
    border: none;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}
.btn-success {
    background: #fff;
    color: #000;
}
.btn-success:hover {
    background: #f0f0f0;
    color: #000;
}

/* —— 卡片与面板 —— */
.card,
.stat-card,
.auth-card,
.checkout-panel,
.plan-card,
.strategy-home-card,
.favorite-tool-card,
.lib-card,
.filter-sidebar .filter-section,
.content-toolbar,
.section-toolbar,
.quota-box,
.detail-sidebar-card {
    background: rgba(255, 255, 255, 0.03) !important;
    background-blend-mode: luminosity;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 20px !important;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.08), var(--shadow-card);
}
.card:hover,
.stat-card-link:hover,
.strategy-home-card:hover,
.favorite-tool-card:hover,
.lib-card:hover {
    border-color: rgba(255, 255, 255, 0.22) !important;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.12), var(--shadow-hover);
    transform: translateY(-2px);
}

.plan-card.selected {
    border-color: rgba(255, 255, 255, 0.45) !important;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35), 0 8px 32px rgba(255, 255, 255, 0.08) !important;
}
.plan-card .plan-tag {
    background: linear-gradient(135deg, var(--gold), #9a7b3c);
    font-size: 10px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.plan-card .plan-name-gold {
    color: var(--gold);
}
.plan-card .plan-features li .ck {
    color: var(--accent);
}

/* —— 策略卡片 —— */
.strategy-home-card {
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.strategy-home-card:hover {
    transform: translateY(-3px);
}
.strategy-home-card .cover-placeholder {
    font-size: 0 !important;
    background: linear-gradient(145deg, var(--bg-elevated), var(--bg-hover));
}
.strategy-home-card .cover-placeholder::after {
    content: "EA";
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--text-muted);
}
.strategy-home-card .view-cta {
    color: var(--accent);
    font-weight: 600;
}

/* —— 侧栏布局 —— */
.layout-sidebar .sidebar {
    background: rgba(0, 0, 0, 0.55);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
}
.sidebar-menu a {
    color: rgba(255, 255, 255, 0.7);
    border-radius: 999px;
    transition: background 0.2s, color 0.2s;
}
.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* —— 认证页 —— */
.auth-page {
    min-height: calc(100dvh - var(--nav-offset));
    background:
        radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.08), transparent 45%),
        #000;
}
.auth-card {
    border-radius: 24px !important;
    max-width: 420px;
}
.auth-card h2 {
    font-family: var(--font-heading);
    font-style: italic;
    font-weight: 400;
    letter-spacing: -0.03em;
    font-size: 32px;
}
.auth-brand {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 8px;
}
.badge-svip {
    background: linear-gradient(135deg, var(--gold), #9a7b3c) !important;
    color: #fff !important;
}
.badge-vip {
    background: linear-gradient(135deg, var(--vip-purple), #5a4d8a) !important;
    color: #fff !important;
}
.badge-trial {
    background: linear-gradient(135deg, #0ea5e9, #0369a1) !important;
    color: #fff !important;
}
.stat-tier-svip { color: var(--gold); }
.stat-tier-vip { color: var(--vip-purple); }
.stat-tier-trial { color: #0ea5e9; }
.stat-tier-admin { color: var(--vip-purple); }
.wallet-stat .value.green,
.text-positive { color: var(--accent) !important; }
.text-negative { color: var(--danger) !important; }
.badge-main {
    background: var(--accent-soft) !important;
    color: var(--accent) !important;
}
.badge-curated {
    background: rgba(124, 108, 191, 0.12) !important;
    color: var(--vip-purple) !important;
}

/* —— 表单 —— */
.form-group input,
.form-group textarea,
.form-group select,
.toolbar-search-input,
.nav-search-input {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 999px !important;
    color: #fff !important;
}
.form-group textarea {
    border-radius: 16px !important;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus,
.toolbar-search-input:focus,
.nav-search-input:focus {
    border-color: rgba(255, 255, 255, 0.35) !important;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08) !important;
    outline: none;
}

/* —— 徽章 —— */
.badge-active,
.badge-paid {
    background: var(--accent-soft);
    color: var(--accent);
}
.badge-pending {
    background: rgba(201, 169, 98, 0.12);
    color: var(--gold);
}
.badge-awaiting_review {
    background: rgba(201, 169, 98, 0.12);
    color: var(--gold);
}

/* —— 页脚 —— */
.footer {
    background: #000;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
}
.footer-logo {
    font-family: var(--font-heading);
    font-style: italic;
    font-size: 22px;
}
.footer-logo span {
    color: #fff;
}
.footer-col h4 {
    font-family: var(--font-body);
    font-style: normal;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.4);
}
.footer-legal {
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.footer-legal-label {
    color: #fff;
    font-weight: 600;
}

/* —— 表格 —— */
table th {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}
.table-wrapper {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

/* —— 首页区块 —— */
.home-section-heading h2 {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.02em;
}
.home-section-more {
    color: var(--accent);
    font-weight: 600;
}
.home-strategy-empty {
    border-style: solid;
    border-color: var(--border);
    background: var(--bg-card);
}

/* —— 会员页 —— */
.checkout-panel {
    border-radius: var(--radius-lg);
    top: 72px;
}
.pay-item.selected {
    border-color: var(--accent) !important;
    background: var(--accent-soft) !important;
    color: var(--accent) !important;
}
.member-welcome-banner {
    background: var(--accent-soft);
    border-color: rgba(255, 255, 255, 0.18);
}
.member-welcome-banner.svip-banner {
    background: var(--gold-soft);
    border-color: rgba(201, 169, 98, 0.25);
}

/* —— 定价 CTA / 空状态 —— */
.alert-success {
    background: var(--accent-soft);
    border-color: rgba(255, 255, 255, 0.22);
    color: var(--accent);
}
.alert-danger {
    background: rgba(212, 107, 107, 0.1);
    border-color: rgba(212, 107, 107, 0.25);
}

/* —— 管理后台 drop-zone —— */
.drop-zone:hover,
.drop-zone.drag-over,
.drop-zone:focus {
    border-color: var(--accent);
    background: var(--accent-soft);
}

/* —— 页面标题 —— */
.page-header {
    text-align: center;
    padding: 36px 0 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 32px;
    position: relative;
}
.page-header::before {
    content: "";
    position: absolute;
    left: 50%;
    top: -20px;
    transform: translateX(-50%);
    width: min(640px, 90%);
    height: 180px;
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.08), transparent 70%);
    pointer-events: none;
}
.page-header h1 {
    position: relative;
    font-family: var(--font-heading);
    font-style: italic;
    font-size: clamp(34px, 5vw, 52px);
    font-weight: 400;
    letter-spacing: -0.04em;
    margin-bottom: 12px;
    line-height: 1;
}
.page-header p {
    position: relative;
    font-size: 14px;
    font-weight: 300;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto;
}

/* —— 筛选侧栏 —— */
.filter-sidebar .filter-section {
    padding: 20px;
}
.filter-sidebar h4 {
    font-family: var(--font-body);
    font-style: normal;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.filter-sidebar label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    border-radius: 999px;
    padding: 7px 12px;
    margin: 0;
}
.filter-sidebar label:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}
.filter-sidebar input[type="radio"]:checked + *,
.filter-sidebar label:has(input:checked) {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}
.filter-clear {
    color: #fff;
    font-size: 13px;
    font-weight: 500;
}

.section-toolbar-title h2 {
    font-size: clamp(26px, 3vw, 36px) !important;
    line-height: 1.05;
}
.section-toolbar-title p {
    color: rgba(255, 255, 255, 0.55) !important;
    font-weight: 300;
}
.lib-card-more,
.view-cta {
    color: #fff !important;
    font-weight: 600;
}

/* —— 内容卡片网格 —— */
.lib-card {
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.lib-card-img {
    background: rgba(255, 255, 255, 0.04);
    aspect-ratio: 16 / 10;
}
.lib-card-title {
    font-family: var(--font-heading);
    font-style: italic;
    font-weight: 400;
    letter-spacing: -0.02em;
    font-size: 1.15em;
}
.lib-card-placeholder,
.strategy-home-card .cover-placeholder {
    font-size: 0 !important;
    background: linear-gradient(145deg, var(--bg-elevated), var(--bg-hover)) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}
.lib-card-placeholder::after,
.strategy-home-card .cover-placeholder::after {
    content: "EA";
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--text-muted);
}
.tools-grid .lib-card-img > div {
    font-size: 0 !important;
    background: linear-gradient(145deg, var(--bg-elevated), var(--bg-hover));
}
.tools-grid .lib-card-img > div::after {
    content: "TOOL";
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--text-muted);
}

/* —— 等级徽章 —— */
.tag-tier-svip,
.badge.tag-tier-svip {
    background: linear-gradient(135deg, var(--gold), #9a7b3c) !important;
    color: #fff !important;
    font-weight: 600;
    border: none;
}
.tag-tier-vip,
.badge.tag-tier-vip {
    background: linear-gradient(135deg, var(--vip-purple), #5a4d8a) !important;
    color: #fff !important;
    font-weight: 600;
    border: none;
}
.tag-tier-free,
.badge.tag-tier-free {
    background: var(--bg-hover) !important;
    color: var(--text-muted) !important;
    border: 1px solid var(--border);
}

.tag-badge {
    border-radius: 999px !important;
    font-weight: 500;
}
.tag-badge.tag-low { background: rgba(255, 255, 255, 0.1); color: #fff; }
.tag-badge.tag-mid { background: rgba(201, 169, 98, 0.18); color: var(--gold); }
.tag-badge.tag-high { background: rgba(248, 113, 113, 0.16); color: #fca5a5; }
.tag-badge.tag-platform { background: rgba(255, 255, 255, 0.1); color: #fff; }
.tag-badge.tag-type { background: rgba(167, 139, 250, 0.18); color: #c4b5fd; }
.tag-badge.tag-tier-free { background: rgba(255, 255, 255, 0.08); color: rgba(255,255,255,0.8); }
.tag-badge.tag-tier-vip { background: rgba(167, 139, 250, 0.22); color: #ddd6fe; }
.tag-badge.tag-tier-svip { background: rgba(201, 169, 98, 0.22); color: #f0d78c; }

/* —— 详情页标签 —— */
.tag-risk-low { background: var(--accent-soft); color: var(--accent); }
.tag-risk-mid { background: rgba(201, 169, 98, 0.12); color: var(--gold); }
.tag-risk-high { background: rgba(212, 107, 107, 0.12); color: var(--danger); }
.detail-tags .tag-platform { background: rgba(255, 255, 255, 0.1); color: #fff; }
.detail-tags .tag-type { background: rgba(124, 108, 191, 0.12); color: var(--vip-purple); }

/* —— 信息提示框 —— */
.info-box,
.auth-notice-key {
    background: var(--accent-soft) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 16px;
}
.auth-notice-free {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
}
.quota-box {
    background: var(--accent-soft);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 16px;
    padding: 10px 12px;
    font-size: 13px;
    color: var(--text-secondary);
}

/* —— 空状态 —— */
.content-empty {
    text-align: center;
    padding: 64px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}
.content-empty-icon {
    font-size: 0;
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    border-radius: var(--radius);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    position: relative;
}
.content-empty-icon::after {
    content: "—";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--text-muted);
}

/* —— 会员定价页覆盖 —— */
.vip-header h1 {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.02em;
}
.plan-card:hover { border-color: rgba(255, 255, 255, 0.28); }
.plan-card.selected {
    border-color: rgba(255, 255, 255, 0.45) !important;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35), 0 8px 32px rgba(255, 255, 255, 0.08) !important;
}
.plan-card-subscribed,
.plan-card-renew {
    border-color: rgba(255, 255, 255, 0.35) !important;
    background: var(--accent-soft) !important;
}
.plan-card-renew.selected,
.plan-card-subscribed.selected {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 1px var(--accent), 0 4px 24px var(--accent-glow) !important;
}
.plan-status-badge.subscribed { background: var(--accent-soft); color: var(--accent); }
.plan-status-badge.renew { background: rgba(255, 255, 255, 0.1); color: var(--accent); }
.plan-status-badge.upgrade { background: var(--gold-soft); color: var(--gold); }
.plan-card .plan-features li .ck { color: var(--accent); }
.pay-item:hover { border-color: rgba(255, 255, 255, 0.28); }
.pay-item.selected {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent);
}
.benefit-icon {
    background: var(--accent-soft) !important;
    font-size: 0 !important;
}
.benefit-icon::after {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
}
.plan-row-label {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: -0.01em;
}
.text-accent { color: var(--accent); }

/* —— 工具栏 —— */
.content-toolbar,
.section-toolbar {
    border-bottom: 1px solid var(--border);
    padding-bottom: 16px;
    margin-bottom: 24px;
}
.toolbar-search-box {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.03);
}
.toolbar-search-box:focus-within {
    border-color: rgba(255, 255, 255, 0.35);
}

/* —— 资源列表 —— */
.resource-list-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.resource-list-item:hover {
    border-color: rgba(255, 255, 255, 0.22);
    box-shadow: var(--shadow-card);
}
.resource-list-arrow {
    color: var(--accent);
}

/* —— 弹窗 —— */
.tier-modal-inner {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-strong);
    box-shadow: var(--shadow-hover);
}
.tier-modal-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: var(--gold-soft);
    border: 1px solid rgba(201, 169, 98, 0.3);
    position: relative;
}
.tier-modal-icon::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 16px;
    border: 2px solid var(--gold);
    border-radius: 3px 3px 5px 5px;
}

/* —— 法律文档（独立页 + 弹窗共用） —— */
.legal-page { padding: 48px 0 80px; max-width: 820px; margin: 0 auto; }
.legal-back { font-size: 14px; color: var(--text-muted); text-decoration: none; display: inline-block; margin-bottom: 24px; }
.legal-back:hover { color: var(--accent); }
.legal-header { margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.legal-header h1 { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.legal-meta { font-size: 13px; color: var(--text-muted); line-height: 1.8; }
.legal-doc { font-size: 14px; color: var(--text-secondary); line-height: 1.85; }
.legal-doc h2 { font-size: 15px; font-weight: 700; color: var(--text-primary); margin: 28px 0 10px; }
.legal-doc h2:first-of-type { margin-top: 0; }
.legal-doc p { margin-bottom: 10px; }
.legal-doc ol, .legal-doc ul { margin: 0 0 10px 1.25em; padding: 0; }
.legal-doc li { margin-bottom: 6px; }
.legal-doc strong { color: var(--text-primary); font-weight: 600; }
.legal-highlight {
    background: var(--accent-soft);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.75;
}
.legal-highlight strong { color: var(--accent); }

/* —— 会员协议弹窗 —— */
.agreement-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}
.agreement-modal.is-open {
    display: flex;
}
.agreement-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.68);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.agreement-modal-panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 640px;
    max-height: min(85vh, 780px);
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-hover);
    animation: agreementModalIn 0.2s ease-out;
}
@keyframes agreementModalIn {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.agreement-modal-header {
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
}
.agreement-modal-header h2 {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0;
    padding-right: 8px;
}
.agreement-modal-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
}
.agreement-modal-close:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
}
.agreement-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 18px;
    -webkit-overflow-scrolling: touch;
}
.agreement-modal-body .legal-doc { font-size: 13px; }
.agreement-modal-body .legal-doc h2 { font-size: 14px; margin-top: 22px; }
.agreement-modal-footer {
    flex-shrink: 0;
    padding: 14px 18px;
    border-top: 1px solid var(--border);
}
.agreement-modal-footer .btn { width: 100%; }
body.agreement-modal-open { overflow: hidden; }
a[data-agreement-open] { cursor: pointer; }

/* —— 移动端布局（覆盖固定高度导航，避免元素重叠）—— */
@media (max-width: 768px) {
    :root { --nav-offset: 148px; }

    .navbar {
        padding-top: 8px;
        background: linear-gradient(to bottom, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.75) 55%, transparent 100%) !important;
        z-index: 200 !important;
    }
    .navbar,
    .navbar-inner {
        height: auto !important;
        min-height: 0;
    }

    .navbar-inner {
        display: grid;
        grid-template-columns: auto 1fr;
        grid-template-areas:
            "brand actions"
            "links links"
            "search search";
        gap: 8px 10px;
        padding: 8px 12px 10px;
        align-items: center;
    }

    .nav-left {
        display: contents;
    }

    .navbar-logo-mark {
        grid-area: brand;
        width: auto;
        min-width: 3.75rem;
        height: 40px;
        padding: 0 12px;
        font-size: 15px;
    }
    .navbar-brand { display: none; }

    .nav-links {
        grid-area: links;
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 4px;
        width: 100%;
        padding: 4px !important;
        scrollbar-width: none;
    }
    .nav-links-glass {
        border-radius: 999px;
    }

    .nav-links::-webkit-scrollbar {
        display: none;
    }

    .nav-links li {
        flex-shrink: 0;
    }

    .nav-spacer {
        display: none !important;
    }

    .nav-search-form {
        grid-area: search;
        width: 100% !important;
        order: unset !important;
        flex: unset !important;
    }

    .nav-right {
        grid-area: actions;
        margin-left: 0 !important;
        width: auto !important;
        flex-shrink: 1;
        min-width: 0;
        justify-content: flex-end;
        flex-wrap: nowrap;
        gap: 6px;
        white-space: nowrap;
    }

    /* 超管顶栏入口保留（普通用户仍隐藏重复链接） */
    body.is-super-admin .nav-right .nav-right-link[href="/admin"] {
        display: inline !important;
        font-size: 12px;
    }

    body.is-super-admin .nav-right .nav-member-badge {
        display: inline-flex !important;
        align-items: center;
        max-width: none;
        padding: 4px 10px;
        font-size: 11px;
    }

    body.is-super-admin .nav-right .nav-member-badge .member-text {
        max-width: none;
    }

    /* 管理/用户后台：侧栏改为顶部横向滑动菜单 */
    .layout-sidebar:has(.sidebar-menu a[href="/admin/strategies"]),
    .layout-sidebar:has(.sidebar-menu a[href="/user/dashboard"]) {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        min-height: auto;
    }

    .layout-sidebar:has(.sidebar-menu a[href="/admin/strategies"]) .sidebar,
    .layout-sidebar:has(.sidebar-menu a[href="/user/dashboard"]) .sidebar {
        display: block;
        position: sticky;
        top: 0;
        z-index: 90;
        padding: 10px 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-right: none;
        border-bottom: 1px solid var(--border);
        background: var(--bg-secondary);
        scrollbar-width: none;
    }

    .layout-sidebar:has(.sidebar-menu a[href="/admin/strategies"]) .sidebar::-webkit-scrollbar,
    .layout-sidebar:has(.sidebar-menu a[href="/user/dashboard"]) .sidebar::-webkit-scrollbar {
        display: none;
    }

    .layout-sidebar:has(.sidebar-menu a[href="/admin/strategies"]) .sidebar-menu,
    .layout-sidebar:has(.sidebar-menu a[href="/user/dashboard"]) .sidebar-menu {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 6px;
        padding: 0 12px;
        width: max-content;
        min-width: 100%;
    }

    .layout-sidebar:has(.sidebar-menu a[href="/admin/strategies"]) .sidebar-menu li,
    .layout-sidebar:has(.sidebar-menu a[href="/user/dashboard"]) .sidebar-menu li {
        flex-shrink: 0;
    }

    .layout-sidebar:has(.sidebar-menu a[href="/admin/strategies"]) .sidebar-menu a,
    .layout-sidebar:has(.sidebar-menu a[href="/user/dashboard"]) .sidebar-menu a {
        padding: 8px 14px;
        border-radius: var(--radius-sm);
        white-space: nowrap;
        background: rgba(255, 255, 255, 0.04);
        border-left: none;
        border-right: none;
    }

    .layout-sidebar:has(.sidebar-menu a[href="/admin/strategies"]) .sidebar-menu a.active,
    .layout-sidebar:has(.sidebar-menu a[href="/user/dashboard"]) .sidebar-menu a.active {
        background: var(--accent-soft);
        color: var(--accent);
        border-left: none;
        border-right: none;
    }

    .layout-sidebar:has(.sidebar-menu a[href="/admin/strategies"]) .sidebar-menu .sidebar-divider,
    .layout-sidebar:has(.sidebar-menu a[href="/user/dashboard"]) .sidebar-menu .sidebar-divider {
        display: none;
    }

    .nav-member-badge {
        max-width: 96px;
        padding: 4px 8px;
        font-size: 11px;
    }

    .nav-member-badge .member-text {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        display: block;
        max-width: 80px;
    }

    .nav-user-trigger {
        max-width: 88px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 13px;
        padding: 5px 8px;
    }

    body.is-super-admin .nav-user-trigger {
        max-width: 72px;
    }

    .nav-vip-btn {
        font-size: 12px;
        padding: 5px 10px;
    }

    .nav-wallet-btn {
        font-size: 12px;
        padding: 5px 8px;
    }

    .nav-right .btn-sm {
        padding: 5px 12px;
        font-size: 12px;
    }

    .nav-user-menu {
        right: 0;
        left: auto;
        max-width: min(280px, calc(100vw - 32px));
    }

    .auth-page {
        min-height: calc(100vh - 120px);
        padding: 24px 0;
    }

    .auth-card {
        width: calc(100% - 32px);
        max-width: 420px;
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .nav-right .nav-right-link[href="/user/dashboard"] {
        font-size: 12px;
        padding: 5px 8px;
    }

    .nav-member-badge {
        max-width: 84px;
        padding: 4px 7px;
        font-size: 10px;
    }

    .nav-member-badge .member-text {
        max-width: 68px;
    }

    .nav-wallet-btn {
        font-size: 11px;
        padding: 5px 7px;
    }

    body.is-super-admin .nav-right .nav-member-badge {
        max-width: none;
    }

    body.is-super-admin .nav-right .nav-member-badge .member-text {
        max-width: none;
    }

    .nav-user-trigger {
        max-width: 72px;
    }
}

/* —— Liquid Glass 工具类 —— */
:root {
    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.14);
    --glass-blur: 16px;
}

.liquid-glass {
    background: rgba(255, 255, 255, 0.03);
    background-blend-mode: luminosity;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: none;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
}
.liquid-glass::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1.2px;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.38) 0%,
        rgba(255, 255, 255, 0.12) 22%,
        rgba(255, 255, 255, 0) 42%,
        rgba(255, 255, 255, 0) 58%,
        rgba(255, 255, 255, 0.16) 80%,
        rgba(255, 255, 255, 0.28) 100%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.liquid-glass-strong {
    background: rgba(255, 255, 255, 0.05);
    background-blend-mode: luminosity;
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: none;
    box-shadow:
        0 8px 28px rgba(0, 0, 0, 0.22),
        inset 0 1px 1px rgba(255, 255, 255, 0.14);
    position: relative;
    overflow: hidden;
}
.liquid-glass-strong::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1.3px;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.48) 0%,
        rgba(255, 255, 255, 0.16) 22%,
        rgba(255, 255, 255, 0) 42%,
        rgba(255, 255, 255, 0) 58%,
        rgba(255, 255, 255, 0.22) 80%,
        rgba(255, 255, 255, 0.4) 100%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.btn-glass {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 999px;
    padding: 12px 22px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn-glass:hover {
    color: #fff;
    transform: translateY(-1px);
}
.btn-glass-primary {
    background: rgba(255, 255, 255, 0.12);
}
.btn-glass-primary:hover {
    background: rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 28px rgba(255, 255, 255, 0.12);
}
.btn-glass-solid {
    background: #fff;
    color: #000;
}
.btn-glass-solid:hover {
    background: #f0f0f0;
    color: #000;
}

/* 分页：accent 为白色时，当前页需黑字才看得见 */
.pagination-num.active,
.pagination-btn.active {
    background: #fff !important;
    border-color: #fff !important;
    color: #000 !important;
}
.pagination-num:hover:not(.disabled):not(.active),
.pagination-btn:hover:not(.disabled) {
    border-color: rgba(255, 255, 255, 0.45) !important;
    color: #fff !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

/* 内页保持纯黑底；导航必须高于内容层，否则会被盖住点不动 */
.navbar {
    position: fixed !important;
    z-index: 1000 !important;
}
.site-main {
    position: relative;
    z-index: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(255, 255, 255, 0.05), transparent 55%),
        #000;
}
.footer {
    position: relative;
    z-index: 0;
    background: #000;
}

/* 会员页标题 */
.vip-header {
    text-align: center;
    margin-bottom: 40px !important;
}
.vip-header h1 {
    font-family: var(--font-heading) !important;
    font-style: italic !important;
    font-weight: 400 !important;
    font-size: clamp(32px, 5vw, 48px) !important;
    letter-spacing: -0.04em !important;
    line-height: 1.1 !important;
    margin-bottom: 14px !important;
}
.vip-header p {
    font-size: 15px !important;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.55) !important;
    max-width: 540px;
    margin: 0 auto;
}
.plan-row-label {
    font-family: var(--font-heading) !important;
    font-style: italic !important;
    font-weight: 400 !important;
    font-size: 22px !important;
    letter-spacing: -0.02em;
}
.plan-card .plan-name {
    font-family: var(--font-heading);
    font-style: italic;
    font-weight: 400 !important;
    letter-spacing: -0.02em;
}
.plan-card .plan-price {
    font-family: var(--font-body);
    font-weight: 600 !important;
}
.ck-submit {
    background: #fff !important;
    color: #000 !important;
    border-radius: 999px !important;
    font-weight: 600 !important;
}
.ck-submit:hover {
    background: #f0f0f0 !important;
    color: #000 !important;
}
.ck-amount {
    color: #fff !important;
}
.checkout-panel {
    top: calc(var(--nav-offset) + 16px) !important;
    border-radius: 24px !important;
}
.member-welcome-banner {
    border-radius: 20px !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    backdrop-filter: blur(10px);
}
.pay-item {
    border-radius: 16px !important;
}
.pay-item.selected {
    border-color: rgba(255, 255, 255, 0.4) !important;
    background: rgba(255, 255, 255, 0.08) !important;
    color: #fff !important;
}
.benefit-item {
    border-radius: 20px !important;
    background: rgba(255, 255, 255, 0.03) !important;
}
.resource-list-item {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 16px !important;
    backdrop-filter: blur(10px);
}
.resource-list-item:hover {
    border-color: rgba(255, 255, 255, 0.28) !important;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
}
.resource-list-title {
    font-family: var(--font-heading);
    font-style: italic;
    font-weight: 400;
    letter-spacing: -0.02em;
}
.resource-list-arrow {
    color: #fff !important;
}

/* 详情页 / 支付卡 */
.detail-hero,
.pay-card {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 20px !important;
    backdrop-filter: blur(10px);
}

.reveal {
    opacity: 0;
    transform: translateY(22px);
    filter: blur(6px);
    transition:
        opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.7s cubic-bezier(0.22, 1, 0.36, 1),
        filter 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        filter: none;
        transition: none;
    }
}
