/* ================================================================
   站酷海洛PLUS · 公共设计系统 common.css
   由原 10 个页面内联样式去重合并而来（v3/v5/v6 补丁已收敛）
   修复: 未定义变量 --color-text-primary、重复属性声明、键盘可访问性
   ================================================================ */

/* ===== Design Tokens ===== */
:root {
    /* 品牌金色系 */
    --color-gold: #d4b996;
    --color-gold-light: #f5cd94;
    --color-gold-bright: #fce4b8;
    --color-gold-dark: #a17e4f;
    --color-gold-deep: #8a6940;

    /* 背景色系 */
    --color-bg-start: #0a0e1a;
    --color-bg-end: #181c2e;
    --color-bg-card: rgba(14, 18, 30, 0.72);
    --color-bg-card-hover: rgba(18, 22, 38, 0.85);
    --color-bg-input: rgba(12, 16, 26, 0.88);
    --color-bg-item: rgba(20, 24, 38, 0.6);
    --color-bg-item-hover: rgba(24, 28, 44, 0.85);

    /* 文字色系（补：--color-text-primary 原代码引用但未定义） */
    --color-text: #e8edf5;
    --color-text-primary: #e8edf5;
    --color-text-secondary: #b8c0d0;
    --color-text-muted: #8893a8;

    /* 边框色系 */
    --color-border: rgba(212, 185, 150, 0.22);
    --color-border-hover: rgba(212, 185, 150, 0.5);
    --color-border-active: rgba(212, 185, 150, 0.8);

    /* 语义色 */
    --color-success: #34d399;
    --color-warning: #fbbf24;
    --color-error: #f87171;
    --color-info: #60a5fa;

    /* 圆角 */
    --radius-sm: 6px;
    --radius-md: 6px;
    --radius-lg: 6px;
    --radius-xl: 6px;
    --radius-full: 9999px;

    /* 布局尺寸 */
    --nav-width: 260px;
    --header-height: 55px;
    --content-max: 1000px;
    --wrapper-max: 1260px;

    /* 间距系统 (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;

    /* 阴影系统 */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
    --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.35);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.28);
    --shadow-btn: 0 4px 16px rgba(0, 0, 0, 0.2);
    --shadow-gold: 0 0 24px rgba(212, 185, 150, 0.15);
    --shadow-gold-strong: 0 0 32px rgba(212, 185, 150, 0.3);

    /* 过渡 */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

    /* 玻璃态 */
    --glass-bg: rgba(14, 18, 30, 0.7);
    --glass-blur: blur(16px);
    --glass-border: rgba(212, 185, 150, 0.18);
}

/* ===== 全局重置（合并原两个 * 块） ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: rgba(212, 185, 150, 0.5) rgba(10, 14, 26, 0.6);
}

/* ===== Font Awesome 图标防抖动 ===== */
/* CDN 延迟加载时图标宽度从 0 突变到有宽度，导致布局偏移 (CLS) */
/* 提前在本地 CSS 中锁定 display / min-width / font-style，消除跳变 */
i[class*="fa-"] {
    display: inline-block;
    min-width: 1em;
    text-align: center;
    font-style: normal;
    line-height: 1;
}

html {
    height: 100%;
    overflow-y: auto;
    scrollbar-gutter: stable;
    scroll-behavior: smooth;
}

body {
    min-height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Microsoft YaHei", "PingFang SC", sans-serif;
    background: linear-gradient(145deg, var(--color-bg-start) 0%, var(--color-bg-end) 100%);
    background-attachment: fixed;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 0 var(--space-6) var(--space-6);
    position: relative;
    overflow-x: clip;
    color: var(--color-text);
}

/* 背景装饰 - 光晕层 */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 25% 35%, rgba(255, 160, 60, 0.10) 0%, transparent 50%),
        radial-gradient(ellipse at 75% 65%, rgba(80, 140, 255, 0.12) 0%, transparent 55%),
        radial-gradient(ellipse at 50% 100%, rgba(212, 185, 150, 0.06) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* 背景装饰 - 网格层 */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 44px 44px;
    pointer-events: none;
    z-index: 0;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

/* ===== 滚动条 ===== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track {
    background: rgba(10, 14, 26, 0.6);
    border-radius: 6px;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(212, 185, 150, 0.5), rgba(161, 126, 79, 0.5));
    border-radius: 6px;
    border: 1px solid rgba(212, 185, 150, 0.15);
    transition: all var(--transition);
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(212, 185, 150, 0.75), rgba(161, 126, 79, 0.75));
    box-shadow: 0 0 12px rgba(212, 185, 150, 0.2);
}
::-webkit-scrollbar-corner { background: transparent; }

/* ===== 图标占位 ===== */
i.fas, i.far, i.fab, i.fa {
    display: inline-block;
    min-width: 1.2em;
    text-align: center;
    font-style: normal;
}

/* ===== 可访问性工具 ===== */
.u-visually-hidden {
    position: absolute !important;
    width: 1px !important; height: 1px !important;
    padding: 0 !important; margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important; border: 0 !important;
}

/* ===== 客服浮动按钮（改进：focus-within 键盘可访问） ===== */
.contact-btn-wrapper {
    position: fixed;
    right: 120px;
    bottom: 200px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.contact-btn-wrapper:hover .contact-popup,
.contact-btn-wrapper:focus-within .contact-popup,
.contact-btn-wrapper .contact-popup:hover {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0) scale(1);
}

.contact-btn {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(212, 185, 150, 0.18), rgba(212, 185, 150, 0.08));
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1.5px solid rgba(212, 185, 150, 0.35);
    color: var(--color-gold);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: var(--shadow-md);
    position: relative;
    gap: 1px;
    z-index: 2;
    font-family: inherit;
}
.contact-btn:hover, .contact-btn:focus-visible {
    border-color: var(--color-border-active);
    background: linear-gradient(135deg, rgba(212, 185, 150, 0.28), rgba(212, 185, 150, 0.12));
    box-shadow: var(--shadow-gold-strong);
    transform: translateY(-2px);
    outline: none;
}
.contact-btn .btn-icon { font-size: 21px; color: var(--color-gold); }
.contact-btn .btn-label { font-size: 9px; font-weight: 700; letter-spacing: 0.5px; color: var(--color-gold); }

