/* ════════════════════════════════════════════════════════════
   组件样式 — 导航栏、卡片、按钮、弹窗
   ════════════════════════════════════════════════════════════ */

/* ── 导航栏 ── */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-2xl);
    background: rgba(10, 10, 20, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    /* 2026-06-26 反馈2：移动端滚动自动隐藏过渡 */
    transition: transform 0.3s ease;
}

/* 2026-06-26 反馈2：移动端导航栏滚动隐藏（JS 添加 .nav-hidden 类） */
.navbar.nav-hidden {
    transform: translateY(-100%);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    text-decoration: none;
}

.navbar-brand-text {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.navbar-logo {
    font-size: var(--text-2xl);
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: logoPulse 3s ease-in-out infinite;
}

.navbar-title {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 700;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
    line-height: 1.1;
    text-align: center;
}

.navbar-nav {
    display: flex;
    gap: var(--space-lg);
    position: relative;
}

/* 滑动指示器（刻度尺效果）— 通过 CSS 变量由 JS 控制位置 */
/* 2026-06-26 优化：使用 transform: translateX 替代 left，GPU加速避免布局抖动。
   原问题：left/width 变更会触发 layout（重排），transform 仅触发 composite（合成）。
   配合 app.js 的 requestAnimationFrame 节流，彻底解决滑动卡顿。 */
.navbar-nav::before {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: var(--indicator-width, 0);
    height: 2px;
    background: var(--gradient-gold);
    border-radius: var(--radius-full);
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.6);
    transform: translateX(var(--indicator-left, 0));
    transition: transform var(--ui-nav-indicator-duration, 0.25s) cubic-bezier(0.4, 0, 0.2, 1), width var(--ui-nav-indicator-duration, 0.25s) cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 1;
    will-change: transform, width;
}

.nav-item {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    position: relative;
}

.nav-item:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
    color: var(--gold);
}

/* 导航栏光条指示器（增强版定义见文件末尾） */

.navbar-user {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

/* 导航栏右侧容器（群组切换器 + 用户菜单） — 旧样式，保留兼容 */
.navbar-user-wrapper {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

/* 2026-06-26 反馈3：导航栏新布局 —— 左侧/右侧分区容器 */
.navbar-section {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-shrink: 0;
}

.navbar-left {
    /* 品牌logo + 群组切换器 + 头像昵称 */
}

.navbar-right {
    /* 齿轮设置按钮 */
}

/* 群组切换器 */
.group-switcher {
    max-width: 160px;
    min-width: 100px;
}

/* 导航栏下拉选择器 */
.nav-select {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-family: var(--font-body);
    cursor: pointer;
    transition: all var(--transition-fast);
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='%23a0a0c0'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 28px;
    max-width: 200px;
}

.nav-select:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(212, 175, 55, 0.4);
}

.nav-select:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.15);
}

.nav-select option {
    background: var(--bg-darker);
    color: var(--text-primary);
}

/* ── 主内容区 ── */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-2xl);
    min-height: calc(100vh - 60px);
}

/* 抽卡页面：去除 padding，让 gacha-page 精确填满视口（避免出现滚动条）
   2026-06-26 强化：多层禁用滚动，确保任何情况下都不出现滚动条 */
.main-content:has(.gacha-page) {
    padding: 0;
    max-width: none;
    /* 强制禁用滚动 */
    overflow: hidden !important;
    height: calc(100vh - 60px);
    max-height: calc(100vh - 60px);
    /* 隐藏滚动条但保留功能（兼容性） */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.main-content:has(.gacha-page)::-webkit-scrollbar {
    display: none;
}

/* body 层级也禁用滚动（抽卡页面时） */
body:has(.gacha-page) {
    overflow: hidden;
}

/* ── 统计卡片 ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-2xl);
}

.stat-card {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.8) 0%, rgba(18, 18, 31, 0.8) 100%);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-base);
}

.stat-card:hover {
    border-color: var(--border-gold);
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-gold);
    opacity: 0.6;
}

.stat-label {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    font-weight: 900;
    color: var(--gold);
}

.stat-icon {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    width: 32px;
    height: 32px;
    opacity: 0.3;
    color: var(--gold);
}

.stat-icon svg {
    width: 100%;
    height: 100%;
}

/* ── 筛选栏 ── */
.filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
}

.filter-chips {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.filter-chip {
    padding: 6px 16px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-medium);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    font-size: var(--text-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    user-select: none;
}

.filter-chip:hover {
    border-color: var(--border-gold);
    color: var(--text-primary);
}

.filter-chip.active {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--gold);
    color: var(--gold);
}

.filter-chip.active.gilded { border-color: var(--gilded); color: var(--gilded); background: rgba(255, 215, 0, 0.1); }
.filter-chip.active.shine { border-color: var(--shine); color: var(--shine); background: rgba(232, 232, 255, 0.1); }
.filter-chip.active.prismatic { border-color: var(--prismatic); color: var(--prismatic); background: rgba(255, 107, 255, 0.1); }
.filter-chip.active.negative { border-color: var(--negative); color: var(--text-tertiary); background: rgba(74, 74, 90, 0.2); }

.sort-select {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-medium);
    color: var(--text-primary);
    padding: 6px 28px 6px 12px;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='%23a0a0c0'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
}

.sort-select option {
    background: var(--bg-darker);
}

/* ── 卡片网格 ── */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--space-lg);
    contain: var(--contain-grid);
    /* 留出卡片上浮和光晕的空间，避免被容器裁切
       2026-06-25 增大水平 padding 至 var(--space-lg)（24px），
       确保边缘卡片 hover 时的 box-shadow（扩散 30px）有足够空间，
       不被 body overflow-x:hidden 或父容器裁切 */
    padding: var(--space-md) var(--space-lg);
    margin: calc(-1 * var(--space-md)) calc(-1 * var(--space-lg));
}

/* ── 单张卡片 ── */
.card-item {
    position: relative;
    cursor: pointer;
    aspect-ratio: 3 / 4;
    transition: transform 0.15s ease-out, box-shadow 0.2s ease-out;
    will-change: transform;
    contain: var(--contain-card);
    transform-style: preserve-3d;
}

/* 卡牌质感外框（精致多层边框设计）
   3D倾斜直接应用在此元素上，图片+边框完全锚定 */
.card-frame {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-dark);
    border: 4px solid var(--gold);
    /* 多层边框立体感：外层金色细线 + 暗色分隔 + 金色外发光 + 内层暗色粗框 + 金色内描边 */
    box-shadow:
        0 0 0 1px rgba(212, 175, 55, 0.5),
        0 0 0 4px rgba(0, 0, 0, 0.7),
        0 0 0 5px rgba(212, 175, 55, 0.25),
        inset 0 0 0 1px rgba(255, 255, 255, 0.12),
        inset 0 0 0 4px rgba(0, 0, 0, 0.5),
        inset 0 0 0 5px rgba(212, 175, 55, 0.25),
        inset 0 0 22px rgba(0, 0, 0, 0.55),
        0 6px 18px rgba(0, 0, 0, 0.65);
    transform-style: preserve-3d;
    transition: transform 0.15s ease-out, box-shadow var(--transition-base);
}

/* 外框光泽效果（仅保留光泽渐变，移除四角装饰和内描边，与详情页统一） */
.card-frame::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background:
        /* 左上→右下光泽渐变 */
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.18) 0%,
            rgba(255, 255, 255, 0) 30%,
            rgba(255, 255, 255, 0) 70%,
            rgba(255, 255, 255, 0.1) 100%
        );
    pointer-events: none;
    z-index: 3;
}

/* 移除内描边（原::after伪元素），与详情页结构统一，外层边线由box-shadow实现 */

/* 3D 倾斜悬停效果（倾斜由 JS mousemove 控制 .card-item，此处仅保留 box-shadow 增强） */
.card-item:hover {
    z-index: 10;
}

.card-item:hover .card-frame {
    box-shadow:
        0 0 0 1px rgba(212, 175, 55, 0.7),
        0 0 0 4px rgba(0, 0, 0, 0.7),
        0 0 0 5px rgba(212, 175, 55, 0.4),
        inset 0 0 0 1px rgba(255, 255, 255, 0.2),
        inset 0 0 0 4px rgba(0, 0, 0, 0.5),
        inset 0 0 0 5px rgba(212, 175, 55, 0.35),
        inset 0 0 30px rgba(0, 0, 0, 0.5),
        0 20px 40px rgba(0, 0, 0, 0.7),
        0 0 30px rgba(212, 175, 55, 0.35);
}

/* 图片容器（完整展示立绘） — 3:4 竖向，灰黑色底板
   3D倾斜在 .card-frame 上，图片作为子元素完全跟随 */
.card-image-wrap {
    position: absolute;
    inset: 0;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: #1a1a2e;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.card-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-medium) 0%, var(--bg-dark) 100%);
    color: var(--text-tertiary);
    font-size: var(--text-4xl);
}

/* ════════════════════════════════════════════════════════════
   词缀图片蒙版特效（Balatro小丑牌风格）
   设计思路：特殊卡牌不影响边框，改为影响整个卡牌图片的蒙版效果
   边框配色统一由热度档位（tier）决定，词缀仅作用于图片层
   ════════════════════════════════════════════════════════════ */

/* 鎏金：金色色调蒙版 + 金色光泽扫描动画 */
.card-item.affix-gilded .card-image-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 215, 0, 0.25) 0%,
        rgba(255, 165, 0, 0.15) 30%,
        rgba(255, 215, 0, 0.2) 60%,
        rgba(255, 185, 50, 0.3) 100%
    );
    mix-blend-mode: overlay;
    pointer-events: none;
    z-index: 2;
    animation: gildedShimmer var(--ui-card-glow-gilded, 3s) ease-in-out infinite;
}

@keyframes gildedShimmer {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* 闪耀：银色全息光泽 + 扫描光带动画 */
.card-item.affix-shine .card-image-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        105deg,
        rgba(232, 232, 255, 0.1) 0%,
        rgba(255, 255, 255, 0.4) 45%,
        rgba(232, 232, 255, 0.1) 55%,
        rgba(255, 255, 255, 0.3) 100%
    );
    mix-blend-mode: screen;
    pointer-events: none;
    z-index: 2;
    animation: shineScan var(--ui-card-glow-shine, 2.5s) ease-in-out infinite;
}

@keyframes shineScan {
    0% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
    100% { transform: translateX(100%); }
}

/* 幻彩：彩虹全息蒙版 + hue-rotate循环动画 */
.card-item.affix-prismatic .card-image-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: conic-gradient(
        from 0deg at 50% 50%,
        rgba(255, 107, 157, 0.3) 0%,
        rgba(196, 77, 255, 0.3) 25%,
        rgba(77, 255, 255, 0.3) 50%,
        rgba(255, 215, 0, 0.3) 75%,
        rgba(255, 107, 157, 0.3) 100%
    );
    mix-blend-mode: overlay;
    pointer-events: none;
    z-index: 2;
    animation: prismaticHueShift var(--ui-card-glow-prismatic, 4s) linear infinite;
}

