/* ════════════════════════════════════════════════════════════
   页面级样式 — 主页、卡组页、成员页、搜索页
   ════════════════════════════════════════════════════════════ */

/* ── 主页 Hero（简约样式：无边框背景，仅光晕） ── */
.home-hero {
    position: relative;
    text-align: center;
    padding: var(--space-3xl) var(--space-3xl) var(--space-2xl);
    margin-bottom: var(--space-2xl);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.home-hero::before {
    content: '';
    position: absolute;
    top: 15%;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 60%;
    background: var(--gradient-hero-glow);
    z-index: -1;
    pointer-events: none;
    animation: heroBgPulse 4s ease-in-out infinite;
    opacity: 0.6;
    border-radius: 50%;
}

@keyframes heroBgPulse {
    0%, 100% { opacity: 0.6; transform: translateX(-50%) scale(1); }
    50% { opacity: 1; transform: translateX(-50%) scale(1.05); }
}

.home-hero-title {
    font-family: var(--font-display);
    font-size: var(--fs-title);
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--gold);
    margin-bottom: var(--space-md);
    letter-spacing: 2px;
    filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.25));
    text-align: center;
    line-height: 1.2;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-star {
    font-size: 0.6em;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: var(--space-xs);
    animation: logoPulse 3s ease-in-out infinite;
}

.home-hero-subtitle {
    font-size: var(--fs-body);
    color: var(--text-secondary);
    font-weight: 300;
    animation: revealUp 0.8s ease 0.2s backwards;
}

/* ════════════════════════════════════════════════════════════
   卡片溪流 — 多层视差无限滚动
   设计思路：3层卡片流从右向左滚动，不同速度/缩放/透明度形成视差
   ════════════════════════════════════════════════════════════ */

.card-stream-section {
    position: relative;
    overflow: hidden;
    padding: var(--space-lg) 0;
    margin-top: var(--space-xl);
    /* 左右渐隐遮罩 */
    mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}

.card-stream-row {
    display: flex;
    gap: 12px;
    padding: 6px 0;
    width: max-content;
    will-change: transform;
}