.contact-popup {
    position: absolute;
    left: 50%;
    transform: translateX(-50%) translateY(16px) scale(0.96);
    bottom: 74px;
    background: rgba(10, 14, 26, 0.95);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--color-border-hover);
    border-radius: var(--radius-lg);
    padding: 20px 24px 18px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: auto;
    z-index: 3;
}
.contact-popup .popup-title {
    font-size: 14px; font-weight: 700; color: var(--color-gold);
    margin-bottom: 12px; letter-spacing: 1px;
    display: flex; align-items: center; gap: 8px;
}
.contact-popup .popup-qrcode {
    width: 160px; height: 160px; border-radius: var(--radius-sm);
    background: #fff; padding: 6px;
    border: 1px solid rgba(212, 185, 150, 0.2);
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-md);
}
.contact-popup .popup-qrcode img {
    width: 100%; height: 100%; object-fit: contain; border-radius: 6px;
}
.contact-popup .popup-sub {
    font-size: 11px; color: rgba(212, 185, 150, 0.6);
    margin-top: 10px; letter-spacing: 0.5px; text-align: center; line-height: 1.5;
}
.contact-popup .popup-sub i { color: var(--color-gold); margin-right: 4px; }

/* ===== 主布局 ===== */
.main-wrapper {
    display: flex;
    gap: var(--space-5);
    width: 100%;
    max-width: var(--wrapper-max);
    position: relative;
    z-index: 20;
    align-items: flex-start;
}

/* ===== 侧边栏（去重：合并原 3 次声明） ===== */
.sidebar {
    position: sticky;
    top: var(--header-height);
    align-self: flex-start;
    width: var(--nav-width);
    max-height: calc(100vh - var(--header-height) - var(--space-6));
    overflow-y: auto;
    background: linear-gradient(160deg, rgba(212, 185, 150, 0.12) 0%, rgba(20, 24, 38, 0.85) 60%);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-5) var(--space-4) var(--space-6);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-card);
    scrollbar-width: thin;
    scrollbar-color: rgba(212, 185, 150, 0.25) transparent;
    margin-top: var(--header-height);
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(212, 185, 150, 0.25); border-radius: 6px; }
.sidebar::-webkit-scrollbar-thumb:hover { background: rgba(212, 185, 150, 0.45); }

/* Logo 区域 */
.sidebar__logo {
    display: flex; align-items: center; gap: 10px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(212, 185, 150, 0.12);
    margin-bottom: 14px; flex-shrink: 0;
}
.sidebar__logo .logo-icon,
.sidebar__logo .logo-text,
.sidebar__logo .logo-badge {
    background: linear-gradient(135deg, var(--color-gold-light), var(--color-gold-dark));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.sidebar__logo .logo-icon {
    font-size: 32px;
    filter: drop-shadow(0 2px 8px rgba(212, 185, 150, 0.25));
}
.sidebar__logo .logo-text { font-size: 26px; font-weight: 800; line-height: 1.2; user-select: none; }
.sidebar__logo .logo-badge { font-size: 12px; font-weight: 700; margin-left: 2px; }

/* 微信登录区 */
.sidebar__login {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    position: relative;
    padding: 10px 12px;
    min-height: 180px;
    flex-shrink: 0;
}
.sidebar__login.is-logged-in {
    min-height: 180px;
    padding: 10px 12px;
}

/* ===== 微信登录区 ===== 二维码填充满白框 ===== */
.login-placeholder {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 10px; width: 100%; min-height: 160px;
}
/* 二维码外框：150×150 白色方块 */
.login-placeholder .qrcode-demo {
    width: 150px; height: 150px; border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    background: #fff; padding: 0; box-shadow: var(--shadow-sm);
    overflow: hidden; /* 裁剪 iframe 底部 LOGO 和文字 */
    position: relative;
    box-sizing: border-box;
}
.login-placeholder .qrcode-demo #login_container {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
/* iframe 150×150，二维码自然渲染，底部 LOGO+文字被 overflow:hidden 裁掉 */
.login-placeholder .qrcode-demo #login_container iframe {
    width: 150px !important;
    height: 150px !important;
    border: 0 !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: translate(-5px, -5px);
}
/* 下方的微信图标 + 文字 */
.login-placeholder .login-text {
    font-size: 13px; font-weight: 500;
    color: rgba(212, 185, 150, 0.55); letter-spacing: 1px;
    display: flex; align-items: center; gap: 8px;
}
.login-placeholder .login-text .wechat-icon { color: var(--color-gold); font-size: 16px; }