@keyframes prismaticHueShift {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

/* 负片：暗紫色阴影蒙版 + 脉冲动画 */
.card-item.affix-negative .card-image-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(74, 58, 90, 0.4) 0%,
        rgba(40, 30, 50, 0.5) 50%,
        rgba(74, 58, 90, 0.4) 100%
    );
    mix-blend-mode: multiply;
    pointer-events: none;
    z-index: 2;
    animation: negativePulse var(--ui-card-glow-negative, 3s) ease-in-out infinite;
}

@keyframes negativePulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 0.9; }
}

/* 词缀角标 */
.card-affix-badges {
    position: absolute;
    top: var(--space-xs);
    left: var(--space-xs);
    display: flex;
    gap: 4px;
    z-index: 5;
}

.affix-badge {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-xs);
    font-weight: 700;
    color: white;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.affix-badge.gilded { background: rgba(255, 215, 0, 0.9); color: #000; }
.affix-badge.shine { background: rgba(232, 232, 255, 0.9); color: #000; }
.affix-badge.prismatic { background: rgba(255, 107, 255, 0.9); }
.affix-badge.negative { background: rgba(74, 74, 90, 0.9); }

/* ── 卡片类型角标（显示卡片类型等级） ── */
.card-type-badge {
    position: absolute;
    bottom: var(--space-xs);
    right: var(--space-xs);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-weight: 700;
    z-index: 5;
    backdrop-filter: blur(4px);
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid currentColor;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* 卡片类型角标颜色分级 */
.type-normal .card-type-badge { display: none; }
.type-special .card-type-badge { background: rgba(96, 165, 250, 0.2); color: #60a5fa; border: 1px solid rgba(96, 165, 250, 0.3); }
.type-rare .card-type-badge { background: rgba(192, 132, 252, 0.2); color: #c084fc; border: 1px solid rgba(192, 132, 252, 0.3); }
.type-epic .card-type-badge { background: rgba(251, 146, 60, 0.2); color: #fb923c; border: 1px solid rgba(251, 146, 60, 0.3); }
.type-legend .card-type-badge { background: rgba(244, 114, 182, 0.2); color: #f472b6; border: 1px solid rgba(244, 114, 182, 0.3); }

/* ── 卡片类型分级光效（基于词缀数量的视觉层级） ── */
/* 普通：无额外光效，保持简约 */
.card-item.type-normal .card-frame {
    /* 使用默认边框，无额外光效 */
}

/* 特殊：微弱蓝色光晕 */
.card-item.type-special .card-frame {
    box-shadow:
        0 0 0 1px rgba(96, 165, 250, 0.5),
        0 0 0 3px rgba(0, 0, 0, 0.7),
        0 0 0 4px rgba(96, 165, 250, 0.25),
        inset 0 0 0 1px rgba(255, 255, 255, 0.12),
        inset 0 0 0 3px rgba(0, 0, 0, 0.5),
        inset 0 0 0 4px rgba(96, 165, 250, 0.2),
        inset 0 0 22px rgba(0, 0, 0, 0.55),
        0 6px 18px rgba(0, 0, 0, 0.65),
        0 0 8px rgba(96, 165, 250, 0.15);
}

/* 稀有特殊：紫色光晕 + 呼吸动画 */
.card-item.type-rare .card-frame {
    box-shadow:
        0 0 0 1px rgba(192, 132, 252, 0.5),
        0 0 0 3px rgba(0, 0, 0, 0.7),
        0 0 0 4px rgba(192, 132, 252, 0.3),
        inset 0 0 0 1px rgba(255, 255, 255, 0.12),
        inset 0 0 0 3px rgba(0, 0, 0, 0.5),
        inset 0 0 0 4px rgba(192, 132, 252, 0.25),
        inset 0 0 22px rgba(0, 0, 0, 0.55),
        0 6px 18px rgba(0, 0, 0, 0.65),
        0 0 20px rgba(192, 132, 252, 0.2);
    animation: srBreathe var(--ui-card-glow-sr, 3s) ease-in-out infinite;
}

@keyframes srBreathe {
    0%, 100% { box-shadow:
        0 0 0 1px rgba(192, 132, 252, 0.5),
        0 0 0 3px rgba(0, 0, 0, 0.7),
        0 0 0 4px rgba(192, 132, 252, 0.3),
        inset 0 0 0 1px rgba(255, 255, 255, 0.12),
        inset 0 0 0 3px rgba(0, 0, 0, 0.5),
        inset 0 0 0 4px rgba(192, 132, 252, 0.25),
        inset 0 0 22px rgba(0, 0, 0, 0.55),
        0 6px 18px rgba(0, 0, 0, 0.65),
        0 0 20px rgba(192, 132, 252, 0.2); }
    50% { box-shadow:
        0 0 0 1px rgba(192, 132, 252, 0.7),
        0 0 0 3px rgba(0, 0, 0, 0.7),
        0 0 0 4px rgba(192, 132, 252, 0.4),
        inset 0 0 0 1px rgba(255, 255, 255, 0.15),
        inset 0 0 0 3px rgba(0, 0, 0, 0.5),
        inset 0 0 0 4px rgba(192, 132, 252, 0.35),
        inset 0 0 22px rgba(0, 0, 0, 0.55),
        0 6px 18px rgba(0, 0, 0, 0.65),
        0 0 30px rgba(192, 132, 252, 0.35); }
}

/* 超稀有特殊：全方位金色光晕 + 边框流光 */
.card-item.type-epic .card-frame {
    box-shadow:
        0 0 0 1px rgba(251, 191, 36, 0.6),
        0 0 0 3px rgba(0, 0, 0, 0.7),
        0 0 0 4px rgba(251, 191, 36, 0.35),
        inset 0 0 0 1px rgba(255, 255, 255, 0.15),
        inset 0 0 0 3px rgba(0, 0, 0, 0.5),
        inset 0 0 0 4px rgba(251, 191, 36, 0.3),
        inset 0 0 22px rgba(251, 191, 36, 0.12),
        0 6px 18px rgba(0, 0, 0, 0.65),
        0 0 20px rgba(251, 191, 36, 0.3),
        0 0 40px rgba(251, 191, 36, 0.15);
    animation: ssrGlow var(--ui-card-glow-ssr, 3s) ease-in-out infinite;
}

@keyframes ssrGlow {
    0%, 100% { box-shadow:
        0 0 0 1px rgba(251, 191, 36, 0.6),
        0 0 0 3px rgba(0, 0, 0, 0.7),
        0 0 0 4px rgba(251, 191, 36, 0.35),
        inset 0 0 0 1px rgba(255, 255, 255, 0.15),
        inset 0 0 0 3px rgba(0, 0, 0, 0.5),
        inset 0 0 0 4px rgba(251, 191, 36, 0.3),
        inset 0 0 22px rgba(251, 191, 36, 0.12),
        0 6px 18px rgba(0, 0, 0, 0.65),
        0 0 20px rgba(251, 191, 36, 0.3),
        0 0 40px rgba(251, 191, 36, 0.15); }
    50% { box-shadow:
        0 0 0 1px rgba(251, 191, 36, 0.8),
        0 0 0 3px rgba(0, 0, 0, 0.7),
        0 0 0 4px rgba(251, 191, 36, 0.5),
        inset 0 0 0 1px rgba(255, 255, 255, 0.2),
        inset 0 0 0 3px rgba(0, 0, 0, 0.5),
        inset 0 0 0 4px rgba(251, 191, 36, 0.4),
        inset 0 0 30px rgba(251, 191, 36, 0.2),
        0 6px 18px rgba(0, 0, 0, 0.65),
        0 0 30px rgba(251, 191, 36, 0.5),
        0 0 60px rgba(251, 191, 36, 0.25); }
}

/* 极稀有特殊：粉色强光晕 + 强呼吸 */
.card-item.type-legend .card-frame {
    box-shadow:
        0 0 0 1px rgba(244, 114, 182, 0.7),
        0 0 0 3px rgba(0, 0, 0, 0.7),
        0 0 0 4px rgba(244, 114, 182, 0.4),
        inset 0 0 0 1px rgba(255, 255, 255, 0.2),
        inset 0 0 0 3px rgba(0, 0, 0, 0.5),
        inset 0 0 0 4px rgba(244, 114, 182, 0.35),
        inset 0 0 25px rgba(244, 114, 182, 0.15),
        0 6px 18px rgba(0, 0, 0, 0.65),
        0 0 30px rgba(244, 114, 182, 0.4),
        0 0 60px rgba(244, 114, 182, 0.2);
    animation: urPulseCard 2s ease-in-out infinite;
}

@keyframes urPulseCard {
    0%, 100% { box-shadow:
        0 0 0 1px rgba(244, 114, 182, 0.7),
        0 0 0 3px rgba(0, 0, 0, 0.7),
        0 0 0 4px rgba(244, 114, 182, 0.4),
        inset 0 0 0 1px rgba(255, 255, 255, 0.2),
        inset 0 0 0 3px rgba(0, 0, 0, 0.5),
        inset 0 0 0 4px rgba(244, 114, 182, 0.35),
        inset 0 0 25px rgba(244, 114, 182, 0.15),
        0 6px 18px rgba(0, 0, 0, 0.65),
        0 0 30px rgba(244, 114, 182, 0.4),
        0 0 60px rgba(244, 114, 182, 0.2); }
    50% { box-shadow:
        0 0 0 1px rgba(244, 114, 182, 0.9),
        0 0 0 3px rgba(0, 0, 0, 0.7),
        0 0 0 4px rgba(244, 114, 182, 0.55),
        inset 0 0 0 1px rgba(255, 255, 255, 0.25),
        inset 0 0 0 3px rgba(0, 0, 0, 0.5),
        inset 0 0 0 4px rgba(244, 114, 182, 0.45),
        inset 0 0 35px rgba(244, 114, 182, 0.25),
        0 6px 18px rgba(0, 0, 0, 0.65),
        0 0 45px rgba(244, 114, 182, 0.6),
        0 0 80px rgba(244, 114, 182, 0.3); }
}

/* ── 粒子飘落效果（SSR+ 专属） ── */
.card-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 4;
    border-radius: var(--radius-lg);
}

.card-particle {
    position: absolute;
    top: -10px;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    animation: cardParticleFall linear infinite;
}

@keyframes cardParticleFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% {
        transform: translateY(300px) rotate(720deg);
        opacity: 0;
    }
}

/* ── 视差效果过渡（新增，多层元素平滑移动） ── */
.card-image-wrap,
.card-overlay,
.card-affix-badges {
    transition: transform 0.2s ease-out;
    will-change: transform;
}

/* 高光反射层（固定光源参照，3D倾斜时提供深度感知）
   未接触时不泛光，鼠标接触后才出现高光（选中概念） */
.card-glare {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    z-index: 6;
    opacity: 0;
    transition: opacity 0.3s ease-out;
    mix-blend-mode: overlay;
}

/* 鼠标接触时才显示高光（选中概念） */
.card-item:hover .card-glare {
    opacity: 1;
}

/* 缩略图动态阴影也仅在 hover 时生效（配合3D倾斜） */
.card-item .card-frame {
    transition: transform var(--transition-base), box-shadow var(--transition-base), filter 0.2s ease-out;
}

/* 最爱标记 */
.card-favorite {
    position: absolute;
    top: var(--space-xs);
    right: var(--space-xs);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 107, 157, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    box-shadow: 0 0 10px rgba(255, 107, 157, 0.5);
}

.card-favorite svg {
    width: 16px;
    height: 16px;
    fill: white;
}

/* 卡片信息覆盖层（底部渐变遮罩）
   直角样式：外层 card-frame 的 overflow:hidden + border-radius 会裁剪圆角，
   overlay 本身无需设置圆角，避免与边框内角不匹配导致白色漏出 */
.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-xl) var(--space-sm) var(--space-sm);
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.98) 0%,
        rgba(0, 0, 0, 0.9) 35%,
        rgba(0, 0, 0, 0.5) 65%,
        transparent 100%
    );
    z-index: 2;
}

.card-name {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.card-heat {
    font-size: var(--text-xs);
    color: var(--gold);
    font-family: var(--font-display);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* ── 骨架卡片 ── */
.skeleton-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 3 / 4;
}

/* ── 按钮 ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
    outline: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-gold);
    color: #000;
    font-weight: 600;
}

.btn-primary:hover {
    box-shadow: var(--shadow-gold);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: 1px solid var(--border-medium);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--border-gold);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

/* ── 弹窗 ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
}

.modal-content {
    background: var(--bg-dark);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-xl);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg) var(--space-xl);
    border-bottom: 1px solid var(--border-subtle);
}

.modal-title {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: var(--text-xl);
    cursor: pointer;
    padding: var(--space-xs);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.modal-close:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.modal-body {
    padding: var(--space-xl);
}

/* ── 空状态 ── */
.empty-state {
    text-align: center;
    padding: var(--space-3xl) var(--space-xl);
    color: var(--text-secondary);
}

.empty-state-title {
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.empty-state-desc {
    font-size: var(--text-sm);
    color: var(--text-tertiary);
}

/* ── 加载指示器 ── */
.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-subtle);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ── 成员列表 ── */
.member-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.member-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: rgba(26, 26, 46, 0.6);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.member-item:hover {
    border-color: var(--border-gold);
    background: rgba(26, 26, 46, 0.9);
    transform: translateX(4px);
}

.member-rank {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 900;
    color: var(--text-tertiary);
    min-width: 40px;
    text-align: center;
}

.member-rank.top-1 { color: #ffd700; }
.member-rank.top-2 { color: #c0c0c0; }
.member-rank.top-3 { color: #cd7f32; }

.member-info {
    flex: 1;
}

.member-uid {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--text-primary);
}

.member-stats {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.member-arrow {
    color: var(--text-tertiary);
    font-size: var(--text-lg);
}

/* 未注册用户标识 */
.member-unregistered-tag {
    display: inline-block;
    margin-left: var(--space-xs);
    padding: 1px 6px;
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    background: rgba(156, 163, 175, 0.15);
    border: 1px solid rgba(156, 163, 175, 0.3);
    border-radius: var(--radius-sm);
    vertical-align: middle;
}

/* ── 单卡鉴赏详情 ── */
.card-detail {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: var(--space-2xl);
    align-items: start;
}

.card-detail-image {
    width: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 3 / 4;
    position: relative;
}

.card-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.card-detail-info h2 {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

.card-detail-alias {
    font-size: var(--text-base);
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
    font-style: italic;
}

/* 数字ID显示（调大字号、提亮颜色） */
.card-detail-id {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
    font-family: var(--font-display);
    letter-spacing: 0.5px;
    opacity: 1;
}

.card-detail-meta {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.meta-item {
    background: rgba(255, 255, 255, 0.03);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
}

.meta-label {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--space-xs);
}

.meta-value {
    font-size: var(--text-base);
    color: var(--text-primary);
    font-weight: 500;
}

.meta-value.gold {
    color: var(--gold);
    font-family: var(--font-display);
    font-weight: 700;
}

/* 词缀面板 */
.affix-panel {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.affix-panel-title {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--space-md);
}

.affix-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.affix-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.02);
}

.affix-row.gilded { border-left: 3px solid var(--gilded); }
.affix-row.shine { border-left: 3px solid var(--shine); }
.affix-row.prismatic { border-left: 3px solid var(--prismatic); }
.affix-row.negative { border-left: 3px solid var(--negative); }

.affix-name {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
}

.affix-value {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

/* ── 返回按钮 ── */
.back-button {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-md);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: var(--text-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-bottom: var(--space-md);
}

.back-button:hover {
    color: var(--text-primary);
    border-color: var(--border-gold);
    background: rgba(255, 255, 255, 0.08);
}

/* ════════════════════════════════════════════════════════════
   单卡鉴赏详情 — 增强布局（任务1）
   ════════════════════════════════════════════════════════════ */

/* 增强版详情容器（覆盖基础 .card-detail 的网格布局） */
.card-detail.card-detail-enhanced {
    display: grid;
    grid-template-columns: minmax(280px, 360px) 1fr;
    gap: var(--space-2xl);
    align-items: start;
}

/* 左侧卡牌区域滚动时固定（sticky），右侧数据可滚动 */
/* 2026-06-26 修复：
   1. top 从 80px 调整为 70px（导航栏60px + 10px间距）
   2. 新增呼吸光效动画，直观区分悬浮锚定状态
   3. 移除可能干扰 sticky 的属性（transform/filter 等）
   原问题：初次滚动不触发 sticky，是因为 :hover transform 创建 containing block 破坏 sticky。
   已将 transform 移到子元素 imageWrap，imageSection 保持纯净 sticky。 */
.card-detail.card-detail-enhanced .card-detail-image-section {
    position: sticky;
    top: var(--ui-detail-sticky-top, 70px);
    align-self: start;
    z-index: 10;
    /* 锚定状态呼吸光效（流动动画直观区分悬浮状态）
       2026-06-26 改为变量驱动，便于调试面板实时调节 */
    animation: stickyBreathGlow var(--ui-detail-sticky-breath-glow, 4s) ease-in-out infinite;
}

/* ── 左侧：大图展示区（整体微动作用于图片+外框） ── */
/* 2026-06-23 升级：支持鼠标联动3D倾斜 + 视差效果 */
/* 图片区域容器（3D倾斜+呼吸+摆动整体作用于卡片+外框+词缀） */
/* 3D倾斜/透视/变量定义见下方 .card-detail-image-section 块 */

.card-detail-image-wrap {
    position: relative;
    width: 100%;
    border-radius: var(--radius-xl);
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: linear-gradient(180deg, var(--bg-medium) 0%, var(--bg-dark) 100%);
    /* 与缩略图 .card-frame 统一的多层立体边框（4px加宽版） */
    border: 4px solid var(--gold);
    box-shadow:
        0 0 0 1px rgba(212, 175, 55, 0.5),
        0 0 0 4px rgba(0, 0, 0, 0.7),
        0 0 0 5px rgba(212, 175, 55, 0.25),
        inset 0 0 0 1px rgba(255, 255, 255, 0.12),
        inset 0 0 0 4px rgba(0, 0, 0, 0.5),
        inset 0 0 0 5px rgba(212, 175, 55, 0.25),
        inset 0 0 22px rgba(0, 0, 0, 0.55),
        0 6px 18px rgba(0, 0, 0, 0.65);
    will-change: transform;
    transform-style: preserve-3d;
    /* 2026-06-26 修复：拆分为两个独立动画，分别使用 CSS 变量控制时长和幅度
       detailBreatheScale 控制呼吸缩放（scale 属性），detailSwayRotate 控制左右摇摆（rotate 属性）
       使用独立 scale/rotate 属性而非 transform，可与 hover 时的 3D transform 组合 */
    animation:
        detailBreatheScale var(--ui-detail-breathe-duration, 12s) ease-in-out infinite,
        detailSwayRotate var(--ui-detail-sway-duration, 12s) ease-in-out infinite;
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}

/* 详情页悬浮时边框增强（与缩略图 hover 效果统一，4px加宽版）+ 暂停呼吸动画避免与3D倾斜冲突 */
/* 2026-06-26 修复：3D倾斜从父元素 imageSection 移到子元素 imageWrap。
   原问题：imageSection 同时有 position:sticky 和 :hover transform，
   transform 创建 containing block 破坏 sticky 计算，导致初次滚动不触发锚定。
   修复：imageSection 保持 sticky 无 transform，imageWrap 承载 3D 倾斜 transform。
   hover 时 animation 暂停，transform 覆盖 animation 的 transform。 */
.card-detail-image-section:hover .card-detail-image-wrap {
    box-shadow:
        0 0 0 1px rgba(212, 175, 55, 0.7),
        0 0 0 4px rgba(0, 0, 0, 0.7),
        0 0 0 5px rgba(212, 175, 55, 0.4),
        inset 0 0 0 1px rgba(255, 255, 255, 0.2),
        inset 0 0 0 4px rgba(0, 0, 0, 0.5),
        inset 0 0 0 5px rgba(212, 175, 55, 0.35),
        inset 0 0 30px rgba(0, 0, 0, 0.5),
        0 20px 40px rgba(0, 0, 0, 0.7),
        0 0 30px rgba(212, 175, 55, 0.35);
    animation-play-state: paused;
    transform: rotateX(var(--mouse-rotate-x, 0deg)) rotateY(var(--mouse-rotate-y, 0deg));
    transition: transform 0.15s ease-out, box-shadow 0.2s ease-out;
}

/* 3D倾斜的透视容器（保持 sticky，无 transform，避免破坏锚定） */
.card-detail-image-section {
    position: relative;
    perspective: 1000px;
    transform-style: preserve-3d;
    --mouse-rotate-x: 0deg;
    --mouse-rotate-y: 0deg;
    --mouse-active: 0;
}

/* 2026-06-26 新增：锚定状态呼吸光效（直观区分悬浮状态） */
/* 卡片加载完成后直接固定在锚定位置，并全程悬浮展示 */
@keyframes stickyBreathGlow {
    0%, 100% {
        box-shadow:
            0 0 0 1px rgba(212, 175, 55, 0.3),
            0 0 20px rgba(212, 175, 55, 0.15),
            0 6px 18px rgba(0, 0, 0, 0.65);
    }
    50% {
        box-shadow:
            0 0 0 1px rgba(212, 175, 55, 0.5),
            0 0 35px rgba(212, 175, 55, 0.3),
            0 8px 22px rgba(0, 0, 0, 0.7);
    }
}

/* 图片内层（视差效果：跟随鼠标移动产生位移） */
.card-detail-image-inner {
    position: absolute;
    inset: 0;
    will-change: transform;
    transition: transform 0.2s ease-out;
}

/* 详情页高光反射层（固定光源参照，3D倾斜时提供深度感知） */
.card-detail-glare {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    z-index: 6;
    opacity: 0;
    transition: opacity 0.3s ease-out;
    mix-blend-mode: overlay;
}

.card-detail-image-section:hover .card-detail-glare {
    opacity: 1;
}

/* 图片本身（不再单独动画，跟随外框整体微动） */
.card-detail-image-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    transform-origin: center center;
}

/* 左右缓慢摇摆（卡牌游戏经典常驻动效，与呼吸组合）
   摇摆周期12s，呼吸周期6s，形成2:1和谐比例，避免视觉冲突 */
@keyframes detailSway {
    0%, 100% { transform: rotate(-0.5deg); }
    50% { transform: rotate(0.5deg); }
}

/* 2026-06-26 修复：将 detailBreatheSway 拆分为两个独立动画，分别使用 scale 和 rotate 属性
   好处：1. 呼吸和摇摆可独立控制时长  2. 不与 hover transform 冲突  3. 摇摆幅度可通过 CSS 变量调节 */
@keyframes detailBreatheScale {
    0%, 100% { scale: 1; }
    25%, 75% { scale: 1.008; }
    50%      { scale: 1.015; }
}

@keyframes detailSwayRotate {
    0%, 100% { rotate: calc(var(--ui-detail-sway-amplitude, 0.4deg) * -1); }
    25%, 75% { rotate: 0deg; }
    50%      { rotate: var(--ui-detail-sway-amplitude, 0.4deg); }
}

/* 摇摆已合并到 image-wrap 的 detailBreatheSway 动画，image-section 不再有动画 */
/* 悬停时暂停子元素动画，让位给父级3D倾斜 */

/* 稀有度角标 */
.card-detail-rarity {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid;
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 1px;
    z-index: 5;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.card-detail-rarity.rarity-legendary {
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.5);
}

.card-detail-rarity.rarity-epic {
    box-shadow: 0 0 10px rgba(255, 107, 255, 0.4);
}

/* 详情页最爱标记 */
.card-detail-favorite {
    position: absolute;
    top: var(--space-md);
    left: var(--space-md);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 107, 157, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    color: white;
    font-size: var(--text-lg);
    box-shadow: 0 0 14px rgba(255, 107, 157, 0.6);
    animation: glowPulse 2s ease-in-out infinite;
}

/* ── 右侧：信息面板 ── */
.card-detail-enhanced .card-detail-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    min-width: 0;
}

/* 标题区 */
.card-detail-header {
    position: relative;
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-subtle);
}

.card-detail-title {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-xs);
    color: var(--text-primary);
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 1px;
}

.card-detail-enhanced .card-detail-alias {
    font-size: var(--text-base);
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: var(--space-sm);
}

.card-detail-fav-tag {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    background: rgba(255, 107, 157, 0.15);
    border: 1px solid rgba(255, 107, 157, 0.4);
    color: #ff6b9d;
    font-size: var(--text-xs);
    font-weight: 600;
}

/* 信息分区 */
.detail-section {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: border-color var(--transition-base);
}

.detail-section:hover {
    border-color: var(--border-medium);
}

.detail-section-title {
    font-size: var(--text-sm);
    color: var(--text-gold);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: var(--space-md);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.detail-section-title::before {
    content: '';
    width: 3px;
    height: 14px;
    background: var(--gradient-gold);
    border-radius: var(--radius-sm);
}

.detail-section-empty {
    color: var(--text-tertiary);
    font-size: var(--text-sm);
    text-align: center;
    padding: var(--space-md);
    font-style: italic;
}

/* ── 热度加成分解（详情页展示有效热度的计算来源） ── */
.detail-section.heat-breakdown {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.04) 0%, rgba(255, 255, 255, 0.02) 100%);
    border-color: rgba(212, 175, 55, 0.2);
}