.card-stream-item {
    flex-shrink: 0;
    width: calc(120px * var(--stream-scale));
    aspect-ratio: 3 / 4;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    position: relative;
    opacity: var(--stream-opacity);
    transition: transform 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.card-stream-item:hover {
    transform: scale(1.1) translateY(-8px);
    opacity: 1 !important;
    z-index: 10;
    box-shadow:
        0 0 0 2px rgba(212, 175, 55, 0.6),
        0 8px 24px rgba(0, 0, 0, 0.6),
        0 0 20px rgba(212, 175, 55, 0.2);
}

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

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

.card-stream-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 6px 4px;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
    color: var(--text-primary);
    font-size: 10px;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.card-stream-item:hover .card-stream-name {
    opacity: 1;
    transform: translateY(0);
}

.card-stream-empty {
    text-align: center;
    color: var(--text-tertiary);
    padding: var(--space-2xl);
    font-size: var(--text-sm);
}

/* 溪流层差异化：layer-0（页面最上方，近景）大而清晰，layer-2（页面最下方，远景）小而模糊 */
.stream-layer-0 {
    --stream-speed: 65s;
    --stream-scale: 1;
    --stream-opacity: 0.95;
}

.stream-layer-1 {
    --stream-speed: 45s;
    --stream-scale: 0.8;
    --stream-opacity: 0.6;
}

.stream-layer-2 {
    --stream-speed: 25s;
    --stream-scale: 0.6;
    --stream-opacity: 0.35;
    filter: blur(var(--stream-blur, 1.5px));
}

/* 悬浮时暂停该行滚动，方便点击 */
.card-stream-row:hover {
    animation-play-state: paused;
}

/* ── 页面标题 ── */
.page-header {
    margin-bottom: var(--space-xl);
}

/* ── 卡组统计栏 ── */
.deck-stats-bar {
    display: flex;
    gap: var(--space-lg);
    padding: var(--space-md) var(--space-lg);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
}

.deck-stat-item {
    flex: 1;
    min-width: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
}

.deck-stat-label {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    letter-spacing: 1px;
}

.deck-stat-value {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.deck-stat-value.gold {
    color: var(--gold);
}

.deck-stat-num {
    color: var(--gold);
}

.deck-stat-sep {
    color: var(--text-tertiary);
    margin: 0 2px;
}

.deck-stat-cap {
    color: var(--text-secondary);
    font-size: var(--text-base);
    font-weight: 500;
}

.page-title {
    font-size: var(--text-3xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.page-subtitle {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

/* ── 卡组页工具栏 ── */
.deck-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
    gap: var(--space-md);
}

.deck-count {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.deck-count strong {
    color: var(--gold);
    font-family: var(--font-display);
    font-size: var(--text-lg);
}

/* ── 排序下拉 ── */
.sort-dropdown {
    position: relative;
}

.sort-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: var(--space-xs);
    background: var(--bg-dark);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    padding: var(--space-xs);
    min-width: 140px;
    z-index: 50;
    box-shadow: var(--shadow-lg);
}

.sort-option {
    display: block;
    width: 100%;
    padding: var(--space-xs) var(--space-md);
    text-align: left;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: var(--text-sm);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

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

.sort-option.active {
    color: var(--gold);
    background: rgba(212, 175, 55, 0.1);
}

/* ── 成员排名页 ── */
.members-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-xl);
}

.members-summary {
    display: flex;
    gap: var(--space-lg);
}

.members-summary-item {
    text-align: center;
}

.members-summary-value {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--gold);
}

.members-summary-label {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ── 搜索页 ── */
.search-container {
    max-width: 800px;
    margin: 0 auto;
}

.search-box {
    position: relative;
    margin-bottom: var(--space-xl);
}

.search-input {
    width: 100%;
    padding: var(--space-md) var(--space-lg) var(--space-md) 48px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-size: var(--fs-body);
    font-family: var(--font-body);
    outline: none;
    transition: all var(--transition-base);
}

.search-input:focus {
    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);
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

.search-input:focus + .search-icon,
.search-box:focus-within .search-icon {
    color: var(--gold);
    transform: translateY(-50%) scale(1.1);
    filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.6));
}

.search-input::placeholder {
    color: var(--text-tertiary);
}

.search-icon {
    position: absolute;
    left: var(--space-lg);
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    width: 20px;
    height: 20px;
    transition: all var(--transition-base);
}

.search-results-info {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
}

/* ── Toast 通知 ── */
.toast-container {
    position: fixed;
    bottom: var(--space-xl);
    right: var(--space-xl);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    pointer-events: none;
}

.toast {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
    color: var(--text-primary);
    font-size: var(--fs-body);
    box-shadow: var(--shadow-lg);
    pointer-events: auto;
    animation: toastEnter 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    max-width: 320px;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.toast.success { border-left: 3px solid #4caf50; }
.toast.error { border-left: 3px solid #f44336; }
.toast.info { border-left: 3px solid var(--gold); }

@keyframes toastEnter {
    from {
        opacity: 0;
        transform: translateX(120%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

/* ── 卡组页进入动画 ── */
.deck-toolbar {
    animation: revealUp 0.5s ease forwards;
}

.deck-toolbar + .card-grid {
    animation: pageEnter 0.6s ease 0.1s backwards;
}

/* ── 单卡鉴赏页 ── */
.detail-page {
    max-width: 1000px;
    margin: 0 auto;
    animation: pageEnter 0.5s ease forwards;
}

.detail-back {
    margin-bottom: var(--space-lg);
}

/* ════════════════════════════════════════════════════════════
   高分辨率布局适配（任务3）
   ════════════════════════════════════════════════════════════ */

/* ── 超宽屏（1920px+）：卡片网格 max 6 列 ── */
@media (min-width: 1920px) {
    .card-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: var(--space-lg);
    }

    .main-content {
        max-width: 1600px;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }
}

/* ── 标准屏（1366-1920px）：4-5 列 ── */
@media (min-width: 1366px) and (max-width: 1919px) {
    .card-grid {
        grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    }
}

/* ── 平板（768-1366px）：3 列 ── */
@media (min-width: 769px) and (max-width: 1365px) {
    .card-grid {
        grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
        gap: var(--space-md);
    }

    .main-content {
        padding: var(--space-xl);
    }
}

/* ── 响应式 ── */
@media (max-width: 768px) {
    .navbar {
        padding: var(--space-md);
        flex-wrap: wrap;
        gap: var(--space-sm);
    }

    /* 2026-06-26 反馈3：768px 适配导航栏布局 */
    .navbar-brand {
        order: 1;
    }

    .navbar-right {
        order: 2;
    }

    .navbar-nav {
        order: 3;
        width: 100%;
        justify-content: center;
        gap: var(--space-md);
    }

    .navbar-user {
        order: unset;
    }

    .main-content {
        padding: var(--space-lg);
    }

    .card-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: var(--space-md);
    }

    .card-detail,
    .card-detail.card-detail-enhanced {
        grid-template-columns: 1fr !important;
    }

    /* 2026-06-26 反馈2：移动端移除卡牌图片锚定（sticky），
       单列布局下 sticky 会导致图片固定在视口顶部阻碍查看数据 */
    .card-detail.card-detail-enhanced .card-detail-image-section {
        position: static !important;
        top: auto !important;
        animation: none !important;
    }

    .card-detail-image,
    .card-detail-image-wrap {
        max-width: 300px;
        margin: 0 auto;
    }

    .card-detail-meta {
        grid-template-columns: 1fr 1fr;
    }

    /* 2026-06-26 反馈2：移动端热度加成分解模块优化
       breakdown-row 竖向排列，避免窄屏拥挤 */
    .heat-breakdown .breakdown-row {
        flex-direction: column;
        gap: 2px;
        align-items: flex-start;
        padding: var(--space-xs) var(--space-sm);
    }

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

    .home-hero-title {
        font-size: var(--text-3xl);
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .card-detail,
    .card-detail.card-detail-enhanced {
        grid-template-columns: 1fr !important;
    }

    .card-detail-image-wrap {
        max-width: 260px;
        margin: 0 auto;
    }

    .card-detail-meta {
        grid-template-columns: 1fr;
    }

    .heat-breakdown .breakdown-row {
        flex-direction: column;
        gap: 2px;
    }

    /* 2026-06-26 反馈3：480px 适配导航栏布局 */
    .navbar-brand {
        order: 1;
        flex: 1;
    }

    .navbar-title {
        font-size: var(--text-base);
    }

    .card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-sm);
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    /* 2026-06-26 反馈2：移动端设置面板优化 */
    .settings-overlay {
        padding: var(--space-sm);
    }

    .settings-panel {
        max-width: 100%;
        max-height: 90dvh;
        max-height: 90vh;
        padding: var(--space-lg);
        border-radius: var(--radius-xl);
    }
}

/* ════════════════════════════════════════════════════════════
   认证页面样式 — 登录/注册/绑定
   ════════════════════════════════════════════════════════════ */

.auth-box {
    max-width: 440px;
    margin: var(--space-3xl) auto;
    padding: var(--space-2xl);
    background: rgba(20, 15, 35, 0.85);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}

.auth-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.auth-logo {
    font-size: 48px;
    margin-bottom: var(--space-sm);
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 12px rgba(212, 175, 55, 0.5));
    animation: heroTitleGlow 3s ease-in-out infinite;
}

.auth-title {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-xs);
    font-weight: 700;
    font-family: var(--font-display);
    letter-spacing: 2px;
    text-align: center;
    line-height: 1.2;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.auth-title span {
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-subtitle {
    font-size: var(--text-sm);
    color: var(--color-text-tertiary);
}

.auth-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    margin-bottom: var(--space-xl);
}

.auth-tab {
    flex: 1;
    text-align: center;
    padding: var(--space-sm) var(--space-md);
    border-radius: 8px;
    cursor: pointer;
    color: var(--color-text-tertiary);
    font-size: var(--text-sm);
    font-weight: 500;
    transition: all 0.3s ease;
}

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

.auth-tab.active {
    background: var(--gradient-gold-shine, linear-gradient(135deg, #d4af37, #f4d03f));
    color: #1a1a2e;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

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

.form-input {
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--color-text-primary);
    font-size: var(--text-base);
    transition: all 0.3s ease;
    outline: none;
}

.form-input:focus {
    border-color: var(--color-gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
    background: rgba(0, 0, 0, 0.4);
}

.form-input::placeholder {
    color: var(--color-text-tertiary);
}

.auth-error {
    color: #ff6b6b;
    font-size: var(--text-sm);
    min-height: 20px;
    text-align: center;
}

.auth-submit-btn {
    padding: 14px;
    background: var(--gradient-gold-shine, linear-gradient(135deg, #d4af37, #f4d03f));
    color: #1a1a2e;
    border: none;
    border-radius: 10px;
    font-size: var(--text-base);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: var(--space-sm);
}

.auth-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.auth-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.auth-footer {
    text-align: center;
    margin-top: var(--space-xl);
    color: var(--color-text-tertiary);
    font-size: var(--text-xs);
}

/* ── 记住密码/自动登录选项 ── */

.auth-options {
    display: flex;
    gap: var(--space-lg);
    margin-bottom: var(--space-md);
    flex-wrap: wrap;
}

.auth-option-label {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    cursor: pointer;
    font-size: var(--text-sm);
    color: var(--text-secondary);
    user-select: none;
}

.auth-option-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--gold, #d4af37);
}

/* ── 自动登录延迟弹窗 ── */

.autologin-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.autologin-card {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.95) 0%, rgba(18, 18, 31, 0.95) 100%);
    border: 1px solid var(--glass-border, rgba(212, 175, 55, 0.2));
    border-radius: var(--radius-xl, 16px);
    padding: var(--space-2xl, 32px) var(--space-3xl, 48px);
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: scaleIn 0.3s ease;
}

.autologin-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(212, 175, 55, 0.2);
    border-top-color: var(--gold, #d4af37);
    border-radius: 50%;
    margin: 0 auto var(--space-md, 16px);
    animation: spin 0.8s linear infinite;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.autologin-title {
    font-size: var(--text-lg, 18px);
    font-weight: 600;
    color: var(--gold, #d4af37);
    margin-bottom: var(--space-xs, 8px);
}

.autologin-countdown {
    font-size: var(--text-sm, 14px);
    color: var(--text-secondary, #a0a0b8);
    margin-bottom: var(--space-lg, 24px);
}

.autologin-cancel-btn {
    padding: 8px 24px;
    background: transparent;
    border: 1px solid var(--glass-border, rgba(212, 175, 55, 0.3));
    border-radius: var(--radius-md, 8px);
    color: var(--text-secondary, #a0a0b8);
    font-size: var(--text-sm, 14px);
    cursor: pointer;
    transition: all 0.2s ease;
}

.autologin-cancel-btn:hover {
    border-color: var(--gold, #d4af37);
    color: var(--gold, #d4af37);
}

/* ── 用户菜单（导航栏）── */

.nav-user-menu {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.nav-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(212, 175, 55, 0.4);
    object-fit: cover;
    background: #1a1a2e;
}

.nav-user-name {
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    font-weight: 500;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-logout-btn {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--color-text-tertiary);
    font-size: var(--text-xs);
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-logout-btn:hover {
    background: rgba(255, 107, 107, 0.15);
    border-color: rgba(255, 107, 107, 0.3);
    color: #ff6b6b;
}

/* ── 成员列表头像 ── */

.member-avatar-wrap {
    flex-shrink: 0;
}

.member-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(212, 175, 55, 0.3);
    object-fit: cover;
    flex-shrink: 0;
    background: #1a1a2e;
}

.member-avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #1a1a2e;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-gold);
    font-size: 18px;
    flex-shrink: 0;
}

.member-uid-sub {
    font-size: var(--text-xs);
    color: var(--color-text-tertiary);
    margin-top: 2px;
}

/* ── 响应式：认证页面 ── */

@media (max-width: 480px) {
    .auth-box {
        margin: var(--space-lg) var(--space-md);
        padding: var(--space-lg);
    }

    .nav-user-name {
        display: none;
    }
}

/* ════════════════════════════════════════════════════════════
   绑定码页面样式
   ════════════════════════════════════════════════════════════ */

.bind-code-display {
    text-align: center;
    padding: var(--space-xl) var(--space-lg);
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 12px;
    margin-bottom: var(--space-lg);
}

.bind-code-label {
    font-size: var(--text-sm);
    color: var(--color-text-tertiary);
    margin-bottom: var(--space-sm);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.bind-code-value {
    font-family: var(--font-display, 'Cinzel Decorative', serif);
    font-size: 42px;
    font-weight: 900;
    color: var(--color-gold, #d4af37);
    letter-spacing: 8px;
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
    margin-bottom: var(--space-sm);
    animation: heroTitleGlow 3s ease-in-out infinite;
}

.bind-code-expires {
    font-size: var(--text-xs);
    color: var(--color-text-tertiary);
}

.bind-instruction-box {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.bind-instruction-title {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-md);
}

.bind-steps {
    list-style: none;
    counter-reset: step;
    padding: 0;
}

.bind-steps li {
    counter-increment: step;
    padding: var(--space-xs) 0 var(--space-xs) 36px;
    position: relative;
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    line-height: 1.6;
}

.bind-steps li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 2px;
    width: 24px;
    height: 24px;
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--color-gold, #d4af37);
}

.bind-command {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 6px;
    color: var(--color-gold, #d4af37);
    font-family: 'Courier New', monospace;
    font-size: 13px;
    font-weight: 600;
    user-select: all;
}

.bind-status-area {
    text-align: center;
    padding: var(--space-md);
    margin-bottom: var(--space-lg);
}

.bind-waiting {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    color: var(--color-text-tertiary);
    font-size: var(--text-sm);
}

.bind-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(212, 175, 55, 0.2);
    border-top-color: var(--color-gold, #d4af37);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.bind-refresh-btn {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.bind-refresh-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(212, 175, 55, 0.3);
}

/* ════════════════════════════════════════════════════════════
   阶段5：响应式适配增强
   — 折叠屏、安全区域、触控优化、CSS容器查询
   ════════════════════════════════════════════════════════════ */

/* ── 安全区域适配（刘海屏/底部横条） ── */
@supports (padding: env(safe-area-inset-top)) {
    .navbar {
        padding-top: calc(var(--space-md) + env(safe-area-inset-top));
        padding-left: calc(var(--space-2xl) + env(safe-area-inset-left));
        padding-right: calc(var(--space-2xl) + env(safe-area-inset-right));
    }

    .main-content {
        padding-bottom: calc(var(--space-2xl) + env(safe-area-inset-bottom));
        padding-left: calc(var(--space-2xl) + env(safe-area-inset-left));
        padding-right: calc(var(--space-2xl) + env(safe-area-inset-right));
    }

    .toast-container {
        bottom: calc(var(--space-xl) + env(safe-area-inset-bottom));
        right: calc(var(--space-xl) + env(safe-area-inset-right));
    }

    .debug-toggle-btn {
        bottom: calc(16px + env(safe-area-inset-bottom));
        right: calc(16px + env(safe-area-inset-right));
    }
}

/* ── 触控设备优化（粗指针/无 hover） ── */
@media (hover: none) and (pointer: coarse) {
    /* 卡片网格：增大触控间距 */
    .card-grid {
        gap: var(--space-md);
    }

    /* 卡片：禁用3D倾斜（触控不友好），改用简单缩放 */
    .card-item:hover {
        transform: none;
    }

    .card-item:active {
        transform: scale(0.97);
        transition: transform 0.1s ease;
    }

    /* 筛选chip：增大触控区域 */
    .filter-chip {
        padding: 8px 18px;
        min-height: 36px;
    }

    /* 导航项：增大触控区域 */
    .nav-item {
        padding: var(--space-sm) var(--space-md);
        min-height: 36px;
    }

    /* 成员列表：增大触控区域 */
    .member-item {
        padding: var(--space-lg);
        min-height: 56px;
    }

    /* 按钮：增大触控区域 */
    .btn {
        padding: var(--space-md) var(--space-xl);
        min-height: 40px;
    }

    .back-button {
        padding: var(--space-sm) var(--space-lg);
        min-height: 36px;
    }
}

/* ── 精细指针设备（鼠标） ── */
@media (hover: hover) and (pointer: fine) {
    /* 仅鼠标设备保留3D倾斜效果 */
    .card-item:hover {
        z-index: 10;
    }
}

/* ── 折叠屏适配（Samsung Z Fold 系列） ── */

/* 折叠屏竖屏内屏（窄屏，约 360px 宽） */
@media (width <= 380px) {
    .navbar {
        padding: var(--space-sm) var(--space-md);
    }

    .navbar-title {
        font-size: var(--text-sm);
    }

    .navbar-nav {
        gap: var(--space-sm);
    }

    .nav-item {
        font-size: var(--text-xs);
        padding: var(--space-xs);
    }

    .main-content {
        padding: var(--space-md);
    }

    .card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-sm);
    }

    .home-hero-title {
        font-size: var(--text-2xl);
    }

    .home-hero-subtitle {
        font-size: var(--text-sm);
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-value {
        font-size: var(--text-2xl);
    }

    /* 详情页：竖屏折叠屏单列布局 */
    .card-detail.card-detail-enhanced {
        grid-template-columns: 1fr;
    }

    .card-detail-image-wrap {
        max-width: 280px;
        margin: 0 auto;
    }

    .card-detail-meta {
        grid-template-columns: 1fr;
    }

    .search-input {
        font-size: 16px; /* 防止 iOS 自动缩放 */
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-chips {
        justify-content: center;
    }
}

/* 折叠屏横屏内屏（宽屏，约 880-920px） */
@media (min-width: 880px) and (max-width: 920px) and (orientation: landscape) {
    .card-grid {
        grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    }

    .card-detail.card-detail-enhanced {
        grid-template-columns: minmax(240px, 300px) 1fr;
    }

    /* 横屏折叠屏：导航栏紧凑模式 */
    .navbar {
        padding: var(--space-xs) var(--space-lg);
    }
}

/* ── 超窄屏（< 360px，如折叠屏外屏） ── */
@media (max-width: 359px) {
    .navbar-brand {
        gap: 4px;
    }

    .navbar-logo {
        font-size: var(--text-base);
    }

    .navbar-title {
        font-size: var(--text-xs);
        letter-spacing: 0;
    }

    .card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-xs);
    }

    .card-name {
        font-size: 0.75rem;
    }

    .card-heat {
        font-size: 0.65rem;
    }

    .affix-badge {
        width: 18px;
        height: 18px;
        font-size: 0.6rem;
    }

    .card-type-badge {
        font-size: 0.6rem;
        padding: 1px 5px;
    }
}

/* ── 横屏手机优化 ── */
@media (max-height: 500px) and (orientation: landscape) {
    .navbar {
        padding: var(--space-xs) var(--space-xl);
    }

    .main-content {
        padding: var(--space-md) var(--space-xl);
        min-height: auto;
    }

    .home-hero {
        padding: var(--space-lg) var(--space-xl);
        margin-bottom: var(--space-lg);
    }

    .home-hero-title {
        font-size: var(--text-2xl);
    }

    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        margin-bottom: var(--space-lg);
    }
}

/* ── CSS 容器查询（现代浏览器渐进增强） ── */
/* 卡片网格容器查询：根据容器宽度自动调整列数 */
@supports (container-type: inline-size) {
    .card-grid {
        container-type: inline-size;
        container-name: card-grid;
    }

    /* 容器宽度 < 360px：2列 */
    @container card-grid (max-width: 359px) {
        .card-grid {
            grid-template-columns: repeat(2, 1fr);
        }
    }

    /* 容器宽度 360-600px：2-3列 */
    @container card-grid (min-width: 360px) and (max-width: 600px) {
        .card-grid {
            grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        }
    }

    /* 容器宽度 600-900px：3-4列 */
    @container card-grid (min-width: 600px) and (max-width: 900px) {
        .card-grid {
            grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
        }
    }
}

/* ── 详情页容器查询 ── */
@supports (container-type: inline-size) {
    .card-detail.card-detail-enhanced {
        container-type: inline-size;
        container-name: card-detail;
    }

    @container card-detail (max-width: 640px) {
        .card-detail.card-detail-enhanced {
            grid-template-columns: 1fr;
        }

        .card-detail-image-wrap {
            max-width: 300px;
            margin: 0 auto;
        }
    }
}

/* ── 打印样式 ── */
@media print {
    .navbar,
    .starfield,
    .particles,
    .debug-toggle-btn,
    .toast-container,
    .modal-container {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    body::before,
    body::after {
        display: none;
    }

    .main-content {
        max-width: 100%;
        padding: 0;
    }

    .card-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .card-frame {
        box-shadow: none;
        border: 1px solid #ccc;
    }

    .card-overlay {
        background: rgba(255, 255, 255, 0.9);
    }

    .card-name,
    .card-heat {
        color: black;
        text-shadow: none;
    }
}

/* ════════════════════════════════════════════════════════════
   调试页面样式（管理员专用，反馈7/8）
   ════════════════════════════════════════════════════════════ */

.debug-page {
    min-height: calc(100vh - 60px);
    padding: var(--space-xl) var(--space-lg);
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.debug-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.debug-header h1 {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    color: var(--gold);
    margin: 0;
}

.admin-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-md);
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    color: #f87171;
    font-weight: 600;
}

/* ── 标签栏 ── */
.debug-tabs {
    display: flex;
    gap: var(--space-xs);
    padding: var(--space-xs);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    width: fit-content;
}

.debug-tab {
    padding: var(--space-sm) var(--space-xl);
    border-radius: var(--radius-md);
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
    font-family: var(--font-body);
}

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

.debug-tab.active {
    background: var(--gradient-gold);
    color: #000;
    font-weight: 600;
    box-shadow: var(--shadow-gold);
}

/* ── 内容区 ── */
.debug-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

/* ── 控制栏 ── */
.debug-control-bar {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    flex-wrap: wrap;
    padding: var(--space-md) var(--space-lg);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
}

.debug-btn-group {
    display: flex;
    gap: var(--space-xs);
    flex-wrap: wrap;
}

.debug-btn {
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-medium);
    background: var(--bg-medium);
    color: var(--text-secondary);
    font-size: var(--text-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-body);
}

.debug-btn:hover {
    border-color: var(--gold);
    color: var(--text-primary);
}

.debug-btn.active {
    background: var(--gold);
    color: #000;
    border-color: var(--gold);
    font-weight: 600;
}

.debug-checkbox-group {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
    align-items: center;
}

.debug-checkbox-group label {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

.debug-checkbox-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--gold);
}

/* ── 卡组调试 ── */
.debug-pool-area {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.debug-tier-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.debug-tier-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    border-left: 4px solid var(--gold);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.03);
}

.debug-tier-name {
    font-size: var(--text-lg);
    font-weight: 700;
    font-family: var(--font-display);
}

.debug-tier-count {
    font-size: var(--text-sm);
    color: var(--text-tertiary);
    padding: var(--space-xs) var(--space-sm);
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-full);
}

.debug-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: var(--space-md);
}

.debug-load-more-btn {
    align-self: center;
    padding: var(--space-sm) var(--space-xl);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-md);
    background: rgba(212, 175, 55, 0.08);
    color: var(--gold);
    font-size: var(--text-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.debug-load-more-btn:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--gold);
}

/* ── 抽卡调试 ── */
/* 2026-06-27 反馈B：三列布局（左调试工具 + 中抽卡舞台 + 右卡片记录）
   2026-06-27 反馈4：21:9超宽屏适配，拓宽左右两列
   2026-06-27 反馈3：进一步拓宽至420px，充分利用超宽屏两侧空间
   2026-06-27 反馈：新增 --debug-layout-gap CSS 变量，支持面板滑块实时调整间距
   2026-06-27 修复：grid 1fr 中间列会自动收缩吸收 gap 变化，导致滑块拖动视觉无变化。
   改为 flex 布局，三列固定宽度，gap 变化时由 justify-content:center 居中、两侧空白吸收，
   滑块拖动可立即看到列间距变化。 */
.debug-gacha-layout {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: var(--debug-layout-gap, var(--space-2xl));
    width: 100%;
    max-width: 2560px;
    margin: 0 auto;
}

/* 三列固定宽度，flex-shrink:0 确保不被压缩，gap 变化直接生效 */
.debug-gacha-layout > .debug-gacha-panel {
    width: 420px;
    flex-shrink: 0;
}
.debug-gacha-layout > .debug-gacha-stage {
    width: 480px;
    flex-shrink: 0;
}
.debug-gacha-layout > .debug-gacha-records {
    width: 420px;
    flex-shrink: 0;
}

.debug-gacha-panel {
    padding: var(--space-lg);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    position: sticky;
    top: 80px;
}

.debug-panel-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.debug-section-title {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: var(--space-xs);
}

.debug-radio-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.debug-radio-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

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

.debug-input,
.debug-select {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-medium);
    background: var(--bg-medium);
    color: var(--text-primary);
    font-size: var(--text-sm);
    font-family: var(--font-body);
    outline: none;
    transition: border-color var(--transition-fast);
}

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

.debug-hint {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    line-height: 1.5;
}

/* ── 布局间距滑块（2026-06-27 反馈）── */
.debug-slider-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    width: 100%;
}

.debug-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: var(--radius-full);
    background: var(--bg-medium);
    border: 1px solid var(--border-medium);
    outline: none;
    cursor: pointer;
}

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

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

.debug-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--gold);
    border: 2px solid var(--bg-dark);
    cursor: pointer;
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
}