/* 已登录用户信息（去重：原 4 次声明收敛为 1 次，头像统一 60x60） */
.user-info {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
    padding: 0;
    animation: fadeIn 0.4s ease;
}
.user-info.is-active { display: flex; }
@keyframes fadeIn {
    0% { opacity: 0; transform: translateY(8px); }
    100% { opacity: 1; transform: translateY(0); }
}
.user-info__avatar {
    width: 60px; height: 60px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    background: rgba(212, 185, 150, 0.08);
    border: 1px solid rgba(212, 185, 150, 0.15);
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}
.user-info__avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.user-info__meta {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.user-info__id,
.user-info__balance,
.user-info__name {
    font-size: 14px; font-weight: 400; line-height: 1.4; user-select: none;
    color: var(--color-gold);
}
.user-info__id {
    user-select: text; cursor: text;
    font-weight: 400;
}
.user-info__balance { font-weight: 400; }
.user-info__name { font-weight: 400; }

/* ===== 退出登录按钮（紧贴已登录用户信息下方，低调主题色） ===== */
.logout-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 4px;
    width: auto;
    margin-top: 8px;
    padding: 3px 10px;
    background: transparent;
    border: 1px solid rgba(212, 185, 150, 0.2);
    color: rgba(212, 185, 150, 0.55);
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 400;
    line-height: 1.4;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
    user-select: none;
    letter-spacing: 0.3px;
    animation: fadeIn 0.4s ease;
}
.logout-btn:hover {
    background: rgba(212, 185, 150, 0.08);
    border-color: rgba(212, 185, 150, 0.45);
    color: var(--color-gold);
}
.logout-btn i { font-size: 10px; line-height: 1; opacity: 0.7; }

.sidebar__divider {
    border: none;
    border-top: 1px solid rgba(212, 185, 150, 0.12);
    margin: 10px 0 12px; flex-shrink: 0;
}

/* 平台列表（改进：tabindex 可键盘聚焦） */
.platform-list {
    display: flex; flex-direction: column; gap: 2px;
    margin-bottom: 6px; flex-shrink: 0;
}
.platform-list__item,
.sidebar-footer__item {
    display: flex; align-items: center; gap: 10px;
    padding: 7px 10px; border-radius: var(--radius-sm);
    color: var(--color-text-secondary);
    font-size: 14px; font-weight: 400;
    transition: all var(--transition);
    cursor: pointer !important;
    user-select: none; line-height: 1.4;
}
.platform-list__item:hover,
.platform-list__item:focus,
.sidebar-footer__item:hover,
.sidebar-footer__item:focus {
    cursor: pointer !important;
}
.platform-list__item:hover,
.sidebar-footer__item:hover,
.platform-list__item:focus-visible,
.sidebar-footer__item:focus-visible {
    background: rgba(212, 185, 150, 0.08);
    color: var(--color-gold-light);
    outline: none;
}
.platform-list__item i,
.sidebar-footer__item i {
    width: 18px; color: rgba(212, 185, 150, 0.38);
    font-size: 14px; transition: color var(--transition);
    text-align: center; font-family: "Font Awesome 6 Free"; font-weight: 900;
}
.platform-list__item:hover i,
.sidebar-footer__item:hover i { color: var(--color-gold); }
.platform-list__item.is-active,
.sidebar-footer__item.is-active {
    background: linear-gradient(90deg, rgba(212, 185, 150, 0.15), rgba(212, 185, 150, 0.05));
    color: var(--color-gold-light);
    border-left: 3px solid var(--color-gold);
    padding-left: 7px;
    box-shadow: inset 0 0 12px rgba(212, 185, 150, 0.06);
}
.platform-list__item.is-active i,
.sidebar-footer__item.is-active i { color: var(--color-gold); }
.platform-list__item .platform-badge {
    margin-left: auto; font-size: 9px; font-weight: 400;
    background: rgba(212, 185, 150, 0.1);
    padding: 2px 8px; border-radius: var(--radius-full);
    color: rgba(212, 185, 150, 0.5); user-select: none;
}

.sidebar-footer {
    margin-top: auto;
    border-top: 1px solid rgba(212, 185, 150, 0.12);
    padding-top: 12px; flex-shrink: 0;
    display: flex; flex-direction: column; gap: 2px;
}