/* 7.5需求：热度加成分解板块间距和宽度调整（宽度50%） */
.detail-section.heat-breakdown.heat-breakdown-compact {
    margin-top: var(--space-lg);
    max-width: 50%;
}

.heat-breakdown-compact .heat-breakdown-list {
    gap: var(--space-xs);
}

.heat-breakdown-compact .breakdown-row {
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--text-sm);
}

.heat-breakdown-compact .breakdown-value {
    font-size: var(--text-sm);
}

/* 7.6需求：羁绊信息视角切换按钮样式 */
.bond-view-switcher {
    display: flex;
    gap: var(--space-xs);
    margin-bottom: var(--space-md);
    padding: 4px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    width: fit-content;
}

.bond-view-btn {
    padding: 6px 16px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    font-size: var(--text-sm);
    font-family: var(--font-body);
    cursor: pointer;
    transition: all var(--transition-fast);
    outline: none;
}

.bond-view-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
}

.bond-view-btn.active {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--gold);
    color: var(--gold);
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.2);
}

.bond-content-wrap {
    transition: opacity var(--transition-fast);
}

/* 热度信息4卡片网格排版 */
.card-detail-meta.heat-info-grid {
    grid-template-columns: repeat(2, 1fr);
}

.heat-info-grid .meta-item {
    text-align: center;
}