.debug-slider-value {
    min-width: 48px;
    text-align: right;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--gold);
    font-variant-numeric: tabular-nums;
}

/* 2026-06-27 诊断显示区：用于定位布局间距滑块失效根因 */
.debug-slider-diag {
    margin-top: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-md);
    font-size: var(--text-xs);
    font-family: ui-monospace, "SF Mono", Consolas, monospace;
    color: var(--text-tertiary);
    word-break: break-all;
    line-height: 1.5;
}

.debug-slider-diag.diag-ok {
    color: #4ade80;
    border-color: rgba(74, 222, 128, 0.4);
    background: rgba(74, 222, 128, 0.08);
}

.debug-slider-diag.diag-error {
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.4);
    background: rgba(248, 113, 113, 0.08);
}

.debug-card-type-hint {
    padding: var(--space-xs) var(--space-sm);
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-md);
    font-size: var(--text-xs);
}

.debug-hint-label {
    color: var(--text-tertiary);
}

.debug-type-name {
    color: var(--gold);
    font-weight: 600;
}

.debug-draw-btn {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    border: none;
    border-radius: var(--radius-lg);
    background: var(--gradient-gold);
    color: #000;
    font-size: var(--text-base);
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-gold);
}

/* ═══════════════════════════════════════════════════════════════
   2026-07-13 交换功能样式
   ═══════════════════════════════════════════════════════════════ */