/* ===== 内容区 ===== */
.content-area {
    flex: 1; min-width: 0;
    display: flex; flex-direction: column; align-items: center;
    min-height: calc(100vh - var(--space-6));
}
.header {
    position: relative; z-index: 30;
    width: 100%; max-width: var(--content-max);
    padding: 4px 0;
    display: flex; justify-content: flex-end; align-items: center;
    border-bottom: 1px solid rgba(212, 185, 150, 0.06);
    height: var(--header-height);
    flex-shrink: 0; margin-bottom: 2px;
}
.container {
    position: relative; z-index: 20;
    width: 100%; max-width: var(--content-max);
    display: flex; flex-direction: column; align-items: center;
    padding-bottom: var(--space-8);
    flex: 1; gap: 10px; justify-content: space-between;
}

/* ===== Hero 卡片 ===== */
.hero-card {
    width: 100%; max-width: var(--content-max);
    background: linear-gradient(135deg, rgba(212, 185, 150, 0.12) 0%, rgba(22, 26, 42, 0.85) 100%);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: var(--radius-lg);
    padding: 14px 28px;
    border: 1px solid rgba(212, 185, 150, 0.4);
    transition: all var(--transition);
    text-align: center; user-select: none;
    position: relative; overflow: hidden;
}
.hero-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 185, 150, 0.4), transparent);
}
.hero-card:hover {
    border-color: rgba(212, 185, 150, 0.7);
    box-shadow: var(--shadow-gold);
}
.hero-card__title {
    font-size: 44px; font-weight: 800; margin-bottom: 4px;
    background: linear-gradient(135deg, var(--color-gold-light), var(--color-gold-dark));
    -webkit-background-clip: text; background-clip: text; color: transparent;
    letter-spacing: -0.5px;
    display: flex; align-items: center; justify-content: center;
    gap: 12px; flex-wrap: wrap; line-height: 1.2;
}
.hero-card__title .handshake-icon {
    font-size: 40px;
    background: linear-gradient(135deg, var(--color-gold-light), var(--color-gold-dark));
    -webkit-background-clip: text; background-clip: text; color: transparent;
    display: inline-flex; align-items: center;
}
.hero-card__sub {
    font-size: 0.95rem; color: var(--color-text-secondary);
    margin-bottom: 6px;
    display: flex; justify-content: center; gap: 8px; flex-wrap: wrap;
    line-height: 1.5;
}
.hero-card__sub span {
    background: rgba(255, 255, 255, 0.04);
    padding: 3px 12px; border-radius: var(--radius-full);
    font-size: 0.78rem; font-weight: 400;
    border: 1px solid rgba(255, 255, 255, 0.03);
}
.hero-card__features {
    display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
    gap: 8px 28px; margin: 10px 0 4px; width: 100%;
    color: var(--color-text); font-size: 0.88rem; line-height: 1.4;
}
.hero-card__features .fi-item {
    display: inline-flex; align-items: center; gap: 6px;
    font-weight: 400; letter-spacing: 0.2px;
}
.hero-card__features .fi-item i { color: var(--color-gold); font-size: 0.88rem; }
.hero-card__badge {
    position: absolute; bottom: 12px; right: 16px;
    display: flex; align-items: center; gap: 6px;
}
.hero-card__badge .green-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--color-success);
    box-shadow: 0 0 8px rgba(52, 211, 153, 0.5);
    flex-shrink: 0; animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}
.hero-card__badge .price-tag {
    font-size: 0.75rem; font-weight: 600; color: var(--color-gold-light);
}

/* 平台页 Hero */
.hero-card--platform {
    flex-direction: column; align-items: center; justify-content: center;
    min-height: 130px; padding: 18px 28px;
}
.hero-card__platform-title {
    font-size: 46px; font-weight: 800; margin-bottom: 0;
    background: linear-gradient(135deg, var(--color-gold-light), var(--color-gold-dark));
    -webkit-background-clip: text; background-clip: text; color: transparent;
    letter-spacing: -0.5px; line-height: 1.2; text-align: center;
}
.hero-card__platform-sub {
    font-size: 0.85rem; color: var(--color-text-muted);
    margin-top: 8px; letter-spacing: 0.2px; line-height: 1.6;
    text-align: center;
    display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.hero-card__platform-sub a {
    color: var(--color-text-muted);
    text-decoration: underline; text-underline-offset: 2px;
    transition: color var(--transition);
}
.hero-card__platform-sub a:hover { color: var(--color-gold); }
.hero-card__platform-warning {
    color: var(--color-warning); font-size: 0.78rem; margin-bottom: 2px;
}

/* ===== 搜索区 ===== */
.search-wrapper {
    width: 100%; max-width: var(--content-max);
    display: flex; flex-direction: column; align-items: center;
    gap: 10px; margin: 0;
}
.search-wrapper__input {
    width: 100%; height: 300px;
    background: var(--color-bg-input);
    border: 1px solid rgba(212, 185, 150, 0.35);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    font-size: 1rem; color: #f0e6d2;
    outline: none; transition: all var(--transition);
    font-family: inherit; line-height: 1.5;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-btn);
    caret-color: var(--color-gold);
    resize: none; overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(212, 185, 150, 0.5) rgba(11, 15, 28, 0.6);
}
.search-wrapper__input::-webkit-scrollbar { width: 6px; height: 0; }
.search-wrapper__input::-webkit-scrollbar-track { background: rgba(11, 15, 28, 0.6); border-radius: 6px; }
.search-wrapper__input::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(212, 185, 150, 0.5), rgba(161, 126, 79, 0.5));
    border-radius: 6px; border: 1px solid rgba(212, 185, 150, 0.15);
}
.search-wrapper__input:focus {
    border-color: var(--color-gold);
    box-shadow: 0 0 24px rgba(212, 185, 150, 0.2), inset 0 0 0 1px rgba(212, 185, 150, 0.1);
}
.search-wrapper__input::placeholder { color: rgba(232, 237, 245, 0.3); }