.heat-info-grid .meta-value {
    font-size: var(--text-lg);
}

.heat-breakdown-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.breakdown-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-xs) var(--space-md);
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-md);
    border-left: 2px solid rgba(212, 175, 55, 0.4);
    transition: all var(--transition-fast);
}

.breakdown-row:hover {
    background: rgba(212, 175, 55, 0.06);
    border-left-color: var(--gold);
    transform: translateX(2px);
}

.breakdown-row.breakdown-sub {
    border-left-color: rgba(192, 132, 252, 0.4);
    margin-left: var(--space-md);
    background: rgba(0, 0, 0, 0.15);
}

.breakdown-row.breakdown-sub:hover {
    border-left-color: var(--rarity-sr);
    background: rgba(192, 132, 252, 0.06);
}

.breakdown-label {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    font-weight: 500;
    flex-shrink: 0;
}

.breakdown-value {
    font-family: var(--font-display);
    font-size: var(--text-sm);
    color: var(--gold);
    font-weight: 600;
    text-align: right;
}

.breakdown-value.breakdown-groups {
    font-family: var(--font-body);
    color: var(--rarity-sr);
    font-weight: 500;
    font-size: var(--text-xs);
    max-width: 60%;
    line-height: 1.4;
}

/* ── 排行依据说明（详情页热度信息区） ── */
.ranking-note {
    margin-top: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-md);
    border-left: 2px solid rgba(212, 175, 55, 0.3);
}

.ranking-note-item {
    display: flex;
    align-items: baseline;
    gap: var(--space-xs);
    font-size: var(--text-xs);
    line-height: 1.6;
}

.ranking-note-item + .ranking-note-item {
    margin-top: 2px;
}

.ranking-note-label {
    color: var(--text-secondary);
    font-weight: 600;
    flex-shrink: 0;
}

.ranking-note-value {
    color: var(--text-tertiary);
}

/* ── 排行数据展示（详情页热度信息区，替代原排行依据说明） ── */
.ranking-section {
    margin-top: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.ranking-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-xs) var(--space-md);
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-md);
    border-left: 2px solid rgba(212, 175, 55, 0.3);
}

.ranking-label {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.ranking-value {
    font-family: var(--font-display);
    font-size: var(--text-base);
    color: var(--gold);
    font-weight: 700;
}

.ranking-total {
    font-family: var(--font-body);
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    font-weight: 400;
}

/* 详情页元信息网格（覆盖基础样式，确保对齐） */
.card-detail-enhanced .card-detail-meta {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    margin-bottom: 0;
}

/* ── 羁绊信息 ── */
.bond-info-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.bond-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    background: rgba(255, 107, 157, 0.05);
    border-left: 3px solid #ff6b9d;
}

.bond-info-label {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.bond-info-value {
    font-size: var(--text-sm);
    color: var(--text-primary);
    font-weight: 600;
}

.bond-info-value.gold {
    color: var(--gold);
    font-family: var(--font-display);
}

.bond-info-text {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    line-height: 1.7;
    padding: var(--space-sm);
}

/* 羁绊成员标签（可点击跳转详情） */
.bond-member-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
    max-width: 60%;
}

.bond-member-chip {
    display: inline-block;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    background: rgba(255, 107, 157, 0.12);
    border: 1px solid rgba(255, 107, 157, 0.3);
    color: #ff9dc5;
    font-size: var(--text-xs);
    cursor: pointer;
    transition: all var(--transition-fast);
    user-select: none;
}

.bond-member-chip:hover {
    background: rgba(255, 107, 157, 0.25);
    border-color: rgba(255, 107, 157, 0.6);
    color: #ffb8d4;
    transform: translateY(-1px);
}

/* 羁绊成员：已拥有（卡组主人持有） */
.bond-member-chip.bond-member-owned {
    background: rgba(212, 175, 55, 0.15);
    border-color: rgba(212, 175, 55, 0.5);
    color: var(--gold);
}

.bond-member-chip.bond-member-owned:hover {
    background: rgba(212, 175, 55, 0.3);
    border-color: var(--gold);
}

/* 羁绊成员：未拥有（卡组主人未持有） */
.bond-member-chip.bond-member-unowned {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
    color: var(--text-tertiary);
    opacity: 0.7;
}

.bond-member-chip.bond-member-unowned:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
    color: var(--text-secondary);
    opacity: 1;
}

/* ── 底部操作按钮区 ── */
.card-detail-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    padding-top: var(--space-lg);
    margin-top: var(--space-md);
    border-top: 1px solid var(--border-subtle);
}

/* ════════════════════════════════════════════════════════════
   详情页词缀图片蒙版特效（Balatro小丑牌风格，与缩略图统一）
   设计思路：特殊卡牌不影响边框，改为影响整个卡牌图片的蒙版效果
   ════════════════════════════════════════════════════════════ */

/* 鎏金：金色色调蒙版 + 金色光泽扫描动画 */
.card-detail-image-wrap.affix-glow.affix-gilded::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(
        135deg,
        rgba(255, 215, 0, 0.25) 0%,
        rgba(255, 165, 0, 0.15) 30%,
        rgba(255, 215, 0, 0.2) 60%,
        rgba(255, 185, 50, 0.3) 100%
    );
    mix-blend-mode: overlay;
    pointer-events: none;
    z-index: 4;
    animation: gildedShimmer var(--ui-card-glow-gilded, 3s) ease-in-out infinite;
}

/* 闪耀：银色全息光泽 + 扫描光带动画 */
.card-detail-image-wrap.affix-glow.affix-shine::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(
        105deg,
        rgba(232, 232, 255, 0.1) 0%,
        rgba(255, 255, 255, 0.4) 45%,
        rgba(232, 232, 255, 0.1) 55%,
        rgba(255, 255, 255, 0.3) 100%
    );
    mix-blend-mode: screen;
    pointer-events: none;
    z-index: 4;
    animation: shineScan var(--ui-card-glow-shine, 2.5s) ease-in-out infinite;
}