/* ── 卡牌详情页顶部操作栏 ── */
.card-detail-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
    flex-wrap: wrap;
}

.card-detail-top-bar .back-button {
    margin: 0;
}

/* 发起交换按钮 */
.trade-init-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    font-size: var(--text-sm);
    font-weight: 600;
    border-radius: var(--radius-md);
    background: var(--gradient-gold);
    color: #000;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-gold);
}

.trade-init-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.4);
}

/* ── 消息中心页面 ── */
.trade-page {
    max-width: 900px;
    margin: 0 auto;
    padding: var(--space-lg) var(--space-md);
}

.trade-tab-bar {
    display: flex;
    gap: var(--space-xs);
    margin-bottom: var(--space-lg);
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0;
}

.trade-tab {
    padding: 10px 24px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-size: var(--text-base);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-bottom: -1px;
}

.trade-tab:hover {
    color: var(--text-primary);
}

.trade-tab.active {
    color: var(--gold);
    border-bottom-color: var(--gold);
}

.trade-content {
    min-height: 300px;
}

.trade-loading {
    text-align: center;
    padding: var(--space-xl);
    color: var(--text-tertiary);
}

/* ── 交换请求卡片 ── */
.trade-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.trade-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: all var(--transition-fast);
}

.trade-card:hover {
    border-color: rgba(212, 175, 55, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.trade-card.pending {
    border-left: 3px solid var(--gold);
}

.trade-card.accepted {
    border-left: 3px solid #10b981;
    opacity: 0.85;
}

.trade-card.rejected {
    border-left: 3px solid var(--danger, #ef4444);
    opacity: 0.7;
}

.trade-card.cancelled {
    border-left: 3px solid var(--text-tertiary);
    opacity: 0.7;
}

.trade-card.expired {
    border-left: 3px solid #f59e0b;
    opacity: 0.7;
}

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

.trade-status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-weight: 600;
}

.trade-status-badge.pending {
    background: rgba(212, 175, 55, 0.15);
    color: var(--gold);
}

.trade-status-badge.accepted {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.trade-status-badge.rejected {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger, #ef4444);
}

.trade-status-badge.cancelled {
    background: rgba(120, 120, 120, 0.15);
    color: var(--text-tertiary);
}

.trade-status-badge.expired {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.trade-card-time {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
}

/* ── 交换卡片主体（双方卡牌展示） ── */
.trade-card-body {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.trade-char-slot {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: var(--space-sm);
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
}

/* 2026-07-12 新增：卡牌缩略图可点击跳转详情页 */
.trade-char-slot.clickable {
    cursor: pointer;
    transition: border-color var(--transition-fast), background var(--transition-fast);
}

.trade-char-slot.clickable:hover {
    border-color: rgba(212, 175, 55, 0.5);
    background: rgba(212, 175, 55, 0.08);
}

/* 2026-07-12 统一：卡牌缩略图使用 3:4 比例，与卡组一致 */
.trade-char-img-wrap {
    width: 80px;
    height: 107px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
}

.trade-char-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.trade-char-img-placeholder {
    color: var(--gold);
    font-size: 24px;
    opacity: 0.5;
}

.trade-char-name {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.trade-char-heat {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

/* 2026-07-13 Bug 1：基础热度 + 有效热度双行显示 */
.trade-char-heat .heat-base {
    color: var(--text-tertiary);
}

.trade-char-heat .heat-effective {
    color: var(--gold);
    font-weight: 600;
}

/* 2026-07-13 Bug 4：发件箱未读红点 */
.trade-unread-dot {
    color: #ef4444;
    font-size: 14px;
    animation: pulse-dot 1.5s ease-in-out infinite;
    margin-left: 4px;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* 2026-07-13 Bug 4：未读卡片高亮边框 */
.trade-card.unread {
    border-color: rgba(239, 68, 68, 0.4);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.15);
}

.trade-char-label {
    font-size: var(--text-xs);
    color: var(--gold);
    font-weight: 500;
    padding: 2px 8px;
    background: rgba(212, 175, 55, 0.1);
    border-radius: var(--radius-sm);
}

.trade-exchange-icon {
    font-size: 24px;
    color: var(--gold);
    flex-shrink: 0;
}

/* ── 交换卡片操作按钮 ── */
.trade-card-actions {
    display: flex;
    gap: var(--space-sm);
    justify-content: flex-end;
    padding-top: var(--space-sm);
    border-top: 1px solid var(--glass-border);
}

.trade-btn-accept,
.trade-btn-reject,
.trade-btn-cancel {
    padding: 6px 18px;
    font-size: var(--text-sm);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

/* ── 发起交换弹窗 ── */
.trade-init-overlay {
    z-index: 10000;
}

.trade-init-modal {
    background: var(--bg-secondary, #1a1a24);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.trade-init-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--glass-border);
}

.trade-init-title {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--gold);
    margin: 0;
}

.modal-close-btn {
    background: none;
    border: none;
    color: var(--text-tertiary);
    font-size: 24px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color var(--transition-fast);
}

.modal-close-btn:hover {
    color: var(--danger, #ef4444);
}

.trade-init-target-section {
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--glass-border);
}

.trade-init-target-label {
    font-size: var(--text-sm);
    color: var(--text-tertiary);
    margin-bottom: var(--space-sm);
}

.trade-init-target-card {
    display: flex;
    justify-content: center;
}

.trade-mini-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: var(--space-sm);
    background: rgba(212, 175, 55, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: var(--radius-md);
    min-width: 120px;
}

/* 2026-07-12 统一：卡牌缩略图使用 3:4 比例 + center top 定位，与卡组一致 */
.trade-mini-card-img {
    width: 90px;
    height: 120px;
    object-fit: cover;
    object-position: center top;
    border-radius: var(--radius-sm);
}

.trade-mini-card-placeholder {
    width: 90px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    font-size: 24px;
    opacity: 0.5;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-sm);
}

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

.trade-mini-card-heat {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
}

.trade-init-my-section {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: var(--space-md) var(--space-lg);
}

.trade-init-my-label {
    font-size: var(--text-sm);
    color: var(--text-tertiary);
    margin-bottom: var(--space-sm);
}

.trade-init-loading {
    text-align: center;
    padding: var(--space-xl);
    color: var(--text-tertiary);
}

.trade-init-grid-container {
    flex: 1;
    overflow-y: auto;
    max-height: 400px;
}

.trade-init-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: var(--space-sm);
    padding: var(--space-xs);
    /* 重置 .card-grid 的负 margin 和 contain，避免弹窗内裁切 */
    margin: 0;
    contain: none;
}

.trade-init-card-option {
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
}

.trade-init-card-option:hover {
    transform: translateY(-2px);
}

.trade-init-card-option.selected {
    border-color: var(--gold);
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.3);
}

.trade-init-card-option.selected::after {
    content: "✓";
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    background: var(--gold);
    color: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    z-index: 1;
}

.trade-init-footer {
    padding: var(--space-md) var(--space-lg);
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: flex-end;
}

.trade-init-confirm-btn {
    min-width: 120px;
}

.trade-init-confirm-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ═══════════════════════════════════════════════════════════════
   2026-07-13 新增：历史记录标签页样式
   ═══════════════════════════════════════════════════════════════ */

/* ── 卡片头部（方向标识 + 状态标签 + 时间） ── */
.trade-card-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    flex-wrap: wrap;
}

/* ── 方向标识（历史记录专用） ── */
.trade-direction {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-weight: 600;
}

.trade-direction.sent {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.trade-direction.received {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
}

.trade-direction-icon {
    font-size: 14px;
    line-height: 1;
}

/* ── 对方信息（历史记录专用） ── */
.trade-other-info {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    background: rgba(0, 0, 0, 0.15);
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
}

.trade-other-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--glass-border);
}

.trade-other-avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold);
    font-size: 14px;
    border: 1px solid var(--glass-border);
}

.trade-other-name {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    font-weight: 500;
}

/* ── 历史记录筛选栏 ── */
.trade-history-filter {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-bottom: var(--space-md);
    padding: var(--space-sm);
    background: rgba(0, 0, 0, 0.15);
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
}

.trade-filter-btn {
    padding: 5px 14px;
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

.trade-filter-btn.active {
    color: var(--gold);
    background: rgba(212, 175, 55, 0.12);
    border-color: rgba(212, 175, 55, 0.3);
}

/* ── 历史记录总数统计 ── */
.trade-history-count {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    margin-bottom: var(--space-md);
    padding-left: var(--space-xs);
}

/* ── 历史记录列表 ── */
.trade-history-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

/* ── 加载更多按钮 ── */
.trade-load-more {
    display: block;
    margin: var(--space-lg) auto;
    padding: 8px 24px;
    min-width: 140px;
}

/* ── 响应式适配 ── */
@media (max-width: 640px) {
    .trade-card-body {
        flex-direction: column;
    }

    .trade-exchange-icon {
        transform: rotate(90deg);
    }

    .trade-init-modal {
        width: 95%;
        max-height: 90vh;
    }

    .trade-init-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }

    .trade-char-img-wrap {
        width: 60px;
        height: 80px;
    }
}

.debug-draw-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(212, 175, 55, 0.3);
}