/* ===== 主按钮（去重：原 4 次声明收敛） ===== */
.btn-primary {
    width: 100%; height: 34px;
    background: linear-gradient(135deg, rgba(212, 185, 150, 0.28), rgba(212, 185, 150, 0.12));
    color: var(--color-gold);
    border: 1px solid rgba(212, 185, 150, 0.45);
    border-radius: var(--radius-sm);
    font-size: 0.95rem; font-weight: 700; line-height: 1;
    cursor: default; user-select: none;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    position: relative; overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
    font-family: inherit;
}
.btn-primary > span { position: relative; z-index: 1; }
.btn-primary::before {
    content: ''; position: absolute; top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 185, 150, 0.2), transparent);
    transition: all 0.5s ease; z-index: 0;
}
.btn-primary:hover::before { left: 100%; }
.btn-primary:hover {
    background: linear-gradient(135deg, rgba(212, 185, 150, 0.4), rgba(212, 185, 150, 0.2));
    border-color: rgba(212, 185, 150, 0.8);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.25), 0 0 20px rgba(212, 185, 150, 0.15);
    color: var(--color-gold-bright);
}
.btn-primary:active {
    background: linear-gradient(135deg, rgba(212, 185, 150, 0.2), rgba(212, 185, 150, 0.08));
    border-color: rgba(212, 185, 150, 0.5);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.25);
}
.btn-primary.is-loading {
    background: rgba(60, 60, 72, 0.6) !important;
    border-color: rgba(100, 100, 110, 0.5) !important;
    color: var(--color-text-muted) !important;
    box-shadow: none !important;
    cursor: wait; pointer-events: none;
}
.btn-primary .btn-text {
    display: inline-flex; align-items: center; gap: 8px;
}
.btn-primary .btn-text i,
.btn-primary .btn-text svg {
    font-size: 1em; width: 1em; height: 1em; line-height: 1;
}
.btn-primary .spinner-icon {
    display: none; font-size: 1em; line-height: 1;
}
.btn-primary .spinner-icon i { font-size: 1em; width: 1em; height: 1em; line-height: 1; animation-duration: 0.6s; }
.btn-primary.is-loading .spinner-icon {
    display: inline-flex; align-items: center; justify-content: center;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== 结果区 ===== */
.result-section {
    width: 100%; max-width: var(--content-max);
    background: var(--color-bg-card);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(212, 185, 150, 0.25);
    padding: 14px;
    max-height: 640px;
    overflow-y: auto;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: rgba(212, 185, 150, 0.5) rgba(11, 15, 28, 0.6);
}
.result-section::-webkit-scrollbar { width: 6px; height: 0; }
.result-section::-webkit-scrollbar-track { background: rgba(11, 15, 28, 0.6); border-radius: 6px; }
.result-section::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(212, 185, 150, 0.5), rgba(161, 126, 79, 0.5));
    border-radius: 6px; border: 1px solid rgba(212, 185, 150, 0.15);
}

.result-table-wrap { width: 100%; overflow: visible; }
.result-table {
    width: 100%; border-collapse: collapse;
    color: var(--color-text); font-size: 0.9rem; table-layout: fixed;
}
.result-table th, .result-table td {
    padding: 12px 8px; text-align: left;
    border-bottom: 1px solid rgba(212, 185, 150, 0.15);
    vertical-align: middle; line-height: 1.4;
}
.result-table tbody tr:last-child td { border-bottom: none; }
.result-table th {
    color: var(--color-gold); font-weight: 700;
    background: rgba(212, 185, 150, 0.06);
    border-bottom: 1px solid rgba(212, 185, 150, 0.25);
    user-select: none;
}
.result-table th:first-child { width: 12%; }
.result-table th:nth-child(2) { width: 48%; }
.result-table th:nth-child(3) { width: 20%; }
.result-table th:last-child { width: 20%; }
.result-table tbody tr { transition: background var(--transition-fast); }
.result-table tbody tr:hover { background: rgba(212, 185, 150, 0.04); }