/* 幻彩：彩虹全息蒙版 + hue-rotate循环动画 */
.card-detail-image-wrap.affix-glow.affix-prismatic::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: conic-gradient(
        from 0deg at 50% 50%,
        rgba(255, 107, 157, 0.3) 0%,
        rgba(196, 77, 255, 0.3) 25%,
        rgba(77, 255, 255, 0.3) 50%,
        rgba(255, 215, 0, 0.3) 75%,
        rgba(255, 107, 157, 0.3) 100%
    );
    mix-blend-mode: overlay;
    pointer-events: none;
    z-index: 4;
    animation: prismaticHueShift var(--ui-card-glow-prismatic, 4s) linear infinite;
}

/* 负片：暗紫色阴影蒙版 + 脉冲动画 */
.card-detail-image-wrap.affix-glow.affix-negative::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(
        180deg,
        rgba(74, 58, 90, 0.4) 0%,
        rgba(40, 30, 50, 0.5) 50%,
        rgba(74, 58, 90, 0.4) 100%
    );
    mix-blend-mode: multiply;
    pointer-events: none;
    z-index: 4;
    animation: negativePulse var(--ui-card-glow-negative, 3s) ease-in-out infinite;
}

/* ── 空状态图标 ── */
.empty-state-icon {
    font-size: var(--text-4xl);
    color: var(--text-tertiary);
    margin-bottom: var(--space-md);
    animation: floatY 3s ease-in-out infinite;
}

/* ════════════════════════════════════════════════════════════
   组件级样式增强（任务2）
   ════════════════════════════════════════════════════════════ */

/* ── 导航栏：滑动指示器（刻度尺效果，由JS控制位置） ── */
/* 移除单个 nav-item 的底部光条，改用 navbar-nav::before 滑动指示器 */
.nav-item::after {
    display: none;
}

.nav-item:hover::after {
    display: none;
}

.nav-item.active::after {
    display: none;
}

@keyframes navIndicatorPulse {
    0%, 100% {
        box-shadow: 0 0 8px rgba(212, 175, 55, 0.6);
        width: 24px;
    }
    50% {
        box-shadow: 0 0 14px rgba(212, 175, 55, 0.9);
        width: 28px;
    }
}

/* ── 卡片网格：瀑布流进入动画增强（staggered） ── */
.card-grid .card-item:nth-child(1) { animation-delay: 0s; }
.card-grid .card-item:nth-child(2) { animation-delay: 0.05s; }
.card-grid .card-item:nth-child(3) { animation-delay: 0.1s; }
.card-grid .card-item:nth-child(4) { animation-delay: 0.15s; }
.card-grid .card-item:nth-child(5) { animation-delay: 0.2s; }
.card-grid .card-item:nth-child(6) { animation-delay: 0.25s; }
.card-grid .card-item:nth-child(7) { animation-delay: 0.3s; }
.card-grid .card-item:nth-child(8) { animation-delay: 0.35s; }
.card-grid .card-item:nth-child(n+9) { animation-delay: 0.4s; }

/* ── 筛选栏：chip 选中动效 ── */
.filter-chip {
    position: relative;
    overflow: hidden;
    transition: all var(--transition-base);
}

.filter-chip:hover {
    transform: translateY(-1px);
    border-color: var(--border-gold);
    color: var(--text-primary);
}

.filter-chip.active {
    animation: chipSelect 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.25);
}

@keyframes chipSelect {
    0% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-3px) scale(1.08); }
    100% { transform: translateY(-1px) scale(1); }
}

/* ── 模态框：背景模糊 + 弹入动画增强 ── */
.modal-overlay {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(5, 5, 8, 0.75);
}

.modal-content {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(212, 175, 55, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* ── 统计卡片：简约悬浮效果 ── */
.stat-card {
    background: var(--gradient-card-bg);
}

.stat-card:hover {
    border-color: var(--border-gold);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.stat-card:hover .stat-value {
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
}

.stat-value {
    transition: text-shadow var(--transition-base);
}

/* ── 成员列表：卡片悬浮增强 ── */
/* 2026-06-25 修复：移除 overflow: hidden（它会裁切 hover 时的 box-shadow 光晕，
   导致两侧光晕突兀中断）。::before 装饰条位于容器内部 left:0/width:3px，
   无需 overflow 裁切 */
.member-item {
    position: relative;
    transition: all var(--transition-base);
}

.member-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--gradient-gold);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform var(--transition-base);
}

.member-item:hover {
    border-color: var(--border-gold);
    background: rgba(26, 26, 46, 0.9);
    transform: translateX(6px);
    box-shadow: var(--shadow-gold);
}

.member-item:hover::before {
    transform: scaleY(1);
}

/* ── 卡片名称流式字号（任务3） ── */
.card-name {
    font-size: var(--fs-card-name);
}

.card-heat {
    font-size: var(--fs-body);
}

/* ════════════════════════════════════════════════════════════
   调试面板样式
   ════════════════════════════════════════════════════════════ */

.debug-toggle-btn {
    position: fixed;
    bottom: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(20, 15, 35, 0.9);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: var(--gold);
    font-size: 18px;
    cursor: pointer;
    z-index: 9998;
    opacity: 0.4;
    transition: all var(--transition-base);
    backdrop-filter: blur(8px);
}

.debug-toggle-btn:hover {
    opacity: 1;
    transform: scale(1.1);
    box-shadow: 0 0 16px rgba(212, 175, 55, 0.4);
}

.debug-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 560px;
    max-width: 100vw;
    height: 100vh;
    background: rgba(10, 10, 20, 0.97);
    backdrop-filter: blur(20px);
    border-left: 1px solid rgba(212, 175, 55, 0.2);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.5);
    animation: debugPanelSlideIn 0.3s ease;
}

@keyframes debugPanelSlideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.debug-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.3);
}

.debug-panel-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 1px;
}

.debug-panel-tabs {
    display: flex;
    gap: 4px;
}

.debug-tab {
    padding: 4px 12px;
    border-radius: 6px;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-tertiary);
    font-size: 12px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.debug-tab:hover {
    color: var(--text-secondary);
}

.debug-tab.active {
    background: rgba(212, 175, 55, 0.15);
    color: var(--gold);
}

.debug-close-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-tertiary);
    cursor: pointer;
    font-size: 14px;
    transition: all var(--transition-fast);
}

.debug-close-btn:hover {
    background: rgba(255, 100, 100, 0.2);
    color: #ff6b6b;
}

.debug-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

/* ── 日志列表 ── */

.debug-logs-toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.debug-log-level {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    outline: none;
}

.debug-btn {
    padding: 4px 12px;
    border-radius: 6px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold);
    font-size: 12px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.debug-btn:hover {
    background: rgba(212, 175, 55, 0.2);
}

.debug-log-list {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 11px;
    line-height: 1.6;
}

.debug-log-entry {
    display: flex;
    flex-direction: column;
    padding: 4px 8px;
    border-radius: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    word-break: break-all;
}

.debug-log-entry:hover {
    background: rgba(255, 255, 255, 0.03);
}

.debug-log-time { color: var(--text-tertiary); }
.debug-log-level { font-weight: 700; }
.debug-log-module { color: #8ecae6; }
.debug-log-message { color: var(--text-secondary); }

.debug-log-error .debug-log-level { color: #ff6b6b; }
.debug-log-error { background: rgba(255, 107, 107, 0.05); }
.debug-log-warning .debug-log-level { color: #ffd700; }
.debug-log-warning { background: rgba(255, 215, 0, 0.03); }
.debug-log-info .debug-log-level { color: #4caf50; }
.debug-log-debug .debug-log-level { color: #888; }
.debug-log-debug { color: var(--text-tertiary); }

.debug-log-traceback {
    color: #ff6b6b;
    font-size: 10px;
    white-space: pre-wrap;
    padding: 4px 8px;
    background: rgba(255, 107, 107, 0.05);
    border-radius: 4px;
    margin-top: 4px;
}

.debug-log-empty {
    text-align: center;
    color: var(--text-tertiary);
    padding: 24px;
}

/* ── 状态网格 ── */

.debug-status-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.debug-status-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.debug-status-label {
    color: var(--text-tertiary);
    font-size: 12px;
}

.debug-status-value {
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 600;
    text-align: right;
    max-width: 60%;
    word-break: break-all;
}

.debug-status-value.error {
    color: #ff6b6b;
}

/* ── 命令面板 ── */

.debug-cmd-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.debug-cmd-btn {
    padding: 10px 8px;
    border-radius: 8px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    background: rgba(212, 175, 55, 0.08);
    color: var(--gold);
    font-size: 12px;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
}

.debug-cmd-btn:hover {
    background: rgba(212, 175, 55, 0.2);
    transform: translateY(-1px);
}

/* ── 测试页面导航 ── */

.debug-tests-wrap {
    padding: 8px 0;
}

.debug-tests-title {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    padding-left: 4px;
}

.debug-tests-empty {
    padding: 24px;
    text-align: center;
    color: var(--text-tertiary);
    font-size: 12px;
}

.debug-tests-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.debug-test-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: left;
    width: 100%;
    font-family: var(--font-body);
}

.debug-test-item:hover {
    border-color: var(--border-gold);
    background: rgba(212, 175, 55, 0.08);
    transform: translateX(2px);
}

.debug-test-icon {
    font-size: 20px;
    color: var(--gold);
    flex-shrink: 0;
    width: 28px;
    text-align: center;
}

.debug-test-info {
    flex: 1;
    min-width: 0;
}

.debug-test-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.debug-test-desc {
    font-size: 11px;
    color: var(--text-tertiary);
    line-height: 1.4;
}

.debug-test-arrow {
    color: var(--text-tertiary);
    font-size: 16px;
    flex-shrink: 0;
    transition: transform var(--transition-fast);
}

.debug-test-item:hover .debug-test-arrow {
    transform: translateX(3px);
    color: var(--gold);
}

.debug-custom-cmd {
    margin-bottom: 16px;
    padding: 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.debug-custom-label {
    color: var(--text-tertiary);
    font-size: 12px;
    margin-bottom: 8px;
}

.debug-input-row {
    display: flex;
    gap: 8px;
}

.debug-input {
    flex: 1;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-primary);
    font-size: 12px;
    font-family: 'Consolas', monospace;
    outline: none;
}

.debug-input:focus {
    border-color: var(--gold);
}

.debug-cmd-result {
    padding: 12px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 12px;
    color: var(--text-secondary);
    min-height: 60px;
}

.debug-cmd-success {
    color: #4caf50;
    font-weight: 600;
    margin-bottom: 8px;
}

.debug-cmd-output {
    color: var(--text-secondary);
    font-family: 'Consolas', monospace;
    font-size: 11px;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 400px;
    overflow-y: auto;
}

/* ════════════════════════════════════════════════════════════
   阶段7：可访问性 a11y — 焦点管理
   ════════════════════════════════════════════════════════════ */

/* 全局焦点样式 */
*:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

/* 导航项焦点 */
.nav-item:focus-visible {
    background: rgba(212, 175, 55, 0.15);
    border-radius: var(--radius-md);
}

/* 卡片焦点 */
.card-item:focus-visible {
    outline-offset: 4px;
    z-index: 10;
}

.card-item:focus-visible .card-frame {
    box-shadow:
        0 0 0 1px rgba(212, 175, 55, 0.9),
        0 0 0 3px rgba(0, 0, 0, 0.7),
        0 0 0 4px rgba(212, 175, 55, 0.6),
        inset 0 0 0 1px rgba(255, 255, 255, 0.2),
        inset 0 0 0 3px rgba(0, 0, 0, 0.5),
        inset 0 0 0 4px rgba(212, 175, 55, 0.4),
        inset 0 0 30px rgba(0, 0, 0, 0.5),
        0 20px 40px rgba(0, 0, 0, 0.7),
        0 0 30px rgba(212, 175, 55, 0.5);
}

/* 成员列表焦点 */
.member-item:focus-visible {
    border-color: var(--gold);
    background: rgba(26, 26, 46, 0.9);
    box-shadow: var(--shadow-gold);
}

.member-item:focus-visible::before {
    transform: scaleY(1);
}

/* 按钮焦点 */
.btn:focus-visible {
    outline-offset: 3px;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.3);
}

/* 筛选chip焦点 */
.filter-chip:focus-visible {
    border-color: var(--gold);
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.3);
}

/* 搜索框焦点增强 */
.search-input:focus-visible {
    border-color: var(--gold);
    box-shadow:
        0 0 0 3px rgba(212, 175, 55, 0.18),
        0 0 24px rgba(212, 175, 55, 0.25);
}

/* 返回按钮焦点 */
.back-button:focus-visible {
    border-color: var(--gold);
    color: var(--text-primary);
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.3);
}

/* 减少动画偏好（尊重用户系统设置） */
@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;
    }

    .card-item {
        transition: none !important;
    }

    .reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .card-detail-image-wrap {
        animation: none !important;
    }

    .particle,
    .star {
        animation: none !important;
    }
}