.debug-draw-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.debug-clear-btn {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--text-secondary);
    font-size: var(--text-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.debug-clear-btn:hover {
    border-color: #f87171;
    color: #f87171;
}

.debug-gacha-stage {
    /* 2026-06-27 反馈3：完整复刻抽卡界面所需的 CSS 变量
       这些变量原本定义在 .gacha-page 上，调试页面缺少该外层容器导致
       召唤阵尺寸为0、卡片显示为狭长长条。此处继承定义以确保子元素正确继承。 */
    --summon-size: clamp(280px, 40vw, 420px);
    --summon-color: var(--gold);
    --glow-color: var(--gold);
    --glow-shadow: rgba(212, 175, 55, 0.6);
    --particle-color: #fde68a;
    --card-width: clamp(240px, 30vw, 320px);
    --card-aspect: 3 / 4;

    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    min-width: 0;
    /* 中列舞台居中对齐，避免在小宽度时贴左 */
    align-items: center;
}

/* 调试模式下的召唤阵区域：覆盖 gacha.css 中的 margin:auto 0，
   避免在舞台容器中产生不必要的垂直居中空白 */
.debug-summon-area {
    margin: 0 auto;
    /* 限制最大尺寸，避免在调试舞台中过大 */
    max-width: var(--summon-size);
}

/* 2026-06-27 反馈B：右列记录区独立成列，带粘性定位和滚动 */
.debug-gacha-records {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    min-width: 0;
}

.debug-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: var(--text-sm);
    color: var(--text-tertiary);
}

.debug-empty {
    text-align: center;
    padding: var(--space-3xl);
    color: var(--text-tertiary);
    font-size: var(--text-sm);
}

.debug-loading {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--text-tertiary);
    font-size: var(--text-sm);
}

