﻿/* ============================================
   modules.css - 勤学苦练 + 闯天关 模块样式
   ============================================ */

/* ========== 通用模块容器 ========== */
.study-module, .challenge-module {
    /* 宽度跟随父容器，不额外限制 */
}

/* ========== 子Tab ========== */
.study-sub-tabs, .challenge-sub-tabs {
    display: flex;
    gap: 4px;
    background: rgba(30, 41, 59, 0.5);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 16px;
}

.sub-tab {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.sub-tab:hover {
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.05);
}

.sub-tab.active {
    background: var(--accent, #6366f1);
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

/* ========== 课程选择页 ========== */
.course-page {
    padding: 0 4px;
}

.level-tabs-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0 12px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.level-tabs-scroll::-webkit-scrollbar { display: none; }


/* 等级tab - 仅展示(不可学习)状态 */
.level-tab.readonly {
    opacity: 0.55;
    cursor: not-allowed;
}
.level-tab.readonly .level-tab-pct {
    opacity: 0.6;
}
.level-tab.readonly:hover {
    opacity: 0.7;
}
.level-tab {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(30, 41, 59, 0.4);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 80px;
}

.level-tab:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.level-tab-icon { font-size: 1.2rem; }
.level-tab-name { font-size: 0.8rem; font-weight: 600; }
.level-tab-pct { font-size: 0.7rem; opacity: 0.7; }

/* ========== 掌握进度 ========== */
.mastery-progress-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    background: rgba(30, 41, 59, 0.3);
    border-radius: 12px;
    margin-bottom: 16px;
}

.mastery-progress-item {
    display: flex;
    align-items: center;
    gap: 14px;
}

.mastery-label {
    font-size: 0.85rem;
    color: #94a3b8;
    min-width: 60px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mastery-count {
    font-size: 0.75rem;
    color: #64748b;
}

.mastery-bar {
    flex: 1;
    height: 8px;
    background: rgba(30, 41, 59, 0.6);
    border-radius: 4px;
    overflow: hidden;
}

.mastery-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.4s ease;
}

.mastery-pct {
    font-size: 0.8rem;
    font-weight: 600;
    color: #e2e8f0;
    min-width: 36px;
    text-align: right;
}

/* ========== 单元卡片 ========== */
.unit-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.unit-card {
    background: rgba(30, 41, 59, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 14px 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.unit-card:hover {
    background: rgba(30, 41, 59, 0.5);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateX(4px);
}

.unit-card.selected {
    border-color: var(--accent, #6366f1);
    background: rgba(99, 102, 241, 0.08);
}

.unit-card.mastered {
    opacity: 0.7;
}

.unit-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.unit-card-number {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
}

.unit-card-info { flex: 1; min-width: 0; }

.unit-card-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.unit-card-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.meta-tag {
    font-size: 0.78rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 4px;
}

.meta-tag.done { color: #10b981; }
.meta-tag i { font-size: 0.7rem; }

.unit-card-arrow {
    color: #475569;
    font-size: 0.85rem;
}

/* ========== 学习页 ========== */
.learn-page {
    padding: 0 4px;
}

.learn-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.learn-unit-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 统一返回按钮 */
.ch-nav-back {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px; border: none;
    background: rgba(255, 255, 255, 0.06);
    color: #94a3b8; font-size: 0.78rem; font-weight: 600;
    border-radius: 8px; cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.ch-nav-back:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
}
.ch-nav-back i { font-size: 0.85rem; }

.back-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: rgba(255, 255, 255, 0.06);
    color: #94a3b8;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}
.back-btn:hover { background: rgba(255, 255, 255, 0.12); color: #e2e8f0; }

/* 统一返回按钮（称号墙/边框墙/排行等子页面） */
.ch-back-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px; border: none;
    background: rgba(255, 255, 255, 0.06);
    color: #94a3b8; font-size: 0.78rem; font-weight: 600;
    border-radius: 8px; cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.ch-back-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
}
.ch-back-btn i { font-size: 0.8rem; }

.learn-unit-name {
    font-size: 1rem;
    font-weight: 600;
    color: #e2e8f0;
}

.review-badge {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.learn-controls {
    display: flex;
    gap: 8px;
}

.hide-toggle-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    color: #94a3b8;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.85rem;
}

.hide-toggle-btn:hover { color: #e2e8f0; border-color: rgba(255, 255, 255, 0.2); }

.learn-progress-bar {
    height: 6px;
    background: rgba(30, 41, 59, 0.6);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 4px;
}

.learn-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #a78bfa);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.learn-progress-text {
    font-size: 0.75rem;
    color: #64748b;
    text-align: right;
    margin-bottom: 16px;
}

/* ========== 学习卡片 ========== */
.learn-card {
    background: rgba(30, 41, 59, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.card-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.word-badge {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.sentence-badge {
    background: rgba(99, 102, 241, 0.12);
    color: #6366f1;
    border: 1px solid rgba(99, 102, 241, 0.25);
}

.dialogue-badge {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.card-indo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s;
}

.card-indo:hover { color: var(--accent, #6366f1); }

.card-play-icon { font-size: 1rem; color: var(--accent, #6366f1); opacity: 0.6; }

.card-zh {
    font-size: 1.2rem;
    color: #94a3b8;
    transition: opacity 0.2s;
}

/* ========== 对话卡片 ========== */
.dialogue-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 16px;
    text-align: center;
}

.dialogue-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dialogue-line {
    padding: 10px 14px;
    border-radius: 10px;
    max-width: 85%;
}

.dialogue-line.speaker-a {
    align-self: flex-start;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.15);
}

.dialogue-line.speaker-b {
    align-self: flex-end;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.dialogue-speaker {
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 4px;
}

.dialogue-indo {
    font-size: 0.95rem;
    color: #e2e8f0;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dialogue-play-icon { font-size: 0.75rem; opacity: 0.5; }

.dialogue-zh {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-top: 4px;
}

/* ========== 学习导航 ========== */
.learn-nav-row {
    display: flex;
    gap: 8px;
    justify-content: space-between;
}

.learn-nav-btn {
    padding: 10px 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    color: #94a3b8;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.learn-nav-btn:hover:not(:disabled) {
    border-color: rgba(255, 255, 255, 0.2);
    color: #e2e8f0;
}

.learn-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.learn-nav-btn.primary {
    background: var(--accent, #6366f1);
    border-color: var(--accent, #6366f1);
    color: white;
}

.learn-nav-btn.primary:hover {
    background: #4f46e5;
}

/* ========== 练习页 ========== */
.practice-page {
    padding: 0 4px;
}

.practice-header {
    text-align: center;
    margin-bottom: 20px;
}

.practice-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 4px;
}

.practice-unit-name {
    font-size: 0.85rem;
    color: #64748b;
}

.practice-stats-row {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.practice-stat-card {
    flex: 1;
    text-align: center;
    padding: 14px;
    background: rgba(30, 41, 59, 0.3);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.practice-stat-num {
    font-size: 1.5rem;
    font-weight: 700;
    color: #a5b4fc;
}

.practice-stat-label {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 2px;
}

.practice-section-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 10px;
}

.practice-type-section, .practice-mastery-section {
    margin-bottom: 20px;
}

.practice-type-btns {
    display: flex;
    gap: 8px;
}

.ptype-btn {
    flex: 1;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    color: #94a3b8;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.ptype-btn:hover {
    border-color: rgba(99, 102, 241, 0.3);
    color: #e2e8f0;
}

.ptype-btn.active {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.4);
    color: #a5b4fc;
}

.mastery-check-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    background: rgba(30, 41, 59, 0.3);
    border-radius: 12px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

.mastery-check-item {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: #cbd5e1;
    font-size: 0.9rem;
}

.mastery-check-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--accent, #6366f1);
    cursor: pointer;
}

/* ========== 答题界面 ========== */
.quiz-container {
    padding: 16px 0;
}

.quiz-progress-bar {
    height: 6px;
    background: rgba(30, 41, 59, 0.6);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 4px;
}

.quiz-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #34d399);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.quiz-counter {
    font-size: 0.75rem;
    color: #64748b;
    text-align: right;
    margin-bottom: 16px;
}

.quiz-type-tag {
    display: inline-block;
    padding: 2px 10px;
    background: rgba(99, 102, 241, 0.12);
    color: #a5b4fc;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.quiz-type-tag.fill-tag {
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
}

.quiz-question {
    background: rgba(30, 41, 59, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 16px;
    text-align: center;
}

.quiz-indo {
    font-size: 1.4rem;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 10px;
    cursor: pointer;
}

.quiz-prompt {
    font-size: 0.85rem;
    color: #64748b;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quiz-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(30, 41, 59, 0.2);
    border-radius: 10px;
    cursor: pointer;
    color: #cbd5e1;
    font-size: 0.95rem;
    transition: all 0.2s;
    text-align: left;
    width: 100%;
}

.quiz-option:hover {
    border-color: rgba(99, 102, 241, 0.4);
    background: rgba(99, 102, 241, 0.08);
}

.quiz-option.correct {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

.quiz-option.wrong {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.quiz-option-letter {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.8rem;
    color: #94a3b8;
    flex-shrink: 0;
}

.quiz-option-text {
    flex: 1;
}

/* ========== 填空题 ========== */
.fill-input-area {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.fill-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(15, 23, 42, 0.6);
    color: #e2e8f0;
    border-radius: 10px;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

.fill-input:focus {
    border-color: var(--accent, #6366f1);
}

.fill-submit-btn {
    padding: 12px 24px;
    background: var(--accent, #6366f1);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.fill-submit-btn:hover { background: #4f46e5; }

.fill-feedback {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.fill-feedback.correct {
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.fill-feedback.wrong {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.fill-actions {
    text-align: center;
}

.fill-next-btn {
    padding: 10px 28px;
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.fill-next-btn:hover {
    background: rgba(99, 102, 241, 0.25);
}

/* ========== 答题结果 ========== */
.quiz-result {
    text-align: center;
    padding: 40px 20px;
}

.result-icon {
    font-size: 3rem;
    color: #a5b4fc;
    margin-bottom: 12px;
}

.result-msg {
    font-size: 1.3rem;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 16px;
}

.result-score {
    font-size: 2.5rem;
    font-weight: 800;
    color: #a5b4fc;
    margin-bottom: 4px;
}

.result-pct {
    font-size: 1rem;
    color: #64748b;
    margin-bottom: 24px;
}

.result-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.result-btn {
    padding: 10px 24px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.result-btn.retry {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.result-btn.retry:hover { background: rgba(99, 102, 241, 0.25); }

.result-btn.back {
    background: transparent;
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.result-btn.back:hover { color: #e2e8f0; border-color: rgba(255, 255, 255, 0.2); }

/* ========== 闯天关 - 关卡地图 ========== */
.stages-page {
    padding: 0 4px;
}

.stages-summary {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.summary-card {
    flex: 1;
    text-align: center;
    padding: 16px;
    background: rgba(30, 41, 59, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
}

.summary-num {
    font-size: 1.8rem;
    font-weight: 800;
    color: #fbbf24;
}

.summary-label {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 2px;
}

/* ========== 选关页顶部横幅 ========== */
.stages-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(30, 41, 59, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    margin-bottom: 10px;
    backdrop-filter: blur(6px);
}
.stages-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}
.stages-header-icon {
    font-size: 1.1rem;
}
.stages-header-title {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.03em;
}
.stages-header-stats {
    display: flex;
    align-items: center;
    gap: 8px;
}
.sh-stat {
    display: flex;
    align-items: center;
    gap: 3px;
}
.sh-stat-num {
    font-size: 1rem;
    font-weight: 800;
    color: #e2e8f0;
}
.sh-stat-label {
    font-size: 0.62rem;
    color: #64748b;
    font-weight: 500;
}
.sh-stat-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #475569;
}
/* 列数切换按钮 */
.sg-cols-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: #94a3b8;
    font-size: 0.65rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.sg-cols-btn:hover {
    background: rgba(255,255,255,0.1);
    color: #e2e8f0;
    border-color: rgba(255,255,255,0.2);
}

/* ========== 通关进度条 ========== */
.stages-progress-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding: 0 2px;
}
.stages-progress-track {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    overflow: hidden;
}
.stages-progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}
.stages-progress-fill::after {
    content: '';
    position: absolute;
    right: 0; top: 0; bottom: 0; width: 20px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4));
    border-radius: 4px;
}
.stages-progress-text {
    font-size: 0.65rem;
    color: #64748b;
    font-weight: 600;
    white-space: nowrap;
    min-width: 50px;
    text-align: right;
}

/* ========== 等级分组容器 ========== */
.stage-group-wrap {
    margin-bottom: 8px;
}
.stage-group-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 4px 4px;
}
.sg-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 6px currentColor;
}
.sg-name {
    font-size: 0.78rem;
    color: #94a3b8;
    font-weight: 700;
}

/* ========== 紧凑关卡卡片子元素 ========== */
.sc-number {
    font-size: 2rem;
    font-weight: 900;
    color: #e2e8f0;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5), 0 0 16px color-mix(in srgb, var(--stage-color, #60a5fa) 40%, transparent);
    margin-bottom: 3px;
    position: relative;
    z-index: 2;
}
.sc-label {
    font-size: 0.6rem;
    color: #94a3b8;
    font-weight: 600;
    margin-bottom: 6px;
    letter-spacing: 0.06em;
    position: relative;
    z-index: 2;
}
.sc-bar {
    width: 55%;
    height: 3px;
    background: rgba(0,0,0,0.3);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
    z-index: 2;
}
.sc-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s;
}

/* ========== 古堡风格卡片 — 石墙背景 ========== */
.sc-castle-bg {
    position: absolute;
    inset: 0;
    border-radius: 10px;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}
/* 石墙纹理 */
.sc-castle-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        /* 砖缝竖线 */
        repeating-linear-gradient(90deg, rgba(0,0,0,0.12) 0px, rgba(0,0,0,0.12) 1px, transparent 1px, transparent 33%),
        /* 砖缝横线（上下错开）*/
        repeating-linear-gradient(0deg, rgba(0,0,0,0.12) 0px, rgba(0,0,0,0.12) 1px, transparent 1px, transparent 50%);
    border-radius: 10px;
    opacity: 0.5;
}
/* 门拱光效 */
.sc-castle-bg::after {
    content: '';
    position: absolute;
    bottom: -10%; left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 60%;
    background: radial-gradient(ellipse at center bottom, color-mix(in srgb, var(--stage-color, #60a5fa) 20%, transparent) 0%, transparent 70%);
    pointer-events: none;
}

/* ========== 城垛顶部装饰 ========== */
.sc-battlement {
    position: absolute;
    top: -6px;
    left: 2px;
    right: 2px;
    height: 6px;
    z-index: 3;
    pointer-events: none;
    display: flex;
    gap: 2px;
    overflow: hidden;
}
.sc-battlement::before {
    content: '';
    flex: 1;
    background:
        repeating-linear-gradient(90deg,
            var(--stage-color, #60a5fa) 0px, var(--stage-color, #60a5fa) 6px,
            transparent 6px, transparent 10px
        );
    border-radius: 1px 1px 0 0;
    opacity: 0.35;
}
.sc-battlement::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(90deg,
            transparent 0px, transparent 6px,
            color-mix(in srgb, var(--stage-color, #60a5fa) 50%, transparent) 6px, color-mix(in srgb, var(--stage-color, #60a5fa) 50%, transparent) 10px
        );
    border-radius: 1px 1px 0 0;
    opacity: 0.1;
}

/* ========== 门拱造型 ========== */
.sc-arch {
    position: absolute;
    bottom: 0; left: 50%;
    transform: translateX(-50%);
    width: 56%;
    height: 38%;
    border-radius: 56% 56% 0 0;
    z-index: 0;
    pointer-events: none;
    border: 2px solid rgba(0,0,0,0.15);
    border-bottom: none;
    background: radial-gradient(ellipse at center bottom, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.15) 50%, transparent 70%);
}

/* ========== 立体边框（多层 box-shadow 模拟石墙厚度）========== */
.stage-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 10px;
    border: 1.5px solid color-mix(in srgb, var(--stage-color, #60a5fa) 20%, rgba(100,116,139,0.3));
    pointer-events: none;
    z-index: 1;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.06),
        inset 0 -1px 0 rgba(0,0,0,0.2);
    transition: border-color 0.3s;
}

/* ========== 卡片状态角标 ========== */
.sc-badge {
    position: absolute;
    top: 10px;
    left: 6px;
    font-size: 0.55rem;
    padding: 1px 5px;
    border-radius: 4px;
    z-index: 4;
    line-height: 1.4;
}
.sc-badge-stars {
    background: rgba(0,0,0,0.4);
    color: #fbbf24;
    font-size: 0.55rem;
    letter-spacing: 1px;
    border: 1px solid rgba(251,191,36,0.3);
}
.sc-badge-current {
    background: color-mix(in srgb, var(--stage-color, #60a5fa) 25%, rgba(0,0,0,0.4));
    color: #fff;
    font-size: 0.6rem;
    animation: sc-pulse 2s ease-in-out infinite;
    border: 1px solid color-mix(in srgb, var(--stage-color, #60a5fa) 35%, transparent);
    text-shadow: 0 0 6px var(--stage-color, #60a5fa);
}
.sc-badge-go {
    background: rgba(0,0,0,0.3);
    color: #818cf8;
    font-size: 0.6rem;
    font-weight: 700;
}
.sc-badge-lock {
    background: rgba(0,0,0,0.2);
    color: #475569;
    font-size: 0.6rem;
}
.sc-badge-ro {
    background: rgba(0,0,0,0.25);
    color: #f59e0b;
    font-size: 0.6rem;
}
@keyframes sc-pulse {
    0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--stage-color, #60a5fa) 30%, transparent); }
    50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--stage-color, #60a5fa) 0%, transparent); }
}

/* ========== 各状态立体造型 ========== */
.stage-card.available {
    background:
        linear-gradient(170deg, rgba(50, 60, 80, 0.7) 0%, rgba(20, 28, 40, 0.85) 100%);
    border-color: transparent;
    box-shadow:
        0 4px 12px rgba(0,0,0,0.4),
        0 1px 3px rgba(0,0,0,0.3),
        inset 0 1px 0 rgba(255,255,255,0.06),
        inset 0 -2px 4px rgba(0,0,0,0.2);
    border-radius: 10px;
}
.stage-card.available:hover {
    transform: translateY(-4px) scale(1.04);
    box-shadow:
        0 12px 32px rgba(0,0,0,0.5),
        0 2px 8px rgba(0,0,0,0.3),
        0 0 24px color-mix(in srgb, var(--stage-color, #60a5fa) 15%, transparent),
        inset 0 1px 0 rgba(255,255,255,0.08);
}
.stage-card.available:hover::after {
    border-color: color-mix(in srgb, var(--stage-color, #60a5fa) 40%, rgba(100,116,139,0.3));
}
.stage-card.current {
    background:
        linear-gradient(170deg, color-mix(in srgb, var(--stage-color, #60a5fa) 18%, rgba(30,35,50,0.8)) 0%, rgba(15,20,30,0.9) 100%);
    border-color: transparent;
    box-shadow:
        0 4px 16px rgba(0,0,0,0.5),
        0 0 28px color-mix(in srgb, var(--stage-color, #60a5fa) 18%, transparent),
        inset 0 1px 0 rgba(255,255,255,0.08),
        inset 0 0 20px color-mix(in srgb, var(--stage-color, #60a5fa) 6%, transparent);
    animation: sc-castle-breathe 3s ease-in-out infinite;
    border-radius: 10px;
}
.stage-card.current::after {
    border-color: color-mix(in srgb, var(--stage-color, #60a5fa) 45%, rgba(100,116,139,0.3));
    animation: sc-castle-glow 3s ease-in-out infinite;
}
@keyframes sc-castle-breathe {
    0%, 100% { box-shadow: 0 4px 16px rgba(0,0,0,0.5), 0 0 20px color-mix(in srgb, var(--stage-color, #60a5fa) 12%, transparent), inset 0 0 16px color-mix(in srgb, var(--stage-color, #60a5fa) 4%, transparent); }
    50% { box-shadow: 0 4px 20px rgba(0,0,0,0.5), 0 0 36px color-mix(in srgb, var(--stage-color, #60a5fa) 25%, transparent), inset 0 0 28px color-mix(in srgb, var(--stage-color, #60a5fa) 10%, transparent); }
}
@keyframes sc-castle-glow {
    0%, 100% { border-color: color-mix(in srgb, var(--stage-color, #60a5fa) 35%, rgba(100,116,139,0.3)); box-shadow: inset 0 1px 0 rgba(255,255,255,0.06); }
    50% { border-color: color-mix(in srgb, var(--stage-color, #60a5fa) 55%, rgba(100,116,139,0.3)); box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 0 8px color-mix(in srgb, var(--stage-color, #60a5fa) 15%, transparent); }
}
.stage-card.cleared {
    background:
        linear-gradient(170deg, rgba(16, 60, 50, 0.5) 0%, rgba(15, 25, 35, 0.75) 100%);
    border-color: transparent;
    box-shadow:
        0 3px 10px rgba(0,0,0,0.3),
        inset 0 1px 0 rgba(255,255,255,0.04);
    border-radius: 10px;
}
.stage-card.cleared::after {
    border-color: rgba(52,211,153,0.25);
}
.stage-card.locked {
    background:
        linear-gradient(170deg, rgba(30, 35, 45, 0.3) 0%, rgba(15, 18, 25, 0.4) 100%);
    border-color: transparent;
    opacity: 0.28;
    cursor: not-allowed;
    box-shadow: none;
    border-radius: 10px;
    filter: grayscale(0.5);
}
.stage-card.locked::after {
    border-color: rgba(100,116,139,0.15);
}
.stage-card.locked .sc-castle-bg::before { opacity: 0.2; }
.stage-card.locked .sc-battlement::before { opacity: 0.08; }

/* 状态文字颜色 */
.stage-card.current .sc-number {
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5), 0 0 20px var(--stage-color, #60a5fa);
}
.stage-card.cleared .sc-number {
    color: #6ee7b7;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5), 0 0 14px rgba(52,211,153,0.3);
}
.stage-card.locked .sc-number {
    color: #475569;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.stage-card.cleared .sc-label {
    color: #6ee7b7;
}
.stage-card.available .sc-number {
    text-shadow: 0 2px 4px rgba(0,0,0,0.5), 0 0 12px color-mix(in srgb, var(--stage-color, #60a5fa) 30%, transparent);
}

/* stages-groups 外层容器 */
.stages-groups {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stage-grid {
    --grid-cols: 4;
    display: grid;
    grid-template-columns: repeat(var(--grid-cols), minmax(0, 1fr));
    gap: 22px;
    padding: 6px 0 12px;
}

.stage-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 6px;
    border-radius: 14px;
    aspect-ratio: 1 / 1;
    cursor: pointer;
    transition: all 0.25s;
    border: 1.5px solid transparent;
    text-align: center;
    overflow: visible;
}

.stage-card.available {
    background: rgba(30, 41, 59, 0.4);
    border-color: transparent;
}

.stage-card.available:hover {
    border-color: transparent;
    transform: translateY(-2px);
}

.stage-card.current {
    background: rgba(99, 102, 241, 0.15);
    border-color: transparent;
    animation: pulse-border 2s ease-in-out infinite;
}

@keyframes pulse-border {
    0%, 100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(99, 102, 241, 0); }
}

.stage-card.cleared {
    background: rgba(16, 185, 129, 0.1);
    border-color: transparent;
}

.stage-card.locked {
    background: rgba(30, 41, 59, 0.2);
    opacity: 0.4;
    cursor: not-allowed;
}

.stage-card.stage-hell {
    border-color: transparent;
}
.stage-card.stage-hell.available {
    background: rgba(239, 68, 68, 0.06);
    border-color: transparent;
}
.stage-card.stage-hell.available:hover {
    border-color: transparent;
}
.stage-card.stage-hell.current {
    background: rgba(239, 68, 68, 0.1);
    border-color: transparent;
    animation: pulse-border-hell 2s ease-in-out infinite;
}
.stage-card.stage-hell.cleared {
    background: rgba(239, 68, 68, 0.05);
    border-color: transparent;
}
@keyframes pulse-border-hell {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}

.stage-number {
    font-size: 1.1rem;
    font-weight: 800;
    color: #e2e8f0;
    margin-bottom: 4px;
}

.stage-icon {
    margin-bottom: 2px;
    font-size: 1.1rem;
    color: #94a3b8;
}

.stage-card.current .stage-icon { color: var(--accent, #6366f1); }
.stage-card.cleared .stage-icon { color: #10b981; }

.stage-name {
    font-size: 0.7rem;
    color: #94a3b8;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 80px;
}

.stage-type {
    font-size: 0.65rem;
    color: #475569;
}

.stage-best {
    font-size: 0.65rem;
    color: #10b981;
    font-weight: 600;
}

.stage-hint {
    font-size: 0.65rem;
    color: var(--accent, #6366f1);
    font-weight: 600;
}
/* ========== 关卡门造型（普通+地狱） ========== */
.stage-gate {
    position: relative;
}

.sg-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-bottom: 2px;
    border-radius: 50%;
    position: relative;
    transition: transform 0.2s;
}

.stage-gate.available:hover .sg-icon {
    transform: scale(1.15);
}

/* 普通模式门：清新圆环 */
.sg-normal::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 2px solid rgba(99, 102, 241, 0.2);
    pointer-events: none;
}

.sg-normal::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99,102,241,0.08), transparent 70%);
    pointer-events: none;
}

/* 地狱模式门：暗红棱角 */
.sg-hell {
    border-radius: 10px;
}

.sg-hell::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 12px;
    border: 2px solid rgba(239, 68, 68, 0.15);
    pointer-events: none;
}

.sg-hell::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 10px;
    background: radial-gradient(circle, rgba(239,68,68,0.06), transparent 70%);
    pointer-events: none;
}

@keyframes sg-pulse {
    0%, 100% { box-shadow: 0 0 0 0 transparent; }
    50% { box-shadow: 0 0 14px 4px rgba(239, 68, 68, 0.2); }
}

.stage-gate.cleared .sg-icon {
    filter: saturate(0.5) brightness(0.8);
}

.stage-gate.locked .sg-icon {
    opacity: 0.3;
    filter: grayscale(0.8);
}


/* ========== 闯天关 - 答题 ========== */
.challenge-play-page {
    padding: 0 4px;
}

.challenge-play-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.challenge-play-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #e2e8f0;
}

.challenge-timer {
    font-size: 0.95rem;
    font-weight: 600;
    color: #f59e0b;
    display: flex;
    align-items: center;
    gap: 6px;
}

.challenge-progress-bar {
    height: 6px;
    background: rgba(30, 41, 59, 0.6);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 4px;
}

/* 非BOSS战斗区装饰 */
.ch-normal-battle-area {
    display: flex; flex-direction: column; gap: 10px;
}
.ch-normal-battle-header {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; margin-bottom: 4px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}
.ch-normal-stage-badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 10px; border-radius: 6px;
    background: rgba(96, 165, 250, 0.15);
    color: #60a5fa; font-size: 0.72rem; font-weight: 700;
    white-space: nowrap;
}
.ch-normal-stage-label {
    font-size: 0.78rem; color: #94a3b8; font-weight: 600;
}

.challenge-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.challenge-progress-text {
    font-size: 0.75rem;
    color: #64748b;
    text-align: right;
    margin-bottom: 16px;
}

.challenge-question-area {
    min-height: 300px;
}

.challenge-q-type {
    display: inline-block;
    padding: 2px 10px;
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.challenge-q-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 8px;
}

.challenge-q-indo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 10px;
    cursor: pointer;
}

.challenge-q-prompt {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 16px;
}

.challenge-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.challenge-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(30, 41, 59, 0.2);
    border-radius: 10px;
    cursor: pointer;
    color: #cbd5e1;
    font-size: 0.95rem;
    transition: all 0.2s;
    text-align: left;
    width: 100%;
}

.challenge-option:hover {
    border-color: rgba(245, 158, 11, 0.4);
    background: rgba(245, 158, 11, 0.08);
}

.challenge-option.correct {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

.challenge-option.wrong {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.challenge-option-letter {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.8rem;
    color: #94a3b8;
    flex-shrink: 0;
}

.challenge-option-text {
    flex: 1;
}

/* ========== 闯关结果 ========== */
.challenge-result-page {
    text-align: center;
    padding: 40px 20px;
}

.challenge-result-icon {
    margin-bottom: 16px;
}

.challenge-result-icon .mini-stars .fa-star.earned {
    font-size: 2rem;
}

.challenge-result-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #e2e8f0;
    margin-bottom: 20px;
}

.challenge-result-stats {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 20px;
}

.result-stat {
    text-align: center;
}

.result-stat-label {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 4px;
}

.result-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #cbd5e1;
}

.result-stat-value.highlight {
    color: #fbbf24;
    font-size: 2rem;
}

.new-record-badge {
    display: inline-block;
    padding: 6px 20px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(251, 191, 36, 0.1));
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.4);
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 20px;
    animation: record-glow 1.5s ease-in-out infinite;
}

@keyframes record-glow {
    0%, 100% { box-shadow: 0 0 8px rgba(245, 158, 11, 0.3); }
    50% { box-shadow: 0 0 16px rgba(245, 158, 11, 0.5); }
}

/* ========== 排行榜 ========== */
.rank-page {
    padding: 0 4px;
}

.champion-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(251, 191, 36, 0.06));
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 14px;
    margin-bottom: 16px;
}

.champion-trophy {
    font-size: 2rem;
    color: #fbbf24;
}

.champion-text { flex: 1; }

.champion-title {
    font-size: 0.75rem;
    color: #f59e0b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.champion-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #e2e8f0;
}

.champion-score {
    font-size: 0.85rem;
    color: #fbbf24;
    font-weight: 600;
}

.rank-period-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
}

.rank-period-btn {
    flex: 1;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    color: #94a3b8;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
}

.rank-period-btn:hover { border-color: rgba(255, 255, 255, 0.2); color: #e2e8f0; }

.rank-period-btn.active {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.3);
    color: #fbbf24;
}

.rank-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rank-header, .rank-item {
    display: grid;
    grid-template-columns: 50px 1fr 60px 60px;
    align-items: center;
    padding: 10px 12px;
    border-radius: 8px;
}

.rank-header {
    font-size: 0.78rem;
    color: #64748b;
    font-weight: 600;
    margin-bottom: 4px;
}

.rank-item {
    background: rgba(30, 41, 59, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: all 0.2s;
}

.rank-item:hover {
    background: rgba(30, 41, 59, 0.4);
}

.rank-me {
    border-color: rgba(99, 102, 241, 0.3);
    background: rgba(99, 102, 241, 0.08);
}

.rank-position {
    text-align: center;
    font-weight: 700;
    color: #94a3b8;
    font-size: 0.9rem;
}

.rank-position.rank-top {
    color: #fbbf24;
}

.rank-name {
    font-weight: 500;
    color: #cbd5e1;
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-company {
    text-align: center;
    font-size: 0.78rem;
    color: #64748b;
}

.rank-score {
    text-align: right;
    font-weight: 700;
    color: #a5b4fc;
    font-size: 0.9rem;
}

.rank-item.rank-1 { border-left: 3px solid #fbbf24; }
.rank-item.rank-2 { border-left: 3px solid #94a3b8; }
.rank-item.rank-3 { border-left: 3px solid #cd7f32; }

/* ========== 响应式 ========== */
@media (max-width: 640px) {
    .stage-grid {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
        gap: 6px;
    }
    .stage-card { padding: 14px 6px; height: 145px; }
    .stage-card.stage-hell { border-color: rgba(239, 68, 68, 0.2); }
    .stage-number { font-size: 1.2rem; }
    .stage-name { font-size: 0.6rem; max-width: 60px; }
    .card-indo { font-size: 1.4rem; }
    .quiz-indo { font-size: 1.2rem; }
    .champion-name { font-size: 0.95rem; }
}


/* ========== 课程页顶部Tab（勤学苦练/闯天关） ========== */
.course-top-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
    background: rgba(30, 41, 59, 0.5);
    border-radius: 12px;
    padding: 4px;
}

.course-tab {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.course-tab:hover {
    color: #e2e8f0;
    background: rgba(99, 102, 241, 0.08);
}

.course-tab.active {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}


/* ========== 主页样式 ========== */
.home-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 220px);
    padding: 40px 20px;
    animation: homeFadeIn 0.6s ease;
}

@keyframes homeFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.home-hero {
    text-align: center;
    margin-bottom: 60px;
}

.home-title {
    font-size: 3.6rem;
    font-weight: 800;
    background: linear-gradient(135deg, #6366f1, #a78bfa, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    letter-spacing: -1px;
}

.home-subtitle {
    font-size: 1.3rem;
    color: #64748b;
    font-weight: 400;
    letter-spacing: 2px;
}

.home-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    max-width: 800px;
    width: 100%;
}

.home-card {
    background: var(--glass);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 24px;
    padding: 48px 32px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.home-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.home-card-icon {
    width: 96px;
    height: 96px;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
    color: #fff;
    margin-bottom: 18px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.home-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 8px;
}

.home-card-desc {
    font-size: 0.92rem;
    color: #64748b;
    line-height: 1.5;
}

.home-card-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.15);
    font-size: 1.4rem;
    transition: all 0.3s ease;
}

.home-card:hover .home-card-arrow {
    color: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%) translateX(3px);
}

/* ========== 闯天关答题控制区 ========== */
.challenge-controls {
    display: flex;
    gap: 20px;
    margin-top: 16px;
    padding: 16px 20px;
    background: rgba(30, 41, 59, 0.3);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.challenge-controls .vslider-box {
    flex: 1;
    min-width: 0;
}

.challenge-controls .vslider-label {
    font-size: 0.78rem;
    color: #94a3b8;
    margin-bottom: 6px;
}

.challenge-controls .vslider-range {
    font-size: 0.7rem;
}

/* 闯天关滑块样式 */
#ch-rate-slider,
#ch-loop-slider {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
    z-index: 2;
    margin: 0;
}

/* 闯天关滑块填充色 - 与学习界面一致 */
#ch-rate-fill {
    background: linear-gradient(to right, #6366f1, #a78bfa, #c084fc) !important;
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.3) !important;
}
#ch-loop-fill {
    background: linear-gradient(to right, #10b981, #34d399, #2dd4bf) !important;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.3) !important;
}

/* 闯天关滑块 thumb - 与学习界面一致 */
#ch-rate-thumb {
    color: #c4b5fd !important;
    background: rgba(99, 102, 241, 0.2) !important;
    border: 1px solid rgba(99, 102, 241, 0.3) !important;
    text-shadow: 0 0 10px rgba(129, 140, 248, 0.5) !important;
}
#ch-loop-thumb {
    color: #6ee7b7 !important;
    background: rgba(16, 185, 129, 0.2) !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
    text-shadow: 0 0 10px rgba(52, 211, 153, 0.5) !important;
}

@media (max-width: 640px) {
    .challenge-controls { flex-direction: column; gap: 12px; }
}

/* 返回主页按钮 */
.back-home-btn:hover {
    color: var(--text-main);
    background: var(--accent-subtle) !important;
}
/* 主页用户状态栏 */
.home-user-bar {
    position: absolute;
    top: 16px;
    right: 24px;
    z-index: 100;
}

/* ===== 错题集样式 ===== */
.wrong-book-panel {
    padding: 16px 0;
}
.wrong-book-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.wrong-book-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    transition: 0.2s;
}
.wrong-book-item:hover {
    border-color: rgba(248, 113, 113, 0.2);
}
.wrong-book-num {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(248, 113, 113, 0.12);
    color: #f87171;
    border-radius: 50%;
    font-size: 0.78rem;
    font-weight: 700;
    flex-shrink: 0;
}
.wrong-book-content {
    flex: 1;
    min-width: 0;
}
.wrong-book-indo {
    font-size: 0.95rem;
    color: #e2e8f0;
    cursor: pointer;
    word-break: break-word;
}
.wrong-book-zh {
    font-size: 0.82rem;
    color: #94a3b8;
    margin-top: 2px;
}
.wrong-book-del {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid rgba(248, 113, 113, 0.15);
    border-radius: 6px;
    color: #94a3b8;
    cursor: pointer;
    transition: 0.2s;
    flex-shrink: 0;
}
.wrong-book-del:hover {
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.4);
    background: rgba(248, 113, 113, 0.08);
}
.result-btn.wrong-book-btn {
    background: rgba(248, 113, 113, 0.12);
    color: #f87171;
    border: 1px solid rgba(248, 113, 113, 0.2);
}
.result-btn.wrong-book-btn:hover {
    background: rgba(248, 113, 113, 0.2);
}


/* ========== 统计页面 - 卡片式布局 ========== */
.stats-container {
    max-width: 100%;
    padding: 0 4px;
}
.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}
.stats-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}
.stats-card { position:relative;
    background: var(--card-bg);
    border-radius: 14px;
    padding: 16px 14px;
    text-align: center;
    border: 1px solid var(--border-subtle);
    transition: transform 0.2s, box-shadow 0.2s;
}
.stats-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}
.stats-card-icon {
    font-size: 1.4rem;
    margin-bottom: 6px;
}
.stats-card-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
}
.stats-card-value small {
    font-weight: 400;
}
.stats-card-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 4px;
}
.stats-card-sub {
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-top: 2px;
}
.stats-section-card {
    background: var(--card-bg);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid var(--border-subtle);
}
.stats-section-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 12px;
}
.stats-mini-row {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}
.stats-mini-item {
    flex: 1;
    text-align: center;
    padding: 10px;
    background: var(--glass);
    border-radius: 10px;
}
.stats-mini-value {
    font-size: 1.3rem;
    font-weight: 800;
    color: #a5b4fc;
}
.stats-mini-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 3px;
}
.stat-progress-bar {
    height: 6px;
    background: var(--border-subtle);
    border-radius: 3px;
    overflow: hidden;
}
.stat-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #a78bfa);
    border-radius: 3px;
    transition: width 0.5s ease;
}
.stat-history-list {
    max-height: 200px;
    overflow-y: auto;
}
.stat-history-item {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.85rem;
}
.stat-history-item:last-child {
    border-bottom: none;
}
.stat-history-type {
    padding: 2px 8px;
    background: var(--accent-subtle);
    color: #a5b4fc;
    border-radius: 6px;
    font-size: 0.75rem;
    flex-shrink: 0;
}
.stat-history-score {
    flex: 1;
    text-align: center;
    font-weight: 600;
}
.stat-history-pct {
    font-weight: 700;
    min-width: 40px;
    text-align: right;
}
.stat-words-list {
    max-height: 200px;
    overflow-y: auto;
}
.stat-word-item {
    display: flex;
    align-items: center;
    padding: 7px 10px;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.85rem;
    gap: 8px;
}
.stat-word-item:last-child {
    border-bottom: none;
}
.stat-word-idx {
    color: var(--text-dim);
    font-size: 0.75rem;
    min-width: 18px;
}
.stat-word-indo {
    color: #a5b4fc;
    font-weight: 600;
}
.stat-word-zh {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ========== 随机推荐单词样式 ========== */
.rw-indo {
    color: #a5b4fc;
}
.rw-zh {
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 400;
}

@media (max-width: 480px) {
    .stats-cards-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .stats-card-value {
        font-size: 1.3rem;
    }
}

/* 折叠面板 - 听力设置 */
.ctrl-expanded .ctrl-body { display: flex !important; align-items: center; gap: 16px; }
.ctrl-expanded > div:first-child i.fa-chevron-down { transform: rotate(180deg); }


/* ============================================
   闯天关首页 - 重新设计
   ============================================ */
.challenge-home {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* -- 英雄区卡片 -- */
.challenge-hero {
    position: relative;
    cursor: pointer;
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(135deg, #1e1b4b 0%, #172554 50%, #0f172a 100%);
    border: 1px solid rgba(99, 102, 241, 0.2);
    transition: all 0.3s ease;
}
.challenge-hero:hover {
    border-color: rgba(99, 102, 241, 0.45);
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.15);
}
.challenge-hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 20% 20%, rgba(99, 102, 241, 0.18), transparent),
        radial-gradient(ellipse 50% 60% at 80% 80%, rgba(139, 92, 246, 0.12), transparent);
    pointer-events: none;
}
.challenge-hero-content {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 24px 0;
}
.challenge-hero-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
    flex-shrink: 0;
}
.challenge-hero-text {
    flex: 1;
}
.challenge-hero-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #f1f5f9;
    margin: 0;
    letter-spacing: 0.5px;
}
.challenge-hero-desc {
    font-size: 0.78rem;
    color: #94a3b8;
    margin: 4px 0 0;
}
.challenge-hero-arrow {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
}
.challenge-hero:hover .challenge-hero-arrow {
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
    transform: translateX(3px);
}

/* -- 英雄区底部模式统计 -- */
.challenge-hero-stats {
    position: relative;
    display: flex;
    align-items: center;
    padding: 18px 24px 22px;
    margin-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.challenge-hero-stat {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}
.challenge-hero-stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
}
.challenge-hero-stat-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.challenge-hero-stat-label {
    font-size: 0.7rem;
    color: #64748b;
    font-weight: 500;
}
.challenge-hero-stat-value {
    font-size: 1.05rem;
    font-weight: 800;
    color: #e2e8f0;
    line-height: 1.2;
}
.challenge-hero-stat-total {
    font-size: 0.75rem;
    color: #475569;
    font-weight: 500;
}
.challenge-hero-stat-stars {
    margin-left: auto;
    font-size: 0.78rem;
    color: #fbbf24;
    font-weight: 600;
    white-space: nowrap;
}
.challenge-hero-stat-empty {
    font-size: 0.72rem;
    color: #475569;
}
.challenge-hero-stat-divider {
    width: 1px;
    height: 36px;
    background: rgba(255, 255, 255, 0.06);
    margin: 0 6px;
    flex-shrink: 0;
}

/* -- 快捷统计条 -- */
.challenge-quick-stats {
    display: flex;
    align-items: center;
    background: rgba(30, 41, 59, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 14px 8px;
}
.challenge-quick-stat {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.challenge-quick-stat i {
    font-size: 0.85rem;
    color: #64748b;
}
.challenge-quick-stat span {
    font-size: 1.15rem;
    font-weight: 800;
    color: #e2e8f0;
}
.challenge-quick-stat label {
    font-size: 0.68rem;
    color: #475569;
    font-weight: 500;
}
.challenge-quick-stat-divider {
    width: 1px;
    height: 32px;
    background: rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

/* -- 排行榜入口 -- */
.challenge-rank-entry {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    background: rgba(30, 41, 59, 0.3);
    border: 1px solid rgba(251, 191, 36, 0.12);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.25s ease;
}
.challenge-rank-entry:hover {
    background: rgba(251, 191, 36, 0.06);
    border-color: rgba(251, 191, 36, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(251, 191, 36, 0.08);
}
.challenge-rank-icon {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    color: #fff;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.25);
    flex-shrink: 0;
}
.challenge-rank-info {
    flex: 1;
    min-width: 0;
}
.challenge-rank-title {
    font-size: 1rem;
    font-weight: 700;
    color: #e2e8f0;
}
.challenge-rank-desc {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 3px;
}
.challenge-rank-arrow {
    color: #475569;
    font-size: 0.85rem;
    transition: all 0.25s ease;
    flex-shrink: 0;
}
.challenge-rank-entry:hover .challenge-rank-arrow {
    color: #fbbf24;
    transform: translateX(3px);
}


/* =============================================
   闯天关首页 - 天堂/地狱 双卡片主题
   ============================================= */

/* -- 首页容器 -- */
.ch-home {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    padding: 16px 0 24px;
    min-height: 100%;
    position: relative;
    overflow: hidden;
}

/* 首页背景氛围光 */
.ch-home::before {
    content: '';
    position: absolute;
    top: -60%;
    left: -20%;
    width: 60%;
    height: 80%;
    background: radial-gradient(ellipse, rgba(251, 191, 36, 0.06), transparent 70%);
    pointer-events: none;
    animation: ch-home-glow 8s ease-in-out infinite alternate;
}
.ch-home::after {
    content: '';
    position: absolute;
    bottom: -40%;
    right: -20%;
    width: 60%;
    height: 80%;
    background: radial-gradient(ellipse, rgba(239, 68, 68, 0.05), transparent 70%);
    pointer-events: none;
    animation: ch-home-glow 8s ease-in-out infinite alternate-reverse;
}
@keyframes ch-home-glow {
    0% { opacity: 0.5; transform: scale(1); }
    100% { opacity: 1; transform: scale(1.15); }
}

/* -- 标题区 -- */
.ch-home-header {
    text-align: center;
    position: relative;
    z-index: 1;
}
.ch-home-title-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}
.ch-home-title-icon {
    font-size: 1.4rem;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 6px rgba(251, 191, 36, 0.3));
}
.ch-home-title {
    font-size: 1.6rem;
    font-weight: 900;
    color: #f1f5f9;
    letter-spacing: 3px;
    margin: 0;
    text-shadow: 0 2px 12px rgba(99, 102, 241, 0.2);
}
.ch-home-subtitle {
    font-size: 0.82rem;
    color: #64748b;
    margin: 8px 0 0;
    letter-spacing: 1px;
}

/* -- 双卡片容器 -- */
.ch-home-cards {
    display: flex;
    gap: 16px;
    width: 100%;
    padding: 0 12px;
    position: relative;
    z-index: 1;
}

/* -- 模式卡片基础 -- */
.ch-mode-card {
    flex: 1;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    flex-direction: column;
    min-height: 340px;
}
.ch-mode-card:hover {
    transform: translateY(-6px) scale(1.02);
}

/* -- 普通模式 - 天堂主题 -- */
.ch-mode-heaven {
    background: linear-gradient(160deg, #1e1b4b 0%, #172554 40%, #0c4a6e 100%);
    border: 1px solid rgba(251, 191, 36, 0.12);
    box-shadow: 0 4px 24px rgba(99, 102, 241, 0.1);
}
.ch-mode-heaven:hover {
    border-color: rgba(251, 191, 36, 0.35);
    box-shadow: 0 12px 40px rgba(251, 191, 36, 0.12), 0 4px 20px rgba(99, 102, 241, 0.1);
}

/* -- 地狱模式 -- */
.ch-mode-hell {
    background: linear-gradient(160deg, #1c0a00 0%, #450a0a 40%, #7f1d1d 100%);
    border: 1px solid rgba(239, 68, 68, 0.12);
    box-shadow: 0 4px 24px rgba(239, 68, 68, 0.06);
}
.ch-mode-hell:hover {
    border-color: rgba(239, 68, 68, 0.35);
    box-shadow: 0 12px 40px rgba(239, 68, 68, 0.12), 0 4px 20px rgba(185, 28, 28, 0.1);
}

/* -- 卡片背景纹理层 -- */
.ch-mode-card-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}
.ch-heaven-bg {
    background:
        radial-gradient(ellipse 50% 40% at 30% 20%, rgba(251, 191, 36, 0.08), transparent),
        radial-gradient(ellipse 40% 50% at 70% 70%, rgba(99, 102, 241, 0.06), transparent),
        radial-gradient(circle at 50% 0%, rgba(253, 224, 71, 0.04), transparent 60%);
}
.ch-hell-bg {
    background:
        radial-gradient(ellipse 50% 40% at 70% 20%, rgba(239, 68, 68, 0.1), transparent),
        radial-gradient(ellipse 40% 50% at 30% 70%, rgba(245, 158, 11, 0.05), transparent),
        radial-gradient(circle at 50% 100%, rgba(220, 38, 38, 0.06), transparent 60%);
}

/* -- 场景区（门+楼梯） -- */
.ch-mode-card-scene {
    position: relative;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 1;
}
.ch-heaven-scene {
    background: linear-gradient(180deg, transparent 0%, rgba(251, 191, 36, 0.02) 100%);
}
.ch-hell-scene {
    background: linear-gradient(0deg, transparent 0%, rgba(239, 68, 68, 0.02) 100%);
}

/* -- 楼梯 -- */
.ch-stairs {
    position: absolute;
    display: flex;
    flex-direction: column;
    gap: 6px;
    opacity: 0.35;
    transition: opacity 0.4s ease;
}
.ch-mode-card:hover .ch-stairs {
    opacity: 0.55;
}

/* 普通模式楼梯 - 向上延伸（门左侧） */
.ch-stairs-up {
    left: 14px;
    bottom: 10px;
    flex-direction: column-reverse;
}
/* 地狱模式楼梯 - 向下延伸（门右侧） */
.ch-stairs-down {
    right: 14px;
    top: 10px;
}

.ch-stair {
    width: 32px;
    height: 3px;
    border-radius: 2px;
    animation: ch-stair-fade 3s ease-in-out infinite;
    animation-delay: calc(var(--i) * 0.5s);
}
.ch-mode-heaven .ch-stair {
    background: linear-gradient(90deg, rgba(251, 191, 36, 0.6), rgba(251, 191, 36, 0.15));
}
.ch-mode-hell .ch-stair {
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.6));
}

@keyframes ch-stair-fade {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* -- 古门 -- */
.ch-door {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: all 0.4s ease;
}
.ch-mode-card:hover .ch-door {
    transform: scale(1.05);
}

/* 门框 */
.ch-door-frame {
    position: relative;
    width: 80px;
    height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 拱顶 */
.ch-door-arch {
    width: 72px;
    height: 36px;
    border-radius: 36px 36px 0 0;
    position: relative;
    z-index: 2;
}
.ch-door-heaven .ch-door-arch {
    background: linear-gradient(180deg, #92400e, #78350f);
    border: 2px solid rgba(251, 191, 36, 0.35);
    border-bottom: none;
    box-shadow: 0 -4px 16px rgba(251, 191, 36, 0.15);
}
.ch-door-hell .ch-door-arch {
    background: linear-gradient(180deg, #451a03, #3b0a0a);
    border: 2px solid rgba(239, 68, 68, 0.3);
    border-bottom: none;
    box-shadow: 0 -4px 16px rgba(239, 68, 68, 0.15);
}

/* 门板 */
.ch-door-body {
    width: 72px;
    height: 78px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    position: relative;
    z-index: 2;
    margin-top: -1px;
}
.ch-door-heaven .ch-door-body {
    background: linear-gradient(180deg, #78350f 0%, #451a03 100%);
    border: 2px solid rgba(251, 191, 36, 0.25);
    border-top: none;
    color: #fbbf24;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.4);
}
.ch-door-hell .ch-door-body {
    background: linear-gradient(180deg, #3b0a0a 0%, #1c0a00 100%);
    border: 2px solid rgba(239, 68, 68, 0.25);
    border-top: none;
    color: #ef4444;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.4);
}

/* 门板纹路（木纹装饰线） */
.ch-door-body::before,
.ch-door-body::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 60%;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.06);
}
.ch-door-body::before {
    left: 14px;
    top: 20%;
}
.ch-door-body::after {
    right: 14px;
    top: 20%;
}

/* 门光晕 */
.ch-door-glow {
    position: absolute;
    inset: -12px;
    border-radius: 50%;
    filter: blur(18px);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 0;
}
.ch-mode-card:hover .ch-door-glow {
    opacity: 1;
}
.ch-door-glow-heaven {
    background: radial-gradient(circle, rgba(251, 191, 36, 0.2), transparent 70%);
}
.ch-door-glow-hell {
    background: radial-gradient(circle, rgba(239, 68, 68, 0.2), transparent 70%);
}

/* -- 门打开过渡动画 -- */
.ch-mode-card:active .ch-door {
    animation: ch-door-open 0.5s ease-out;
}
@keyframes ch-door-open {
    0% { transform: scale(1.05); }
    50% { transform: scale(1.12) rotateY(5deg); }
    100% { transform: scale(0.95) rotateY(8deg); opacity: 0.7; }
}

/* -- 卡片信息区 -- */
.ch-mode-card-info {
    padding: 16px 18px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
}

/* 徽章 */
.ch-mode-badge {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #fff;
    margin-bottom: 2px;
}
.ch-badge-heaven {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    box-shadow: 0 4px 14px rgba(251, 191, 36, 0.3);
}
.ch-badge-hell {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}

/* 模式名称 */
.ch-mode-name {
    font-size: 1.2rem;
    font-weight: 900;
    letter-spacing: 2px;
}
.ch-name-heaven {
    color: #fbbf24;
    text-shadow: 0 0 16px rgba(251, 191, 36, 0.25);
}
.ch-name-hell {
    color: #f87171;
    text-shadow: 0 0 16px rgba(239, 68, 68, 0.25);
}

/* 模式描述 */
.ch-mode-desc {
    font-size: 0.72rem;
    color: #64748b;
    letter-spacing: 0.5px;
}

/* 进度区 */
.ch-mode-progress {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.ch-mode-progress-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.ch-progress-label {
    font-size: 0.72rem;
    color: #475569;
    font-weight: 500;
}
.ch-progress-value {
    font-size: 0.88rem;
    font-weight: 800;
    color: #e2e8f0;
}
.ch-progress-total {
    font-size: 0.72rem;
    color: #475569;
    font-weight: 500;
}
.ch-stars {
    color: #fbbf24 !important;
}
.ch-stars i {
    font-size: 0.7rem;
    margin-left: 2px;
}

/* -- 底部入口 -- */
.ch-home-footer {
    width: 100%;
    max-width: 400px;
    position: relative;
    z-index: 1;
}
.ch-footer-entry {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: rgba(30, 41, 59, 0.3);
    border: 1px solid rgba(251, 191, 36, 0.1);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #94a3b8;
    font-size: 0.92rem;
    font-weight: 600;
}
.ch-footer-entry:hover {
    background: rgba(251, 191, 36, 0.05);
    border-color: rgba(251, 191, 36, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(251, 191, 36, 0.06);
    color: #f1f5f9;
}
.ch-footer-icon {
    font-size: 1.1rem;
    color: #fbbf24;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(251, 191, 36, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}
.ch-footer-arrow {
    margin-left: auto;
    font-size: 0.75rem;
    color: #475569;
    transition: all 0.3s ease;
}
.ch-footer-entry:hover .ch-footer-arrow {
    color: #fbbf24;
    transform: translateX(3px);
}

/* =============================================
   响应式适配
   ============================================= */
@media (max-width: 380px) {
    .ch-mode-card {
        min-height: 310px;
    }
    .ch-door-frame {
        width: 66px;
        height: 100px;
    }
    .ch-door-arch {
        width: 60px;
        height: 30px;
        border-radius: 30px 30px 0 0;
    }
    .ch-door-body {
        width: 60px;
        height: 64px;
        font-size: 1.2rem;
    }
    .ch-stair {
        width: 26px;
    }
    .ch-home-title {
        font-size: 1.35rem;
    }
    .ch-mode-name {
        font-size: 1.05rem;
    }
}


/* ========== 闯天关 - 开始闯关界面 ========== */
.ch-ready-panel {
    text-align: center;
    padding: 40px 20px;
    background: rgba(30, 41, 59, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    margin: 20px 0;
}

.ch-ready-icon {
    font-size: 3.5rem;
    color: #60a5fa;
    margin-bottom: 16px;
    animation: ready-pulse 2s ease-in-out infinite;
}

@keyframes ready-pulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.08); opacity: 1; }
}

.ch-ready-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #e2e8f0;
    margin-bottom: 10px;
}

.ch-ready-desc {
    font-size: 0.9rem;
    color: #94a3b8;
    margin-bottom: 24px;
}

.ch-ready-count {
    color: #fbbf24;
    font-weight: 700;
    font-size: 1.1rem;
}

.ch-ready-rules {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 28px;
    text-align: left;
    max-width: 240px;
    margin-left: auto;
    margin-right: auto;
}

.ch-ready-rule {
    font-size: 0.85rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ch-ready-rule i {
    color: #10b981;
    font-size: 0.8rem;
    width: 16px;
    text-align: center;
}

.ch-start-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 40px;
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.25), rgba(96, 165, 250, 0.12));
    color: #60a5fa;
    border: 2px solid rgba(96, 165, 250, 0.5);
    border-radius: 14px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 0 24px rgba(96, 165, 250, 0.15);
}

.ch-start-btn:hover {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.35), rgba(96, 165, 250, 0.2));
    transform: translateY(-2px);
    box-shadow: 0 0 32px rgba(96, 165, 250, 0.25);
}

.ch-start-btn:active {
    transform: translateY(0);
}

/* ========== 闯天关 - 题号导航条 ========== */
.ch-question-nav {
    background: rgba(30, 41, 59, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 16px;
}

.ch-nav-stats {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.ch-nav-stat {
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.ch-nav-stat i {
    font-size: 0.65rem;
}

.ch-nav-answered {
    color: #10b981;
}

.ch-nav-skipped {
    color: #f59e0b;
}

.ch-nav-remaining {
    color: #64748b;
}

.ch-nav-dots {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}

.ch-nav-dot {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    background: rgba(30, 41, 59, 0.4);
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.ch-nav-dot:hover:not(.ch-nav-dot-current) {
    border-color: rgba(96, 165, 250, 0.4);
    background: rgba(96, 165, 250, 0.08);
    color: #94a3b8;
}

.ch-nav-dot-current {
    border-color: #60a5fa;
    background: rgba(96, 165, 250, 0.2);
    color: #60a5fa;
    box-shadow: 0 0 10px rgba(96, 165, 250, 0.2);
    transform: scale(1.08);
}

.ch-nav-dot-answered {
    border-color: rgba(16, 185, 129, 0.35);
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
}

.ch-nav-dot-answered.ch-nav-dot-current {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.25);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.ch-nav-dot-skipped {
    border-color: rgba(245, 158, 11, 0.35);
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
}

.ch-nav-dot-skipped.ch-nav-dot-current {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.25);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
}

.ch-nav-quick-actions {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.ch-nav-quick-btn {
    padding: 5px 14px;
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s;
}

.ch-nav-quick-btn:hover {
    background: rgba(245, 158, 11, 0.2);
}

/* ========== 闯天关 - 淘汰提示 ========== */
.ch-knockout-banner {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 16px;
    animation: knockout-shake 0.5s ease-in-out;
}

@keyframes knockout-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-4px); }
    40% { transform: translateX(4px); }
    60% { transform: translateX(-3px); }
    80% { transform: translateX(2px); }
}

/* 已锁定（已答过）的选项样式 */
.ch-option-locked {
    cursor: default !important;
}


/* ========== 称号系统样式 ========== */

/* 称号获得通知弹窗 */
.title-notification-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: title-notif-in 0.4s ease;
}
.title-notification-fade-out {
    animation: title-notif-out 0.5s ease forwards;
}
@keyframes title-notif-in {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes title-notif-out {
    from { opacity: 1; }
    to { opacity: 0; }
}

.title-notification-card {
    position: relative;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-radius: 20px;
    padding: 32px 36px;
    max-width: 360px;
    width: 90%;
    text-align: center;
    animation: title-card-pop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}
.title-notification-card.normal {
    border: 2px solid rgba(96, 165, 250, 0.5);
    box-shadow: 0 0 30px rgba(96, 165, 250, 0.15);
}
.title-notification-card.hell {
    border: 2px solid rgba(239, 68, 68, 0.5);
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.15);
}
.title-notification-card.general {
    border: 2px solid rgba(250, 204, 21, 0.5);
    box-shadow: 0 0 30px rgba(250, 204, 21, 0.15);
}
.title-notification-card.boss {
    border: 2px solid rgba(167, 139, 250, 0.5);
    box-shadow: 0 0 30px rgba(167, 139, 250, 0.15);
}
.title-notification-card.condition {
    border: 2px solid rgba(52, 211, 153, 0.5);
    box-shadow: 0 0 30px rgba(52, 211, 153, 0.15);
}

@keyframes title-card-pop {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.title-notification-sparkle {
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle at 30% 30%, rgba(255,215,0,0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 70%, rgba(255,215,0,0.05) 0%, transparent 50%);
    animation: sparkle-rotate 4s linear infinite;
    pointer-events: none;
}
@keyframes sparkle-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.title-notification-icon {
    font-size: 48px;
    margin-bottom: 12px;
    animation: title-icon-float 2s ease-in-out infinite;
}
.title-notification-card.normal .title-notification-icon { color: #60a5fa; }
.title-notification-card.hell .title-notification-icon { color: #f87171; }
.title-notification-card.general .title-notification-icon { color: #fbbf24; }
.title-notification-card.boss .title-notification-icon { color: #a78bfa; }
.title-notification-card.condition .title-notification-icon { color: #34d399; }

@keyframes title-icon-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.title-notification-label {
    font-size: 12px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 4px;
}
.title-notification-name {
    font-size: 28px;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 8px;
}
.title-notification-desc {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 12px;
}
.title-notification-category {
    display: inline-block;
    padding: 2px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}
.title-notification-card.normal .title-notification-category {
    background: rgba(96, 165, 250, 0.15);
    color: #60a5fa;
}
.title-notification-card.hell .title-notification-category {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}
.title-notification-card.general .title-notification-category {
    background: rgba(250, 204, 21, 0.15);
    color: #fbbf24;
}
.title-notification-card.boss .title-notification-category {
    background: rgba(167, 139, 250, 0.15);
    color: #a78bfa;
}
.title-notification-card.condition .title-notification-category {
    background: rgba(52, 211, 153, 0.15);
    color: #34d399;
}

.title-notification-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: #64748b;
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
}
.title-notification-close:hover { color: #e2e8f0; }

/* 称号墙页面 */
.title-wall-summary {
    text-align: center;
    padding: 16px 20px 8px;
}
.title-wall-count {
    font-size: 14px;
    color: #94a3b8;
    margin-bottom: 8px;
}
.title-count-num {
    font-size: 24px;
    font-weight: 700;
    color: #fbbf24;
}
.title-count-total {
    font-size: 16px;
    color: #64748b;
}
.title-wall-progress-bar {
    height: 6px;
    background: #1e293b;
    border-radius: 3px;
    overflow: hidden;
    max-width: 200px;
    margin: 0 auto;
}
.title-wall-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #60a5fa, #fbbf24, #f87171);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.title-wall-category {
    margin: 16px 12px 0;
}
.title-wall-cat-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 10px;
}
.title-wall-cat-header.normal {
    background: rgba(96, 165, 250, 0.1);
    color: #60a5fa;
}
.title-wall-cat-header.hell {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
}
.title-wall-cat-header.general {
    background: rgba(250, 204, 21, 0.1);
    color: #fbbf24;
}
.title-wall-cat-header.boss {
    background: rgba(167, 139, 250, 0.1);
    color: #a78bfa;
}
.title-wall-cat-header.condition {
    background: rgba(52, 211, 153, 0.1);
    color: #34d399;
}
.title-wall-cat-count {
    margin-left: auto;
    font-size: 13px;
    font-weight: 400;
    opacity: 0.7;
}

.title-wall-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.title-wall-item {
    background: #1e293b;
    border-radius: 12px;
    padding: 14px 10px 12px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.title-wall-item.earned {
    border: 1px solid rgba(250, 204, 21, 0.2);
}
.title-wall-item.earned:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.title-wall-item.locked {
    opacity: 0.4;
    border: 1px solid #334155;
}
.title-wall-item.earned.normal { border-color: rgba(96, 165, 250, 0.25); }
.title-wall-item.earned.hell { border-color: rgba(239, 68, 68, 0.25); }
.title-wall-item.earned.general { border-color: rgba(250, 204, 21, 0.25); }
.title-wall-item.earned.boss { border-color: rgba(167, 139, 250, 0.25); }
.title-wall-item.earned.condition { border-color: rgba(52, 211, 153, 0.25); }

.title-wall-icon {
    font-size: 28px;
    margin-bottom: 8px;
}
.title-wall-item.earned.normal .title-wall-icon { color: #60a5fa; }
.title-wall-item.earned.hell .title-wall-icon { color: #f87171; }
.title-wall-item.earned.general .title-wall-icon { color: #fbbf24; }
.title-wall-item.earned.boss .title-wall-icon { color: #a78bfa; }
.title-wall-item.earned.condition .title-wall-icon { color: #34d399; }
.title-wall-item.locked .title-wall-icon { color: #475569; }

.title-wall-name {
    font-size: 14px;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 4px;
}
.title-wall-item.locked .title-wall-name { color: #64748b; }

.title-wall-desc {
    font-size: 11px;
    color: #64748b;
    line-height: 1.4;
    margin-bottom: 4px;
    flex: 1;
    min-height: 30px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.title-wall-date {
    font-size: 10px;
    color: #475569;
    flex-shrink: 0;
    min-height: 14px;
}


/* ========== BOSS战动画 ========== */

/* BOSS受击动画 */
@keyframes boss-hit {
    0% { transform: translateX(0) scale(1); }
    15% { transform: translateX(-8px) scale(1.02); filter: brightness(2) saturate(0); }
    30% { transform: translateX(6px) scale(0.98); }
    45% { transform: translateX(-4px) scale(1.01); }
    60% { transform: translateX(3px) scale(0.99); }
    75% { transform: translateX(-1px); }
    100% { transform: translateX(0) scale(1); filter: brightness(1) saturate(1); }
}
.boss-hit-anim {
    animation: boss-hit 0.5s ease-out;
}

/* 屏幕震动 */
@keyframes screen-shake {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-3px, -2px); }
    20% { transform: translate(4px, 1px); }
    30% { transform: translate(-2px, 3px); }
    40% { transform: translate(3px, -1px); }
    50% { transform: translate(-1px, 2px); }
    60% { transform: translate(2px, -3px); }
    70% { transform: translate(-3px, 1px); }
    80% { transform: translate(1px, -2px); }
    90% { transform: translate(-2px, 3px); }
}
.screen-shake-anim {
    animation: screen-shake 0.4s ease-out;
}

/* BOSS震动（暴怒状态） */
@keyframes boss-shake {
    0%, 100% { transform: scale(1) rotate(0deg); }
    10% { transform: scale(1.05) rotate(-2deg); }
    20% { transform: scale(0.97) rotate(2deg); }
    30% { transform: scale(1.03) rotate(-1deg); }
    40% { transform: scale(0.99) rotate(1deg); }
    50% { transform: scale(1.02) rotate(-1deg); }
    60% { transform: scale(1); }
}
.boss-shake-anim {
    animation: boss-shake 0.6s ease-in-out infinite;
}

/* BOSS HP暴怒脉冲 */
@keyframes boss-hp-rage-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    50% { box-shadow: 0 0 15px 5px rgba(239, 68, 68, 0.7); }
}
.boss-hp-rage .boss-hp-bar-boss-track {
    animation: boss-hp-rage-pulse 1s ease-in-out infinite;
}

/* BOSS门脉冲动画 */
@keyframes boss-gate-pulse {
    0%, 100% { box-shadow: 0 0 10px rgba(167, 139, 250, 0.3), inset 0 0 10px rgba(167, 139, 250, 0.1); }
    50% { box-shadow: 0 0 25px rgba(167, 139, 250, 0.6), inset 0 0 20px rgba(167, 139, 250, 0.2); }
}

/* 用户受击闪红 */
@keyframes user-damage-flash {
    0%, 100% { background-color: transparent; }
    50% { background-color: rgba(239, 68, 68, 0.15); }
}
.user-damage-flash {
    animation: user-damage-flash 0.4s ease-out;
}

/* ========== BOSS战结果页面 ========== */

.boss-result-page {
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.boss-result-card {
    background: linear-gradient(145deg, #1e293b, #0f172a);
    border-radius: 20px;
    padding: 32px 28px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    position: relative;
    z-index: 2;
}

.victory-card {
    border: 2px solid rgba(251, 191, 36, 0.4);
    box-shadow: 0 0 40px rgba(251, 191, 36, 0.15), 0 20px 60px rgba(0, 0, 0, 0.5);
}

.defeat-card {
    border: 2px solid rgba(239, 68, 68, 0.3);
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.1), 0 20px 60px rgba(0, 0, 0, 0.5);
}

.boss-result-badge {
    width: 90px;
    height: 90px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.victory-badge {
    background: linear-gradient(145deg, #fbbf24, #f59e0b);
    box-shadow: 0 0 30px rgba(251, 191, 36, 0.5);
}

.defeat-badge {
    background: linear-gradient(145deg, #374151, #1f2937);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

.boss-defeated-icon {
    font-size: 36px;
    animation: boss-defeated-spin 1s ease-out;
}

@keyframes boss-defeated-spin {
    0% { transform: rotate(0deg) scale(1.5); opacity: 0; }
    50% { transform: rotate(180deg) scale(1.2); opacity: 1; }
    100% { transform: rotate(360deg) scale(1); opacity: 1; }
}

.boss-defeat-icon {
    font-size: 36px;
    color: #ef4444;
    animation: boss-defeat-icon-appear 0.6s ease-out;
}

@keyframes boss-defeat-icon-appear {
    0% { transform: scale(0.3); opacity: 0; }
    60% { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
}

.boss-result-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
}

.victory-title {
    color: #fbbf24;
    text-shadow: 0 0 20px rgba(251, 191, 36, 0.4);
}

.defeat-title {
    color: #f87171;
}

.boss-result-subtitle {
    font-size: 14px;
    color: #94a3b8;
    margin-bottom: 24px;
    line-height: 1.5;
}

.boss-result-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.boss-stat-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 12px 8px;
}

.boss-stat-value {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

.victory-value {
    color: #fbbf24;
}

.defeat-value {
    color: #f87171;
}

.boss-stat-label {
    font-size: 11px;
    color: #64748b;
}

.boss-perfect-notice {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(245, 158, 11, 0.1));
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 12px;
    padding: 14px 20px;
    margin-bottom: 20px;
    font-size: 15px;
    font-weight: 600;
    color: #fbbf24;
    animation: perfect-glow 2s ease-in-out infinite;
}

@keyframes perfect-glow {
    0%, 100% { box-shadow: 0 0 10px rgba(251, 191, 36, 0.2); }
    50% { box-shadow: 0 0 25px rgba(251, 191, 36, 0.4); }
}

.boss-perfect-notice i {
    margin-right: 8px;
}

.boss-hp-remaining {
    background: rgba(52, 211, 153, 0.1);
    border: 1px solid rgba(52, 211, 153, 0.25);
    border-radius: 12px;
    padding: 12px 20px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #34d399;
}

.boss-hp-remaining i {
    margin-right: 8px;
    color: #f87171;
}

.boss-result-title-unlock {
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.15), rgba(139, 92, 246, 0.1));
    border: 1px solid rgba(167, 139, 250, 0.3);
    border-radius: 12px;
    padding: 14px 20px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 600;
    color: #a78bfa;
}

.boss-result-title-unlock i {
    margin-right: 8px;
}

/* BOSS失败页 - BOSS HP进度条 */
.boss-defeat-hp-bar {
    margin-bottom: 24px;
    text-align: left;
}

.boss-defeat-hp-label {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 6px;
}

.boss-defeat-hp-track {
    height: 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 5px;
    overflow: hidden;
}

.boss-defeat-hp-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 1s ease-out;
}

/* BOSS结果页按钮 */
.boss-result-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.boss-btn {
    padding: 12px 24px;
    border-radius: 12px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.boss-btn-retry {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.boss-btn-retry:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.boss-btn-return {
    background: rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.boss-btn-return:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
    transform: translateY(-2px);
}

/* 胜利粒子 */
.boss-result-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.boss-victory-particle {
    position: absolute;
    bottom: -10px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    opacity: 0;
    animation: particle-rise 3s ease-out forwards;
}

@keyframes particle-rise {
    0% { opacity: 1; transform: translateY(0) translateX(0) scale(1); }
    50% { opacity: 0.8; transform: translateY(calc(var(--ty) * 0.5)) translateX(var(--tx)) scale(0.8); }
    100% { opacity: 0; transform: translateY(var(--ty)) translateX(var(--tx)) scale(0); }
}

/* ========== BOSS战Playing页面增强 ========== */

/* BOSS战信息栏 */
.boss-battle-header {
    text-align: center;
    margin-bottom: 8px;
}

.boss-battle-title {
    font-size: 18px;
    font-weight: 700;
    color: #a78bfa;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 4px;
}

.boss-battle-subtitle {
    font-size: 12px;
    color: #64748b;
}

/* BOSS HP条容器 */
.boss-hp-container {
    margin-bottom: 16px;
}

.boss-hp-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.boss-hp-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.boss-hp-avatar.boss-avatar {
    background: linear-gradient(135deg, #7f1d1d, #991b1b);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

.boss-hp-avatar.boss-avatar.rage-mode {
    background: linear-gradient(135deg, #991b1b, #dc2626);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.6);
    animation: boss-shake 0.6s ease-in-out infinite;
}

.boss-hp-avatar.user-avatar {
    background: linear-gradient(135deg, #1e3a5f, #1e40af);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

.boss-hp-info {
    flex: 1;
    min-width: 0;
}

.boss-hp-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.boss-hp-name {
    font-size: 12px;
    font-weight: 600;
    color: #e2e8f0;
}

.boss-hp-numbers {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 500;
}

.boss-hp-bar-boss-track {
    height: 12px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.boss-hp-bar-user-track {
    height: 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 5px;
    overflow: hidden;
}

.boss-hp-bar-fill {
    height: 100%;
    border-radius: inherit;
    transition: width 0.5s ease-out;
    position: relative;
}



.boss-hp-bar-fill.low-hp {
    background: linear-gradient(90deg, #f59e0b, #ef4444) !important;
}

.boss-hp-vs {
    text-align: center;
    font-size: 13px;
    font-weight: 800;
    color: #475569;
    margin: 2px 0;
    letter-spacing: 2px;
}

/* BOSS连胜显示 */
.boss-streak-display {
    text-align: center;
    font-size: 13px;
    color: #fbbf24;
    margin-bottom: 12px;
    min-height: 20px;
}

.boss-streak-display i {
    margin-right: 4px;
}

.boss-streak-display.active {
    animation: streak-fire 0.5s ease-out;
}

@keyframes streak-fire {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); color: #f59e0b; }
    100% { transform: scale(1); }
}

/* BOSS关卡卡片样式 (关卡地图) */
.stage-card.boss-cleared {
    border-color: rgba(167, 139, 250, 0.4) !important;
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.08), rgba(139, 92, 246, 0.04)) !important;
}

.stage-card.boss-current {
    border-color: rgba(167, 139, 250, 0.6) !important;
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.12), rgba(139, 92, 246, 0.06)) !important;
    animation: boss-gate-pulse 2s ease-in-out infinite;
}

.stage-card.boss-available {
    border-color: rgba(167, 139, 250, 0.3) !important;
}

/* BOSS关卡序号特殊样式 */
.boss-stage-number {
    background: linear-gradient(135deg, #7c3aed, #6d28d9) !important;
    color: white !important;
}

.boss-stage-number i {
    font-size: inherit;
}

/* BOSS标签 */
.boss-stage-label {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    margin-top: 4px;
}

.boss-stage-label.active {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.boss-stage-label.defeated {
    background: rgba(52, 211, 153, 0.15);
    color: #34d399;
}

/* 响应式调整 */
@media (max-width: 480px) {
    .boss-result-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .boss-stat-value {
        font-size: 16px;
    }
    .boss-result-card {
        padding: 24px 20px;
    }
    .boss-result-title {
        font-size: 20px;
    }
}


/* ========== 版本号显示 ========== */
.app-version {
    position: fixed;
    bottom: 8px;
    right: 12px;
    font-size: 0.7rem;
    color: rgba(100, 116, 139, 0.5);
    z-index: 5;
    user-select: none;
    cursor: default;
}

/* ========== 闯天关UI升级 v2.54 ========== */

/* 页面过渡动画 */
.page-transition-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 99999;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-transition-overlay .pt-bar {
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent, #6366f1), transparent);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.page-transition-overlay.active .pt-bar {
    width: 60%;
}

.page-transition-overlay.done .pt-bar {
    width: 100%;
    opacity: 0;
    transition: width 0.2s ease, opacity 0.2s ease 0.1s;
}

/* 页面内容淡入淡出 */
.page-fade-in {
    animation: pageFadeIn 0.35s ease-out;
}

@keyframes pageFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.page-fade-out {
    animation: pageFadeOut 0.2s ease-in;
}

@keyframes pageFadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-8px); }
}

/* 关卡卡片升级 */
.stage-card {
    backdrop-filter: blur(4px);
    position: relative;
    overflow: visible;
    aspect-ratio: 1 / 1;
}

.stage-card::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.02), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.stage-card:hover::before {
    opacity: 1;
}

/* BOSS关卡卡片中的迷你BOSS图 */
.stage-boss-img-wrap {
    width: 80px;
    height: 80px;
    margin: 4px 0 6px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid rgba(192,132,252,0.3);
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}
.stage-card.boss-big .stage-boss-img-wrap {
    width: 120px;
    height: 120px;
    border-color: rgba(251,191,36,0.5);
    box-shadow: 0 0 16px rgba(251,191,36,0.15);
}
.stage-boss-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}
.stage-card.available:hover .stage-boss-img-wrap {
    border-color: rgba(192,132,252,0.7);
    box-shadow: 0 0 12px rgba(192,132,252,0.2);
}
.stage-card.current .stage-boss-img-wrap {
    border-color: rgba(192,132,252,0.6);
    box-shadow: 0 0 16px rgba(192,132,252,0.3);
}
.stage-boss-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
/* BOSS卡片整体更高 */
.stage-card.boss-card {
    min-height: 220px;
    padding: 14px 8px;
}

/* 大BOSS卡片 */
.stage-card.boss-big {
    min-height: 260px;
    border-color: rgba(251,191,36,0.4) !important;
    background: linear-gradient(135deg, rgba(251,191,36,0.06), rgba(239,68,68,0.03)) !important;
}
.stage-card.boss-big.current {
    border-color: rgba(251,191,36,0.7) !important;
    box-shadow: 0 0 24px rgba(251,191,36,0.25);
}

/* 小BOSS卡片 */
.stage-card.boss-mini {
    min-height: 200px;
    border-color: rgba(192,132,252,0.35) !important;
    background: linear-gradient(135deg, rgba(139,92,246,0.05), rgba(167,139,250,0.03)) !important;
}
.stage-card.boss-mini.current {
    border-color: rgba(192,132,252,0.7) !important;
    box-shadow: 0 0 20px rgba(192,132,252,0.25);
}


.stage-card.available:hover {
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 8px 25px rgba(99,102,241,0.15);
}

.stage-card.current {
    box-shadow: 0 0 20px rgba(99,102,241,0.1);
}

.stage-card.current:hover {
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 8px 30px rgba(99,102,241,0.25);
}

/* 关卡图标升级 */
.sg-icon {
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.sg-icon:hover {
    transform: scale(1.1) rotate(3deg);
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

/* 关卡数字升级 */
.stage-number {
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
    letter-spacing: 0.5px;
}

/* 关卡网格升级 - 4列固定 */
.stage-grid {
    --grid-cols: 4;
    display: grid;
    grid-template-columns: repeat(var(--grid-cols), minmax(0, 1fr));
    gap: 22px;
    padding: 6px 0 12px;
}

/* BOSS关卡标签升级 */
.stage-boss-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: #c084fc;
    text-shadow: 0 0 8px rgba(192,132,252,0.3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 130px;
}
.stage-card.boss-big .stage-boss-label {
    color: #fbbf24;
    font-size: 0.8rem;
    text-shadow: 0 0 12px rgba(251,191,36,0.4);
    max-width: 160px;
}
.stage-boss-type {
    font-size: 0.6rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}
.stage-boss-type.big {
    background: rgba(251,191,36,0.2);
    color: #fbbf24;
    border: 1px solid rgba(251,191,36,0.4);
}
.stage-boss-type.mini {
    background: rgba(192,132,252,0.2);
    color: #c084fc;
    border: 1px solid rgba(192,132,252,0.4);
}

/* ==========================================
   关卡图标新设计 — 大小BOSS分离布局
   ========================================== */

/* -- 8层层级色 -- */
:root {
    --boss-l0: #22c55e; --boss-l1: #a78bfa; --boss-l2: #fbbf24; --boss-l3: #f97316;
    --boss-l4: #8b5cf6; --boss-l5: #ef4444; --boss-l6: #dc2626; --boss-l7: #7c3aed;
}

/* === 大BOSS通栏横幅（方案B）=== */
.stage-card.boss-banner {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 200px 1fr 170px;
    gap: 20px;
    align-items: center;
    min-height: 250px;
    padding: 16px 20px;
    border-radius: 18px;
    cursor: pointer;
    transition: all 0.3s;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #161623, #0c0c14);
    border: 2px solid color-mix(in srgb, var(--boss-theme) 35%, transparent);
}
.stage-card.boss-banner:hover {
    transform: translateY(-3px);
    border-color: var(--boss-theme);
    box-shadow: 0 6px 30px color-mix(in srgb, var(--boss-theme) 20%, transparent);
}

/* 紫雾装饰动画 */
.boss-mist {
    position: absolute; right: 0; top: 0; bottom: 0; width: 40%;
    background: radial-gradient(ellipse at 80% 40%, color-mix(in srgb, var(--boss-theme) 3%, transparent) 0%, transparent 50%),
                radial-gradient(ellipse at 90% 65%, color-mix(in srgb, var(--boss-theme) 2%, transparent) 0%, transparent 40%);
    pointer-events: none; z-index: 0;
    animation: boss-mist-drift 12s ease-in-out infinite;
}
@keyframes boss-mist-drift {
    0%, 100% { opacity: 0.3; transform: translateX(0); }
    50% { opacity: 0.5; transform: translateX(-10px); }
}

/* 左：BOSS大图 */
.boss-banner-img {
    width: 160px; height: 213px; flex-shrink: 0;
    border-radius: 14px; overflow: hidden;
    border: 2px solid color-mix(in srgb, var(--boss-theme) 40%, transparent);
    background: #000;
    box-shadow: 0 4px 20px color-mix(in srgb, var(--boss-theme) 15%, transparent);
    z-index: 1; position: relative;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto;
}
.boss-banner-img img {
    width: 100%; height: 100%; object-fit: contain;
}
.boss-badge-icon {
    position: absolute; top: 8px; right: 8px; width: 30px; height: 30px;
    border-radius: 10px; background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px); border: 2px solid var(--boss-theme);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem; color: var(--boss-theme); z-index: 2;
}
.boss-badge-icon.big-crown {
    box-shadow: 0 0 12px color-mix(in srgb, var(--boss-theme) 30%, transparent);
}

/* 中：信息区 */
.boss-banner-info {
    display: flex; flex-direction: column; gap: 8px; z-index: 1; min-width: 0;
}
.boss-banner-header {
    display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
}
.boss-banner-name {
    font-size: 1.25rem; font-weight: 800; color: #f1f5f9;
}
.boss-banner-local {
    font-size: 0.78rem; color: #94a3b8;
}
.boss-banner-tagline {
    font-size: 0.7rem; color: var(--boss-theme); font-weight: 600;
}
.boss-banner-source {
    font-size: 0.65rem; color: #64748b; font-style: italic;
}
.boss-banner-quote {
    font-size: 0.78rem; color: #64748b; font-style: italic;
    padding: 8px 14px; border-left: 3px solid color-mix(in srgb, var(--boss-theme) 35%, transparent);
    background: rgba(255,255,255,0.015); border-radius: 0 6px 6px 0; line-height: 1.5;
}
.boss-banner-story {
    font-size: 0.74rem; color: #94a3b8; line-height: 1.55;
    display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 右：属性面板 */
.boss-banner-stats {
    display: flex; flex-direction: column; gap: 10px; z-index: 1;
    padding: 14px; background: rgba(0,0,0,0.35); border-radius: 14px;
    border: 1px solid color-mix(in srgb, var(--boss-theme) 15%, transparent);
    backdrop-filter: blur(4px);
}
.boss-stat-section { }
.boss-stat-title {
    font-size: 0.58rem; color: #64748b; text-transform: uppercase;
    letter-spacing: 1px; margin-bottom: 5px;
}
.boss-stat-difficulty {
    font-size: 0.7rem; color: var(--boss-theme); letter-spacing: 1px;
}
.boss-stat-hp-row {
    display: flex; align-items: center; gap: 6px; margin-bottom: 3px;
}
.boss-stat-hp-bar {
    flex: 1; height: 5px; background: rgba(255,255,255,0.06);
    border-radius: 3px; overflow: hidden;
}
.boss-stat-hp-fill {
    height: 100%; background: var(--boss-theme); border-radius: 3px;
    transition: width 0.6s;
}
.boss-stat-hp-text {
    font-size: 0.58rem; color: #64748b; min-width: 34px; text-align: right;
}
.boss-stat-moves {
    display: flex; gap: 4px; flex-wrap: wrap;
}
.boss-stat-move {
    font-size: 0.68rem; padding: 2px 7px; border-radius: 5px;
    background: color-mix(in srgb, var(--boss-theme) 10%, transparent);
    color: var(--boss-theme);
    border: 1px solid color-mix(in srgb, var(--boss-theme) 20%, transparent);
}
.boss-stat-reward {
    font-size: 0.66rem; color: var(--boss-theme);
    display: flex; align-items: center; gap: 4px;
}
.boss-banner-status {
    margin-top: auto;
}
.boss-banner-status-badge {
    font-size: 0.7rem; padding: 3px 12px; border-radius: 10px; display: inline-block;
}
.boss-status-available {
    background: color-mix(in srgb, var(--boss-theme) 18%, transparent);
    color: var(--boss-theme);
}
.boss-status-locked {
    background: rgba(100,116,139,0.08); color: #64748b;
}
.boss-status-cleared {
    background: rgba(16,185,129,0.12); color: #34d399;
}

/* === 小BOSS大卡片（方案A）=== */
.stage-card.boss-mini-card {
    min-height: 230px;
    padding: 16px 12px 12px;
    border-radius: 16px;
    display: flex; flex-direction: column; align-items: center;
    background: linear-gradient(180deg, #161e2e, #0c0c14);
    border: 2px solid color-mix(in srgb, var(--boss-theme) 30%, transparent);
    transition: all 0.3s; overflow: hidden; position: relative;
}
.stage-card.boss-mini-card:hover {
    transform: translateY(-4px);
    border-color: var(--boss-theme);
    box-shadow: 0 8px 28px color-mix(in srgb, var(--boss-theme) 18%, transparent);
}
.boss-mini-badge {
    position: absolute; top: 10px; right: 10px; width: 26px; height: 26px;
    border-radius: 8px; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
    border: 1.5px solid var(--boss-theme);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem; color: var(--boss-theme); z-index: 2;
}
.boss-mini-img {
    width: 120px; height: 160px; border-radius: 12px; overflow: hidden;
    border: 2px solid color-mix(in srgb, var(--boss-theme) 40%, transparent);
    background: #000; margin-bottom: 8px;
    box-shadow: 0 4px 16px color-mix(in srgb, var(--boss-theme) 12%, transparent);
    display: flex; align-items: center; justify-content: center;
}
.boss-mini-img img {
    width: 100%; height: 100%; object-fit: contain;
}
.boss-mini-info { text-align: center; z-index: 1; }
.boss-mini-name {
    font-size: 0.85rem; font-weight: 700; color: #e2e8f0; margin-bottom: 1px;
}
.boss-mini-local {
    font-size: 0.68rem; color: #94a3b8;
}
.boss-mini-difficulty {
    margin-top: 5px; font-size: 0.62rem; letter-spacing: 2px; color: var(--boss-theme);
}
.boss-mini-status {
    margin-top: 6px; font-size: 0.65rem; padding: 2px 10px; border-radius: 8px; display: inline-block;
}
.boss-mini-available {
    background: color-mix(in srgb, var(--boss-theme) 15%, transparent); color: var(--boss-theme);
}
.boss-mini-locked {
    background: rgba(100,116,139,0.08); color: #64748b;
}
.boss-mini-cleared {
    background: rgba(16,185,129,0.12); color: #34d399;
}

/* 响应式：大BOSS横幅在小屏幕折叠 */
@media (max-width: 768px) {
    .stage-card.boss-banner {
        grid-template-columns: 110px 1fr;
        gap: 12px; padding: 14px; min-height: auto;
    }
    .boss-banner-img { width: 110px; height: 147px; }
    .boss-banner-stats { display: none; }
    .boss-banner-name { font-size: 1rem; }
    .boss-banner-story { -webkit-line-clamp: 2; }
}

/* === 普通关卡大卡片升级 === */
.stage-card .stage-card-number {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--stage-color, #60a5fa);
    line-height: 1;
    margin-bottom: 4px;
    text-shadow: 0 0 10px color-mix(in srgb, var(--stage-color, #60a5fa) 30%, transparent);
}
.stage-card .stage-card-icon {
    font-size: 1.5rem;
    margin-bottom: 4px;
    color: var(--stage-color, #94a3b8);
}
.stage-card .stage-card-name {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}
.stage-card .stage-card-progress {
    width: 70%;
    height: 3px;
    background: rgba(255,255,255,0.06);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 4px;
}
.stage-card .stage-card-progress-fill {
    height: 100%;
    background: var(--stage-color, #60a5fa);
    border-radius: 2px;
    transition: width 0.4s;
}

/* 关卡颜色装饰条（顶部） */
.stage-card-color-bar {
    position: absolute; top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--stage-color, #60a5fa);
    border-radius: 16px 16px 0 0;
    opacity: 0.6;
    transition: opacity 0.3s;
}
.stage-card:hover .stage-card-color-bar { opacity: 1; }
.stage-card.cleared .stage-card-color-bar { opacity: 0.85; }

/* 关卡名称标签 */
.stage-card-label {
    font-size: 0.62rem; color: #64748b;
    margin-top: 4px; letter-spacing: 0.05em;
    font-weight: 600;
}
.stage-card.cleared .stage-card-label { color: #94a3b8; }
.stage-card.current .stage-card-label { color: var(--stage-color, #60a5fa); }

/* 关卡星级 */
.stage-card-mini-stars {
    font-size: 0.55rem; letter-spacing: 2px;
    margin-top: 2px;
}
.stage-card .stage-card-status {
    font-size: 0.62rem;
    padding: 1px 8px;
    border-radius: 6px;
}
.stage-card .status-available {
    background: color-mix(in srgb, var(--stage-color, #60a5fa) 15%, transparent);
    color: var(--stage-color, #60a5fa);
}
.stage-card .status-current {
    background: color-mix(in srgb, var(--stage-color, #60a5fa) 20%, transparent);
    color: var(--stage-color, #60a5fa);
    font-weight: 700;
    animation: stage-pulse 2s ease-in-out infinite;
}
.stage-card .status-locked {
    background: rgba(100,116,139,0.08);
    color: #64748b;
}
.stage-card .status-cleared {
    background: rgba(16,185,129,0.12);
    color: #34d399;
}
.stage-card .stage-card-stars {
    font-size: 0.65rem;
    letter-spacing: 1px;
    color: #fbbf24;
}
@keyframes stage-pulse {
    0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--stage-color, #60a5fa) 30%, transparent); }
    50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--stage-color, #60a5fa) 0%, transparent); }
}





/* 关卡最佳成绩 */
.stage-best {
    font-size: 0.6rem;
    color: #10b981;
    font-weight: 600;
    text-shadow: 0 0 6px rgba(16,185,129,0.2);
}

/* 关卡提示 */
.stage-hint {
    font-size: 0.6rem;
    color: var(--accent, #6366f1);
    font-weight: 600;
    animation: hintBlink 2s ease-in-out infinite;
}

@keyframes hintBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* 闯天关首页卡片升级 */
.ch-mode-card {
    min-height: 280px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.15);
}

.ch-mode-card:hover {
    box-shadow: 0 8px 40px rgba(0,0,0,0.25);
}

/* 闯天关首页头部优化 */
.ch-home {
    gap: 20px;
    padding: 12px 0 20px;
}

.ch-home-title {
    font-size: 1.6rem;
    background: linear-gradient(135deg, #6366f1, #a78bfa, #6366f1);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: titleShimmer 3s ease-in-out infinite;
}

@keyframes titleShimmer {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 200% center; }
}

.ch-home-subtitle {
    font-size: 0.82rem;
    color: #64748b;
    margin-top: 2px;
}

/* 关卡等级标题样式 */
.stages-level-title {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 4px 4px;
    position: relative;
}

.stages-level-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(255,255,255,0.06), transparent);
    margin-left: 8px;
}

/* 版权区在闯天关战斗页面固定底部 */
#copyright {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(8px);
    padding: 6px 0;
    margin: 0;
    font-size: 0.75rem;
}


/* ========== 称号佩戴功能 ========== */
.title-wall-item.equipped {
    border-color: rgba(250, 204, 21, 0.5) !important;
    box-shadow: 0 0 16px rgba(250, 204, 21, 0.15);
}

.title-wall-item.equipped::after {
    content: '';
    position: absolute;
    top: 6px; right: 6px;
    width: 18px; height: 18px;
    background: rgba(250, 204, 21, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.title-equip-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 5px 14px;
    margin-top: auto;
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 8px;
    font-size: 0.68rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.title-equip-btn:hover {
    background: rgba(99, 102, 241, 0.25);
    transform: translateY(-1px);
}

.title-equip-btn.equipped {
    background: rgba(250, 204, 21, 0.15);
    color: #fbbf24;
    border-color: rgba(250, 204, 21, 0.4);
    cursor: pointer;
}

.title-equip-btn.equipped:hover {
    background: rgba(250, 204, 21, 0.25);
}


/* ========== BOSS图鉴 ========== */
.boss-codex-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 20px;
}

.boss-codex-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    backdrop-filter: blur(8px);
    transition: all 0.3s;
}

.boss-codex-card:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.boss-codex-card.final-boss {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(220, 38, 38, 0.04));
    border-color: rgba(239, 68, 68, 0.25);
}

.boss-codex-avatar {
    width: 60px;
    height: 60px;
    min-width: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.boss-codex-info {
    flex: 1;
}

.boss-codex-name {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.boss-codex-level {
    font-size: 0.7rem;
    color: #64748b;
    margin-bottom: 4px;
}

.boss-codex-desc {
    font-size: 0.75rem;
    color: #94a3b8;
}

.boss-codex-final-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    margin-top: 6px;
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 600;
}


/* ========== 关卡边框装饰系统 v2 ========== */
/* 每个 BOSS 关卡掉落对应边框，可随时装备/卸下 */
/* v3 重构：边框 = 装配在关卡卡片外沿的相框式装饰（卡内保持干净，不再是卡内填充） */

/* 通用边框层 - 卡外装饰框 */
.stage-card .frame-border,
.boss-banner .frame-border,
.boss-mini-card .frame-border {
    position: absolute;
    inset: -7px;
    border-radius: 20px;
    pointer-events: none;
    z-index: 2;
    transition: all 0.3s ease;
}
/* 外框旋转光束（沿边框外缘旋转） */
.stage-card .frame-border::before,
.boss-banner .frame-border::before,
.boss-mini-card .frame-border::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 20px;
    padding: 3px;
    background: conic-gradient(from var(--frame-angle, 0deg), transparent 0%, transparent 60%, var(--frame-color, #22c55e) 80%, transparent 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: frame-rotate var(--frame-speed, 3s) linear infinite;
    opacity: 0.65;
}
.stage-card:hover .frame-border::before,
.boss-banner:hover .frame-border::before,
.boss-mini-card:hover .frame-border::before { opacity: 1; }
/* 四角装饰：相框角扣（四角 L 形亮角，强化装配感） */
.stage-card .frame-border::after,
.boss-banner .frame-border::after,
.boss-mini-card .frame-border::after {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 24px;
    pointer-events: none;
    background:
        linear-gradient(var(--frame-color, #22c55e), var(--frame-color, #22c55e)) top 0 left 0 / 20px 3px no-repeat,
        linear-gradient(var(--frame-color, #22c55e), var(--frame-color, #22c55e)) top 0 left 0 / 3px 20px no-repeat,
        linear-gradient(var(--frame-color, #22c55e), var(--frame-color, #22c55e)) top 0 right 0 / 20px 3px no-repeat,
        linear-gradient(var(--frame-color, #22c55e), var(--frame-color, #22c55e)) top 0 right 0 / 3px 20px no-repeat,
        linear-gradient(var(--frame-color, #22c55e), var(--frame-color, #22c55e)) bottom 0 left 0 / 20px 3px no-repeat,
        linear-gradient(var(--frame-color, #22c55e), var(--frame-color, #22c55e)) bottom 0 left 0 / 3px 20px no-repeat,
        linear-gradient(var(--frame-color, #22c55e), var(--frame-color, #22c55e)) bottom 0 right 0 / 20px 3px no-repeat,
        linear-gradient(var(--frame-color, #22c55e), var(--frame-color, #22c55e)) bottom 0 right 0 / 3px 20px no-repeat;
    filter: drop-shadow(0 0 5px var(--frame-color, #22c55e));
    opacity: 0.9;
}
@property --frame-angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes frame-rotate { to { --frame-angle: 360deg; } }

/* ====== frame-q0 · 翡翠流光 ====== */
.stage-card.frame-q0, .boss-banner.frame-q0, .boss-mini-card.frame-q0 { --frame-color: #10b981; --frame-speed: 4s; }
.stage-card.frame-q0 .frame-border, .boss-banner.frame-q0 .frame-border, .boss-mini-card.frame-q0 .frame-border {
    border: 2px solid rgba(16,185,129,0.88);
    box-shadow: 0 0 6px rgba(16,185,129,0.55), 0 0 16px rgba(16,185,129,0.3), 0 0 42px rgba(16,185,129,0.14), 0 0 0 3px rgba(16,185,129,0.1);
}
.stage-card.frame-q0:hover .frame-border, .boss-banner.frame-q0:hover .frame-border, .boss-mini-card.frame-q0:hover .frame-border {
    border-color: rgba(16,185,129,1);
    box-shadow: 0 0 10px rgba(16,185,129,0.75), 0 0 28px rgba(16,185,129,0.45), 0 0 70px rgba(16,185,129,0.2), 0 0 0 5px rgba(16,185,129,0.15);
}

/* ====== frame-q1 · 紫晶藤蔓 ====== */
.stage-card.frame-q1, .boss-banner.frame-q1, .boss-mini-card.frame-q1 { --frame-color: #a855f7; --frame-speed: 2.6s; }
.stage-card.frame-q1 .frame-border, .boss-banner.frame-q1 .frame-border, .boss-mini-card.frame-q1 .frame-border {
    border: 2px solid rgba(168,85,247,0.88);
    box-shadow: 0 0 6px rgba(168,85,247,0.55), 0 0 16px rgba(168,85,247,0.3), 0 0 42px rgba(168,85,247,0.14), 0 0 0 3px rgba(168,85,247,0.1);
}
.stage-card.frame-q1:hover .frame-border, .boss-banner.frame-q1:hover .frame-border, .boss-mini-card.frame-q1:hover .frame-border {
    border-color: rgba(168,85,247,1);
    box-shadow: 0 0 10px rgba(168,85,247,0.75), 0 0 28px rgba(168,85,247,0.45), 0 0 70px rgba(168,85,247,0.2), 0 0 0 5px rgba(168,85,247,0.15);
}

/* ====== frame-q2 · 琥珀金纹 ====== */
.stage-card.frame-q2, .boss-banner.frame-q2, .boss-mini-card.frame-q2 { --frame-color: #f59e0b; --frame-speed: 4.5s; }
.stage-card.frame-q2 .frame-border, .boss-banner.frame-q2 .frame-border, .boss-mini-card.frame-q2 .frame-border {
    border: 2px solid rgba(245,158,11,0.88);
    box-shadow: 0 0 6px rgba(245,158,11,0.55), 0 0 16px rgba(245,158,11,0.3), 0 0 42px rgba(245,158,11,0.14), 0 0 0 3px rgba(245,158,11,0.1);
}
.stage-card.frame-q2:hover .frame-border, .boss-banner.frame-q2:hover .frame-border, .boss-mini-card.frame-q2:hover .frame-border {
    border-color: rgba(245,158,11,1);
    box-shadow: 0 0 10px rgba(245,158,11,0.75), 0 0 28px rgba(245,158,11,0.45), 0 0 70px rgba(245,158,11,0.2), 0 0 0 5px rgba(245,158,11,0.15);
}

/* ====== frame-q3 · 橙焰巨锤 ====== */
.stage-card.frame-q3, .boss-banner.frame-q3, .boss-mini-card.frame-q3 { --frame-color: #f97316; --frame-speed: 1.8s; }
.stage-card.frame-q3 .frame-border, .boss-banner.frame-q3 .frame-border, .boss-mini-card.frame-q3 .frame-border {
    border: 2px solid rgba(249,115,22,0.88);
    box-shadow: 0 0 6px rgba(249,115,22,0.55), 0 0 16px rgba(249,115,22,0.3), 0 0 42px rgba(249,115,22,0.14), 0 0 0 3px rgba(249,115,22,0.1);
}
.stage-card.frame-q3:hover .frame-border, .boss-banner.frame-q3:hover .frame-border, .boss-mini-card.frame-q3:hover .frame-border {
    border-color: rgba(249,115,22,1);
    box-shadow: 0 0 10px rgba(249,115,22,0.75), 0 0 28px rgba(249,115,22,0.45), 0 0 70px rgba(249,115,22,0.2), 0 0 0 5px rgba(249,115,22,0.15);
}

/* ====== frame-q4 · 暗紫密谋 ====== */
.stage-card.frame-q4, .boss-banner.frame-q4, .boss-mini-card.frame-q4 { --frame-color: #3b82f6; --frame-speed: 5.5s; }
.stage-card.frame-q4 .frame-border, .boss-banner.frame-q4 .frame-border, .boss-mini-card.frame-q4 .frame-border {
    border: 2px solid rgba(59,130,246,0.88);
    box-shadow: 0 0 6px rgba(59,130,246,0.55), 0 0 16px rgba(59,130,246,0.3), 0 0 42px rgba(59,130,246,0.14), 0 0 0 3px rgba(59,130,246,0.1);
}
.stage-card.frame-q4:hover .frame-border, .boss-banner.frame-q4:hover .frame-border, .boss-mini-card.frame-q4:hover .frame-border {
    border-color: rgba(59,130,246,1);
    box-shadow: 0 0 10px rgba(59,130,246,0.75), 0 0 28px rgba(59,130,246,0.45), 0 0 70px rgba(59,130,246,0.2), 0 0 0 5px rgba(59,130,246,0.15);
}

/* ====== frame-q5 · 赤红幻术 ====== */
.stage-card.frame-q5, .boss-banner.frame-q5, .boss-mini-card.frame-q5 { --frame-color: #ef4444; --frame-speed: 2s; }
.stage-card.frame-q5 .frame-border, .boss-banner.frame-q5 .frame-border, .boss-mini-card.frame-q5 .frame-border {
    border: 2px solid rgba(239,68,68,0.88);
    box-shadow: 0 0 6px rgba(239,68,68,0.55), 0 0 16px rgba(239,68,68,0.3), 0 0 42px rgba(239,68,68,0.14), 0 0 0 3px rgba(239,68,68,0.1);
}
.stage-card.frame-q5:hover .frame-border, .boss-banner.frame-q5:hover .frame-border, .boss-mini-card.frame-q5:hover .frame-border {
    border-color: rgba(239,68,68,1);
    box-shadow: 0 0 10px rgba(239,68,68,0.75), 0 0 28px rgba(239,68,68,0.45), 0 0 70px rgba(239,68,68,0.2), 0 0 0 5px rgba(239,68,68,0.15);
}

/* ====== frame-q6 · 烈焰荆棘 ====== */
.stage-card.frame-q6, .boss-banner.frame-q6, .boss-mini-card.frame-q6 { --frame-color: #f43f5e; --frame-speed: 1.4s; }
.stage-card.frame-q6 .frame-border, .boss-banner.frame-q6 .frame-border, .boss-mini-card.frame-q6 .frame-border {
    border: 2px solid rgba(244,63,94,0.88);
    box-shadow: 0 0 6px rgba(244,63,94,0.55), 0 0 16px rgba(244,63,94,0.3), 0 0 42px rgba(244,63,94,0.14), 0 0 0 3px rgba(244,63,94,0.1);
}
.stage-card.frame-q6:hover .frame-border, .boss-banner.frame-q6:hover .frame-border, .boss-mini-card.frame-q6:hover .frame-border {
    border-color: rgba(244,63,94,1);
    box-shadow: 0 0 10px rgba(244,63,94,0.75), 0 0 28px rgba(244,63,94,0.45), 0 0 70px rgba(244,63,94,0.2), 0 0 0 5px rgba(244,63,94,0.15);
}

/* ====== frame-q7 · 极光幻彩 ====== */
.stage-card.frame-q7, .boss-banner.frame-q7, .boss-mini-card.frame-q7 { --frame-color: #7c3aed; --frame-speed: 2.2s; }
.stage-card.frame-q7 .frame-border, .boss-banner.frame-q7 .frame-border, .boss-mini-card.frame-q7 .frame-border {
    border: 2px solid rgba(124,58,237,0.88);
    box-shadow: 0 0 6px rgba(124,58,237,0.55), 0 0 16px rgba(124,58,237,0.3), 0 0 42px rgba(124,58,237,0.14), 0 0 0 3px rgba(124,58,237,0.1);
}
.stage-card.frame-q7:hover .frame-border, .boss-banner.frame-q7:hover .frame-border, .boss-mini-card.frame-q7:hover .frame-border {
    border-color: rgba(124,58,237,1);
    box-shadow: 0 0 10px rgba(124,58,237,0.75), 0 0 28px rgba(124,58,237,0.45), 0 0 70px rgba(124,58,237,0.2), 0 0 0 5px rgba(124,58,237,0.15);
}

/* 已通关普通关卡可叠加低透明度边框（降低视觉干扰） */
.stage-card.cleared.frame-q0 .frame-border { opacity: 0.85; }
.stage-card.cleared.frame-q1 .frame-border { opacity: 0.85; }
.stage-card.cleared.frame-q2 .frame-border { opacity: 0.85; }
.stage-card.cleared.frame-q3 .frame-border { opacity: 0.85; }
.stage-card.cleared.frame-q4 .frame-border { opacity: 0.85; }
.stage-card.cleared.frame-q5 .frame-border { opacity: 0.85; }
.stage-card.cleared.frame-q6 .frame-border { opacity: 0.85; }
.stage-card.cleared.frame-q7 .frame-border { opacity: 0.85; }
.stage-card.cleared:hover .frame-border { opacity: 1; }

/* ========== BOSS 战对峙动画 ========== */
/* 用户攻击冲刺 */
@keyframes hero-attack {
    0% { transform: translateX(0); }
    30% { transform: translateX(20px) scale(1.3); }
    50% { transform: translateX(20px) scale(1.3); }
    100% { transform: translateX(0) scale(1); }
}

/* BOSS 攻击冲刺 */
@keyframes boss-attack {
    0% { transform: translateX(0); }
    30% { transform: translateX(-20px) scale(1.3); }
    50% { transform: translateX(-20px) scale(1.3); }
    100% { transform: translateX(0) scale(1); }
}

/* BOSS 受伤 - 增强版 */
@keyframes boss-hit {
    0% { filter: brightness(1); transform: scale(1); }
    15% { filter: brightness(3) saturate(0.3); transform: scale(0.82) translateX(-6px); }
    30% { filter: brightness(1); transform: scale(1.08) translateX(3px); }
    50% { filter: brightness(2) saturate(0.5); transform: scale(0.92); }
    70% { filter: brightness(1.3); transform: scale(1.02); }
    100% { filter: brightness(1); transform: scale(1); }
}

/* 用户受伤 - 增强版 */
@keyframes hero-hit {
    0% { filter: brightness(1); opacity: 1; transform: scale(1); }
    15% { filter: brightness(0.3) saturate(3) hue-rotate(-40deg); opacity: 0.6; transform: scale(0.82) translateX(6px); }
    30% { filter: brightness(1); opacity: 1; transform: scale(1.06) translateX(-2px); }
    50% { filter: brightness(0.7) saturate(2); opacity: 0.8; transform: scale(0.95); }
    70% { filter: brightness(1.2); transform: scale(1.02); }
    100% { filter: brightness(1); opacity: 1; transform: scale(1); }
}

/* BOSS 暴怒抖动 - 更剧烈 */
@keyframes boss-shake {
    0%, 100% { transform: translateX(0); }
    15% { transform: translateX(-5px) rotate(-3deg); }
    30% { transform: translateX(5px) rotate(3deg); }
    45% { transform: translateX(-4px) rotate(-2deg); }
    60% { transform: translateX(4px) rotate(2deg); }
    75% { transform: translateX(-3px) rotate(-1deg); }
}

/* BOSS 暴怒脉冲 */
@keyframes boss-hp-rage-pulse {
    0%, 100% { box-shadow: 0 0 3px rgba(239, 68, 68, 0.2); }
    50% { box-shadow: 0 0 12px rgba(239, 68, 68, 0.6); }
}

/* 屏幕震动 - 基础版 */
@keyframes screen-shake {
    0%, 100% { transform: translate(0); }
    15% { transform: translate(-6px, 3px); }
    30% { transform: translate(5px, -3px); }
    45% { transform: translate(-4px, 2px); }
    60% { transform: translate(3px, -1px); }
    80% { transform: translate(-1px, 1px); }
}

/* 屏幕震动 - 强力版（用户受伤） */
@keyframes screen-shake-strong {
    0%, 100% { transform: translate(0); }
    10% { transform: translate(-8px, 4px) rotate(-0.5deg); }
    20% { transform: translate(7px, -4px) rotate(0.5deg); }
    30% { transform: translate(-6px, 3px) rotate(-0.3deg); }
    40% { transform: translate(5px, -2px) rotate(0.3deg); }
    55% { transform: translate(-3px, 2px); }
    70% { transform: translate(2px, -1px); }
    85% { transform: translate(-1px, 0); }
}

/* 伤害飘字动画 */
@keyframes dmg-float {
    0% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1.2); }
    40% { opacity: 1; transform: translateX(-50%) translateY(-20px) scale(1); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-40px) scale(0.7); }
}

/* BOSS 对峙区域入场 */
.boss-vs-area {
    animation: vs-appear 0.5s ease-out;
}
@keyframes vs-appear {
    0% { opacity: 0; transform: scaleY(0.5); }
    70% { opacity: 1; transform: scaleY(1.05); }
    100% { opacity: 1; transform: scaleY(1); }
}

/* BOSS 暴怒横幅 - 低调化 */
.boss-rage-banner {
    margin-top: 4px;
    padding: 4px 10px;
    text-align: center;
    background: linear-gradient(90deg, transparent, rgba(239, 68, 68, 0.1), transparent);
    color: #f87171;
    font-size: 0.68rem;
    font-weight: 600;
    animation: rage-banner-pulse 1.2s ease-in-out infinite;
    border-radius: 4px;
}
@keyframes rage-banner-pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 0.9; }
}

/* ========== 边框墙 - 卡片网格布局 ========== */
.frame-wall-section {
    margin-top: 20px;
    padding-bottom: 20px;
}

.frame-wall-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 12px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.frame-wall-header i {
    color: #818cf8;
    font-size: 0.9rem;
}

.frame-wall-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.frame-wall-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px 10px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s;
    position: relative;
}

.frame-wall-item:hover:not(.locked) {
    transform: translateY(-2px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.frame-wall-item.equipped {
    border-color: rgba(250, 204, 21, 0.4);
    box-shadow: 0 0 12px rgba(250, 204, 21, 0.1);
}

.frame-wall-item.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.frame-wall-item.locked:hover {
    transform: none;
}

.frame-wall-preview {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    transition: all 0.3s;
}

.frame-wall-name {
    font-size: 0.72rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2px;
}

.frame-wall-desc {
    font-size: 0.6rem;
    color: #64748b;
    text-align: center;
    margin-bottom: 6px;
    min-height: 14px;
}

.frame-wall-action {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    margin-top: auto;
    background: rgba(99, 102, 241, 0.12);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 6px;
    font-size: 0.6rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.frame-wall-action:hover {
    background: rgba(99, 102, 241, 0.2);
}

.frame-wall-action.equipped {
    background: rgba(250, 204, 21, 0.12);
    color: #fbbf24;
    border-color: rgba(250, 204, 21, 0.35);
}
/* ========== BOSS技能名称浮动标签（清晰锐利版） ========== */
.boss-skill-name-tag {
    animation: skill-name-pop 2s cubic-bezier(0.22, 1, 0.36, 1) forwards !important;
}
.boss-skill-name-tag .boss-skill-glow {
    display: inline-block;
    color: #fff;
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 0.25em;
    text-shadow:
        0 0 6px rgba(255,68,68,1),
        0 0 14px rgba(255,68,68,0.9),
        0 0 28px rgba(255,68,68,0.6),
        0 0 48px rgba(255,68,68,0.3),
        0 1px 3px rgba(0,0,0,0.95);
    border-bottom: 2px solid rgba(255,68,68,0.7);
    padding-bottom: 4px;
}
/* 技能名下方装饰线 */
.boss-skill-line {
    width: 0;
    height: 2px;
    margin: 6px auto 0;
    background: linear-gradient(90deg, transparent, #ff4444, #ff6b35, #ff4444, transparent);
    animation: skill-line-expand 1.2s 0.3s ease-out forwards;
    box-shadow: 0 0 8px rgba(255,68,68,0.6);
}
/* 技能名两侧能量线 */
.boss-skill-side-line {
    position: absolute;
    top: 50%;
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(255,68,68,0.8), transparent);
    transform: translateY(-50%);
    animation: skill-side-expand 0.8s 0.4s ease-out forwards;
}
.boss-skill-side-left {
    right: calc(100% + 12px);
    background: linear-gradient(90deg, transparent, rgba(255,68,68,0.8));
}
.boss-skill-side-right {
    left: calc(100% + 12px);
    background: linear-gradient(90deg, rgba(255,68,68,0.8), transparent);
}
@keyframes skill-name-pop {
    0% { transform: scale(0.3) translateY(15px); opacity: 0; }
    10% { transform: scale(1.15) translateY(-5px); opacity: 1; }
    20% { transform: scale(0.95) translateY(0); opacity: 1; }
    28% { transform: scale(1.05) translateY(-2px); opacity: 1; }
    35% { transform: scale(1) translateY(0); opacity: 1; }
    75% { transform: scale(1) translateY(-20px); opacity: 1; }
    100% { transform: scale(0.9) translateY(-40px); opacity: 0; }
}
@keyframes skill-line-expand {
    0% { width: 0; opacity: 0; }
    30% { width: 160px; opacity: 1; }
    80% { width: 160px; opacity: 1; }
    100% { width: 160px; opacity: 0; }
}
@keyframes skill-side-expand {
    0% { width: 0; opacity: 0; }
    40% { width: 60px; opacity: 1; }
    80% { width: 60px; opacity: 0.8; }
    100% { width: 60px; opacity: 0; }
}
/* 技能冲击波线（兼容） */
@keyframes skill-wave {
    0% { width: 0; opacity: 1; }
    100% { width: 200px; opacity: 0; }
}

/* ========== 粒子爆发 ========== */
@keyframes particle-burst {
    0% { transform: translate(0, 0) scale(1); opacity: 0.9; }
    100% { transform: translate(var(--dx), var(--dy)) scale(0); opacity: 0; }
}
.boss-damage-particle {
    animation: particle-burst 0.6s ease-out forwards !important;
}

/* ========== 边框选中徽章 ========== */
.frame-check-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 20px;
    height: 20px;
    background: #fbbf24;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0f172a;
    font-size: 0.65rem;
    box-shadow: 0 0 8px rgba(251,191,36,0.5);
    z-index: 2;
}

/* frame-wall-preview 需要 relative 定位 */
.frame-wall-preview {
    position: relative;
}

/* 清除全部按钮 */
.frame-clear-all {
    cursor: pointer;
    transition: all 0.2s;
}
.frame-clear-all:hover {
    background: rgba(239,68,68,0.25) !important;
}



/* ========== BOSS 电影级对战布局 ========== */
.boss-cinematic-page {
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.boss-cinematic-layout {
    display: grid;
    grid-template-columns: 3fr 2fr;
    grid-template-rows: 1fr auto;
    gap: 0;
    height: calc(100vh - 140px);
    position: relative;
    background: linear-gradient(135deg, rgba(15,23,42,0.97) 0%, rgba(15,23,42,0.85) 50%, rgba(15,23,42,0.92) 100%);
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.06);
}

/* 左半：BOSS区（全高） */
.boss-cinematic-left {
    grid-row: 1 / 3;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: relative;
    z-index: 1;
    overflow: hidden;
    padding: 0;
}

.boss-cinematic-scene {
    width: 100%;
    height: 100%;
}

.boss-cinematic-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.boss-cinematic-boss-zone {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* BOSS 全区域背景大头像 */
.boss-bg-avatar {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.boss-bg-avatar .boss-cinematic-avatar,
.boss-bg-avatar .boss-cinematic-avatar-fallback {
    width: 100%;
    height: 100%;
    border-radius: 0;
    border: none;
    object-fit: contain;
    opacity: 0.85;
    filter: brightness(0.8);
    animation: boss-bg-pulse 5s ease-in-out infinite alternate;
}

.boss-bg-avatar .boss-cinematic-avatar-fallback {
    background: transparent;
    box-shadow: none;
}

.boss-bg-avatar .boss-cinematic-avatar-fallback i {
    font-size: 12rem !important;
    opacity: 0.15;
    filter: blur(1px);
}

@keyframes boss-bg-pulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.03); opacity: 0.9; }
}

/* 覆盖在头像上的信息层 */
.boss-overlay-info {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
}



.boss-cinematic-hp-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 220px;
}

.boss-cinematic-hp-track {
    flex: 1;
    height: 14px;
    background: rgba(0,0,0,0.5);
    border-radius: 7px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.4);
}

.boss-cinematic-hp-track.rage {
    animation: boss-hp-rage-pulse 0.8s ease-in-out infinite;
}

.boss-cinematic-hp-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.4s ease;
    position: relative;
}

.boss-cinematic-hp-fill::after {
    content: '';
    position: absolute;
    top: 1px;
    left: 4px;
    right: 4px;
    height: 4px;
    background: linear-gradient(180deg, rgba(255,255,255,0.35) 0%, transparent 100%);
    border-radius: 4px;
}

.boss-hp-fill {
    background: linear-gradient(90deg, #dc2626, #ef4444, #f87171);
    box-shadow: 0 0 8px rgba(239,68,68,0.4);
}

.user-hp-track {
    background: rgba(255,255,255,0.06);
}

.user-hp-fill {
    background: linear-gradient(90deg, #059669, #34d399, #6ee7b7);
    box-shadow: 0 0 8px rgba(52,211,153,0.4);
}

.boss-cinematic-hp-num {
    font-size: 0.8rem;
    font-weight: 800;
    white-space: nowrap;
    min-width: 44px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.boss-cinematic-nameplate {
    text-align: center;
}

.boss-cinematic-name {
    font-size: 1rem;
    font-weight: 800;
    color: #f1f5f9;
    text-shadow: 0 2px 8px rgba(0,0,0,0.7);
    letter-spacing: 1px;
}

.boss-cinematic-nameplate.hero-nameplate .boss-cinematic-name {
    color: #6ee7b7;
}

/* 右上：答题区 (2/4) */
.boss-cinematic-right {
    grid-column: 2;
    grid-row: 1 / 3;
    display: flex;
    flex-direction: column;
    border-left: 1px solid rgba(255,255,255,0.06);
    overflow: hidden;
}

.boss-cinematic-quiz {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 12px 24px 12px 20px;
    overflow-y: auto;
}

.boss-cinematic-progress {
    margin-bottom: 6px;
    flex-shrink: 0;
}

/* 右下：用户区 (4/4) */
.boss-cinematic-hero {
    flex-shrink: 0;
    border-top: 1px solid rgba(52,211,153,0.15);
    background: rgba(52,211,153,0.04);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}



/* 暴怒覆盖层 */

/* 英雄面板（BOSS战右下） */
.boss-hero-panel {
    display: flex; align-items: center; gap: 12px;
    width: 100%; padding: 4px 0;
}
.boss-hero-panel-img-wrap {
    width: 160px; height: 213px; border-radius: 16px; overflow: hidden;
    border: 2px solid rgba(96,165,250,0.5);
    background: #000; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 20px rgba(96,165,250,0.25);
}
.boss-hero-panel-img {
    width: 100%; height: 100%; object-fit: cover; object-position: center 15%;
}
.boss-hero-panel-fallback {
    display: flex; align-items: center; justify-content: center;
    width: 100%; height: 100%;
}
.boss-hero-panel-info {
    flex: 1; min-width: 0;
}
.boss-hero-panel-name {
    font-size: 0.8rem; font-weight: 700; margin-bottom: 4px;
}
.boss-hero-panel-hp-wrap {
    display: flex; align-items: center; gap: 6px;
}
.boss-hero-panel-hp-track {
    flex: 1; height: 5px; background: rgba(255,255,255,0.08);
    border-radius: 3px; overflow: hidden;
}
.boss-hero-panel-hp-fill {
    height: 100%; border-radius: 3px; transition: width 0.4s ease;
}
.boss-hero-panel-hp-text {
    font-size: 0.7rem; font-weight: 600; white-space: nowrap;
}

/* === BOSS 面板装饰元素 === */

/* 层级符文（左侧） */
.boss-rune-badge {
    position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
    width: 64px; height: 64px; border-radius: 50%;
    border: 2px solid color-mix(in srgb, var(--boss-theme, #7c3aed) 60%, transparent);
    background: radial-gradient(circle at 30% 30%, rgba(0,0,0,0.6), rgba(0,0,0,0.85));
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    z-index: 3; box-shadow: 0 0 24px color-mix(in srgb, var(--boss-theme, #7c3aed) 30%, transparent);
    animation: rune-float 3s ease-in-out infinite;
}
.boss-rune-level {
    font-size: 1.3rem; font-weight: 900; color: var(--boss-theme, #7c3aed);
    line-height: 1; text-shadow: 0 0 10px var(--boss-theme, #7c3aed);
}
.boss-rune-label {
    font-size: 0.55rem; color: #94a3b8; font-weight: 600; letter-spacing: 0.5px;
}
@keyframes rune-float {
    0%, 100% { transform: translateY(-50%) translateX(0); }
    50% { transform: translateY(-50%) translateX(4px); }
}

/* 招式图标列表（右侧） */
.boss-attacks-list {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    display: flex; flex-direction: column; gap: 8px; z-index: 3;
}
.boss-attack-item {
    display: flex; align-items: center; gap: 6px;
    padding: 4px 10px; border-radius: 8px;
    background: rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.06);
    font-size: 0.7rem; color: #cbd5e1; white-space: nowrap;
    transition: all 0.3s;
}
.boss-attack-item:hover {
    background: rgba(0,0,0,0.7);
    border-color: color-mix(in srgb, var(--boss-theme, #7c3aed) 30%, transparent);
    color: #f1f5f9;
}
.boss-attack-icon {
    width: 20px; height: 20px; border-radius: 4px;
    background: color-mix(in srgb, var(--boss-theme, #7c3aed) 20%, transparent);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.6rem; color: var(--boss-theme, #7c3aed);
}

/* 背景粒子飘散 */
.boss-particle-layer {
    position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
}
.boss-particle {
    position: absolute; bottom: -10px;
    width: 3px; height: 3px; border-radius: 50%;
    background: var(--boss-theme, #7c3aed);
    opacity: 0;
    animation: particle-rise linear infinite;
}
@keyframes particle-rise {
    0% { transform: translateY(0) translateX(0) scale(1); opacity: 0; }
    10% { opacity: 0.6; }
    90% { opacity: 0.2; }
    100% { transform: translateY(-100vh) translateX(var(--px)) scale(0.3); opacity: 0; }
}

/* BOSS 信息卡片位置微调 */
.boss-overlay-info {
    position: absolute; inset: 0; z-index: 2;
    display: flex; flex-direction: column; align-items: center;
    justify-content: flex-end; gap: 10px; padding: 20px 20px 30px;
}

.boss-cinematic-rage-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 40%, rgba(239,68,68,0.1) 0%, transparent 60%);
    pointer-events: none;
    z-index: 1;
    animation: rage-pulse 2s ease-in-out infinite;
}

.boss-cinematic-rage-banner {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 6px;
    text-align: center;
    background: linear-gradient(90deg, transparent, rgba(239,68,68,0.15), transparent);
    color: #f87171;
    font-size: 0.75rem;
    font-weight: 700;
    animation: rage-banner-pulse 1s ease-in-out infinite;
    letter-spacing: 1px;
    border-top: 1px solid rgba(239,68,68,0.15);
    z-index: 5;
}

/* 闪屏效果 */
.boss-cinematic-flash {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 50;
    opacity: 0;
    transition: opacity 0.15s;
}

/* 答题面板内的样式适配 */
.boss-cinematic-quiz .challenge-question {
    padding: 12px;
    margin-bottom: 8px;
}

.boss-cinematic-quiz .quiz-indo {
    font-size: 1.1rem;
}

.boss-cinematic-quiz .quiz-option {
    padding: 10px 12px;
    font-size: 0.85rem;
}

.boss-cinematic-quiz .challenge-option-text {
    font-size: 0.85rem;
}

/* ========== BOSS HP 血条卡片（覆盖层） ========== */
.boss-hp-card {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 240px;
    padding: 14px 16px;
    background: rgba(0,0,0,0.6);
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    z-index: 3;
}

.boss-hp-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.boss-hp-card-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.boss-hp-card-icon i {
    font-size: 0.8rem;
}

.boss-hp-card-name {
    font-size: 0.9rem;
    font-weight: 800;
    color: #f1f5f9;
    text-shadow: 0 1px 6px rgba(0,0,0,0.6);
    letter-spacing: 0.5px;
    flex: 1;
}

.boss-hp-card-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.boss-hp-bar-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.boss-hp-bar-track {
    flex: 1;
    height: 16px;
    background: rgba(255,255,255,0.06);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
}

.boss-hp-bar-fill {
    height: 100%;
    border-radius: 7px;
    transition: width 0.4s ease;
    position: relative;
}

.boss-hp-bar-track.rage {
    animation: rage-track-pulse 0.8s ease-in-out infinite alternate;
}

@keyframes rage-track-pulse {
    0% { box-shadow: inset 0 2px 4px rgba(0,0,0,0.3), 0 0 8px rgba(255,68,68,0.3); }
    100% { box-shadow: inset 0 2px 4px rgba(0,0,0,0.3), 0 0 16px rgba(255,68,68,0.5); }
}

.boss-hp-bar-shine {
    position: absolute;
    top: 2px;
    left: 6px;
    right: 6px;
    height: 5px;
    background: linear-gradient(180deg, rgba(255,255,255,0.25) 0%, transparent 100%);
    border-radius: 4px;
    pointer-events: none;
}

.boss-hp-bar-pct {
    font-size: 0.75rem;
    font-weight: 800;
    min-width: 38px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* BOSS血条 - 暴怒火焰 */
.boss-hp-rage {
    animation: hp-rage-flame 0.4s ease-in-out infinite alternate;
    box-shadow: 0 0 12px rgba(255,68,68,0.6), 0 0 24px rgba(255,68,68,0.3);
}

.boss-hp-rage::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: linear-gradient(90deg, transparent, rgba(255,100,0,0.4), rgba(255,200,0,0.2), rgba(255,100,0,0.4), transparent);
    animation: rage-fire-sweep 1.2s linear infinite;
    z-index: 1;
    pointer-events: none;
}

.boss-hp-rage::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255,255,255,0.3) 0%, transparent 40%);
    animation: rage-flicker 0.15s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes hp-rage-flame {
    0% { filter: brightness(1) saturate(1.2); }
    100% { filter: brightness(1.3) saturate(1.5); }
}

@keyframes rage-fire-sweep {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes rage-flicker {
    0% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* BOSS血条 - 危险橙色脉冲 */
.boss-hp-warning {
    animation: hp-warning-pulse 0.6s ease-in-out infinite alternate;
    box-shadow: 0 0 8px rgba(249,115,22,0.4);
}

@keyframes hp-warning-pulse {
    0% { filter: brightness(1); }
    100% { filter: brightness(1.2) saturate(1.3); }
}

/* BOSS血条 - 警告黄色微动 */
.boss-hp-caution {
    animation: hp-caution-breathe 1.5s ease-in-out infinite alternate;
}

@keyframes hp-caution-breathe {
    0% { filter: brightness(0.95); }
    100% { filter: brightness(1.1); }
}

/* 轨道状态效果 */
.boss-hp-bar-track.warning {
    border-color: rgba(249,115,22,0.3);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.3), 0 0 8px rgba(249,115,22,0.15);
}

.boss-hp-bar-track.caution {
    border-color: rgba(234,179,8,0.2);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.3), 0 0 6px rgba(234,179,8,0.1);
}

/* ===== 玩家血条分级效果 ===== */
.hero-hp-critical {
    animation: hero-critical-flash 0.5s ease-in-out infinite alternate;
    box-shadow: 0 0 10px rgba(248,113,113,0.5);
}

.hero-hp-critical::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, transparent 30%, rgba(255,255,255,0.25) 50%, transparent 70%);
    animation: critical-sweep 1s linear infinite;
    pointer-events: none;
}

@keyframes hero-critical-flash {
    0% { filter: brightness(0.9) saturate(1.2); }
    100% { filter: brightness(1.2) saturate(1.5); }
}

@keyframes critical-sweep {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.hero-hp-warning {
    animation: hero-warning-pulse 0.8s ease-in-out infinite alternate;
    box-shadow: 0 0 6px rgba(249,115,22,0.3);
}

@keyframes hero-warning-pulse {
    0% { filter: brightness(1); }
    100% { filter: brightness(1.15) saturate(1.2); }
}

.hero-hp-caution {
    animation: hero-caution-breathe 1.5s ease-in-out infinite alternate;
}

@keyframes hero-caution-breathe {
    0% { filter: brightness(0.95); }
    100% { filter: brightness(1.08); }
}

/* ========== 用户面板 ========== */
.boss-hero-panel {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(30,41,59,0.4) 0%, rgba(15,23,42,0.3) 100%);
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.06);
}

.boss-hero-visual {
    transition: transform 0.3s ease, filter 0.3s ease;
    flex-shrink: 0;
}

.boss-cinematic-hero-avatar {
    width: 200px;
    height: 267px;
    border-radius: 14px;
    object-fit: cover;
    object-position: center 15%;
    border: 2px solid rgba(52,211,153,0.5);
    box-shadow: 0 0 14px rgba(52,211,153,0.15), 0 2px 8px rgba(0,0,0,0.3);
}

.boss-cinematic-hero-fallback {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    border: 2px solid rgba(52,211,153,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(52,211,153,0.06);
}

.boss-hero-info {
    flex: 1;
    min-width: 0;
}

.boss-hero-name-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 6px;
}
.boss-hero-icon {
    width: 24px;
    height: 24px;
    border-radius: 7px;
    background: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.boss-hero-icon i {
    font-size: 0.7rem;
}


.boss-hero-name {
    font-size: 0.8rem;
    font-weight: 700;
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.boss-hero-hp-badge {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 5px;
    white-space: nowrap;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

.boss-hero-hp-bar-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.boss-hero-hp-track {
    flex: 1;
    height: 12px;
    background: rgba(255,255,255,0.06);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.25);
}

.boss-hero-hp-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.4s ease;
    position: relative;
}

.boss-hero-hp-shine {
    position: absolute;
    top: 1px;
    left: 4px;
    right: 4px;
    height: 4px;
    background: linear-gradient(180deg, rgba(255,255,255,0.22) 0%, transparent 100%);
    border-radius: 3px;
    pointer-events: none;
}

.boss-hero-hp-pct {
    font-size: 0.7rem;
    font-weight: 800;
    min-width: 34px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* ========== BOSS 加载界面（独立介绍页） ========== */
.boss-loading-page {
    position: relative;
    min-height: 100%;
    overflow: hidden;
}

/* 顶部遮罩进度条 */
.boss-loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(2,6,23,0.96);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    transition: opacity 0.5s ease;
    backdrop-filter: blur(6px);
}

.boss-loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 220px;
}

.boss-loading-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(30,41,59,0.6);
    border: 2px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: boss-load-pulse 1.5s ease-in-out infinite;
}

.boss-loading-icon-wrap i {
    font-size: 1.3rem;
}

@keyframes boss-load-pulse {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.08); opacity: 1; }
}

.boss-loading-progress-wrap {
    width: 100%;
    height: 5px;
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
    overflow: hidden;
}

.boss-loading-progress-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
    position: relative;
}

.boss-loading-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4));
    border-radius: 3px;
}

.boss-loading-progress-text {
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    font-variant-numeric: tabular-nums;
}

.boss-loading-status {
    color: #475569;
    font-size: 0.62rem;
    font-weight: 500;
    min-height: 1em;
}

/* ===== 主体内容区 ===== */
.boss-loading-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 16px 20px;
    animation: bossPageIn 0.6s ease;
    position: relative;
    z-index: 1;
}

@keyframes bossPageIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* BOSS类型标签 */
.boss-loading-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 14px;
    border: 1px solid;
}

.boss-loading-type-badge.is-big {
    color: #f87171;
    background: rgba(248,113,113,0.08);
    border-color: rgba(248,113,113,0.2);
}

.boss-loading-type-badge.is-mini {
    color: #fbbf24;
    background: rgba(251,191,36,0.08);
    border-color: rgba(251,191,36,0.2);
}

/* BOSS剪影视觉区 */
.boss-loading-visual {
    margin-bottom: 16px;
    position: relative;
}

.boss-loading-silhouette {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.boss-loading-silhouette::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid;
    opacity: 0.15;
}

.boss-loading-silhouette-icon {
    font-size: 4rem;
    opacity: 0.12;
    filter: blur(1px);
}

.boss-loading-silhouette-glow {
    position: absolute;
    inset: -20px;
    border-radius: 50%;
    filter: blur(30px);
    opacity: 0.15;
    animation: silhouetteGlow 3s ease-in-out infinite;
}

@keyframes silhouetteGlow {
    0%, 100% { opacity: 0.1; transform: scale(1); }
    50% { opacity: 0.2; transform: scale(1.05); }
}

/* BOSS信息区 */
.boss-loading-info {
    text-align: center;
    width: 100%;
    max-width: 360px;
}

.boss-loading-name-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 4px;
}

.boss-loading-name {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.boss-loading-name-local {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* 危险度星级 */
.boss-loading-danger {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-bottom: 12px;
}

.boss-loading-danger-star {
    font-size: 0.7rem;
}

.boss-loading-danger-star.filled {
    color: #f87171;
}

.boss-loading-danger-star.empty {
    color: #1e293b;
}

.boss-loading-danger-label {
    font-size: 0.6rem;
    color: #475569;
    margin-left: 6px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* 背景故事卡片 */
.boss-loading-lore {
    background: rgba(15,23,42,0.6);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 14px;
    padding: 14px 16px;
    margin: 12px 0;
    text-align: left;
    width: 100%;
    max-width: 360px;
}

.boss-loading-lore-quote {
    font-size: 0.72rem;
    color: #cbd5e1;
    line-height: 1.7;
    font-style: italic;
    padding-left: 12px;
    border-left: 2px solid rgba(255,255,255,0.1);
    margin-bottom: 8px;
}

.boss-loading-lore-quote-original {
    font-size: 0.62rem;
    color: #64748b;
    line-height: 1.6;
    font-style: italic;
    padding-left: 12px;
    border-left: 2px solid rgba(255,255,255,0.06);
    margin-bottom: 8px;
}

.boss-loading-lore-text {
    font-size: 0.7rem;
    color: #94a3b8;
    line-height: 1.7;
}

/* 战斗数据面板 */
.boss-loading-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin: 10px 0;
    width: 100%;
    max-width: 360px;
}

.boss-loading-stat {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 10px;
    background: rgba(30,41,59,0.4);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.04);
}

.boss-loading-stat-icon {
    font-size: 0.9rem;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
}

.boss-loading-stat-info {
    text-align: left;
    min-width: 0;
}

.boss-loading-stat-label {
    font-size: 0.55rem;
    color: #475569;
    font-weight: 500;
}

.boss-loading-stat-value {
    font-size: 0.8rem;
    font-weight: 700;
}

/* 提示 */
.boss-loading-tips {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-bottom: 12px;
    width: 100%;
    max-width: 360px;
}

.boss-loading-tip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    font-size: 0.6rem;
    color: #64748b;
    background: rgba(30,41,59,0.25);
    border-radius: 6px;
    text-align: left;
}

/* 开始按钮 */
.boss-loading-start-btn {
    margin-top: 4px;
    padding: 11px 36px !important;
    font-size: 0.9rem !important;
    letter-spacing: 2px;
    transition: all 0.3s !important;
}

.boss-loading-start-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 24px rgba(0,0,0,0.4) !important;
}

/* 文化出处 */
.boss-loading-source {
    margin-top: 8px;
    font-size: 0.55rem;
    color: #334155;
    text-align: center;
    line-height: 1.5;
    max-width: 360px;
}

.boss-loading-source i {
    margin-right: 3px;
}

/* 头像（有图片时用） */
.boss-loading-avatar {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid;
    box-shadow: 0 0 40px rgba(0,0,0,0.4);
    position: relative;
    z-index: 2;
}

.boss-loading-avatar-fallback {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 3px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15,23,42,0.5);
}

/* ========== BOSS降临遭遇动画 ========== */

/* 全屏暗化遮罩 */
.boss-encounter-overlay {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(0,0,0,0.85);
    display: flex; align-items: center; justify-content: center;
    animation: encounter-fade-in 0.4s ease;
}
@keyframes encounter-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 遭遇主卡片 */
.boss-encounter-stage {
    position: relative;
    width: min(700px, 92vw);
    display: flex; flex-direction: column; align-items: center;
    gap: 20px;
}

/* BOSS+英雄对峙区 */
.boss-encounter-showdown {
    display: flex; align-items: center; justify-content: center;
    gap: 40px;
    width: 100%;
}

/* BOSS卡片（用于碎片炸裂的源） */
.boss-encounter-card {
    position: relative;
    width: 200px; height: 267px;
    border-radius: 20px; overflow: hidden;
    border: 3px solid var(--boss-theme, #7c3aed);
    box-shadow: 0 0 30px color-mix(in srgb, var(--boss-theme, #7c3aed) 40%, transparent);
    background: #000;
    transition: transform 0.1s;
    z-index: 2;
}
.boss-encounter-card img {
    width: 100%; height: 100%; object-fit: contain;
}

/* 英雄卡片 */
.boss-encounter-hero {
    position: relative;
    width: 220px; height: 124px;
    border-radius: 16px; overflow: hidden;
    border: 2px solid rgba(96,165,250,0.5);
    box-shadow: 0 0 20px rgba(96,165,250,0.3);
    background: #000;
    z-index: 2;
    align-self: center;
}
.boss-encounter-hero img {
    width: 100%; height: 100%; object-fit: contain;
}
.boss-encounter-hero .hero-label {
    position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%);
    font-size: 0.65rem; color: #60a5fa; font-weight: 700;
    background: rgba(0,0,0,0.7); padding: 2px 8px; border-radius: 6px;
}

/* VS标志 */
.boss-encounter-vs {
    font-size: 3rem; font-weight: 900; color: #ef4444;
    text-shadow: 0 0 20px rgba(239,68,68,0.6);
    z-index: 2; animation: vs-pulse 0.8s ease-in-out infinite;
}
@keyframes vs-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* 进度条区 */
.boss-encounter-progress-wrap {
    width: 80%; max-width: 500px;
    height: 6px; background: rgba(255,255,255,0.08);
    border-radius: 3px; overflow: hidden;
    position: relative; z-index: 2;
}
.boss-encounter-progress-bar {
    height: 100%; border-radius: 3px;
    background: linear-gradient(90deg, var(--boss-theme, #7c3aed), #fbbf24);
    width: 0%;
    transition: width 0.08s linear;
    box-shadow: 0 0 10px var(--boss-theme, #7c3aed);
}
.boss-encounter-progress-text {
    font-size: 0.75rem; color: #94a3b8; text-align: center;
    margin-top: 6px; z-index: 2;
}

/* BOSS名称区 */
.boss-encounter-name {
    font-size: 1.4rem; font-weight: 800; color: #f1f5f9;
    text-shadow: 0 0 12px var(--boss-theme, #7c3aed);
    z-index: 2;
}

/* 卡片抖动 */
.boss-encounter-shaking {
    animation: encounter-shake 0.15s ease-in-out infinite;
}
@keyframes encounter-shake {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(-4px, 2px) rotate(-1deg); }
    50% { transform: translate(3px, -3px) rotate(1deg); }
    75% { transform: translate(-2px, -1px) rotate(-0.5deg); }
}

/* 边框光晕（30%+） */
.boss-encounter-glowing {
    box-shadow: 0 0 40px color-mix(in srgb, var(--boss-theme, #7c3aed) 60%, transparent),
                0 0 80px color-mix(in srgb, var(--boss-theme, #7c3aed) 30%, transparent) !important;
}

/* 火焰特效（70%+） */
.boss-encounter-flame-layer {
    position: absolute; inset: -10px; border-radius: 26px;
    pointer-events: none; z-index: 1;
    background: conic-gradient(
        from 0deg,
        var(--boss-theme, #7c3aed), transparent 25%,
        var(--boss-theme, #7c3aed) 30%, transparent 55%,
        #fbbf24 60%, transparent 85%
    );
    filter: blur(8px);
    animation: flame-spin 0.6s linear infinite;
    opacity: 0.85;
}
@keyframes flame-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 碎片炸裂容器 */
.boss-shatter-container {
    position: absolute;
    width: 200px; height: 267px;
    z-index: 10;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(5, 1fr);
    pointer-events: none;
}

/* 碎片 */
.boss-shatter-piece {
    background-size: 200px 267px;
    background-repeat: no-repeat;
    transition: none;
    opacity: 1;
    will-change: transform, opacity;
}

/* 碎片炸裂动画 */
.boss-shatter-piece.exploding {
    animation: shatter-fly 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}
@keyframes shatter-fly {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(1);
        opacity: 1;
    }
    30% {
        opacity: 1;
    }
    100% {
        transform: translate(var(--sx), var(--sy)) rotate(var(--sr)) scale(var(--ss));
        opacity: 0;
    }
}

/* 英雄卡片也抖动 */
.boss-encounter-hero-shaking {
    animation: hero-shake 0.12s ease-in-out infinite;
}
@keyframes hero-shake {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(2px, -1px); }
    50% { transform: translate(-3px, 2px); }
    75% { transform: translate(1px, -2px); }
}

/* 炸裂后的暗化淡出 */
.boss-encounter-overlay.fading {
    animation: overlay-fade-out 0.5s ease forwards;
}
@keyframes overlay-fade-out {
    from { opacity: 1; }


/* ========== 虚空撕裂遭遇动画 v2 - 四幕主题 ========== */
/* 第一幕：漩涡凝聚 | 第二幕：裂隙撕裂 | 第三幕：BOSS降临 | 第四幕：破碎终结 */

/* 遭遇舞台 */
.void-encounter-stage {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    overflow: hidden;
}

/* 星空背景 */
.void-stars {
    position: absolute; inset: 0;
    z-index: 0;
    transition: opacity 1.5s ease;
}
.void-star {
    position: absolute;
    border-radius: 50%;
    background: #fff;
    animation: void-star-twinkle 3s ease-in-out infinite alternate;
}
@keyframes void-star-twinkle {
    0% { opacity: 0.2; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1.3); }
}

/* 各幕容器 */
.void-act {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    z-index: 2;
}
.void-act-enter {
    animation: void-act-fade-in 0.5s ease-out;
}
@keyframes void-act-fade-in {
    from { opacity: 0; filter: blur(8px); }
    to { opacity: 1; filter: blur(0); }
}

/* ====== 第一幕：漩涡 ====== */
.void-vortex {
    position: relative;
    width: 300px; height: 300px;
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.1s linear;
}
.void-vortex-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid var(--void-theme, #7c3aed);
    opacity: 0;
    animation: void-vortex-spin 3s linear infinite;
}
.vring-1 { width: 280px; height: 280px; animation-direction: normal; }
.vring-2 { width: 200px; height: 200px; animation-direction: reverse; animation-delay: -0.5s; }
.vring-3 { width: 120px; height: 120px; animation-direction: normal; animation-delay: -1s; }
@keyframes void-vortex-spin {
    0% { transform: rotate(0deg); opacity: 0.3; border-width: 2px; }
    50% { opacity: 0.8; border-width: 4px; }
    100% { transform: rotate(360deg); opacity: 0.3; border-width: 2px; }
}

.void-vortex-core {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: var(--void-theme, #7c3aed);
    box-shadow: 0 0 30px var(--void-theme, #7c3aed), 0 0 60px var(--void-theme, #7c3aed), 0 0 90px var(--void-theme, #7c3aed);
    animation: void-core-pulse 1.5s ease-in-out infinite;
}
@keyframes void-core-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 30px var(--void-theme, #7c3aed), 0 0 60px var(--void-theme, #7c3aed); }
    50% { transform: scale(1.6); box-shadow: 0 0 50px var(--void-theme, #7c3aed), 0 0 100px var(--void-theme, #7c3aed), 0 0 150px var(--void-theme, #7c3aed); }
}

/* 漩涡峰值状态（切换到第二幕前） */
.void-vortex-peak {
    animation: void-vortex-burst 0.3s ease-out forwards;
}
@keyframes void-vortex-burst {
    0% { transform: scale(1) rotate(0deg); filter: brightness(1); }
    50% { transform: scale(1.5) rotate(15deg); filter: brightness(2.5); }
    100% { transform: scale(2) rotate(30deg); filter: brightness(3); opacity: 0; }
}

/* ====== 第二幕：裂隙 ====== */
.void-rift {
    position: relative;
    width: 350px; height: 350px;
    display: flex; align-items: center; justify-content: center;
}
.void-rift-crack {
    position: absolute;
    background: rgba(255, 255, 255, 0.15);
    transform-origin: center center;
}
.void-crack-1 { width: 300px; height: 3px; transform: rotate(25deg); animation: void-crack-pulse 1.2s ease-in-out infinite; }
.void-crack-2 { width: 280px; height: 2px; transform: rotate(-35deg); animation: void-crack-pulse 1.4s ease-in-out infinite 0.2s; }
.void-crack-3 { width: 260px; height: 2px; transform: rotate(65deg); animation: void-crack-pulse 1.1s ease-in-out infinite 0.4s; }
.void-crack-4 { width: 290px; height: 3px; transform: rotate(-55deg); animation: void-crack-pulse 1.3s ease-in-out infinite 0.15s; }
.void-crack-5 { width: 240px; height: 2px; transform: rotate(10deg); animation: void-crack-pulse 1.5s ease-in-out infinite 0.35s; }
@keyframes void-crack-pulse {
    0%, 100% { opacity: 0.3; box-shadow: none; }
    50% { opacity: 0.9; box-shadow: 0 0 8px rgba(255,255,255,0.5); }
}

.void-rift-light {
    position: absolute;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: #fff;
    opacity: 0;
    animation: void-rift-glow 2s ease-in-out infinite;
}
@keyframes void-rift-glow {
    0%, 100% { transform: scale(0.5); opacity: 0.3; }
    50% { transform: scale(1.8); opacity: 1; }
}

/* ====== 第三幕：BOSS降临 ====== */
.void-emerge-scene {
    display: flex; align-items: center; justify-content: center;
    gap: 60px;
    width: 100%;
    max-width: 800px;
    padding: 0 40px;
}

/* 英雄面板 */
.void-hero-panel {
    width: 200px; height: 267px;
    border-radius: 16px; overflow: hidden;
    border: 2px solid rgba(96, 165, 250, 0.5);
    box-shadow: 0 0 30px rgba(96, 165, 250, 0.35);
    background: rgba(0, 0, 0, 0.6);
    display: flex; flex-direction: column; align-items: center;
    opacity: 0;
    transform: translateX(-80px);
}
.void-hero-panel img {
    width: 100%; height: 85%; object-fit: cover; object-position: center 15%;
}
.void-hero-name {
    font-size: 0.75rem; color: #60a5fa; font-weight: 700;
    padding: 4px 0; text-align: center;
}
.void-hero-emerge {
    animation: void-hero-slide-in 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
@keyframes void-hero-slide-in {
    from { opacity: 0; transform: translateX(-80px) scale(0.6); filter: blur(4px); }
    to { opacity: 1; transform: translateX(0) scale(1); filter: blur(0); }
}

/* BOSS面板 */
.void-boss-panel {
    width: 240px; height: 320px;
    border-radius: 20px; overflow: hidden;
    border: 3px solid var(--void-theme, #7c3aed);
    box-shadow: 0 0 40px color-mix(in srgb, var(--void-theme, #7c3aed) 50%, transparent);
    background: #000;
    opacity: 0;
    transform: scale(0.3);
}
.void-boss-panel img {
    width: 100%; height: 100%; object-fit: contain;
}
.void-boss-emerge {
    animation: void-boss-burst-in 1s cubic-bezier(0.075, 0.82, 0.165, 1) forwards;
}
@keyframes void-boss-burst-in {
    0% { opacity: 0; transform: scale(0.3); filter: brightness(3) blur(6px); }
    60% { opacity: 1; transform: scale(1.05); filter: brightness(1.2) blur(0); }
    100% { opacity: 1; transform: scale(1); filter: brightness(1) blur(0); }
}

/* 粒子层 */
.void-particles-layer {
    position: absolute; inset: 0;
    pointer-events: none; z-index: 5;
}
.void-particle {
    position: absolute;
    top: 50%; left: 50%;
    border-radius: 50%;
    animation: void-particle-burst 1.5s ease-out forwards;
}
@keyframes void-particle-burst {
    0% { transform: translate(0, 0) scale(1); opacity: 1; }
    100% { transform: translate(var(--px), var(--py)) scale(0); opacity: 0; }
}

/* ====== 第四幕：破碎终结 ====== */
.void-glass-shatter {
    position: absolute; inset: 0;
    z-index: 10; pointer-events: none;
    overflow: hidden;
}
.void-glass-shard {
    position: absolute;
    top: 50%; left: 50%;
    width: 60px; height: 60px;
    background: linear-gradient(135deg, rgba(255,255,255,0.3), rgba(255,255,255,0.05));
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 2px;
    animation: void-glass-fly 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    animation-delay: var(--sd, 0s);
}
@keyframes void-glass-fly {
    0% { transform: translate(0, 0) rotate(0deg) scale(1); opacity: 0.8; }
    50% { opacity: 0.4; }
    100% { transform: translate(var(--sx), var(--sy)) rotate(var(--sr)) scale(0.2); opacity: 0; }
}

.void-title-reveal {
    display: flex; align-items: center; gap: 16px;
    z-index: 15;
}
.void-title-line {
    width: 60px; height: 2px;
    background: var(--void-theme, #7c3aed);
    animation: void-line-extend 0.8s ease-out forwards;
}
@keyframes void-line-extend {
    from { width: 0; opacity: 0; }
    to { width: 60px; opacity: 1; }
}
.void-title-text {
    font-size: 2rem; font-weight: 900; color: #f1f5f9;
    text-shadow: 0 0 30px var(--void-theme, #7c3aed), 0 0 60px var(--void-theme, #7c3aed);
    letter-spacing: 0.05em;
}
.void-subtitle {
    font-size: 0.9rem; color: #94a3b8;
    margin-top: 12px;
    letter-spacing: 0.1em;
    z-index: 15;
}

.void-overlay-fade {
    animation: void-overlay-fade-out 0.4s ease forwards;
}
@keyframes void-overlay-fade-out {
    from { opacity: 1; backdrop-filter: blur(2px); }
    to { opacity: 0; backdrop-filter: blur(0); }
}

/* ====== 提示文字 ====== */
.void-hint {
    margin-top: 20px;
    font-size: 0.85rem; color: #64748b;
    letter-spacing: 0.08em;
    z-index: 3;
    animation: void-hint-pulse 2s ease-in-out infinite;
}
@keyframes void-hint-pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.9; }
}
.void-hint-boss {
    font-size: 1.1rem; font-weight: 700;
    color: var(--void-theme, #7c3aed);
    text-shadow: 0 0 16px var(--void-theme, #7c3aed);
    margin-top: 28px;
}

/* ====== 进度指示器 ====== */
.void-progress-track {
    position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 18px;
    z-index: 20;
}
.void-progress-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    transition: all 0.4s ease;
}
.void-progress-dot.active {
    background: var(--void-theme, #7c3aed);
    box-shadow: 0 0 8px var(--void-theme, #7c3aed);
}
.void-progress-dot.current {
    transform: scale(1.6);
    box-shadow: 0 0 14px var(--void-theme, #7c3aed), 0 0 28px var(--void-theme, #7c3aed);
}
    to { opacity: 0; }
}


/* ========== 普通关卡卡片装饰填充 ========== */
.stage-card-deco-bg {
    position: absolute; bottom: 0; left: 0; right: 0; top: 0;
    background: radial-gradient(circle at 50% 80%, color-mix(in srgb, var(--stage-color, #60a5fa) 8%, transparent) 0%, transparent 60%);
    border-radius: 16px;
    pointer-events: none;
    z-index: 0;
}
.stage-card-deco-glow {
    position: absolute; top: -20px; right: -20px;
    width: 60px; height: 60px;
    background: radial-gradient(circle, color-mix(in srgb, var(--stage-color, #60a5fa) 20%, transparent) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    opacity: 0.6;
    z-index: 0;
}
.stage-card-deco-lines {
    position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 3px; pointer-events: none; z-index: 0;
}
.stage-card-deco-line {
    width: 3px; border-radius: 2px;
    background: color-mix(in srgb, var(--stage-color, #60a5fa) 15%, transparent);
}
.stage-card-deco-line:nth-child(1) { height: 8px; opacity: 0.4; }
.stage-card-deco-line:nth-child(2) { height: 14px; opacity: 0.6; }
.stage-card-deco-line:nth-child(3) { height: 10px; opacity: 0.5; }
.stage-card-deco-line:nth-child(4) { height: 18px; opacity: 0.7; }
.stage-card-deco-line:nth-child(5) { height: 12px; opacity: 0.5; }
/* 悬停时装饰增强 */
.stage-card:hover .stage-card-deco-glow { opacity: 1; }
.stage-card:hover .stage-card-deco-lines { opacity: 0.8; }

/* ========== 统一返回/导航按钮样式 ========== */
.ch-action-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: 10px; cursor: pointer;
    font-size: 0.78rem; font-weight: 600;
    transition: all 0.2s; border: 1px solid;
    white-space: nowrap;
}
.ch-action-btn-back {
    background: rgba(148,163,184,0.08);
    color: #94a3b8;
    border-color: rgba(148,163,184,0.15);
}
.ch-action-btn-back:hover {
    background: rgba(148,163,184,0.15);
    color: #e2e8f0;
    border-color: rgba(148,163,184,0.3);
}
.ch-action-btn-home {
    background: rgba(96,165,250,0.08);
    color: #60a5fa;
    border-color: rgba(96,165,250,0.2);
}
.ch-action-btn-home:hover {
    background: rgba(96,165,250,0.15);
    color: #93c5fd;
    border-color: rgba(96,165,250,0.35);
}
.ch-action-btn-exit {
    background: rgba(248,113,113,0.06);
    color: #94a3b8;
    border-color: rgba(148,163,184,0.12);
}
.ch-action-btn-exit:hover {
    background: rgba(248,113,113,0.12);
    color: #f87171;
    border-color: rgba(248,113,113,0.25);
}
.ch-action-btn i { font-size: 0.8rem; }

/* ==============================================
   【UI 视觉升级层】闯天关 · 主页卡片精修 (2026-09-23)
   本层追加于文件末尾，用于覆盖旧样式，不影响功能。
   ============================================== */

/* ---------- 主页模块卡片：光感边框 + 图标发光 ---------- */
.home-card {
    background: linear-gradient(160deg, rgba(30,41,59,0.55), rgba(15,23,42,0.80)) !important;
    border: 1px solid rgba(139,92,246,0.22) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 12px 32px rgba(0,0,0,0.35) !important;
}
.home-card::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(ellipse 70% 55% at 50% 0%, rgba(99,102,241,0.14), transparent 70%);
}
.home-card:hover {
    transform: translateY(-6px) !important;
    border-color: rgba(139,92,246,0.55) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 22px 48px rgba(0,0,0,0.5), 0 0 44px rgba(99,102,241,0.18) !important;
}
.home-card-icon {
    box-shadow: 0 8px 24px rgba(0,0,0,0.35), 0 0 26px rgba(99,102,241,0.30) !important;
}
.home-card:hover .home-card-icon {
    transform: scale(1.06);
}
.home-card-title {
    color: #f1f5f9 !important;
}

/* ---------- 难度选择卡片（普通/地狱） ---------- */
.ch-mode-card {
    border-radius: 26px !important;
    min-height: 360px !important;
}
.ch-mode-heaven {
    background: linear-gradient(165deg, #1e1b4b 0%, #1e3a8a 45%, #0c4a6e 100%) !important;
    border: 1px solid rgba(129,140,248,0.35) !important;
    box-shadow: 0 0 44px rgba(99,102,241,0.16), inset 0 1px 0 rgba(255,255,255,0.10), 0 14px 40px rgba(0,0,0,0.45) !important;
}
.ch-mode-heaven::before {
    content: '';
    position: absolute;
    top: -55%; left: -25%;
    width: 150%; height: 120%;
    background: radial-gradient(circle, rgba(129,140,248,0.20), transparent 55%);
    pointer-events: none;
    z-index: 0;
}
.ch-mode-hell {
    background: linear-gradient(165deg, #2a0a00 0%, #7f1d1d 55%, #450a0a 100%) !important;
    border: 1px solid rgba(239,68,68,0.38) !important;
    box-shadow: 0 0 44px rgba(239,68,68,0.14), inset 0 1px 0 rgba(255,255,255,0.07), 0 14px 40px rgba(0,0,0,0.45) !important;
}
.ch-mode-hell::before {
    content: '';
    position: absolute;
    top: -55%; left: -25%;
    width: 150%; height: 120%;
    background: radial-gradient(circle, rgba(239,68,68,0.18), transparent 55%);
    pointer-events: none;
    z-index: 0;
}
.ch-mode-heaven:hover {
    transform: translateY(-8px) scale(1.02) !important;
    border-color: rgba(129,140,248,0.70) !important;
    box-shadow: 0 0 70px rgba(99,102,241,0.30), 0 22px 55px rgba(0,0,0,0.55) !important;
}
.ch-mode-hell:hover {
    transform: translateY(-8px) scale(1.02) !important;
    border-color: rgba(239,68,68,0.70) !important;
    box-shadow: 0 0 70px rgba(239,68,68,0.26), 0 22px 55px rgba(0,0,0,0.55) !important;
}
/* 模式卡片文字发光 */
.ch-mode-card .ch-mode-card-title,
.ch-mode-card .ch-mode-card-subtitle {
    position: relative;
    z-index: 1;
}

/* ---------- 关卡卡片：立体质感 ---------- */
.stage-grid {
    padding: 10px 2px 14px !important;
}
.stage-card {
    background: linear-gradient(180deg, rgba(38,49,77,0.55), rgba(17,24,39,0.80)) !important;
    border: 1px solid rgba(99,102,241,0.18) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 6px 16px rgba(0,0,0,0.32) !important;
    border-radius: 16px !important;
}
.stage-card.available {
    background: linear-gradient(180deg, rgba(51,65,105,0.62), rgba(23,32,58,0.85)) !important;
    border-color: rgba(99,102,241,0.28) !important;
}
.stage-card.available:hover {
    transform: translateY(-4px) scale(1.03) !important;
    border-color: rgba(129,140,248,0.65) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.09), 0 12px 30px rgba(0,0,0,0.5), 0 0 26px rgba(99,102,241,0.22) !important;
}
.stage-card.current {
    background: linear-gradient(180deg, rgba(76,74,160,0.50), rgba(30,27,75,0.75)) !important;
    border-color: rgba(129,140,248,0.75) !important;
    box-shadow: 0 0 0 1px rgba(129,140,248,0.18), 0 0 30px rgba(99,102,241,0.38), inset 0 1px 0 rgba(255,255,255,0.10) !important;
}
.stage-card.cleared {
    background: linear-gradient(180deg, rgba(16,99,70,0.50), rgba(6,38,28,0.80)) !important;
    border-color: rgba(52,211,153,0.45) !important;
    box-shadow: 0 0 20px rgba(16,185,129,0.16), inset 0 1px 0 rgba(255,255,255,0.08) !important;
}
.stage-card.locked {
    background: linear-gradient(180deg, rgba(30,41,59,0.32), rgba(15,23,42,0.55)) !important;
    border-color: rgba(100,116,139,0.16) !important;
    opacity: 0.55;
    filter: saturate(0.35);
}
.stage-card.locked::after {
    content: '🔒';
    position: absolute;
    top: 8px;
    right: 10px;
    font-size: 0.72rem;
    opacity: 0.85;
}
/* 关卡数字 / 顶条 / 进度光效 */
.stage-card .stage-card-number {
    text-shadow: 0 0 18px color-mix(in srgb, var(--stage-color, #60a5fa) 55%, transparent), 0 1px 5px rgba(0,0,0,0.5) !important;
}
.stage-card-color-bar {
    height: 4px !important;
    opacity: 0.85 !important;
    box-shadow: 0 0 12px var(--stage-color, #60a5fa);
}
.stage-card .stage-card-progress {
    height: 4px !important;
    background: rgba(255,255,255,0.08) !important;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.4);
}
.stage-card .stage-card-progress-fill {
    box-shadow: 0 0 9px color-mix(in srgb, var(--stage-color, #60a5fa) 70%, transparent);
}
.stage-card .status-current {
    animation: stage-pulse 1.8s ease-in-out infinite;
}
.stage-card .status-cleared {
    background: rgba(16,185,129,0.16) !important;
}

/* ---------- 答题界面 ---------- */
.challenge-play-page {
    padding: 0 6px !important;
}
.challenge-play-title {
    background: linear-gradient(135deg, #f8fafc, #a5b4fc, #818cf8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.15rem !important;
    filter: drop-shadow(0 2px 6px rgba(99,102,241,0.35));
}
.challenge-timer {
    color: #fbbf24 !important;
    background: rgba(245,158,11,0.10);
    border: 1px solid rgba(245,158,11,0.22);
    padding: 4px 12px;
    border-radius: 999px;
    box-shadow: 0 0 14px rgba(245,158,11,0.14);
}
.challenge-progress-bar {
    height: 7px !important;
    background: rgba(255,255,255,0.07) !important;
    border-radius: 999px !important;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.4);
}
.challenge-progress-fill {
    background: linear-gradient(90deg, #6366f1, #a855f7, #ec4899) !important;
    border-radius: 999px !important;
    box-shadow: 0 0 14px rgba(168,85,247,0.55) !important;
}
.challenge-question-area {
    background: linear-gradient(165deg, rgba(30,41,59,0.62), rgba(15,23,42,0.75)) !important;
    border: 1px solid rgba(139,92,246,0.24) !important;
    border-radius: 18px !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 18px 44px rgba(0,0,0,0.42) !important;
    padding: 26px 24px !important;
    backdrop-filter: blur(12px);
}
.challenge-q-type {
    background: linear-gradient(135deg, rgba(245,158,11,0.26), rgba(217,119,6,0.16)) !important;
    border: 1px solid rgba(245,158,11,0.35) !important;
    border-radius: 999px !important;
    padding: 3px 14px !important;
    letter-spacing: 0.08em;
    box-shadow: 0 0 16px rgba(245,158,11,0.12);
}
.challenge-q-indo {
    background: linear-gradient(135deg, #f8fafc, #c7d2fe, #a5b4fc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 3px 10px rgba(99,102,241,0.35));
    font-size: 1.7rem !important;
}
.challenge-q-title {
    color: #eef2ff !important;
}
.challenge-q-prompt {
    color: #7c8db0 !important;
}
/* 选项按钮 */
.challenge-option {
    border: 1px solid rgba(255,255,255,0.10) !important;
    background: linear-gradient(135deg, rgba(51,65,85,0.50), rgba(30,41,59,0.62)) !important;
    border-radius: 13px !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05) !important;
    transition: all 0.22s cubic-bezier(0.25,0.46,0.45,0.94) !important;
}
.challenge-option:hover {
    border-color: rgba(129,140,248,0.60) !important;
    background: linear-gradient(135deg, rgba(79,70,229,0.24), rgba(49,46,129,0.32)) !important;
    box-shadow: 0 0 22px rgba(99,102,241,0.20), inset 0 1px 0 rgba(255,255,255,0.08) !important;
    transform: translateX(4px);
}
.challenge-option.correct {
    border-color: rgba(52,211,153,0.75) !important;
    background: linear-gradient(135deg, rgba(16,185,129,0.26), rgba(6,95,70,0.36)) !important;
    box-shadow: 0 0 24px rgba(16,185,129,0.26) !important;
}
.challenge-option.wrong {
    border-color: rgba(248,113,113,0.75) !important;
    background: linear-gradient(135deg, rgba(239,68,68,0.26), rgba(127,29,29,0.40)) !important;
    box-shadow: 0 0 20px rgba(239,68,68,0.22) !important;
}
.challenge-option-letter {
    background: linear-gradient(135deg, rgba(99,102,241,0.38), rgba(139,92,246,0.32)) !important;
    border: 1px solid rgba(129,140,248,0.38) !important;
    border-radius: 9px !important;
    min-width: 30px !important;
    height: 30px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 700 !important;
    font-size: 0.85rem !important;
    box-shadow: 0 0 12px rgba(99,102,241,0.22) !important;
}
/* 题号导航容器 */
.ch-question-nav {
    background: linear-gradient(160deg, rgba(30,41,59,0.5), rgba(15,23,42,0.6)) !important;
    border: 1px solid rgba(255,255,255,0.06) !important;
    border-radius: 14px !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04) !important;
}
/* 普通模式战斗头部徽章 */
.ch-normal-battle-header {
    background: linear-gradient(135deg, rgba(30,41,59,0.55), rgba(15,23,42,0.65)) !important;
    border: 1px solid rgba(139,92,246,0.18) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05) !important;
}
.ch-normal-stage-badge {
    background: linear-gradient(135deg, rgba(96,165,250,0.28), rgba(59,130,246,0.20)) !important;
    color: #93c5fd !important;
    border: 1px solid rgba(96,165,250,0.35);
    border-radius: 999px !important;
    box-shadow: 0 0 12px rgba(96,165,250,0.15);
}
.ch-normal-stage-label {
    color: #a5b4fc !important;
}
/* 控制区（语速/循环） */
.challenge-controls {
    background: linear-gradient(160deg, rgba(30,41,59,0.5), rgba(15,23,42,0.62)) !important;
    border: 1px solid rgba(255,255,255,0.05) !important;
    border-radius: 14px !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04) !important;
}

/* ==============================================
   【UI 视觉升级层 2】闯天关游戏化强化 (2026-09-23)
   在升级层 1 基础上追加，进一步强化游戏氛围。
   ============================================== */

/* ---------- 难度选择卡片：场景强化 ---------- */
.ch-mode-card-scene {
    height: 230px !important;
}
.ch-mode-card-title,
.ch-mode-card-subtitle,
.ch-mode-card-stats {
    position: relative;
    z-index: 2;
}
/* 普通卡片顶部神圣光柱 */
.ch-mode-heaven::after {
    content: '';
    position: absolute;
    left: 50%;
    top: -40%;
    width: 220px;
    height: 200%;
    transform: translateX(-50%);
    background: linear-gradient(180deg, rgba(129,140,248,0.22), transparent 60%);
    pointer-events: none;
    z-index: 0;
    animation: fmi-holy-beam 5s ease-in-out infinite alternate;
}
/* 地狱卡片底部熔岩光 */
.ch-mode-hell::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -30%;
    width: 260px;
    height: 160%;
    transform: translateX(-50%);
    background: linear-gradient(0deg, rgba(239,68,68,0.25), transparent 55%);
    pointer-events: none;
    z-index: 0;
    animation: fmi-lava-glow 5s ease-in-out infinite alternate;
}
@keyframes fmi-holy-beam {
    from { opacity: 0.55; }
    to { opacity: 1; }
}
@keyframes fmi-lava-glow {
    from { opacity: 0.5; }
    to { opacity: 1; }
}

/* ---------- 关卡卡片：霓虹数字 + 状态光效 ---------- */
.stage-card .stage-card-number {
    font-size: 1.9rem !important;
    background: linear-gradient(160deg, #ffffff 10%, var(--stage-color, #60a5fa) 90%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 14px color-mix(in srgb, var(--stage-color, #60a5fa) 65%, transparent));
}
/* 锁定卡片数字去发光 */
.stage-card.locked .stage-card-number {
    -webkit-text-fill-color: #475569;
    background: none;
    filter: none;
}
/* 当前关：呼吸光晕 */
.stage-card.current {
    animation: fmi-stage-breath 2.2s ease-in-out infinite !important;
}
@keyframes fmi-stage-breath {
    0%, 100% { box-shadow: 0 0 0 1px rgba(129,140,248,0.25), 0 0 22px rgba(99,102,241,0.30), inset 0 1px 0 rgba(255,255,255,0.10) !important; }
    50% { box-shadow: 0 0 0 2px rgba(129,140,248,0.50), 0 0 42px rgba(99,102,241,0.55), inset 0 1px 0 rgba(255,255,255,0.14) !important; }
}
/* 通关关卡：金色微光 */
.stage-card.cleared .stage-card-number {
    background: linear-gradient(160deg, #fef9c3 10%, #fbbf24 90%);
    -webkit-background-clip: text;
    background-clip: text;
    filter: drop-shadow(0 0 12px rgba(251,191,36,0.55));
}
.stage-card.cleared {
    animation: fmi-cleared-glow 3s ease-in-out infinite;
}
@keyframes fmi-cleared-glow {
    0%, 100% { box-shadow: 0 0 16px rgba(16,185,129,0.14), inset 0 1px 0 rgba(255,255,255,0.08) !important; }
    50% { box-shadow: 0 0 26px rgba(16,185,129,0.26), inset 0 1px 0 rgba(255,255,255,0.10) !important; }
}
/* 锁定卡片：玻璃暗化（保留轮廓） */
.stage-card.locked {
    backdrop-filter: blur(3px) saturate(0.6);
    opacity: 0.62 !important;
}
.stage-card.locked .stage-card-name,
.stage-card.locked .stage-card-label {
    color: #556177 !important;
}

/* ---------- 题号导航：胶囊发光 ---------- */
.ch-nav-dot {
    width: 38px !important;
    height: 38px !important;
    border-radius: 12px !important;
    border: 1.5px solid rgba(255,255,255,0.10) !important;
    background: linear-gradient(160deg, rgba(51,65,85,0.55), rgba(30,41,59,0.65)) !important;
    color: #94a3b8 !important;
    font-size: 0.8rem !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05) !important;
    transition: all 0.2s cubic-bezier(0.25,0.46,0.45,0.94) !important;
}
.ch-nav-dot:hover:not(.ch-nav-dot-current) {
    border-color: rgba(129,140,248,0.55) !important;
    background: linear-gradient(160deg, rgba(79,70,229,0.25), rgba(49,46,129,0.35)) !important;
    color: #c7d2fe !important;
    transform: translateY(-2px);
}
.ch-nav-dot-current {
    border-color: rgba(129,140,248,0.85) !important;
    background: linear-gradient(160deg, #6366f1, #8b5cf6) !important;
    color: #ffffff !important;
    box-shadow: 0 0 18px rgba(129,140,248,0.55), inset 0 1px 0 rgba(255,255,255,0.22) !important;
}
.ch-nav-dot-answered {
    border-color: rgba(52,211,153,0.6) !important;
    background: linear-gradient(160deg, rgba(16,185,129,0.45), rgba(5,150,105,0.35)) !important;
    color: #a7f3d0 !important;
    box-shadow: 0 0 12px rgba(16,185,129,0.25) !important;
}
.ch-nav-dot-skipped {
    border-color: rgba(245,158,11,0.6) !important;
    background: linear-gradient(160deg, rgba(245,158,11,0.4), rgba(217,119,6,0.3)) !important;
    color: #fde68a !important;
    box-shadow: 0 0 12px rgba(245,158,11,0.22) !important;
}

/* ---------- 题目区顶部高光 ---------- */
.challenge-question-area::before {
    content: '';
    position: absolute;
    top: 0; left: 12%; right: 12%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(129,140,248,0.7), transparent);
    pointer-events: none;
}

/* ---------- 闯天关标题发光 ---------- */
.challenge-module h2,
.challenge-module .ch-page-title {
    background: linear-gradient(135deg, #f8fafc, #a5b4fc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 10px rgba(99,102,241,0.4));
}

/* ==============================================
   【UI 视觉升级层 3】关卡卡片 sc-* 实际类强化 (2026-09-23)
   关卡卡片 DOM 实际使用 sc-number/sc-label/sc-bar/sc-castle-bg
   等类，本层针对它们做霓虹与质感强化。
   ============================================== */

/* ---- 石墙背景：纹理更清晰、门拱光效更强 ---- */
.sc-castle-bg::before {
    opacity: 0.75 !important;
}
.sc-castle-bg::after {
    width: 92% !important;
    height: 72% !important;
    background: radial-gradient(ellipse at center bottom,
        color-mix(in srgb, var(--stage-color, #60a5fa) 32%, transparent) 0%,
        transparent 70%) !important;
}
/* 城垛更亮 */
.sc-battlement::before {
    opacity: 0.6 !important;
}

/* ---- 关卡数字：霓虹渐变 ---- */
.sc-number {
    font-size: 2.15rem !important;
    background: linear-gradient(160deg, #ffffff 12%, var(--stage-color, #60a5fa) 92%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 16px color-mix(in srgb, var(--stage-color, #60a5fa) 62%, transparent));
}
.sc-label {
    color: #a5b4fc !important;
    letter-spacing: 0.12em !important;
    font-size: 0.62rem !important;
}
/* 锁定卡片数字去发光 */
.stage-card.locked .sc-number {
    background: none;
    -webkit-text-fill-color: #4b5563;
    filter: none;
}
.stage-card.locked .sc-label {
    color: #556177 !important;
}
/* 通关卡片数字金色 */
.stage-card.cleared .sc-number {
    background: linear-gradient(160deg, #fef9c3 10%, #fbbf24 90%);
    -webkit-background-clip: text;
    background-clip: text;
    filter: drop-shadow(0 0 12px rgba(251,191,36,0.6));
}

/* ---- 进度条强化 ---- */
.sc-bar {
    height: 4px !important;
    width: 60% !important;
    border-radius: 999px !important;
    background: rgba(0,0,0,0.35) !important;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.5);
}
.sc-bar-fill {
    border-radius: 999px !important;
    box-shadow: 0 0 10px color-mix(in srgb, var(--stage-color, #60a5fa) 70%, transparent);
}

/* ---- 激活关卡：呼吸光晕强化 ---- */
.stage-card.current {
    border-color: rgba(129,140,248,0.85) !important;
}

/* ---- 难度卡片：门光晕常亮（不再仅 hover 可见） ---- */
.ch-door-glow {
    opacity: 0.45 !important;
    transition: opacity 0.5s ease !important;
}
.ch-mode-card:hover .ch-door-glow {
    opacity: 0.9 !important;
}
/* 门框加亮 */
.ch-door-heaven .ch-door-arch {
    border-color: rgba(251,191,36,0.55) !important;
    box-shadow: 0 -4px 20px rgba(251,191,36,0.22) !important;
}
.ch-door-heaven .ch-door-body {
    border-color: rgba(251,191,36,0.45) !important;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.4), 0 0 14px rgba(251,191,36,0.12) !important;
}
.ch-door-hell .ch-door-arch {
    border-color: rgba(239,68,68,0.55) !important;
    box-shadow: 0 -4px 20px rgba(239,68,68,0.22) !important;
}
.ch-door-hell .ch-door-body {
    border-color: rgba(239,68,68,0.45) !important;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.4), 0 0 14px rgba(239,68,68,0.12) !important;
}

/* ---- 选关页头部栏 ---- */
.stages-header-bar {
    background: linear-gradient(160deg, rgba(30,41,59,0.55), rgba(15,23,42,0.65)) !important;
    border: 1px solid rgba(139,92,246,0.16) !important;
    border-radius: 14px !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05) !important;
}
.stages-progress-track {
    background: rgba(255,255,255,0.07) !important;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.4) !important;
}
.stages-progress-fill {
    box-shadow: 0 0 12px color-mix(in srgb, var(--stage-color, #60a5fa) 60%, transparent) !important;
}

/* ==============================================
   【UI 视觉升级层 5】关卡卡片清爽化 (2026-09-24)
   移除城垛小锯齿 / 黑色门拱等不易理解的装饰图形，
   保留霓虹数字 + 名称 + 进度条 + 状态光效，卡片更简洁精致。
   ============================================== */
/* 移除顶部城垛小锯齿 */
.sc-battlement {
    display: none !important;
}
/* 移除底部黑色门拱图形 */
.sc-arch {
    display: none !important;
}
/* 石墙砖缝纹理淡化至几乎不可见（保留微质感） */
.sc-castle-bg::before {
    opacity: 0.12 !important;
}
/* 底部门拱光晕减淡（柔和色彩氛围） */
.sc-castle-bg::after {
    opacity: 0.7 !important;
}
/* ==============================================
   【UI 视觉升级层 6】图标修复 (2026-09-24)
   - 锁定卡片锁图标由 emoji(🔒) 改为 FontAwesome fa-lock，
     修复 Windows 上 emoji 渲染成"未知方块"的丑图标问题
   - 当前关播放角标改为圆形渐变发光徽章
   ============================================== */
.stage-card.locked::after {
    content: '\f023';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.7rem;
    color: #64748b;
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.2);
    width: 22px;
    height: 22px;
    line-height: 22px;
    text-align: center;
    border-radius: 8px;
    position: absolute;
    top: 8px;
    right: 10px;
    opacity: 0.95;
    display: block;
}
.sc-badge-current {
    background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
    border: none !important;
    border-radius: 999px !important;
    width: 24px !important;
    height: 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    box-shadow: 0 0 12px rgba(129, 140, 248, 0.55) !important;
    animation: sc-pulse 2s ease-in-out infinite !important;
}
.sc-badge-current i {
    font-size: 0.7rem !important;
    color: #fff !important;
}
/* 可挑战徽章：圆形发光（fa-bolt 图标） */
.sc-badge-go {
    background: linear-gradient(135deg, rgba(99,102,241,0.40), rgba(139,92,246,0.32)) !important;
    color: #c7d2fe !important;
    border: 1px solid rgba(129,140,248,0.40) !important;
    border-radius: 999px !important;
    width: 22px !important;
    height: 22px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    font-size: 0.62rem !important;
    box-shadow: 0 0 10px rgba(99,102,241,0.35) !important;
}
.sc-badge-go i {
    font-size: 0.6rem !important;
    color: #a5b4fc !important;
}
/* ==============================================
   【UI 视觉升级层 7】关卡图标重设计 (2026-09-24)
   普通关卡数字升级为"发光圆形徽章"：
   数字嵌入霓虹圆环底座，不同状态不同配色。
   ============================================== */
.sc-number {
    width: 62px !important;
    height: 62px !important;
    border-radius: 50% !important;
    background:
        radial-gradient(circle at 32% 28%, rgba(255,255,255,0.14), transparent 58%),
        linear-gradient(160deg, color-mix(in srgb, var(--stage-color, #60a5fa) 24%, #16203a) 0%, #0b1120 82%) !important;
    border: 2px solid color-mix(in srgb, var(--stage-color, #60a5fa) 48%, transparent) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.5rem !important;
    font-weight: 900 !important;
    color: #ffffff !important;
    -webkit-text-fill-color: currentColor;
    background-clip: border-box !important;
    margin: 2px 0 8px !important;
    box-shadow:
        0 0 18px color-mix(in srgb, var(--stage-color, #60a5fa) 26%, transparent),
        inset 0 2px 4px rgba(0,0,0,0.45),
        inset 0 -2px 4px rgba(255,255,255,0.06) !important;
    text-shadow: 0 0 14px color-mix(in srgb, var(--stage-color, #60a5fa) 65%, transparent) !important;
    line-height: 1 !important;
    filter: none !important;
}

/* 当前关：徽章高亮 + 呼吸 */
.stage-card.current .sc-number {
    border-color: rgba(129,140,248,0.75) !important;
    background:
        radial-gradient(circle at 32% 28%, rgba(255,255,255,0.16), transparent 58%),
        linear-gradient(160deg, rgba(99,102,241,0.42), rgba(49,46,129,0.55) 82%) !important;
    box-shadow:
        0 0 24px rgba(99,102,241,0.5),
        inset 0 2px 4px rgba(0,0,0,0.45),
        inset 0 -2px 4px rgba(255,255,255,0.10) !important;
    text-shadow: 0 0 16px rgba(165,180,252,0.9) !important;
    animation: fmi-badge-breath 2.2s ease-in-out infinite;
}
@keyframes fmi-badge-breath {
    0%, 100% { box-shadow: 0 0 16px rgba(99,102,241,0.35), inset 0 2px 4px rgba(0,0,0,0.45); }
    50% { box-shadow: 0 0 30px rgba(99,102,241,0.65), inset 0 2px 4px rgba(0,0,0,0.45); }
}

/* 通关关：金色徽章 */
.stage-card.cleared .sc-number {
    border-color: rgba(251,191,36,0.55) !important;
    background:
        radial-gradient(circle at 32% 28%, rgba(255,255,255,0.14), transparent 58%),
        linear-gradient(160deg, rgba(251,191,36,0.28), rgba(69,42,10,0.6) 82%) !important;
    box-shadow: 0 0 18px rgba(251,191,36,0.32), inset 0 2px 4px rgba(0,0,0,0.45) !important;
    color: #fde68a !important;
    text-shadow: 0 0 14px rgba(251,191,36,0.7) !important;
}

/* 锁定关：暗灰徽章 */
.stage-card.locked .sc-number {
    border-color: rgba(100,116,139,0.28) !important;
    background: linear-gradient(160deg, #1c2536, #0d1322) !important;
    box-shadow: none !important;
    color: #64748b !important;
    text-shadow: none !important;
}
.stage-card.locked .sc-label {
    color: #556177 !important;
}
/* ==============================================
   【UI 视觉升级层 8】BOSS图标FA适配 (2026-09-24)
   小BOSS徽章/状态徽章/遭遇动画图标的 <i> 渲染细节
   ============================================== */
.boss-mini-badge i {
    font-size: 0.95rem;
    line-height: 1;
    filter: drop-shadow(0 0 6px color-mix(in srgb, var(--boss-theme) 55%, transparent));
}
.boss-banner-status-badge i,
.boss-mini-status i {
    margin-right: 4px;
    font-size: 0.8em;
}
.boss-encounter-overlay i {
    color: var(--boss-theme, #7c3aed);
    filter: drop-shadow(0 0 10px color-mix(in srgb, var(--boss-theme, #7c3aed) 60%, transparent));
}

/* ====== 选关页边框装备栏（随时装备/卸下） ====== */
.frame-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 14px;
    margin: 0 4px 10px;
    background: rgba(30,41,59,0.5);
    border: 1px solid rgba(129,140,248,0.22);
    border-radius: 14px;
}
.frame-toolbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.frame-toolbar-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #e2e8f0;
}
.frame-toolbar-badges {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.frame-tb-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.frame-tb-badge:hover { filter: brightness(1.25); transform: translateY(-1px); }
.frame-tb-empty {
    font-size: 0.72rem;
    color: #64748b;
}
.frame-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.frame-tb-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 8px;
    background: rgba(99,102,241,0.15);
    color: #a5b4fc;
    border: 1px solid rgba(99,102,241,0.3);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.frame-tb-btn:hover { background: rgba(99,102,241,0.28); }
.frame-tb-btn.danger {
    background: rgba(239,68,68,0.12);
    color: #f87171;
    border-color: rgba(239,68,68,0.3);
}
.frame-tb-btn.danger:hover { background: rgba(239,68,68,0.25); }

/* ====== 关卡卡边框角标按钮（装配入口） ====== */
.stage-card .stage-frame-btn,
.boss-banner .stage-frame-btn,
.boss-mini-card .stage-frame-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 6;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: rgba(15,23,42,0.72);
    border: 1px solid rgba(129,140,248,0.25);
    color: #818cf8;
    font-size: 0.6rem;
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.2s;
}
.stage-card .stage-frame-btn:hover,
.boss-banner .stage-frame-btn:hover,
.boss-mini-card .stage-frame-btn:hover {
    opacity: 1;
    transform: scale(1.12);
}
.stage-card .stage-frame-btn.on,
.boss-banner .stage-frame-btn.on,
.boss-mini-card .stage-frame-btn.on {
    opacity: 1;
    background: rgba(15,23,42,0.88);
    box-shadow: 0 0 8px currentColor;
}


/* ====== 关卡边框装配浮层 ====== */
.stage-frame-picker {
    position: absolute;
    z-index: 999;
    width: 300px;
    background: rgba(15,23,42,0.97);
    border: 1px solid rgba(129,140,248,0.35);
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.6);
    padding: 10px;
}
.spf-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 700;
    color: #e2e8f0;
    padding: 2px 2px 8px;
}
.spf-close { cursor: pointer; color: #64748b; font-size: 0.8rem; padding: 2px 6px; }
.spf-close:hover { color: #f87171; }
.spf-hint { font-size: 0.65rem; color: #64748b; padding: 0 2px 8px; }
.spf-list { display: flex; flex-direction: column; gap: 4px; max-height: 280px; overflow-y: auto; }
.spf-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 8px;
    cursor: pointer;
    background: rgba(51,65,85,0.35);
    transition: all 0.15s;
}
.spf-item:hover { background: rgba(99,102,241,0.2); }
.spf-item.locked { opacity: 0.45; cursor: not-allowed; }
.spf-item.cur { background: rgba(99,102,241,0.25); outline: 1px solid rgba(129,140,248,0.5); }
.spf-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.spf-name { font-size: 0.72rem; font-weight: 600; color: #e2e8f0; }
.spf-desc { font-size: 0.62rem; color: #64748b; margin-left: auto; }
.spf-act { font-size: 0.68rem; color: #a5b4fc; }
.spf-lock { color: #475569; font-size: 0.7rem; margin-left: auto; }
.spf-clear {
    margin-top: 8px;
    padding: 6px;
    text-align: center;
    font-size: 0.68rem;
    color: #f87171;
    background: rgba(239,68,68,0.1);
    border-radius: 8px;
    cursor: pointer;
}
.spf-clear:hover { background: rgba(239,68,68,0.22); }


/* ====== 各款边框独特造型（专配唯一性 v4：专属层级色 + 强流光） ====== */
/* 通用流光：沿边框外缘流动的光带（加宽加亮） */
.stage-card .frame-border::before,
.boss-banner .frame-border::before,
.boss-mini-card .frame-border::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 20px;
    padding: 4px;
    background: conic-gradient(from var(--frame-angle, 0deg), transparent 0% 52%, var(--frame-color, #22c55e) 74% 90%, transparent 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: frame-rotate var(--frame-speed, 3s) linear infinite;
    opacity: 0.95;
}

/* 通用四角相框角扣 */
.stage-card .frame-border::after,
.boss-banner .frame-border::after,
.boss-mini-card .frame-border::after {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 24px;
    pointer-events: none;
    background:
        linear-gradient(var(--frame-color, #22c55e), var(--frame-color, #22c55e)) top 0 left 0 / 22px 3px no-repeat,
        linear-gradient(var(--frame-color, #22c55e), var(--frame-color, #22c55e)) top 0 left 0 / 3px 22px no-repeat,
        linear-gradient(var(--frame-color, #22c55e), var(--frame-color, #22c55e)) top 0 right 0 / 22px 3px no-repeat,
        linear-gradient(var(--frame-color, #22c55e), var(--frame-color, #22c55e)) top 0 right 0 / 3px 22px no-repeat,
        linear-gradient(var(--frame-color, #22c55e), var(--frame-color, #22c55e)) bottom 0 left 0 / 22px 3px no-repeat,
        linear-gradient(var(--frame-color, #22c55e), var(--frame-color, #22c55e)) bottom 0 left 0 / 3px 22px no-repeat,
        linear-gradient(var(--frame-color, #22c55e), var(--frame-color, #22c55e)) bottom 0 right 0 / 22px 3px no-repeat,
        linear-gradient(var(--frame-color, #22c55e), var(--frame-color, #22c55e)) bottom 0 right 0 / 3px 22px no-repeat;
    filter: drop-shadow(0 0 5px var(--frame-color, #22c55e));
    opacity: 0.95;
}

/* 各款专属造型与动态（颜色随 --frame-color，层级专属） */

/* q0 翡翠流光：纯净翡翠光流 + 四角钻光（基础） */
.stage-card.frame-q0 .frame-border, .boss-banner.frame-q0 .frame-border, .boss-mini-card.frame-q0 .frame-border { border-radius: 20px; }

/* q1 紫晶藤蔓：内外双虚线藤环 + 紫色光流 */
.stage-card.frame-q1 .frame-border, .boss-banner.frame-q1 .frame-border, .boss-mini-card.frame-q1 .frame-border {
    border: 2px solid rgba(168,85,247,0.9);
    box-shadow: 0 0 8px rgba(168,85,247,0.5), 0 0 22px rgba(168,85,247,0.22);
}
.stage-card.frame-q1 .frame-border::after, .boss-banner.frame-q1 .frame-border::after, .boss-mini-card.frame-q1 .frame-border::after {
    inset: -3px;
    border: 2px dashed rgba(168,85,247,0.5);
    border-radius: 18px;
    background: none;
    filter: none;
    opacity: 1;
    animation: frame-rotate 22s linear infinite;
}

/* q2 琥珀金纹：金色齿环旋转 + 琥珀光流 */
.stage-card.frame-q2 .frame-border, .boss-banner.frame-q2 .frame-border, .boss-mini-card.frame-q2 .frame-border {
    border: 2px solid rgba(245,158,11,0.9);
    box-shadow: 0 0 8px rgba(245,158,11,0.5), 0 0 22px rgba(245,158,11,0.2);
}
.stage-card.frame-q2 .frame-border::before, .boss-banner.frame-q2 .frame-border::before, .boss-mini-card.frame-q2 .frame-border::before {
    inset: -7px;
    border: 2px dashed rgba(245,158,11,0.45);
    animation: frame-rotate 16s linear infinite;
    opacity: 0.9;
}

/* q3 橙焰巨锤：火焰呼吸脉动 + 橙焰光流 */
@keyframes frame-flame {
    0%, 100% { box-shadow: 0 0 6px rgba(249,115,22,0.55), 0 0 14px rgba(249,115,22,0.3), 0 0 30px rgba(249,115,22,0.12); }
    50% { box-shadow: 0 0 10px rgba(249,115,22,0.85), 0 0 28px rgba(249,115,22,0.55), 0 0 60px rgba(249,115,22,0.25); }
}
.stage-card.frame-q3 .frame-border, .boss-banner.frame-q3 .frame-border, .boss-mini-card.frame-q3 .frame-border {
    border: 2px solid rgba(249,115,22,0.95);
    animation: frame-flame 1.4s ease-in-out infinite;
}

/* q4 深海秘蓝：点状虚线 + 蓝色迷雾光流 */
@keyframes frame-mist {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}
.stage-card.frame-q4 .frame-border, .boss-banner.frame-q4 .frame-border, .boss-mini-card.frame-q4 .frame-border {
    border: 2px dotted rgba(59,130,246,0.85);
    box-shadow: 0 0 10px rgba(59,130,246,0.4), 0 0 26px rgba(59,130,246,0.18);
    animation: frame-mist 4.5s ease-in-out infinite;
}

/* q5 赤红幻术：警戒闪烁双圈 + 赤红光流 */
@keyframes frame-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}
.stage-card.frame-q5 .frame-border, .boss-banner.frame-q5 .frame-border, .boss-mini-card.frame-q5 .frame-border {
    border: 2px solid rgba(239,68,68,0.95);
    outline: 1px dashed rgba(239,68,68,0.6);
    outline-offset: 3px;
    box-shadow: 0 0 8px rgba(239,68,68,0.5), 0 0 24px rgba(239,68,68,0.2);
    animation: frame-blink 1s steps(2, jump-none) infinite;
}

/* q6 烈焰荆棘：玫红尖刺外圈旋转 + 烈焰光流 */
.stage-card.frame-q6 .frame-border, .boss-banner.frame-q6 .frame-border, .boss-mini-card.frame-q6 .frame-border {
    border: 2px solid rgba(244,63,94,0.95);
    box-shadow: 0 0 8px rgba(244,63,94,0.55), 0 0 24px rgba(244,63,94,0.25);
}
.stage-card.frame-q6 .frame-border::before, .boss-banner.frame-q6 .frame-border::before, .boss-mini-card.frame-q6 .frame-border::before {
    inset: -15px;
    background: conic-gradient(from var(--frame-angle, 0deg), transparent 0% 76%, #f43f5e 87%, transparent 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: frame-rotate 3.5s linear infinite;
    opacity: 0.85;
}

/* q7 极光幻彩：多彩极光全谱流动 */
@keyframes frame-aurora {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}
.stage-card.frame-q7 .frame-border, .boss-banner.frame-q7 .frame-border, .boss-mini-card.frame-q7 .frame-border {
    border: 2px solid transparent;
    background: linear-gradient(90deg, #10b981, #a855f7, #f59e0b, #f97316, #3b82f6, #ef4444, #f43f5e, #7c3aed) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    box-shadow: 0 0 12px rgba(124,58,237,0.5);
    animation: frame-aurora 6s linear infinite;
}

/* ====== 批量装配面板 ====== */
.batch-panel-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: rgba(2,6,23,0.65);
    display: flex;
    align-items: center;
    justify-content: center;
}
.batch-panel {
    width: 400px;
    max-width: 92vw;
    background: rgba(15,23,42,0.98);
    border: 1px solid rgba(129,140,248,0.35);
    border-radius: 16px;
    box-shadow: 0 18px 60px rgba(0,0,0,0.7);
    padding: 16px;
}
.batch-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 700;
    color: #e2e8f0;
    padding-bottom: 8px;
}
.batch-panel-close { cursor: pointer; color: #64748b; font-size: 0.85rem; padding: 2px 6px; }
.batch-panel-close:hover { color: #f87171; }
.batch-sec-title { font-size: 0.68rem; color: #94a3b8; margin: 10px 0 6px; font-weight: 600; }
.batch-frame-row { display: flex; flex-wrap: wrap; gap: 6px; }
.batch-frame-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,0.25);
    font-size: 0.68rem;
    color: #cbd5e1;
    cursor: pointer;
    transition: all 0.15s;
    background: rgba(51,65,85,0.3);
}
.batch-frame-chip:hover { transform: translateY(-1px); }
.batch-frame-chip.sel { border-color: transparent; font-weight: 700; box-shadow: 0 0 8px currentColor; }
.batch-frame-chip.locked { opacity: 0.4; cursor: not-allowed; }
.batch-scope-row { display: flex; flex-direction: column; gap: 6px; }
.batch-scope-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.72rem;
    color: #cbd5e1;
    background: rgba(51,65,85,0.25);
    transition: all 0.15s;
}
.batch-scope-item:hover { background: rgba(99,102,241,0.18); }
.batch-scope-item.sel { background: rgba(99,102,241,0.28); outline: 1px solid rgba(129,140,248,0.5); }
.batch-panel-actions { display: flex; gap: 8px; margin-top: 14px; }
.batch-btn {
    flex: 1;
    padding: 8px;
    border-radius: 9px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}
.batch-btn.apply {
    background: rgba(99,102,241,0.85);
    color: #fff;
    border: 1px solid rgba(129,140,248,0.6);
}
.batch-btn.apply:hover { background: rgba(99,102,241,1); }
.batch-btn.cancel { background: rgba(51,65,85,0.4); color: #94a3b8; border: 1px solid rgba(148,163,184,0.2); }
.batch-btn.cancel:hover { color: #e2e8f0; }
.batch-tip { font-size: 0.62rem; color: #64748b; margin-top: 8px; line-height: 1.5; }

/* ====== 边框角落 BOSS 出处徽记（证明边框来自哪个BOSS） ====== */
.stage-card .frame-boss-mark,
.boss-banner .frame-boss-mark,
.boss-mini-card .frame-boss-mark {
    position: absolute;
    top: -13px;
    left: -13px;
    z-index: 7;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid var(--frame-color, #22c55e);
    background: rgba(15,23,42,0.92);
    box-shadow: 0 0 8px var(--frame-color, #22c55e), 0 0 0 3px rgba(15,23,42,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: default;
    transition: transform 0.2s, box-shadow 0.2s;
}
.stage-card .frame-boss-mark:hover,
.boss-banner .frame-boss-mark:hover,
.boss-mini-card .frame-boss-mark:hover {
    transform: scale(1.15);
    box-shadow: 0 0 12px var(--frame-color, #22c55e), 0 0 0 4px rgba(15,23,42,0.55);
}
.stage-card .frame-boss-mark img,
.boss-banner .frame-boss-mark img,
.boss-mini-card .frame-boss-mark img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.stage-card .frame-boss-mark i,
.boss-banner .frame-boss-mark i,
.boss-mini-card .frame-boss-mark i {
    font-size: 0.8rem;
    color: var(--frame-color, #22c55e);
}
.stage-card .frame-boss-mark .fbm-crown,
.boss-banner .frame-boss-mark .fbm-crown,
.boss-mini-card .frame-boss-mark .fbm-crown {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: rgba(15,23,42,0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fbbf24;
    font-size: 0.55rem;
    border: 1px solid rgba(251,191,36,0.45);
    box-shadow: 0 0 4px rgba(251,191,36,0.5);
}

/* ====== 地狱排行榜（多分支） ====== */
.hell-rank-head {
    text-align: center;
    padding: 14px 16px 10px;
}
.hell-rank-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #f87171;
    letter-spacing: 1px;
}
.hell-rank-title i { margin-right: 6px; }
.hell-rank-sub {
    font-size: 0.68rem;
    color: #64748b;
    margin-top: 4px;
}
.rank-branch-tabs {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 6px 8px 14px;
}
.rank-branch-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(51,65,85,0.35);
    border: 1px solid rgba(148,163,184,0.2);
    color: #94a3b8;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.rank-branch-btn:hover { color: #e2e8f0; border-color: rgba(148,163,184,0.4); }
.rank-branch-btn.active {
    background: linear-gradient(135deg, rgba(239,68,68,0.25), rgba(153,27,27,0.15));
    color: #fca5a5;
    border-color: rgba(248,113,113,0.5);
    box-shadow: 0 0 10px rgba(239,68,68,0.2);
}
/* 首杀榜条目 */
.rank-first-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    margin: 0 0 6px;
    background: rgba(30,41,59,0.45);
    border: 1px solid rgba(148,163,184,0.12);
    border-radius: 12px;
    transition: all 0.2s;
}
.rank-first-item:hover { background: rgba(30,41,59,0.7); transform: translateX(2px); }
.rank-first-item.champion {
    background: linear-gradient(135deg, rgba(124,58,237,0.18), rgba(139,92,246,0.06));
    border-color: rgba(139,92,246,0.35);
    box-shadow: 0 0 16px rgba(139,92,246,0.15);
}
.rank-first-item.locked { opacity: 0.55; }
.rf-rank {
    width: 30px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 800;
    color: #fbbf24;
}
.rank-first-item.locked .rf-rank { color: #475569; }
.rf-title {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.rf-boss {
    font-size: 0.82rem;
    font-weight: 800;
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rank-first-item.champion .rf-boss {
    background: linear-gradient(90deg, #c084fc, #f0abfc);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.rf-tag {
    flex-shrink: 0;
    font-size: 0.6rem;
    font-weight: 700;
    color: #fbbf24;
    background: rgba(251,191,36,0.12);
    border: 1px solid rgba(251,191,36,0.3);
    padding: 1px 7px;
    border-radius: 999px;
    white-space: nowrap;
}
.rf-tag.pending {
    color: #64748b;
    background: rgba(100,116,139,0.1);
    border-color: rgba(100,116,139,0.25);
}
.rf-user {
    font-size: 0.75rem;
    font-weight: 600;
    color: #cbd5e1;
    white-space: nowrap;
}
.rf-user i { color: #818cf8; margin-right: 4px; }
.rf-stat {
    font-size: 0.68rem;
    color: #94a3b8;
    white-space: nowrap;
}
/* 全通榜卡片 */
.hell-clear-card {
    background: rgba(15,23,42,0.6);
    border: 1px solid rgba(148,163,184,0.15);
    border-radius: 16px;
    padding: 16px;
    margin: 0 2px;
}
.hc-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 800;
    color: #e2e8f0;
    padding-bottom: 10px;
}
.hc-head i { color: #f87171; }
.hc-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.hc-progress-bar {
    flex: 1;
    height: 10px;
    background: rgba(51,65,85,0.5);
    border-radius: 999px;
    overflow: hidden;
}
.hc-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #f87171, #ef4444);
    border-radius: 999px;
    transition: width 0.4s;
}
.hc-progress-text { font-size: 0.7rem; color: #94a3b8; white-space: nowrap; }
.hc-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}
.hc-stat {
    text-align: center;
    background: rgba(51,65,85,0.3);
    border-radius: 10px;
    padding: 10px 4px;
}
.hc-num { display: block; font-size: 1rem; font-weight: 800; color: #f87171; }
.hc-label { font-size: 0.62rem; color: #64748b; }
.hc-boss-list { display: flex; flex-direction: column; gap: 5px; }
.hc-boss-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(51,65,85,0.2);
    font-size: 0.72rem;
    color: #cbd5e1;
}
.hc-boss-tag {
    margin-left: auto;
    font-size: 0.6rem;
    font-weight: 700;
}
.hc-boss-tag.pending { color: #64748b; }
.hc-boss-item.done .hc-boss-tag { color: #22c55e; }

.msg-list {
    columns: 3;
    column-gap: 16px;
}
.msg-note {
    break-inside: avoid;
    margin-bottom: 16px;
    transition: transform 0.2s;
}
.msg-note:hover { transform: translateY(-3px) rotate(0deg) !important; }
.msg-public-lb {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.7rem;
    color: #cbd5e1;
    cursor: pointer;
}
.msg-public-lb input { accent-color: #34d399; width: 14px; height: 14px; }

/* ====== 留言墙（便利贴 + 图钉风格） ====== */
.msg-wall {
    max-width: 900px;
    margin: 0 auto;
    padding: 18px 16px 30px;
}
.msg-wall-head { text-align: center; padding: 8px 0 16px; }
.msg-wall-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #f9a8d4;
    letter-spacing: 1px;
}
.msg-wall-title i { margin-right: 6px; }
.msg-wall-sub { font-size: 0.72rem; color: #64748b; margin-top: 5px; }
.msg-post-card {
    background: rgba(30,41,59,0.5);
    border: 1px solid rgba(244,114,182,0.2);
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 18px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}
.msg-post-row { display: flex; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.msg-input {
    flex: 1;
    min-width: 160px;
    padding: 8px 12px;
    background: rgba(15,23,42,0.5);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: #e2e8f0;
    font-size: 0.82rem;
    outline: none;
}
.msg-input:focus, .msg-textarea:focus { border-color: rgba(244,114,182,0.5); }
.msg-textarea {
    width: 100%;
    padding: 10px 12px;
    background: rgba(15,23,42,0.5);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: #e2e8f0;
    font-size: 0.85rem;
    outline: none;
    resize: vertical;
    font-family: inherit;
    box-sizing: border-box;
}
.msg-post-bar { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; gap: 10px; flex-wrap: wrap; }
.msg-tip { font-size: 0.66rem; color: #64748b; }
.msg-send-btn {
    padding: 8px 20px;
    border-radius: 10px;
    background: linear-gradient(135deg, #ec4899, #d946ef);
    border: none;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(236,72,153,0.35);
    transition: all 0.2s;
}
.msg-send-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 18px rgba(236,72,153,0.5); }
.msg-list {
    columns: 3;
    column-gap: 16px;
}
@media (max-width: 900px) { .msg-list { columns: 2; } }
@media (max-width: 600px) { .msg-list { columns: 1; } }
.msg-note {
    position: relative;
    border-radius: 4px 16px 4px 4px;
    padding: 20px 14px 12px;
    min-height: 120px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.3);
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    gap: 8px;
    break-inside: avoid;
    margin-bottom: 16px;
}
.msg-note:hover { transform: translateY(-3px) rotate(0deg) !important; box-shadow: 0 10px 26px rgba(0,0,0,0.4); }
.msg-note-pin {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%) rotate(-12deg);
    color: rgba(71,85,105,0.9);
    font-size: 1.05rem;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.4));
}
.msg-n-yellow { background: linear-gradient(160deg, #fef3c7, #fde68a); color: #78350f; }
.msg-n-pink   { background: linear-gradient(160deg, #fbcfe8, #f9a8d4); color: #831843; }
.msg-n-blue   { background: linear-gradient(160deg, #c7d2fe, #a5b4fc); color: #1e1b4b; }
.msg-n-green  { background: linear-gradient(160deg, #bbf7d0, #86efac); color: #14532d; }
.msg-note-to { font-size: 0.66rem; font-weight: 700; opacity: 0.75; }
.msg-note-content { font-size: 0.85rem; line-height: 1.5; word-break: break-word; flex: 1; }
.msg-note-foot {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.66rem;
    opacity: 0.8;
    padding-top: 6px;
    border-top: 1px dashed rgba(0,0,0,0.15);
}
.msg-note-from { font-weight: 700; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-del-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.7rem;
    opacity: 0.5;
    transition: opacity 0.2s;
    padding: 2px 4px;
}
.msg-del-btn:hover { opacity: 1; color: #dc2626; }
.msg-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: #64748b;
    padding: 50px 0;
    font-size: 0.85rem;
}
.msg-empty i { display: block; font-size: 2.2rem; margin-bottom: 10px; color: #475569; }