/* 高对比度模式适配 */
@media (prefers-contrast: high) {
    .card-frame {
        border-width: 3px;
    }

    .card-name {
        text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
    }

    .meta-item {
        border-width: 2px;
    }

    .detail-section {
        border-width: 2px;
    }
}

/* 跳过导航链接（屏幕阅读器专用，视觉隐藏但键盘可达） */
.skip-nav {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gold);
    color: var(--bg-darkest);
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-md);
    font-weight: 700;
    z-index: 10000;
    transition: top 0.2s ease;
}

.skip-nav:focus {
    top: var(--space-md);
}

/* ════════════════════════════════════════════════════════════
   设置面板
   ════════════════════════════════════════════════════════════ */

.nav-settings-btn {
    background: none;
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    transition: all 0.2s ease;
}

.nav-settings-btn:hover {
    color: var(--gold);
    border-color: var(--gold);
    background: rgba(212, 175, 55, 0.1);
}

.nav-settings-btn svg {
    width: 18px;
    height: 18px;
}

/* 2026-07-13 交换功能：导航栏消息入口按钮 */
.nav-messages-btn {
    position: relative;
    background: none;
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    transition: all 0.2s ease;
}

.nav-messages-btn:hover {
    color: var(--gold);
    border-color: var(--gold);
    background: rgba(212, 175, 55, 0.1);
}

.nav-messages-btn svg {
    width: 18px;
    height: 18px;
}

.nav-messages-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--danger, #ef4444);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 0 0 2px var(--bg-primary, #0a0a0f);
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.settings-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
    animation: fadeIn 0.2s ease;
}

.settings-panel {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-2xl);
    padding: var(--space-2xl);
    width: 100%;
    max-width: 420px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-xl);
}

.settings-title {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    color: var(--gold);
    margin: 0;
}

.settings-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: var(--text-xl);
    cursor: pointer;
    padding: var(--space-xs);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.settings-close:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

.settings-section {
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--glass-border);
}

.settings-section:last-of-type {
    border-bottom: none;
}

.settings-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
    color: var(--text-primary);
    font-weight: 500;
}

.settings-value {
    color: var(--gold);
    font-weight: 700;
    font-size: var(--text-sm);
}

.settings-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    margin: var(--space-md) 0;
}

.settings-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--gold);
    cursor: pointer;
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
    transition: transform 0.15s ease;
}

.settings-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.settings-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--gold);
    cursor: pointer;
    border: none;
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
}

.settings-presets {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
}

.settings-preset-btn {
    flex: 1;
    padding: var(--space-xs) var(--space-sm);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: var(--text-xs);
    transition: all 0.2s ease;
}

.settings-preset-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.settings-preset-btn.active {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--gold);
    color: var(--gold);
}

.settings-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    cursor: pointer;
    color: var(--text-primary);
    font-size: var(--text-sm);
}

.settings-toggle input {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 44px;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--text-secondary);
    transition: all 0.3s ease;
}

.settings-toggle input:checked + .toggle-slider {
    background: rgba(212, 175, 55, 0.3);
}

.settings-toggle input:checked + .toggle-slider::after {
    transform: translateX(20px);
    background: var(--gold);
}

.settings-footer {
    margin-top: var(--space-lg);
    display: flex;
    gap: var(--space-md);
    justify-content: center;
}

/* 2026-06-26 反馈3.3：退出登录按钮样式 */
.settings-logout-btn {
    background: rgba(255, 107, 107, 0.15);
    border: 1px solid rgba(255, 107, 107, 0.3);
    color: #ff6b6b;
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: var(--text-sm);
    font-family: var(--font-body);
    transition: all 0.2s ease;
}

.settings-logout-btn:hover {
    background: rgba(255, 107, 107, 0.25);
    border-color: rgba(255, 107, 107, 0.5);
    color: #ff8a8a;
}

/* 禁用动画 */
body.no-animations *,
body.no-animations *::before,
body.no-animations *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
}

/* 禁用粒子 */
body.no-particles .particle,
body.no-particles .star,
body.no-particles .card-particle {
    display: none !important;
}

/* ════════════════════════════════════════════════════════════
   信息提示组件（i 图标 + 悬浮说明）
   ════════════════════════════════════════════════════════════ */

.info-tip {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 4px;
    cursor: help;
    vertical-align: middle;
}

.info-tip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    color: var(--text-tertiary, #6b7280);
    opacity: 0.6;
    transition: opacity 0.2s ease, color 0.2s ease;
}

.info-tip:hover .info-tip-icon,
.info-tip:focus .info-tip-icon,
.info-tip.info-tip-visible .info-tip-icon {
    opacity: 1;
    color: var(--gold);
}

.info-tip-content {
    position: absolute;
    z-index: 1000;
    padding: var(--space-sm) var(--space-md);
    background: rgba(15, 15, 30, 0.95);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: var(--text-xs);
    line-height: 1.6;
    white-space: normal;
    width: max-content;
    max-width: 280px;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
}

.info-tip:hover .info-tip-content,
.info-tip:focus .info-tip-content,
.info-tip.info-tip-visible .info-tip-content {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* 提示位置 */
.info-tip-top .info-tip-content {
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
}

.info-tip-bottom .info-tip-content {
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
}

.info-tip-left .info-tip-content {
    right: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
}

.info-tip-right .info-tip-content {
    left: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
}

/* 提示箭头 */
.info-tip-top .info-tip-content::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(15, 15, 30, 0.95);
}

.info-tip-bottom .info-tip-content::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-bottom-color: rgba(15, 15, 30, 0.95);
}

/* 带提示的标签 */
.labeled-with-tip {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.labeled-with-tip .label-text {
    color: inherit;
}

/* 提示内容中的列表 */
.info-tip-content ul {
    margin: 4px 0;
    padding-left: 16px;
}

.info-tip-content li {
    margin: 2px 0;
}

.info-tip-content strong {
    color: var(--gold);
}

.info-tip-content .tip-divider {
    border-top: 1px solid var(--glass-border);
    margin: 6px 0;
}

/* ════════════════════════════════════════════════════════════
   反馈12：热度档位专属配色 + 卡牌外框特效（方案B：华丽特效风）
   ════════════════════════════════════════════════════════════ */

/* ── 热度档位外框配色（border-color + 多层box-shadow，兼容圆角） ── */

/* UR 档位：金色边框 + 金色光晕（保留立体多层结构，4px加宽版）
   2026-06-26 反馈5：与SSR交换配色 */
.card-item.tier-ur .card-frame {
    border-color: #f59e0b;
    box-shadow:
        0 0 0 1px rgba(245, 158, 11, 0.5),
        0 0 0 4px rgba(0, 0, 0, 0.7),
        0 0 0 5px rgba(245, 158, 11, 0.3),
        inset 0 0 0 1px rgba(255, 255, 255, 0.12),
        inset 0 0 0 4px rgba(0, 0, 0, 0.5),
        inset 0 0 0 5px rgba(245, 158, 11, 0.3),
        inset 0 0 22px rgba(0, 0, 0, 0.55),
        0 6px 18px rgba(0, 0, 0, 0.65),
        0 0 20px rgba(245, 158, 11, 0.35);
    animation: urGlow var(--ui-card-glow-ur, 3s) ease-in-out infinite;
}

/* 2026-06-26 反馈5：与SSR交换配色 */
@keyframes urGlow {
    0%, 100% { box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.5), 0 0 0 4px rgba(0, 0, 0, 0.7), 0 0 0 5px rgba(245, 158, 11, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.12), inset 0 0 0 4px rgba(0, 0, 0, 0.5), inset 0 0 0 5px rgba(245, 158, 11, 0.3), inset 0 0 22px rgba(0, 0, 0, 0.55), 0 6px 18px rgba(0, 0, 0, 0.65), 0 0 20px rgba(245, 158, 11, 0.35); }
    50% { box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.7), 0 0 0 4px rgba(0, 0, 0, 0.7), 0 0 0 5px rgba(245, 158, 11, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.2), inset 0 0 0 4px rgba(0, 0, 0, 0.5), inset 0 0 0 5px rgba(245, 158, 11, 0.4), inset 0 0 22px rgba(0, 0, 0, 0.55), 0 6px 18px rgba(0, 0, 0, 0.65), 0 0 30px rgba(245, 158, 11, 0.5); }
}

/* SSR 档位：粉紫边框 + 粉紫光晕（增强基础粉紫，4px加宽版）
   2026-06-26 反馈5：与UR交换配色 */