/* ── 抽卡调试结果卡片淡入动画 ── */
@keyframes debugCardFadeIn {
    from {
        opacity: 0;
        transform: scale(0.85);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.debug-records-grid .card-item {
    animation: debugCardFadeIn 0.3s ease-out forwards;
}

/* ── 响应式 ── */
/* 2026-06-27 反馈B：三列布局在中等屏幕降级为两列，小屏降级为单列
   2026-06-27 反馈4：适配21:9超宽屏，拓宽左右两列至420px
   2026-06-27 修复：flex 布局下，响应式通过调整列宽和 flex-wrap 实现 */
@media (max-width: 1600px) {
    .debug-gacha-layout > .debug-gacha-panel,
    .debug-gacha-layout > .debug-gacha-records {
        width: 380px;
    }
    .debug-gacha-layout > .debug-gacha-stage {
        width: 440px;
    }
}

@media (max-width: 1400px) {
    .debug-gacha-layout > .debug-gacha-panel,
    .debug-gacha-layout > .debug-gacha-records {
        width: 340px;
    }
    .debug-gacha-layout > .debug-gacha-stage {
        width: 400px;
    }
}

@media (max-width: 1200px) {
    /* 中等屏幕：两列布局，记录区换行到下方 */
    .debug-gacha-layout {
        flex-wrap: wrap;
        justify-content: center;
    }
    .debug-gacha-layout > .debug-gacha-panel {
        width: 280px;
    }
    .debug-gacha-layout > .debug-gacha-stage {
        flex: 1 1 400px;
        width: auto;
    }
    .debug-gacha-layout > .debug-gacha-records {
        width: 100%;
        flex: 1 1 100%;
        position: static;
        max-height: none;
    }
}

@media (max-width: 768px) {
    .debug-gacha-layout {
        flex-direction: column;
        align-items: center;
    }
    .debug-gacha-layout > .debug-gacha-panel,
    .debug-gacha-layout > .debug-gacha-stage,
    .debug-gacha-layout > .debug-gacha-records {
        width: 100%;
        max-width: 480px;
    }
    .debug-gacha-panel {
        position: static;
    }

    .debug-card-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

/* ════════════════════════════════════════════════════════════
   羁绊分组视图样式
   ════════════════════════════════════════════════════════════ */

/* ── 羁绊组区块 ── */
.bond-group-section {
    margin-bottom: var(--space-2xl);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    overflow: hidden;
}

/* ── 组头部 ── */
.bond-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-sm);
    padding-bottom: var(--space-md);
    margin-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-light);
}

.bond-group-title {
    display: flex;
    align-items: baseline;
    gap: var(--space-sm);
}

.bond-group-name {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 0.5px;
}

.bond-group-count {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

.bond-group-stats {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.bond-group-boost {
    font-size: var(--text-sm);
    font-weight: 700;
    color: #4ade80;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.bond-group-boost.muted {
    color: var(--text-tertiary);
    background: rgba(128, 128, 128, 0.1);
    border-color: rgba(128, 128, 128, 0.2);
}

.bond-group-heat {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

.bond-group-heat::before {
    content: '🔥 ';
    font-size: var(--text-xs);
}

/* ── 组内卡牌网格 ── */
.bond-group-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: var(--space-md);
}

/* ── 缺失卡牌灰色占位 ── */
.card-placeholder .card-frame {
    border-color: var(--border-medium);
    opacity: 0.85;
}

.card-placeholder-overlay {
    position: absolute;
    inset: 0;
    background: rgba(40, 40, 40, 0.55);
    z-index: 3;
    pointer-events: none;
}

/* 缺失卡牌的图片去饱和 */
.card-placeholder .card-image {
    filter: grayscale(1) brightness(0.6);
}

/* 缺失卡牌的名称变暗 */
.card-placeholder .card-name {
    color: var(--text-tertiary);
}

.card-placeholder .card-heat {
    color: var(--text-tertiary);
}

/* ── 响应式 ── */
@media (max-width: 640px) {
    .bond-group-section {
        padding: var(--space-md);
    }

    .bond-group-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .bond-group-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: var(--space-sm);
    }
}

/* 2026-07-13 调试面板重构：AdminPage 和 DevTestPage 样式 */
/* ═══════════════════════════════════════════════════════════════
   SubTask 9.1：AdminPage 样式（.admin-page-* 系列）
   来源：AdminPage.js — 权限管理 / 系统状态 / 调试命令 / 缓存管理
   设计：复用 .debug-* 系列视觉语言，保持与 DebugPanel 风格一致
   ═══════════════════════════════════════════════════════════════ */

/* ── 页面容器与标题 ── */
.admin-page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-lg) var(--space-md) var(--space-2xl);
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.admin-page-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.admin-page-header h1 {
    margin: 0;
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-display);
}

/* ── 标签栏 ── */
.admin-page-tabs {
    display: flex;
    gap: var(--space-xs);
    padding: var(--space-xs);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    width: fit-content;
    flex-wrap: wrap;
}

.admin-page-tab {
    padding: var(--space-sm) var(--space-xl);
    border-radius: var(--radius-md);
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
    font-family: var(--font-body);
}

.admin-page-tab:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.admin-page-tab.active {
    background: var(--gradient-gold);
    color: #000;
    font-weight: 600;
    box-shadow: var(--shadow-gold);
}

/* ── 内容区 ── */
.admin-page-content {
    min-height: 300px;
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

/* ── 通用：区块头部（标题 + 描述）── */
.admin-page-section-header {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--border-subtle);
}

.admin-page-section-title {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-display);
}

.admin-page-section-desc {
    font-size: var(--text-sm);
    color: var(--text-tertiary);
    line-height: 1.6;
}

/* ── 通用：加载/错误/提示 ── */
.admin-page-loading,
.admin-page-hint {
    text-align: center;
    padding: var(--space-xl);
    color: var(--text-tertiary);
    font-size: var(--text-sm);
}

.admin-page-error {
    text-align: center;
    padding: var(--space-md);
    color: #f87171;
    font-size: var(--text-sm);
    background: rgba(248, 113, 113, 0.08);
    border: 1px solid rgba(248, 113, 113, 0.2);
    border-radius: var(--radius-md);
}

/* ═══════════════════════════════════════════════════════════════
   子标签1：权限管理
   ═══════════════════════════════════════════════════════════════ */

/* ── 模式切换按钮组 ── */
.admin-page-mode-bar {
    display: flex;
    gap: var(--space-xs);
    flex-wrap: wrap;
}

.admin-page-mode-btn {
    padding: var(--space-xs) var(--space-lg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-medium);
    background: var(--bg-medium);
    color: var(--text-secondary);
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-body);
}

.admin-page-mode-btn:hover {
    border-color: var(--gold);
    color: var(--text-primary);
}

.admin-page-mode-btn.active {
    background: var(--gold);
    color: #000;
    border-color: var(--gold);
    font-weight: 600;
}

/* ── 用户选择器 ── */
.admin-page-user-selector {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    width: fit-content;
}

.admin-page-selector-label {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    font-weight: 500;
}

.admin-page-user-select {
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-medium);
    background: var(--bg-medium);
    color: var(--text-primary);
    font-size: var(--text-sm);
    font-family: var(--font-body);
    cursor: pointer;
    outline: none;
    transition: border-color var(--transition-fast);
    min-width: 200px;
}

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

/* ── 权限分组 ── */
.admin-page-perm-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
}

.admin-page-perm-group-title {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-display);
}

.admin-page-perm-group-icon {
    font-size: var(--text-lg);
    line-height: 1;
}

.admin-page-perm-group-desc {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    line-height: 1.5;
    margin-top: calc(-1 * var(--space-xs));
}

/* ── 权限行 ── */
.admin-page-perm-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid transparent;
    transition: all var(--transition-fast);
}

.admin-page-perm-row:hover {
    border-color: var(--glass-border);
    background: rgba(0, 0, 0, 0.25);
}

/* 未配置状态：灰色覆盖层标记 */
.admin-page-perm-row.perm-not-configured {
    opacity: 0.65;
}

.admin-page-perm-label {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

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

.admin-page-perm-key {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    font-family: ui-monospace, "SF Mono", Consolas, monospace;
}

.admin-page-perm-desc {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    line-height: 1.5;
}

.admin-page-perm-inherited-badge {
    display: inline-block;
    width: fit-content;
    margin-top: 2px;
    padding: 2px 8px;
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    background: rgba(120, 120, 120, 0.15);
    border: 1px solid rgba(120, 120, 120, 0.25);
    border-radius: var(--radius-sm);
}

/* ── 权限值控制区 ── */
.admin-page-perm-control {
    display: flex;
    gap: var(--space-xs);
    flex-shrink: 0;
}

.admin-page-perm-btn {
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-medium);
    background: var(--bg-medium);
    color: var(--text-secondary);
    font-size: var(--text-xs);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-body);
    min-width: 64px;
}