.material-info-cell { display: flex; align-items: center; gap: 12px; }
.material-info-cell__img {
    width: 50px; height: 50px; object-fit: fill;
    border-radius: 6px; border: 1px solid rgba(212, 185, 150, 0.15);
    background: #1e1e2a; flex-shrink: 0;
    transition: border-color var(--transition);
}
.material-info-cell__img:hover { border-color: rgba(212, 185, 150, 0.4); }
.material-info-cell__stack {
    display: flex; flex-direction: column; gap: 2px;
    justify-content: center; height: 50px;
}
.material-info-cell__stack .info-id {
    font-weight: 700; color: var(--color-gold-light);
    font-size: 0.85rem; line-height: 1.3;
}
.material-info-cell__stack .info-format,
.material-info-cell__stack .info-dimension {
    font-size: 0.75rem; color: var(--color-text-muted); line-height: 1.3;
}

.price-tag {
    font-weight: 400; font-size: 0.8rem;
    padding: 3px 12px; border-radius: var(--radius-full);
    display: inline-block; line-height: 1.4;
}
.price-tag--free {
    color: #67c23a;
    background: rgba(103, 194, 58, 0.12);
    border: 1px solid rgba(103, 194, 58, 0.3);
}
.price-tag--paid {
    color: var(--color-gold);
    background: rgba(212, 185, 150, 0.12);
    border: 1px solid rgba(212, 185, 150, 0.3);
}

.save-btn-small {
    position: relative;
    background: linear-gradient(135deg, rgba(212, 185, 150, 0.15), rgba(212, 185, 150, 0.08));
    border: 1px solid rgba(212, 185, 150, 0.3);
    color: var(--color-gold);
    padding: var(--space-1) var(--space-3); border-radius: var(--radius-sm);
    display: inline-flex; align-items: center; gap: 4px;
    cursor: default; overflow: hidden; z-index: 1;
    transition: all var(--transition);
    font-size: 0.75rem; white-space: nowrap; flex-shrink: 0;
    user-select: none; height: 28px; min-width: 72px; font-family: inherit;
    line-height: 1;
}
.save-btn-small::before {
    content: ''; position: absolute; top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 185, 150, 0.15), transparent);
    transition: all 0.5s ease; z-index: -1;
}
.save-btn-small:hover::before { left: 100%; }
.save-btn-small:hover {
    border-color: rgba(212, 185, 150, 0.6);
    box-shadow: var(--shadow-gold);
    background: linear-gradient(135deg, rgba(212, 185, 150, 0.25), rgba(212, 185, 150, 0.12));
    color: var(--color-gold-bright);
}
.save-btn-small:active {
    background: linear-gradient(135deg, rgba(212, 185, 150, 0.12), rgba(212, 185, 150, 0.05));
    border-color: rgba(212, 185, 150, 0.4);
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.2);
}
.save-btn-small:disabled { opacity: 0.5; box-shadow: none; }
.save-btn-small.save-btn-small--free {
    background: linear-gradient(135deg, rgba(103, 194, 58, 0.18), rgba(103, 194, 58, 0.08));
    border-color: rgba(103, 194, 58, 0.45);
    color: #67c23a;
}
.save-btn-small.save-btn-small--free::before {
    background: linear-gradient(90deg, transparent, rgba(103, 194, 58, 0.18), transparent);
}
.save-btn-small.save-btn-small--free:hover {
    border-color: rgba(103, 194, 58, 0.7);
    box-shadow: 0 0 14px rgba(103, 194, 58, 0.2);
    background: linear-gradient(135deg, rgba(103, 194, 58, 0.28), rgba(103, 194, 58, 0.12));
    color: #85ce61;
}
.save-btn-small.is-downloaded {
    background: linear-gradient(135deg, rgba(103, 194, 58, 0.18), rgba(103, 194, 58, 0.08));
    border-color: rgba(103, 194, 58, 0.45);
    color: #67c23a;
}
.save-btn-small.is-downloaded::before {
    background: linear-gradient(90deg, transparent, rgba(103, 194, 58, 0.15), transparent);
}
.save-btn-small.is-downloaded:hover {
    border-color: rgba(103, 194, 58, 0.7);
    box-shadow: 0 0 14px rgba(103, 194, 58, 0.2);
    background: linear-gradient(135deg, rgba(103, 194, 58, 0.28), rgba(103, 194, 58, 0.12));
    color: #85ce61;
}
.save-btn-small.is-downloaded:active {
    background: linear-gradient(135deg, rgba(103, 194, 58, 0.12), rgba(103, 194, 58, 0.05));
    border-color: rgba(103, 194, 58, 0.4);
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.2);
}

.insufficient-tag {
    color: #e2a1a1; font-size: 0.72rem;
    background: rgba(180, 100, 100, 0.15);
    border: 1px solid rgba(180, 100, 100, 0.2);
    padding: 3px 8px; border-radius: var(--radius-sm);
    display: inline-flex; align-items: center; gap: 4px;
    white-space: nowrap; min-height: 28px;
    font-weight: normal; line-height: 1.4;
}