.card-item.tier-ssr .card-frame {
    border-color: #ec4899;
    box-shadow:
        0 0 0 1px rgba(236, 72, 153, 0.6),
        0 0 0 4px rgba(0, 0, 0, 0.7),
        0 0 0 5px rgba(236, 72, 153, 0.35),
        inset 0 0 0 1px rgba(255, 255, 255, 0.15),
        inset 0 0 0 4px rgba(0, 0, 0, 0.5),
        inset 0 0 0 5px rgba(236, 72, 153, 0.3),
        inset 0 0 22px rgba(0, 0, 0, 0.55),
        0 6px 18px rgba(0, 0, 0, 0.65),
        0 0 18px rgba(236, 72, 153, 0.3);
    animation: ssrGlow var(--ui-card-glow-ssr, 3s) ease-in-out infinite;
}

/* 2026-06-26 反馈5：与UR交换配色 */
@keyframes ssrGlow {
    0%, 100% { box-shadow: 0 0 0 1px rgba(236, 72, 153, 0.6), 0 0 0 4px rgba(0, 0, 0, 0.7), 0 0 0 5px rgba(236, 72, 153, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.15), inset 0 0 0 4px rgba(0, 0, 0, 0.5), inset 0 0 0 5px rgba(236, 72, 153, 0.3), inset 0 0 22px rgba(0, 0, 0, 0.55), 0 6px 18px rgba(0, 0, 0, 0.65), 0 0 18px rgba(236, 72, 153, 0.3); }
    50% { box-shadow: 0 0 0 1px rgba(236, 72, 153, 0.8), 0 0 0 4px rgba(0, 0, 0, 0.7), 0 0 0 5px rgba(236, 72, 153, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.2), inset 0 0 0 4px rgba(0, 0, 0, 0.5), inset 0 0 0 5px rgba(236, 72, 153, 0.4), inset 0 0 22px rgba(0, 0, 0, 0.55), 0 6px 18px rgba(0, 0, 0, 0.65), 0 0 28px rgba(236, 72, 153, 0.45); }
}

/* SR 档位：紫色边框 + 紫色光晕（4px加宽版） */
.card-item.tier-sr .card-frame {
    border-color: #a855f7;
    box-shadow:
        0 0 0 1px rgba(168, 85, 247, 0.5),
        0 0 0 4px rgba(0, 0, 0, 0.7),
        0 0 0 5px rgba(168, 85, 247, 0.3),
        inset 0 0 0 1px rgba(255, 255, 255, 0.12),
        inset 0 0 0 4px rgba(0, 0, 0, 0.5),
        inset 0 0 0 5px rgba(168, 85, 247, 0.25),
        inset 0 0 22px rgba(0, 0, 0, 0.55),
        0 6px 18px rgba(0, 0, 0, 0.65),
        0 0 15px rgba(168, 85, 247, 0.25);
}

/* R 档位：蓝色边框 + 蓝色光晕（4px加宽版） */
.card-item.tier-r .card-frame {
    border-color: #3b82f6;
    box-shadow:
        0 0 0 1px rgba(59, 130, 246, 0.5),
        0 0 0 4px rgba(0, 0, 0, 0.7),
        0 0 0 5px rgba(59, 130, 246, 0.3),
        inset 0 0 0 1px rgba(255, 255, 255, 0.12),
        inset 0 0 0 4px rgba(0, 0, 0, 0.5),
        inset 0 0 0 5px rgba(59, 130, 246, 0.25),
        inset 0 0 22px rgba(0, 0, 0, 0.55),
        0 6px 18px rgba(0, 0, 0, 0.65),
        0 0 12px rgba(59, 130, 246, 0.2);
}

/* N 档位：灰色边框 + 微弱光晕（普通卡牌） */
.card-item.tier-n .card-frame {
    border-color: #9ca3af;
    box-shadow:
        0 0 0 1px rgba(156, 163, 175, 0.4),
        0 0 0 4px rgba(0, 0, 0, 0.7),
        0 0 0 5px rgba(156, 163, 175, 0.2),
        inset 0 0 0 1px rgba(255, 255, 255, 0.08),
        inset 0 0 0 4px rgba(0, 0, 0, 0.5),
        inset 0 0 0 5px rgba(156, 163, 175, 0.15),
        inset 0 0 22px rgba(0, 0, 0, 0.55),
        0 6px 18px rgba(0, 0, 0, 0.65);
}

/* ── 详情页热度档位配色（与缩略图统一的多层box-shadow结构，4px加宽版） ── */

/* 详情页 UR 档位：金色边框 + 金色光晕
   2026-06-26 反馈5：与SSR交换配色 */
.card-detail.tier-ur .card-detail-image-wrap {
    border-color: #f59e0b;
    box-shadow:
        0 0 0 1px rgba(245, 158, 11, 0.5),
        0 0 0 4px rgba(0, 0, 0, 0.7),
        0 0 0 5px rgba(245, 158, 11, 0.3),
        inset 0 0 0 1px rgba(255, 255, 255, 0.12),
        inset 0 0 0 4px rgba(0, 0, 0, 0.5),
        inset 0 0 0 5px rgba(245, 158, 11, 0.3),
        inset 0 0 22px rgba(0, 0, 0, 0.55),
        0 6px 18px rgba(0, 0, 0, 0.65),
        0 0 20px rgba(245, 158, 11, 0.35);
}

/* 详情页 SSR 档位：粉紫边框 + 粉紫光晕
   2026-06-26 反馈5：与UR交换配色 */
.card-detail.tier-ssr .card-detail-image-wrap {
    border-color: #ec4899;
    box-shadow:
        0 0 0 1px rgba(236, 72, 153, 0.6),
        0 0 0 4px rgba(0, 0, 0, 0.7),
        0 0 0 5px rgba(236, 72, 153, 0.35),
        inset 0 0 0 1px rgba(255, 255, 255, 0.15),
        inset 0 0 0 4px rgba(0, 0, 0, 0.5),
        inset 0 0 0 5px rgba(236, 72, 153, 0.3),
        inset 0 0 22px rgba(0, 0, 0, 0.55),
        0 6px 18px rgba(0, 0, 0, 0.65),
        0 0 18px rgba(236, 72, 153, 0.3);
}

/* 详情页 SR 档位：紫色边框 + 紫色光晕 */
.card-detail.tier-sr .card-detail-image-wrap {
    border-color: #a855f7;
    box-shadow:
        0 0 0 1px rgba(168, 85, 247, 0.5),
        0 0 0 4px rgba(0, 0, 0, 0.7),
        0 0 0 5px rgba(168, 85, 247, 0.3),
        inset 0 0 0 1px rgba(255, 255, 255, 0.12),
        inset 0 0 0 4px rgba(0, 0, 0, 0.5),
        inset 0 0 0 5px rgba(168, 85, 247, 0.25),
        inset 0 0 22px rgba(0, 0, 0, 0.55),
        0 6px 18px rgba(0, 0, 0, 0.65),
        0 0 15px rgba(168, 85, 247, 0.25);
}

/* 详情页 R 档位：蓝色边框 + 蓝色光晕 */
.card-detail.tier-r .card-detail-image-wrap {
    border-color: #3b82f6;
    box-shadow:
        0 0 0 1px rgba(59, 130, 246, 0.5),
        0 0 0 4px rgba(0, 0, 0, 0.7),
        0 0 0 5px rgba(59, 130, 246, 0.3),
        inset 0 0 0 1px rgba(255, 255, 255, 0.12),
        inset 0 0 0 4px rgba(0, 0, 0, 0.5),
        inset 0 0 0 5px rgba(59, 130, 246, 0.25),
        inset 0 0 22px rgba(0, 0, 0, 0.55),
        0 6px 18px rgba(0, 0, 0, 0.65),
        0 0 12px rgba(59, 130, 246, 0.2);
}

/* ════════════════════════════════════════════════════════════
   调试面板 — UI调节 & 网站管理 标签页样式（2026-06-26 新增）
   ════════════════════════════════════════════════════════════ */

/* ── 补充按钮样式（调试面板操作栏使用）── */
.btn-success {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.4);
}
.btn-success:hover {
    background: rgba(34, 197, 94, 0.25);
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.3);
}
.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.4);
}
.btn-danger:hover {
    background: rgba(239, 68, 68, 0.25);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.3);
}

/* ── 警告按钮变体（2026-07-11 新增：愿望单移除等中等风险操作）── */
.btn-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.4);
}
.btn-warning:hover {
    background: rgba(245, 158, 11, 0.25);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.3);
}

/* ── UI 调节标签页 ── */
.debug-ui-wrap {
    padding: 4px 0 80px;
}
.debug-ui-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.debug-ui-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 4px;
}
.debug-ui-desc {
    font-size: 11px;
    color: var(--text-tertiary);
    line-height: 1.6;
}
.debug-ui-loading,
.debug-ui-error {
    padding: 24px;
    text-align: center;
    color: var(--text-tertiary);
    font-size: 12px;
}
.debug-ui-error { color: #ff6b6b; }

.debug-ui-group {
    margin-bottom: 20px;
    padding: 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
}
.debug-ui-group-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.debug-ui-group-icon {
    font-size: 15px;
    line-height: 1;
}

.debug-ui-param-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}
.debug-ui-param-row:last-child {
    border-bottom: none;
}
.debug-ui-param-label {
    flex: 1;
    min-width: 0;
}
.debug-ui-param-name {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
}
.debug-ui-param-desc {
    display: block;
    font-size: 10px;
    color: var(--text-tertiary);
    line-height: 1.4;
}
.debug-ui-param-control {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    width: 200px;
}
.debug-ui-slider {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}
.debug-ui-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--gold);
    cursor: pointer;
    box-shadow: 0 0 6px rgba(212, 175, 55, 0.5);
    transition: transform 0.15s ease;
}
.debug-ui-slider::-webkit-slider-thumb:hover {
    transform: scale(1.3);
}
.debug-ui-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--gold);
    cursor: pointer;
    border: none;
    box-shadow: 0 0 6px rgba(212, 175, 55, 0.5);
}
.debug-ui-value {
    min-width: 50px;
    text-align: right;
    font-size: 11px;
    font-family: 'Consolas', 'Monaco', monospace;
    color: var(--gold);
    font-weight: 600;
}

.debug-ui-action-bar {
    display: flex;
    gap: 8px;
    padding: 12px 0 0;
    margin-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    position: sticky;
    bottom: 0;
    background: rgba(10, 10, 20, 0.95);
    backdrop-filter: blur(8px);
}
.debug-ui-action-bar .btn {
    flex: 1;
    padding: 6px 10px;
    font-size: 12px;
}

/* ── 网站管理标签页 ── */
.debug-admin-wrap {
    padding: 4px 0 80px;
}
.debug-admin-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.debug-admin-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 4px;
}
.debug-admin-desc {
    font-size: 11px;
    color: var(--text-tertiary);
    line-height: 1.6;
}

.debug-admin-mode-bar {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
    padding: 4px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}
.debug-admin-mode-btn {
    flex: 1;
    padding: 8px 12px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--text-tertiary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}
.debug-admin-mode-btn:hover {
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.04);
}
.debug-admin-mode-btn.active {
    background: rgba(212, 175, 55, 0.15);
    color: var(--gold);
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.15);
}