.admin-page-perm-btn:hover {
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

.admin-page-perm-btn.active {
    color: #000;
    font-weight: 600;
    border-color: transparent;
}

.admin-page-perm-btn.perm-green.active {
    background: #10b981;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.admin-page-perm-btn.perm-red.active {
    background: #ef4444;
    color: #fff;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.admin-page-perm-btn.perm-gold.active {
    background: var(--gold);
    box-shadow: var(--shadow-gold);
}

/* ── 用户信息条 ── */
.admin-page-user-info {
    padding: var(--space-sm) var(--space-md);
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

/* ── 操作按钮区 ── */
.admin-page-action-bar {
    display: flex;
    gap: var(--space-sm);
    justify-content: flex-end;
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-subtle);
    flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════════════════
   子标签2：系统状态
   ═══════════════════════════════════════════════════════════════ */

.admin-page-status-toolbar {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.admin-page-status {
    min-height: 120px;
}

/* 状态网格：自适应列数 */
.admin-page-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--space-md);
}

.admin-page-status-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    padding: var(--space-md);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.admin-page-status-card:hover {
    border-color: rgba(212, 175, 55, 0.3);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.admin-page-status-label {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-page-status-value {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    word-break: break-word;
}

.admin-page-status-value.error {
    color: #f87171;
}

/* ═══════════════════════════════════════════════════════════════
   子标签3：调试命令
   ═══════════════════════════════════════════════════════════════ */

.admin-page-commands {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-md);
}

.admin-page-command-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    padding: var(--space-md);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.admin-page-command-card:hover {
    border-color: rgba(212, 175, 55, 0.3);
}

.admin-page-command-btn {
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-md);
    background: rgba(212, 175, 55, 0.08);
    color: var(--gold);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-body);
}

.admin-page-command-btn:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--gold);
    transform: translateY(-1px);
}

.admin-page-command-desc {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    line-height: 1.5;
}

/* ── 命令输出区（终端风格）── */
.admin-page-command-output {
    background: #0a0a0f;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    min-height: 120px;
    max-height: 480px;
    overflow-y: auto;
    font-family: ui-monospace, "SF Mono", Consolas, "Courier New", monospace;
    font-size: var(--text-sm);
    color: #e0e0e0;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

.admin-page-command-output::-webkit-scrollbar {
    width: 8px;
}

.admin-page-command-output::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.admin-page-command-output::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.3);
    border-radius: var(--radius-full);
}

.admin-page-cmd-success {
    color: #4ade80;
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.admin-page-cmd-error {
    color: #f87171;
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.admin-page-cmd-result {
    margin: 0;
    padding: 0;
    color: #c0c0c0;
    font-family: inherit;
    font-size: inherit;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ═══════════════════════════════════════════════════════════════
   子标签4：缓存管理
   ═══════════════════════════════════════════════════════════════ */

.admin-page-cache-last-refresh {
    padding: var(--space-sm) var(--space-md);
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    color: var(--gold);
    font-weight: 500;
    text-align: center;
}

.admin-page-cache-btn {
    padding: var(--space-md) var(--space-xl);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    background: var(--bg-medium);
    color: var(--text-primary);
    font-size: var(--text-base);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-body);
}

.admin-page-cache-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.admin-page-cache-btn-primary {
    width: 100%;
    padding: var(--space-lg) var(--space-xl);
    border: none;
    border-radius: var(--radius-lg);
    background: var(--gradient-gold);
    color: #000;
    font-size: var(--text-lg);
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-gold);
    font-family: var(--font-body);
}

.admin-page-cache-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(212, 175, 55, 0.4);
}

.admin-page-cache-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.admin-page-cache-sub-buttons {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.admin-page-cache-sub-buttons .admin-page-cache-btn {
    flex: 1;
    min-width: 160px;
    text-align: center;
}


/* ═══════════════════════════════════════════════════════════════
   SubTask 9.2：DevTestPage 样式（.dev-test-* 系列）
   来源：DevTestPage.js — 卡组调试 / 抽卡调试 / 测试页面
   设计：复用 .debug-* 系列视觉语言，与 AdminPage 风格一致
   ═══════════════════════════════════════════════════════════════ */

/* ── 页面容器与标题 ── */
.dev-test-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-lg) var(--space-md) var(--space-2xl);
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.dev-test-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.dev-test-header h1 {
    margin: 0;
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-display);
}

/* ── 标签栏 ── */
.dev-test-tabs {
    display: flex;
    gap: var(--space-xs);
    padding: var(--space-xs);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    width: fit-content;
    flex-wrap: wrap;
}

.dev-test-tab {
    padding: var(--space-sm) var(--space-xl);
    border-radius: var(--radius-md);
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
    font-family: var(--font-body);
}

.dev-test-tab:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.dev-test-tab.active {
    background: var(--gradient-gold);
    color: #000;
    font-weight: 600;
    box-shadow: var(--shadow-gold);
}

/* ── 内容区 ── */
.dev-test-content {
    min-height: 300px;
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

/* ── 通用：加载/空状态/提示 ── */
.dev-test-loading {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--text-tertiary);
    font-size: var(--text-sm);
}

.dev-test-empty {
    text-align: center;
    padding: var(--space-3xl);
    color: var(--text-tertiary);
    font-size: var(--text-sm);
}

.dev-test-hint {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════════
   子标签1：卡组调试
   ═══════════════════════════════════════════════════════════════ */

/* ── 控制栏 ── */
.dev-test-control-bar {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    flex-wrap: wrap;
    padding: var(--space-md) var(--space-lg);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
}

.dev-test-btn-group {
    display: flex;
    gap: var(--space-xs);
    flex-wrap: wrap;
    align-items: center;
}

.dev-test-group-label {
    font-size: var(--text-sm);
    color: var(--text-tertiary);
    font-weight: 500;
    margin-right: var(--space-xs);
}

.dev-test-btn {
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-medium);
    background: var(--bg-medium);
    color: var(--text-secondary);
    font-size: var(--text-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-body);
}

.dev-test-btn:hover {
    border-color: var(--gold);
    color: var(--text-primary);
}

.dev-test-btn.active {
    background: var(--gold);
    color: #000;
    border-color: var(--gold);
    font-weight: 600;
}

.dev-test-load-btn {
    border-color: var(--border-gold);
    background: rgba(212, 175, 55, 0.08);
    color: var(--gold);
    font-weight: 600;
}

.dev-test-load-btn:hover {
    background: rgba(212, 175, 55, 0.15);
}

.dev-test-load-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ── 复选框组 ── */
.dev-test-checkbox-group {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
    align-items: center;
}

.dev-test-checkbox-item {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

.dev-test-checkbox-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--gold);
}

/* ── 卡组展示区 ── */
.dev-test-pool {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.dev-test-pool-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.dev-test-pool-group-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    border-left: 4px solid var(--gold);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.03);
}

.dev-test-pool-group-name {
    font-size: var(--text-lg);
    font-weight: 700;
    font-family: var(--font-display);
}

.dev-test-pool-group-count {
    font-size: var(--text-sm);
    color: var(--text-tertiary);
    padding: var(--space-xs) var(--space-sm);
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-full);
}

.dev-test-pool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: var(--space-md);
}

.dev-test-load-more-btn {
    align-self: center;
    padding: var(--space-sm) var(--space-xl);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-md);
    background: rgba(212, 175, 55, 0.08);
    color: var(--gold);
    font-size: var(--text-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-body);
}

.dev-test-load-more-btn:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--gold);
}

/* ═══════════════════════════════════════════════════════════════
   子标签2：抽卡调试
   ═══════════════════════════════════════════════════════════════ */

/* ── 三列布局（左控制面板 + 中舞台 + 右记录）── */
.dev-test-gacha {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    max-width: 2560px;
    margin: 0 auto;
}

/* 三列固定宽度，flex-shrink:0 确保不被压缩 */
.dev-test-gacha > .dev-test-gacha-panel {
    width: 420px;
    flex-shrink: 0;
}

.dev-test-gacha > .dev-test-gacha-stage {
    width: 480px;
    flex-shrink: 0;
}

.dev-test-gacha > .dev-test-gacha-record {
    width: 420px;
    flex-shrink: 0;
}

/* ── 左列：调试控制面板 ── */
.dev-test-gacha-panel {
    padding: var(--space-lg);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    position: sticky;
    top: 80px;
}

/* ── 中列：抽卡舞台 ── */
.dev-test-gacha-stage {
    /* 复刻抽卡界面所需的 CSS 变量（与 .debug-gacha-stage 一致）*/
    --summon-size: clamp(280px, 40vw, 420px);
    --summon-color: var(--gold);
    --glow-color: var(--gold);
    --glow-shadow: rgba(212, 175, 55, 0.6);
    --particle-color: #fde68a;
    --card-width: clamp(240px, 30vw, 320px);
    --card-aspect: 3 / 4;

    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    min-width: 0;
    align-items: center;
}