/* 下载加载图标：与搜索按钮一致的 fa-circle-notch 转圈，主题金色 */
.download-spinner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 28px;
    min-width: 72px;
    color: var(--color-gold);
    font-size: 0.95rem;
    line-height: 1;
    vertical-align: middle;
}
.download-spinner i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    width: 1em;
    height: 1em;
    line-height: 1;
    transform-origin: 50% 50%;
    animation-duration: 0.6s;
}

/* 平滑过渡：spinner 淡出 + 按钮淡入 */
@keyframes spinner-exit {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0; transform: scale(0.8); }
}
.download-spinner.is-leaving {
    animation: spinner-exit 0.1s ease forwards;
    pointer-events: none;
}
@keyframes btn-enter {
    from { opacity: 0; transform: scale(0.85); }
    to { opacity: 1; transform: scale(1); }
}
.save-btn-small.is-entering {
    animation: btn-enter 0.2s ease forwards;
}

.global-download-wrap {
    width: 100%; max-width: var(--content-max); margin-top: 10px;
}

/* ===== 底部特性列表 ===== */
.features-list {
    display: flex; flex-wrap: wrap; justify-content: center;
    gap: 28px; margin: 0; margin-top: auto;
    color: var(--color-text); font-size: 0.88rem; line-height: 1.4;
}
.features-list i { color: var(--color-gold); margin-right: 6px; }

/* ===== Toast ===== */
.toast-message {
    position: fixed;
    top: 20%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #f5d9a8;
    color: #1a1f30;
    padding: 16px 36px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    border: 2px solid #d4b996;
    z-index: 2147483647;
    white-space: nowrap;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.55), 0 0 40px rgba(212, 185, 150, 0.45), 0 2px 0 rgba(255, 255, 255, 0.4) inset;
    animation: toastFade 2s ease forwards;
    pointer-events: none;
    font-family: inherit;
}

@keyframes toastFade {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
    15% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    85% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(0.95); }
}

/* ===== 演示登录按钮 ===== */
.demo-login-btn {
    position: fixed; left: 24px; top: 12px; z-index: 100;
    background: linear-gradient(135deg, rgba(212, 185, 150, 0.15), rgba(212, 185, 150, 0.08));
    border: 1px solid rgba(212, 185, 150, 0.3);
    color: var(--color-gold);
    padding: 6px 18px; border-radius: var(--radius-sm);
    font-size: 12px; font-weight: 600; cursor: pointer;
    transition: all var(--transition); font-family: inherit;
    letter-spacing: 0.5px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    line-height: 1.4;
}
.demo-login-btn:hover {
    background: linear-gradient(135deg, rgba(212, 185, 150, 0.25), rgba(212, 185, 150, 0.12));
    border-color: rgba(212, 185, 150, 0.55);
    box-shadow: var(--shadow-gold);
    transform: translateY(-1px);
}
.demo-login-btn:active { transform: scale(0.97); }

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
    .main-wrapper { flex-direction: column; align-items: center; }
    .sidebar {
        position: relative; top: 0;
        width: 100%; max-width: var(--content-max);
        flex-direction: row; flex-wrap: wrap;
        padding: 16px 20px; gap: 12px; align-items: center;
        max-height: none; overflow-y: visible; margin-top: 0;
    }
    .sidebar__logo { border-bottom: none; padding-bottom: 0; margin-bottom: 0; flex-shrink: 0; }
    .sidebar__logo .logo-text { font-size: 22px; }
    .sidebar__logo .logo-icon { font-size: 28px; }
    .sidebar__login { min-height: 100px; width: 200px; flex-shrink: 0; margin-bottom: 0; padding: 6px 10px; }
    .sidebar__login.is-logged-in { min-height: 100px; padding: 6px 10px; }
    /* ≤1024px：二维码盒子 100×100，iframe 100×100，自然渲染 */
    .login-placeholder .qrcode-demo { width: 100px; height: 100px; padding: 0; }
    .login-placeholder .qrcode-demo #login_container { width: 100%; height: 100%; }
    .login-placeholder .qrcode-demo #login_container iframe {
        width: 100px !important; height: 100px !important;
        border: 0 !important; display: block !important;
        margin: 0 !important; padding: 0 !important;
    }
    .user-info__avatar { width: 60px; height: 60px; }
    .platform-list { flex-direction: row; flex-wrap: wrap; gap: 2px; margin-bottom: 0; }
    .platform-list__item, .sidebar-footer__item { font-size: 12px; padding: 4px 8px; }
    .platform-list__item .platform-badge { display: none; }
    .sidebar__divider { display: none; }
    .sidebar-footer { margin-top: 0; border-top: none; padding-top: 0; flex-wrap: wrap; flex-direction: row; }
    .header { height: 45px; }
    :root { --header-height: 45px; }
    .demo-login-btn { left: 16px; top: 10px; font-size: 11px; padding: 5px 14px; }
    .contact-btn-wrapper { right: 60px; bottom: 160px; }
    .contact-btn { width: 54px; height: 54px; }
    .contact-btn .btn-icon { font-size: 18px; }
    .contact-btn .btn-label { font-size: 8px; }
    .contact-popup { bottom: 66px; min-width: 170px; padding: 16px 18px 14px; }
    .contact-popup .popup-qrcode { width: 130px; height: 130px; }
}