.debug-admin-user-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.debug-admin-selector-label {
    font-size: 12px;
    color: var(--text-secondary);
    flex-shrink: 0;
}
.debug-admin-user-select {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    outline: none;
    cursor: pointer;
}
.debug-admin-user-select:focus {
    border-color: var(--gold);
}
.debug-admin-user-select option {
    background: var(--bg-darker);
}

.debug-admin-loading,
.debug-admin-error,
.debug-admin-hint {
    padding: 24px;
    text-align: center;
    color: var(--text-tertiary);
    font-size: 12px;
}
.debug-admin-error { color: #ff6b6b; }

.debug-admin-group {
    margin-bottom: 20px;
    padding: 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
}
.debug-admin-group-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.debug-admin-group-icon {
    font-size: 15px;
    line-height: 1;
}
.debug-admin-group-desc {
    font-size: 10px;
    color: var(--text-tertiary);
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    line-height: 1.4;
}

.debug-admin-perm-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}
.debug-admin-perm-row:last-child {
    border-bottom: none;
}
.debug-admin-perm-label {
    flex: 1;
    min-width: 0;
}
.debug-admin-perm-name {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary);
}
.debug-admin-perm-key {
    display: inline-block;
    font-size: 10px;
    font-family: 'Consolas', monospace;
    color: var(--text-tertiary);
    background: rgba(255, 255, 255, 0.04);
    padding: 1px 5px;
    border-radius: 3px;
    margin: 2px 0;
}
.debug-admin-perm-desc {
    display: block;
    font-size: 10px;
    color: var(--text-tertiary);
    line-height: 1.4;
    margin-top: 2px;
}
.debug-admin-perm-control {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}
.debug-admin-perm-btn {
    padding: 4px 10px;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-tertiary);
    font-size: 11px;
    cursor: pointer;
    transition: all var(--transition-fast);
}
.debug-admin-perm-btn:hover {
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-secondary);
}
.debug-admin-perm-btn.active.perm-green {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.5);
    color: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.2);
}
.debug-admin-perm-btn.active.perm-red {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
    color: #ef4444;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.2);
}
.debug-admin-perm-btn.active.perm-gold {
    background: rgba(212, 175, 55, 0.2);
    border-color: rgba(212, 175, 55, 0.5);
    color: var(--gold);
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.2);
}

/* 2026-06-28 新增：未配置权限项的灰色覆盖层效果（用户模式下"沿用全局"状态） */
.debug-admin-perm-row.perm-not-configured {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
    padding: 8px 8px;
    position: relative;
}
/* 未配置状态下，按钮的 active 状态显示为灰色（表示这是继承的全局值，非用户单独配置） */
.debug-admin-perm-row.perm-not-configured .debug-admin-perm-btn.active,
.debug-admin-perm-row.perm-not-configured .debug-admin-perm-btn.active.perm-green,
.debug-admin-perm-row.perm-not-configured .debug-admin-perm-btn.active.perm-red,
.debug-admin-perm-row.perm-not-configured .debug-admin-perm-btn.active.perm-gold {
    background: rgba(160, 160, 160, 0.15);
    border-color: rgba(160, 160, 160, 0.3);
    color: rgba(160, 160, 160, 0.8);
    box-shadow: none;
}
/* "沿用全局"徽章样式 */
.debug-admin-perm-inherited-badge {
    display: inline-block;
    font-size: 9px;
    color: rgba(160, 160, 160, 0.9);
    background: rgba(160, 160, 160, 0.15);
    border: 1px solid rgba(160, 160, 160, 0.3);
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 4px;
    vertical-align: middle;
}

.debug-admin-user-info {
    padding: 8px 12px;
    margin-bottom: 12px;
    border-radius: 6px;
    background: rgba(212, 175, 55, 0.06);
    border: 1px solid rgba(212, 175, 55, 0.15);
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.debug-admin-action-bar {
    display: flex;
    gap: 8px;
    padding: 12px 0 0;
    margin-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    position: sticky;
    bottom: 0;
    background: rgba(10, 10, 20, 0.95);
    backdrop-filter: blur(8px);
}
.debug-admin-action-bar .btn {
    flex: 1;
    padding: 6px 10px;
    font-size: 12px;
}

/* ── Toast 提示 ── */
.debug-toast {
    position: fixed;
    bottom: 70px;
    right: 16px;
    padding: 10px 18px;
    border-radius: 8px;
    background: rgba(15, 15, 30, 0.95);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: var(--text-primary);
    font-size: 13px;
    z-index: 10001;
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    animation: debugToastIn 0.3s ease, debugToastOut 0.3s ease 2.2s forwards;
    max-width: 320px;
}
@keyframes debugToastIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes debugToastOut {
    to { opacity: 0; transform: translateY(10px); }
}

/* ═══════════════════════════════════════════════════════════════
   卡组管理样式（2026-07-11 新增）
   确认对话框 + 卡片锁定标记 + 详情页操作按钮
   ═══════════════════════════════════════════════════════════════ */

/* ── 确认对话框 ── */
.confirm-dialog {
    max-width: 420px;
    padding: var(--space-xl);
    text-align: center;
}

.confirm-dialog-overlay {
    z-index: 1100;
}

.confirm-dialog-icon {
    font-size: 48px;
    line-height: 1;
    margin-bottom: var(--space-md);
}

.confirm-dialog-icon svg {
    width: 48px;
    height: 48px;
    fill: #ef4444;
}

.confirm-dialog-header {
    margin-bottom: var(--space-sm);
}

.confirm-dialog-title {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.confirm-dialog-card-info {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    margin: var(--space-md) 0;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
}

.confirm-dialog-card-img {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid var(--border-medium);
}

.confirm-dialog-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.confirm-dialog-card-img .card-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-card-bg);
    color: var(--text-tertiary);
    font-size: 20px;
}

.confirm-dialog-card-name {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
    text-align: left;
}

/* 卡牌名称行（名称+热度并排，热度右对齐） */
.confirm-dialog-card-name-row {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex: 1;
}

.confirm-dialog-card-heat {
    font-size: var(--text-sm);
    color: var(--text-tertiary);
    font-weight: 500;
    margin-left: auto;
    text-align: right;
    white-space: nowrap;
}

/* 双卡片对比布局（最爱切换确认） */
.confirm-dialog-compare {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    padding: var(--space-md);
    margin: var(--space-md) 0;
}

.confirm-dialog-compare-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.04);
}

.confirm-dialog-compare-card.old {
    opacity: 0.7;
}

.confirm-dialog-compare-card.new {
    border-color: var(--accent-gold, #d4af37);
    background: rgba(212, 175, 55, 0.08);
}

.confirm-dialog-compare-label {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.confirm-dialog-compare-name-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.confirm-dialog-compare-name {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
    text-align: left;
}

.confirm-dialog-compare-heat {
    font-size: var(--text-sm);
    color: var(--text-tertiary);
    font-weight: 500;
    margin-left: auto;
    text-align: right;
    white-space: nowrap;
}

/* 对比布局中的卡牌图片（紧凑尺寸，比普通确认框的48px小） */
.confirm-dialog-compare-img {
    width: 40px;
    height: 40px;
}

.confirm-dialog-compare-arrow {
    text-align: center;
    font-size: var(--text-xl);
    color: var(--text-tertiary);
    line-height: 1;
}

.confirm-dialog-message {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    line-height: 1.6;
    margin-bottom: var(--space-lg);
}

.confirm-dialog-message strong {
    color: var(--text-primary);
    font-weight: 600;
}

.confirm-dialog-actions {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
}

.confirm-dialog-btn {
    min-width: 120px;
    padding: var(--space-sm) var(--space-lg);
    font-size: var(--text-sm);
    font-weight: 600;
}

/* ── 卡片锁定标记（CardGrid） ── */
.card-locked {
    position: absolute;
    top: var(--space-xs);
    left: var(--space-xs);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(100, 116, 139, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    box-shadow: 0 0 10px rgba(100, 116, 139, 0.5);
}

.card-locked svg {
    width: 14px;
    height: 14px;
    fill: white;
}

/* ── 卡牌详情页：操作按钮区 ── */
.card-detail-actions {
    display: flex;
    gap: var(--space-sm);
    padding: var(--space-md) 0;
    flex-wrap: wrap;
    align-items: center;
}

.card-detail-actions .btn {
    padding: var(--space-sm) var(--space-md);
    font-size: var(--text-sm);
    font-weight: 600;
}

/* 操作按钮分组分隔符 */
.card-detail-action-divider {
    width: 1px;
    height: 24px;
    background: var(--border-subtle);
    margin: 0 var(--space-xs);
}

/* 锁定状态提示条 */
.card-detail-lock-notice {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: rgba(100, 116, 139, 0.1);
    border: 1px solid rgba(100, 116, 139, 0.3);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: var(--text-sm);
    margin-bottom: var(--space-md);
}

.card-detail-lock-notice svg {
    width: 16px;
    height: 16px;
    fill: var(--text-tertiary);
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════
   日志面板增强样式（2026-07-11）
   筛选工具栏 / 结构化日志条目 / 统计信息条
   ═══════════════════════════════════════════════════════════════ */

/* 工具栏允许换行，适配多筛选控件 */
.debug-logs-toolbar {
    flex-wrap: wrap;
}

/* 筛选标签（包裹 label + 控件） */
.debug-filter-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--text-tertiary);
    white-space: nowrap;
}

/* 类别下拉框（复用级别下拉框样式） */
.debug-log-category {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    outline: none;
    cursor: pointer;
}

.debug-log-category:focus {
    border-color: var(--gold);
}

.debug-log-category option {
    background: var(--bg-darker);
}

/* 用户ID 输入框 */
.debug-log-uid {
    width: 80px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    outline: none;
}

.debug-log-uid:focus {
    border-color: var(--gold);
}

.debug-log-uid::placeholder {
    color: var(--text-tertiary);
    opacity: 0.6;
}

/* 自动刷新开关 */
.debug-autorefresh-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--text-tertiary);
    cursor: pointer;
    user-select: none;
}

.debug-autorefresh-toggle input[type="checkbox"] {
    cursor: pointer;
    accent-color: var(--gold);
}

/* 统计信息条 */
.debug-log-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    margin-bottom: 8px;
    font-size: 11px;
    color: var(--text-tertiary);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
}

.debug-stat-sep {
    color: rgba(255, 255, 255, 0.15);
}

/* 日志条目主行（grid 布局：时间 / 级别 / 类别 / 消息） */
.debug-log-main-row {
    display: grid;
    grid-template-columns: 145px 60px 90px 1fr;
    gap: 8px;
    align-items: baseline;
}

/* 类别/操作标签 */
.debug-log-cat {
    color: #c792ea;
    font-size: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 元信息行（UID/GID/CID/IP） */
.debug-log-meta {
    color: var(--text-tertiary);
    font-size: 10px;
    padding-left: 153px;
    opacity: 0.7;
}