/* 调试模式下的召唤阵区域 */
.dev-test-summon-area {
    margin: 0 auto;
    max-width: var(--summon-size);
}

/* ── 右列：抽卡记录区 ── */
.dev-test-gacha-record {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    min-width: 0;
}

.dev-test-gacha-record-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: var(--text-sm);
    color: var(--text-tertiary);
}

.dev-test-gacha-record-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: var(--space-sm);
}

/* ── 面板分区 ── */
.dev-test-panel-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.dev-test-section-title {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: var(--space-xs);
}

/* ── 模式选择（单选组）── */
.dev-test-radio-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.dev-test-radio-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

.dev-test-radio-item input[type="radio"] {
    accent-color: var(--gold);
    cursor: pointer;
}

.dev-test-mode-config {
    padding: var(--space-sm);
    background: rgba(0, 0, 0, 0.15);
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
}

/* ── 输入/选择控件 ── */
.dev-test-input,
.dev-test-select {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-medium);
    background: var(--bg-medium);
    color: var(--text-primary);
    font-size: var(--text-sm);
    font-family: var(--font-body);
    outline: none;
    transition: border-color var(--transition-fast);
}

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

/* ── 抽卡/清空按钮 ── */
.dev-test-draw-btn {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    border: none;
    border-radius: var(--radius-lg);
    background: var(--gradient-gold);
    color: #000;
    font-size: var(--text-base);
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-gold);
    font-family: var(--font-body);
}

.dev-test-draw-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(212, 175, 55, 0.3);
}

.dev-test-draw-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.dev-test-clear-btn {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--text-secondary);
    font-size: var(--text-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-body);
}

.dev-test-clear-btn:hover {
    border-color: #f87171;
    color: #f87171;
}

/* ── 滑块控件 ── */
.dev-test-slider-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    width: 100%;
}

.dev-test-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: var(--radius-full);
    background: var(--bg-medium);
    border: 1px solid var(--border-medium);
    outline: none;
    cursor: pointer;
}

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

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

.dev-test-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--gold);
    border: 2px solid var(--bg-dark);
    cursor: pointer;
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
}

.dev-test-slider-label {
    min-width: 70px;
    flex-shrink: 0;
}

.dev-test-slider-value {
    min-width: 48px;
    text-align: right;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--gold);
    font-variant-numeric: tabular-nums;
}

/* ── 诊断显示区（布局间距滑块）── */
.dev-test-slider-diag {
    margin-top: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-md);
    font-size: var(--text-xs);
    font-family: ui-monospace, "SF Mono", Consolas, monospace;
    color: var(--text-tertiary);
    word-break: break-all;
    line-height: 1.5;
}

.dev-test-slider-diag.dev-test-diag-ok {
    color: #4ade80;
    border-color: rgba(74, 222, 128, 0.4);
    background: rgba(74, 222, 128, 0.08);
}

.dev-test-slider-diag.dev-test-diag-error {
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.4);
    background: rgba(248, 113, 113, 0.08);
}

/* ── 卡牌类型提示 ── */
.dev-test-card-type-hint {
    padding: var(--space-xs) var(--space-sm);
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-md);
    font-size: var(--text-xs);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.dev-test-hint-label {
    color: var(--text-tertiary);
}

.dev-test-type-name {
    color: var(--gold);
    font-weight: 600;
}

.dev-test-type-name.type-normal { color: #9ca3af; }
.dev-test-type-name.type-special { color: #60a5fa; }
.dev-test-type-name.type-rare { color: #c084fc; }
.dev-test-type-name.type-epic { color: #f472b6; }
.dev-test-type-name.type-legend { color: #fbbf24; }

/* ═══════════════════════════════════════════════════════════════
   子标签3：测试页面
   ═══════════════════════════════════════════════════════════════ */

.dev-test-tests {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.dev-test-tests-title {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-display);
}

.dev-test-tests-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-md);
}

.dev-test-test-card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: left;
    color: var(--text-primary);
    font-family: var(--font-body);
}

.dev-test-test-card:hover {
    transform: translateY(-3px);
    border-color: rgba(212, 175, 55, 0.4);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(212, 175, 55, 0.15);
    background: rgba(212, 175, 55, 0.05);
}

.dev-test-test-card-icon {
    font-size: 28px;
    color: var(--gold);
    flex-shrink: 0;
    line-height: 1;
    width: 40px;
    text-align: center;
}

.dev-test-test-card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    min-width: 0;
}

.dev-test-test-card-name {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--text-primary);
}

.dev-test-test-card-desc {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    line-height: 1.5;
}

.dev-test-test-card-arrow {
    font-size: var(--text-lg);
    color: var(--text-tertiary);
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.dev-test-test-card:hover .dev-test-test-card-arrow {
    color: var(--gold);
    transform: translateX(4px);
}


/* ═══════════════════════════════════════════════════════════════
   SubTask 9.3：响应式适配
   ═══════════════════════════════════════════════════════════════ */

/* ── 中等屏幕：抽卡调试三列降级为两列 ── */
@media (max-width: 1600px) {
    .dev-test-gacha > .dev-test-gacha-panel,
    .dev-test-gacha > .dev-test-gacha-record {
        width: 380px;
    }
    .dev-test-gacha > .dev-test-gacha-stage {
        width: 440px;
    }
}

@media (max-width: 1400px) {
    .dev-test-gacha > .dev-test-gacha-panel,
    .dev-test-gacha > .dev-test-gacha-record {
        width: 340px;
    }
    .dev-test-gacha > .dev-test-gacha-stage {
        width: 400px;
    }
}

@media (max-width: 1200px) {
    /* 中等屏幕：两列布局，记录区换行到下方 */
    .dev-test-gacha {
        flex-wrap: wrap;
        justify-content: center;
    }
    .dev-test-gacha > .dev-test-gacha-panel {
        width: 280px;
    }
    .dev-test-gacha > .dev-test-gacha-stage {
        flex: 1 1 400px;
        width: auto;
    }
    .dev-test-gacha > .dev-test-gacha-record {
        width: 100%;
        flex: 1 1 100%;
        position: static;
        max-height: none;
    }
}

/* ── 移动端：单列布局 ── */
@media (max-width: 768px) {
    /* AdminPage 移动端适配 */
    .admin-page-container {
        padding: var(--space-md) var(--space-sm) var(--space-xl);
    }

    .admin-page-tabs {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .admin-page-tab {
        padding: var(--space-sm) var(--space-md);
        white-space: nowrap;
    }

    .admin-page-perm-row {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-sm);
    }

    .admin-page-perm-control {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .admin-page-perm-btn {
        flex: 1;
        min-width: 60px;
    }

    .admin-page-status-grid {
        grid-template-columns: 1fr;
    }

    .admin-page-commands {
        grid-template-columns: 1fr;
    }

    .admin-page-action-bar {
        justify-content: stretch;
    }

    .admin-page-action-bar .btn {
        flex: 1;
    }

    .admin-page-cache-sub-buttons {
        flex-direction: column;
    }

    .admin-page-cache-sub-buttons .admin-page-cache-btn {
        width: 100%;
    }

    /* DevTestPage 移动端适配 */
    .dev-test-container {
        padding: var(--space-md) var(--space-sm) var(--space-xl);
    }

    .dev-test-tabs {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .dev-test-tab {
        padding: var(--space-sm) var(--space-md);
        white-space: nowrap;
    }

    .dev-test-control-bar {
        padding: var(--space-sm) var(--space-md);
        gap: var(--space-md);
    }

    .dev-test-pool-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: var(--space-sm);
    }

    /* 抽卡调试：移动端单列布局 */
    .dev-test-gacha {
        flex-direction: column;
        align-items: center;
    }
    .dev-test-gacha > .dev-test-gacha-panel,
    .dev-test-gacha > .dev-test-gacha-stage,
    .dev-test-gacha > .dev-test-gacha-record {
        width: 100%;
        max-width: 480px;
    }
    .dev-test-gacha-panel {
        position: static;
    }

    .dev-test-tests-list {
        grid-template-columns: 1fr;
    }
}

/* ── 超窄屏（< 360px，折叠屏外屏）── */
@media (max-width: 360px) {
    .admin-page-status-grid,
    .dev-test-pool-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    }

    .admin-page-perm-btn {
        min-width: 48px;
        padding: var(--space-xs) var(--space-sm);
    }
}