@media (max-width: 768px) {
    .sidebar { flex-direction: column; align-items: stretch; padding: 14px 16px; max-height: none; overflow-y: visible; }
    .sidebar__logo { border-bottom: 1px solid rgba(212, 185, 150, 0.12); padding-bottom: 10px; margin-bottom: 10px; }
    .sidebar__logo .logo-text { font-size: 20px; }
    .sidebar__logo .logo-icon { font-size: 26px; }
    .sidebar__login { width: 100%; min-height: 80px; padding: 6px 10px; }
    .sidebar__login.is-logged-in { min-height: 80px; padding: 6px 10px; }
    /* ≤768px：二维码盒子 70×70，iframe 70×70，自然渲染 */
    .login-placeholder .qrcode-demo { width: 70px; height: 70px; padding: 0; }
    .login-placeholder .qrcode-demo #login_container { width: 100%; height: 100%; }
    .login-placeholder .qrcode-demo #login_container iframe {
        width: 70px !important; height: 70px !important;
        border: 0 !important; display: block !important;
        margin: 0 !important; padding: 0 !important;
    }
    .user-info__avatar { width: 60px; height: 60px; }
    .platform-list__item .platform-badge { display: inline; }
    .platform-list__item, .sidebar-footer__item { font-size: 11px; padding: 3px 6px; }
    .sidebar-footer { flex-direction: column; }
    .hero-card__title { font-size: 28px !important; }
    .hero-card__title .handshake-icon { font-size: 26px !important; }
    .hero-card__features { gap: 6px 18px; font-size: 0.8rem; }
    .demo-login-btn { left: 12px; top: 8px; font-size: 10px; padding: 4px 12px; }
    .contact-btn-wrapper { right: 40px; bottom: 120px; }
    .contact-btn { width: 46px; height: 46px; }
    .contact-btn .btn-icon { font-size: 16px; }
    .contact-btn .btn-label { font-size: 7px; }
    .contact-popup { bottom: 56px; min-width: 150px; padding: 12px 14px 10px; }
    .contact-popup .popup-qrcode { width: 110px; height: 110px; }
    .contact-popup .popup-title { font-size: 12px; }
    .contact-popup .popup-sub { font-size: 10px; }
    .search-wrapper__input { height: 240px; }
    .header { height: 40px; }
    :root { --header-height: 40px; }
}

@media (max-width: 600px) {
    .hero-card__features { gap: 4px 12px; font-size: 0.75rem; }
    .demo-login-btn { left: 10px; top: 6px; font-size: 9px; padding: 3px 10px; }
    .contact-btn-wrapper { right: 30px; bottom: 100px; }
    .contact-btn { width: 46px; height: 46px; }
    .contact-btn .btn-icon { font-size: 16px; }
    .contact-btn .btn-label { font-size: 7px; }
    .contact-popup { bottom: 56px; min-width: 150px; padding: 12px 14px 10px; }
    .contact-popup .popup-qrcode { width: 110px; height: 110px; }
    .contact-popup .popup-title { font-size: 12px; }
    .contact-popup .popup-sub { font-size: 10px; }
    .search-wrapper__input { height: 200px; }
    .header { height: 36px; }
    :root { --header-height: 36px; }
}

@media (max-width: 430px) {
    .hero-card__features { gap: 3px 8px; font-size: 0.7rem; }
    .search-wrapper__input { height: 160px; }
    .demo-login-btn { left: 8px; top: 6px; font-size: 8px; padding: 2px 8px; }
    .contact-btn-wrapper { right: 24px; bottom: 80px; }
}

/* ===== 分页（充值/历史页共用） ===== */
.history-module__pagination {
    display: flex; justify-content: center;
    margin-top: var(--space-1);
    gap: var(--space-2);
    padding-top: var(--space-1);
    flex-shrink: 0;
    border-top: 1px solid rgba(212, 185, 150, 0.1);
}
.page-btn {
    background: var(--color-bg-item);
    border: 1px solid rgba(212, 185, 150, 0.1);
    color: var(--color-text);
    width: 28px; height: 28px;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    cursor: default;
    transition: all var(--transition);
    font-size: 0.75rem;
    user-select: none;
    font-family: inherit;
}
.history-module__pagination .page-btn:hover {
    border-color: rgba(212, 185, 150, 0.3);
    background: rgba(212, 185, 150, 0.1);
}
.history-module__pagination .page-btn.is-active {
    background: linear-gradient(135deg, rgba(212, 185, 150, 0.25), rgba(212, 185, 150, 0.1));
    border-color: rgba(212, 185, 150, 0.5);
    color: var(--color-gold);
    box-shadow: var(--shadow-gold);
}
.history-module__pagination .page-btn.is-disabled {
    opacity: 0.4; cursor: not-allowed; pointer-events: none;
}

/* ===== 无障碍：尊重减少动画偏好 ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
