/* ════════════════════════════════════════════════════════════
   抽卡页面样式 — 召唤阵动画 + 卡牌翻转 + 热度光效
   ════════════════════════════════════════════════════════════
   设计理念参考：
   - 原神祈愿：三段式节奏（蓄势→爆发→展示），色彩提前暗示稀有度
   - 星穹铁道跃迁：多层粒子营造空间感（前景大粒子+背景星尘）
   - FGO召唤：召唤阵旋转+符文发光的古典仪式感
   - 通用原则：GPU加速（transform/opacity）、cubic-bezier缓动、100ms内即时反馈
   ════════════════════════════════════════════════════════════ */

/* ── CSS 变量（抽卡页面专属，覆盖默认） ── */
.gacha-page {
    --summon-size: clamp(280px, 40vw, 420px);       /* 召唤阵尺寸 */
    --summon-color: var(--gold);                     /* 召唤阵主色（默认金色） */
    --glow-color: var(--gold);                       /* 光效颜色（JS 动态设置） */
    --glow-shadow: rgba(212, 175, 55, 0.6);          /* 光效阴影（JS 动态设置） */
    --particle-color: #fde68a;                       /* 粒子颜色（JS 动态设置） */
    --card-width: clamp(240px, 30vw, 320px);         /* 结果卡牌宽度 */
    --card-aspect: 3 / 4;                            /* 卡牌宽高比 */

    /* 页面布局 — 固定高度填满除导航栏外的视口，禁止滚动
       2026-06-25 修复：原 calc(100vh - 44px) 未计算 main-content 的 48px padding，
       导致实际高度超出视口 ~100px 出现滚动条。现配合 .main-content:has(.gacha-page)
       去除父容器 padding，高度精确等于视口减导航栏(60px)
       2026-06-26 反馈2：移动端 100vh 不稳定（地址栏动态显示/隐藏），
       优先使用 100dvh（dynamic viewport height），回退到 100vh */
    height: calc(100vh - 60px);
    height: calc(100dvh - 60px);
    padding: var(--space-lg) var(--space-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    /* 2026-06-26 反馈2：改为 flex-start 让状态栏紧贴顶部，
       召唤阵通过 margin:auto 0 在剩余空间居中，消除上方空白 */
    justify-content: flex-start;
    gap: var(--space-md);
    position: relative;
    overflow: hidden;
    /* 注意：不设置 overflow-x: hidden，因为 CSS 规范规定
       当一个方向 overflow 非 visible 时，另一个方向的 visible
       会被强制改为 auto，可能裁剪绝对定位的卡牌结果区 */
}

/* 页面背景光晕（营造仪式感） */
.gacha-page::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 60%;
    background: radial-gradient(
        ellipse at center,
        rgba(212, 175, 55, 0.08) 0%,
        rgba(124, 58, 237, 0.05) 40%,
        transparent 70%
    );
    z-index: -1;
    pointer-events: none;
    animation: gachaBgPulse 6s ease-in-out infinite;
}

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


/* ════════════════════════════════════════════════════════════
   状态栏
   ════════════════════════════════════════════════════════════ */

.gacha-status-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    min-width: 280px;
    max-width: 90vw;
}

.gacha-status-item {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    transition: all var(--transition-base);
}

.gacha-status-item .status-label {
    color: var(--text-tertiary);
    font-weight: 400;
}

.gacha-status-item .status-value {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* 状态颜色 */
.gacha-status-item.status-ok {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
}
.gacha-status-item.status-ok .status-value {
    color: #4ade80;
}

.gacha-status-item.status-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
}
.gacha-status-item.status-error .status-value {
    color: #f87171;
}

.gacha-status-item.status-warn {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
}
.gacha-status-item.status-warn .status-value {
    color: var(--gold-light);
}

.gacha-status-error {
    color: #f87171;
    font-size: var(--text-sm);
    text-align: center;
    width: 100%;
}

.gacha-status-reason {
    color: var(--text-tertiary);
    font-size: var(--text-xs);
    text-align: center;
    width: 100%;
    font-style: italic;
}


/* ════════════════════════════════════════════════════════════
   召唤阵区域
   ════════════════════════════════════════════════════════════ */

.gacha-summon-area {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--summon-size);
    height: var(--summon-size);
    /* 2026-06-26 反馈2：margin:auto 0 让召唤阵在剩余空间垂直居中，
       消除状态栏上方的空白浪费 */
    margin: auto 0;
    /* 明确声明 overflow: visible，确保绝对定位的卡牌结果区不被裁剪 */
    overflow: visible;
}

/* 召唤阵容器 */
.summon-circle-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--summon-color);
    transition: color var(--transition-slow);
}

/* 召唤阵光晕底层（呼吸效果） */
.summon-circle-wrapper::before {
    content: '';
    position: absolute;
    inset: -10%;
    background: radial-gradient(
        circle at center,
        var(--glow-shadow) 0%,
        transparent 60%
    );
    opacity: 0.4;
    z-index: 0;
    pointer-events: none;
    animation: summonGlow 4s ease-in-out infinite;
    transition: opacity var(--transition-slow), background var(--transition-slow);
}

@keyframes summonGlow {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.05); }
}

/* 召唤中：光晕增强 */
.summon-circle-wrapper.summoning::before {
    opacity: 0.9;
    animation: summonGlowActive 0.8s ease-in-out infinite;
}

@keyframes summonGlowActive {
    0%, 100% { opacity: 0.7; transform: scale(1.05); }
    50% { opacity: 1; transform: scale(1.15); }
}

/* 抽卡动画中：光晕达到最强 */
.summon-circle-wrapper.draw-animating::before {
    opacity: 1;
    background: radial-gradient(
        circle at center,
        var(--glow-shadow) 0%,
        var(--glow-color) 30%,
        transparent 70%
    );
    animation: drawGlowBurst 3s ease-out;
}

@keyframes drawGlowBurst {
    0% { opacity: 0.4; transform: scale(1); }
    20% { opacity: 1; transform: scale(1.2); }
    40% { opacity: 0.9; transform: scale(1.3); }
    100% { opacity: 0.7; transform: scale(1.15); }
}


/* ── 5 层繁复魔法阵 ──
   层次（外→内）：runes / petals / hex / octa / core
   旋转方向交替，速度由外向内递增，营造层次感
   每层通过 .summon-ring 基类继承定位与尺寸
*/

.summon-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 1;
}

.summon-svg {
    width: 100%;
    height: 100%;
    display: block;
    filter: drop-shadow(0 0 8px var(--glow-shadow));
    transition: filter var(--transition-slow);
}

@keyframes rotateCW {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes rotateCCW {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(-360deg); }
}

/* 层 1：符文外环 — 顺时针 60s（最慢，外层稳重） */
.summon-ring-runes {
    animation: rotateCW var(--ui-summon-runes, 60s) linear infinite;
}

/* 层 2：十二瓣花 — 逆时针 45s */
.summon-ring-petals {
    animation: rotateCCW var(--ui-summon-petals, 45s) linear infinite;
}

/* 层 3：双层六芒星 — 顺时针 30s（保留原节奏） */
.summon-ring-hex {
    animation: rotateCW var(--ui-summon-hex, 30s) linear infinite;
}

/* 层 4：八芒星 + 方位 — 逆时针 20s */
.summon-ring-octa {
    animation: rotateCCW var(--ui-summon-octa, 20s) linear infinite;
}

/* 层 5：中心图腾 — 顺时针 15s（最快，核心灵动） */
.summon-ring-core {
    animation: rotateCW var(--ui-summon-core, 15s) linear infinite;
}

/* 召唤中：所有层加速（默认÷7.5，octa÷7.14保持原节奏差异） */
/* 使用 calc() 按比例自动调整，用户调节默认时长时加速状态同步变化 */
.summon-circle-wrapper.summoning .summon-ring-runes {
    animation: rotateCW calc(var(--ui-summon-runes, 60s) / 7.5) linear infinite;
}
.summon-circle-wrapper.summoning .summon-ring-petals {
    animation: rotateCCW calc(var(--ui-summon-petals, 45s) / 7.5) linear infinite;
}
.summon-circle-wrapper.summoning .summon-ring-hex {
    animation: rotateCW calc(var(--ui-summon-hex, 30s) / 7.5) linear infinite;
}
.summon-circle-wrapper.summoning .summon-ring-octa {
    animation: rotateCCW calc(var(--ui-summon-octa, 20s) / 7.14) linear infinite;
}
.summon-circle-wrapper.summoning .summon-ring-core {
    animation: rotateCW calc(var(--ui-summon-core, 15s) / 7.5) linear infinite;
}

/* 抽卡动画中：极速旋转（默认÷25，octa÷22.22保持原节奏差异） */
.summon-circle-wrapper.draw-animating .summon-ring-runes {
    animation: rotateCW calc(var(--ui-summon-runes, 60s) / 25) linear infinite;
}
.summon-circle-wrapper.draw-animating .summon-ring-petals {
    animation: rotateCCW calc(var(--ui-summon-petals, 45s) / 25) linear infinite;
}
.summon-circle-wrapper.draw-animating .summon-ring-hex {
    animation: rotateCW calc(var(--ui-summon-hex, 30s) / 25) linear infinite;
}
.summon-circle-wrapper.draw-animating .summon-ring-octa {
    animation: rotateCCW calc(var(--ui-summon-octa, 20s) / 22.22) linear infinite;
}
.summon-circle-wrapper.draw-animating .summon-ring-core {
    animation: rotateCW calc(var(--ui-summon-core, 15s) / 25) linear infinite;
}

.summon-circle-wrapper.draw-animating .summon-svg {
    filter: drop-shadow(0 0 16px var(--glow-color)) drop-shadow(0 0 32px var(--glow-shadow));
}


/* ── 粒子层 ── */
/* 设计参考：星穹铁道跃迁的多层粒子，营造空间深度感 */

.summon-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
}

.summon-particle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 4px;
    background: var(--particle-color);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--particle-color), 0 0 12px var(--glow-shadow);
    opacity: 0;
    /* 16 个粒子均匀分布在圆周上，每个偏移 22.5 度（配合 5 层阵法） */
    --angle: calc(var(--i) * 22.5deg);
    --radius: 45%;
    transform: translate(-50%, -50%) rotate(var(--angle)) translateX(var(--radius));
    animation: particleOrbit 8s linear infinite;
    animation-delay: calc(var(--i) * -0.6s);
    transition: background var(--transition-slow), box-shadow var(--transition-slow);
}

@keyframes particleOrbit {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) rotate(var(--angle)) translateX(var(--radius)) scale(0.5);
    }
    20% {
        opacity: 0.8;
        transform: translate(-50%, -50%) rotate(var(--angle)) translateX(var(--radius)) scale(1);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) rotate(calc(var(--angle) + 180deg)) translateX(var(--radius)) scale(1.2);
    }
    80% {
        opacity: 0.8;
        transform: translate(-50%, -50%) rotate(calc(var(--angle) + 300deg)) translateX(var(--radius)) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) rotate(calc(var(--angle) + 360deg)) translateX(var(--radius)) scale(0.5);
    }
}

/* 召唤中：粒子加速 + 变大 */
.summon-circle-wrapper.summoning .summon-particle {
    width: 6px;
    height: 6px;
    animation: particleOrbitFast 2s linear infinite;
    animation-delay: calc(var(--i) * -0.15s);
}

@keyframes particleOrbitFast {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) rotate(var(--angle)) translateX(30%) scale(0.5);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) rotate(calc(var(--angle) + 180deg)) translateX(60%) scale(1.5);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) rotate(calc(var(--angle) + 360deg)) translateX(30%) scale(0.5);
    }
}

/* 抽卡动画中：粒子向中心汇聚爆发 */
.summon-circle-wrapper.draw-animating .summon-particle {
    animation: particleConverge 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: calc(var(--i) * 0.05s);
}

@keyframes particleConverge {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) rotate(var(--angle)) translateX(60%) scale(1.5);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) rotate(var(--angle)) translateX(20%) scale(2);
        background: var(--glow-color);
        box-shadow: 0 0 12px var(--glow-color), 0 0 24px var(--glow-shadow);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) rotate(var(--angle)) translateX(0%) scale(0);
    }
}


/* ── 召唤按钮 ── */

.summon-btn {
    position: relative;
    z-index: 3;
    width: clamp(80px, 12vw, 120px);
    height: clamp(80px, 12vw, 120px);
    border-radius: 50%;
    border: 2px solid var(--summon-color);
    background: radial-gradient(
        circle at center,
        rgba(212, 175, 55, 0.2) 0%,
        rgba(18, 18, 31, 0.9) 70%
    );
    color: var(--summon-color);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    transition: all var(--transition-base);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow:
        0 0 20px var(--glow-shadow),
        inset 0 0 20px rgba(212, 175, 55, 0.1);
    font-family: var(--font-display);
}

.summon-btn:hover:not(.disabled):not(:disabled) {
    transform: scale(1.08);
    border-color: var(--gold-light);
    box-shadow:
        0 0 30px var(--glow-shadow),
        0 0 60px var(--glow-shadow),
        inset 0 0 30px rgba(212, 175, 55, 0.2);
}

.summon-btn:active:not(.disabled):not(:disabled) {
    transform: scale(0.95);
}

.summon-btn:focus-visible {
    outline: 2px solid var(--gold-light);
    outline-offset: 4px;
}

.summon-btn.disabled,
.summon-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    filter: grayscale(0.5);
}

.summon-btn-icon {
    font-size: clamp(1.5rem, 3vw, 2rem);
    line-height: 1;
    filter: drop-shadow(0 0 4px var(--glow-shadow));
    animation: btnIconPulse 2s ease-in-out infinite;
}

@keyframes btnIconPulse {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.1); opacity: 1; }
}

.summon-btn-text {
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* 召唤中：按钮隐藏 */
.summon-circle-wrapper.summoning .summon-btn,
.summon-circle-wrapper.draw-animating .summon-btn {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.5);
    transition: all 0.3s ease;
}

/* 结果展示时：召唤阵元素淡出（让卡牌成为视觉焦点） */
.summon-circle-wrapper.result-shown .summon-ring,
.summon-circle-wrapper.result-shown .summon-particles,
.summon-circle-wrapper.result-shown .summon-btn {
    opacity: 0;
    transition: opacity 0.4s ease;
}

.summon-circle-wrapper.result-shown::before {
    opacity: 0.3;
    transition: opacity 0.4s ease;
}


/* ════════════════════════════════════════════════════════════
   魔法阵测试页面（调试面板入口）
   ════════════════════════════════════════════════════════════ */

.magic-test-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-xl) var(--space-lg) var(--space-3xl);
    color: var(--text-primary);
}

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

.magic-test-back-btn {
    display: inline-block;
    margin-bottom: var(--space-md);
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: var(--text-sm);
    transition: all var(--transition-fast);
}

.magic-test-back-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-gold);
    background: rgba(212, 175, 55, 0.08);
}

.magic-test-title {
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    font-weight: 700;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: var(--space-xs);
}

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

.magic-test-current-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: rgba(212, 175, 55, 0.06);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
}

.magic-test-current-label {
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

.magic-test-current-name {
    color: var(--gold);
    font-weight: 600;
    font-size: var(--text-base);
}

.magic-test-reset-btn {
    padding: 4px 12px;
    background: transparent;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    color: var(--text-tertiary);
    font-size: var(--text-xs);
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

.magic-test-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: var(--space-xl);
}

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

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

.magic-test-card.selected {
    border-color: var(--gold);
    box-shadow: 0 0 0 1px var(--gold), 0 0 24px rgba(212, 175, 55, 0.2);
}

.magic-test-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
}

.magic-test-card-name {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text-primary);
}

.magic-test-card-badge {
    padding: 2px 10px;
    background: var(--gradient-gold);
    color: #000;
    font-size: var(--text-xs);
    font-weight: 600;
    border-radius: var(--radius-full);
}

.magic-test-card-preview {
    width: 100%;
    aspect-ratio: 1 / 1;
    max-width: 280px;
    margin: 0 auto;
    position: relative;
    color: var(--gold);
}

/* 测试页面中魔法阵容器：固定尺寸，不响应交互 */
.magic-test-circle {
    position: relative;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* 测试页面中心点装饰（所有设计共用） */
.magic-test-circle .summon-ring-center-dot {
    animation: none;
}

.magic-test-card-desc {
    color: var(--text-tertiary);
    font-size: var(--text-sm);
    line-height: 1.5;
    text-align: center;
    min-height: 3em;
}

.magic-test-apply-btn {
    padding: 8px 16px;
    background: var(--gradient-gold);
    color: #000;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-body);
}

.magic-test-apply-btn:hover:not(.disabled) {
    transform: scale(1.03);
    box-shadow: var(--shadow-gold);
}

.magic-test-apply-btn.disabled {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-tertiary);
    cursor: not-allowed;
    box-shadow: none;
}


/* ── 5 种新设计的旋转动画 ──
   设计原则：
   1. 每个设计 5 层，每层仅一个旋转动画
   2. 旋转方向交替（CW/CCW），速度由外向内递增
   3. 减少圆形元素，突出三角/六芒星/符文主体
   4. 由外到内方向：CW → CCW → CW → CCW → CW
*/

/* 设计 1：北欧符文阵 — 5 层 */
.magic-test-d1 .magic-test-d1-l1 { animation: rotateCW 60s linear infinite; }
.magic-test-d1 .magic-test-d1-l2 { animation: rotateCCW 45s linear infinite; }
.magic-test-d1 .magic-test-d1-l3 { animation: rotateCW 30s linear infinite; }
.magic-test-d1 .magic-test-d1-l4 { animation: rotateCCW 20s linear infinite; }
.magic-test-d1 .magic-test-d1-l5 { animation: rotateCW 15s linear infinite; }

/* 设计 2：星象魔法阵 — 5 层 */
.magic-test-d2 .magic-test-d2-l1 { animation: rotateCW 55s linear infinite; }
.magic-test-d2 .magic-test-d2-l2 { animation: rotateCCW 40s linear infinite; }
.magic-test-d2 .magic-test-d2-l3 { animation: rotateCW 25s linear infinite; }
.magic-test-d2 .magic-test-d2-l4 { animation: rotateCCW 18s linear infinite; }
.magic-test-d2 .magic-test-d2-l5 { animation: rotateCW 12s linear infinite; }

/* 设计 3：炼金术阵 — 5 层 */
.magic-test-d3 .magic-test-d3-l1 { animation: rotateCW 50s linear infinite; }
.magic-test-d3 .magic-test-d3-l2 { animation: rotateCCW 35s linear infinite; }
.magic-test-d3 .magic-test-d3-l3 { animation: rotateCW 22s linear infinite; }
.magic-test-d3 .magic-test-d3-l4 { animation: rotateCCW 16s linear infinite; }
.magic-test-d3 .magic-test-d3-l5 { animation: rotateCW 10s linear infinite; }

/* 设计 4：所罗门封印阵 — 5 层 */
.magic-test-d4 .magic-test-d4-l1 { animation: rotateCW 58s linear infinite; }
.magic-test-d4 .magic-test-d4-l2 { animation: rotateCCW 42s linear infinite; }
.magic-test-d4 .magic-test-d4-l3 { animation: rotateCW 28s linear infinite; }
.magic-test-d4 .magic-test-d4-l4 { animation: rotateCCW 19s linear infinite; }
.magic-test-d4 .magic-test-d4-l5 { animation: rotateCW 13s linear infinite; }

/* 设计 5：星辰封印阵 — 5 层 */
.magic-test-d5 .magic-test-d5-l1 { animation: rotateCW 62s linear infinite; }
.magic-test-d5 .magic-test-d5-l2 { animation: rotateCCW 48s linear infinite; }
.magic-test-d5 .magic-test-d5-l3 { animation: rotateCW 32s linear infinite; }
.magic-test-d5 .magic-test-d5-l4 { animation: rotateCCW 22s linear infinite; }
.magic-test-d5 .magic-test-d5-l5 { animation: rotateCW 14s linear infinite; }

/* 设计 6：机械朋克阵 — 5 层 */
.magic-test-d6 .magic-test-d6-l1 { animation: rotateCW 65s linear infinite; }
.magic-test-d6 .magic-test-d6-l2 { animation: rotateCCW 50s linear infinite; }
.magic-test-d6 .magic-test-d6-l3 { animation: rotateCW 35s linear infinite; }
.magic-test-d6 .magic-test-d6-l4 { animation: rotateCCW 24s linear infinite; }
.magic-test-d6 .magic-test-d6-l5 { animation: rotateCW 16s linear infinite; }

/* 设计 7：赛博朋克阵 — 5 层 */
.magic-test-d7 .magic-test-d7-l1 { animation: rotateCW 58s linear infinite; }
.magic-test-d7 .magic-test-d7-l2 { animation: rotateCCW 42s linear infinite; }
.magic-test-d7 .magic-test-d7-l3 { animation: rotateCW 28s linear infinite; }
.magic-test-d7 .magic-test-d7-l4 { animation: rotateCCW 19s linear infinite; }
.magic-test-d7 .magic-test-d7-l5 { animation: rotateCW 12s linear infinite; }

/* 设计 8：东方仙灵阵 — 5 层 */
.magic-test-d8 .magic-test-d8-l1 { animation: rotateCW 55s linear infinite; }
.magic-test-d8 .magic-test-d8-l2 { animation: rotateCCW 40s linear infinite; }
.magic-test-d8 .magic-test-d8-l3 { animation: rotateCW 26s linear infinite; }
.magic-test-d8 .magic-test-d8-l4 { animation: rotateCCW 18s linear infinite; }
.magic-test-d8 .magic-test-d8-l5 { animation: rotateCW 11s linear infinite; }

/* 设计 9：哥特暗影阵 — 5 层 */
.magic-test-d9 .magic-test-d9-l1 { animation: rotateCW 60s linear infinite; }
.magic-test-d9 .magic-test-d9-l2 { animation: rotateCCW 45s linear infinite; }
.magic-test-d9 .magic-test-d9-l3 { animation: rotateCW 30s linear infinite; }
.magic-test-d9 .magic-test-d9-l4 { animation: rotateCCW 20s linear infinite; }
.magic-test-d9 .magic-test-d9-l5 { animation: rotateCW 14s linear infinite; }

/* 设计 10：深海神殿阵 — 5 层 */
.magic-test-d10 .magic-test-d10-l1 { animation: rotateCW 52s linear infinite; }
.magic-test-d10 .magic-test-d10-l2 { animation: rotateCCW 38s linear infinite; }
.magic-test-d10 .magic-test-d10-l3 { animation: rotateCW 25s linear infinite; }
.magic-test-d10 .magic-test-d10-l4 { animation: rotateCCW 17s linear infinite; }
.magic-test-d10 .magic-test-d10-l5 { animation: rotateCW 10s linear infinite; }

/* 设计 11：原始图腾阵 — 5 层 */
.magic-test-d11 .magic-test-d11-l1 { animation: rotateCW 56s linear infinite; }
.magic-test-d11 .magic-test-d11-l2 { animation: rotateCCW 41s linear infinite; }
.magic-test-d11 .magic-test-d11-l3 { animation: rotateCW 27s linear infinite; }
.magic-test-d11 .magic-test-d11-l4 { animation: rotateCCW 18s linear infinite; }
.magic-test-d11 .magic-test-d11-l5 { animation: rotateCW 12s linear infinite; }

/* 设计 12：量子矩阵阵 — 5 层 */
.magic-test-d12 .magic-test-d12-l1 { animation: rotateCW 54s linear infinite; }
.magic-test-d12 .magic-test-d12-l2 { animation: rotateCCW 39s linear infinite; }
.magic-test-d12 .magic-test-d12-l3 { animation: rotateCW 24s linear infinite; }
.magic-test-d12 .magic-test-d12-l4 { animation: rotateCCW 16s linear infinite; }
.magic-test-d12 .magic-test-d12-l5 { animation: rotateCW 10s linear infinite; }

/* 设计 13：时空裂隙阵 — 5 层 */
.magic-test-d13 .magic-test-d13-l1 { animation: rotateCW 62s linear infinite; }
.magic-test-d13 .magic-test-d13-l2 { animation: rotateCCW 46s linear infinite; }
.magic-test-d13 .magic-test-d13-l3 { animation: rotateCW 30s linear infinite; }
.magic-test-d13 .magic-test-d13-l4 { animation: rotateCCW 20s linear infinite; }
.magic-test-d13 .magic-test-d13-l5 { animation: rotateCW 13s linear infinite; }

/* 设计 14：圣光教堂阵 — 5 层 */
.magic-test-d14 .magic-test-d14-l1 { animation: rotateCW 57s linear infinite; }
.magic-test-d14 .magic-test-d14-l2 { animation: rotateCCW 42s linear infinite; }
.magic-test-d14 .magic-test-d14-l3 { animation: rotateCW 27s linear infinite; }
.magic-test-d14 .magic-test-d14-l4 { animation: rotateCCW 18s linear infinite; }
.magic-test-d14 .magic-test-d14-l5 { animation: rotateCW 12s linear infinite; }

/* 设计 15：幻境迷宫阵 — 5 层 */
.magic-test-d15 .magic-test-d15-l1 { animation: rotateCW 59s linear infinite; }
.magic-test-d15 .magic-test-d15-l2 { animation: rotateCCW 43s linear infinite; }
.magic-test-d15 .magic-test-d15-l3 { animation: rotateCW 28s linear infinite; }
.magic-test-d15 .magic-test-d15-l4 { animation: rotateCCW 19s linear infinite; }
.magic-test-d15 .magic-test-d15-l5 { animation: rotateCW 12s linear infinite; }


/* ════════════════════════════════════════════════════════════
   抽卡页面魔法阵新设计 — 旋转动画与状态加速
   与测试页面共用 SVG 结构，但 class 命名为 design-dN-lM
   支持 .summoning（加速 5 倍）和 .draw-animating（加速 15 倍）状态
   ════════════════════════════════════════════════════════════ */

/* 设计 1：北欧符文阵 — 5 层 */
.design-d1 .design-d1-l1 { animation: rotateCW 60s linear infinite; }
.design-d1 .design-d1-l2 { animation: rotateCCW 45s linear infinite; }
.design-d1 .design-d1-l3 { animation: rotateCW 30s linear infinite; }
.design-d1 .design-d1-l4 { animation: rotateCCW 20s linear infinite; }
.design-d1 .design-d1-l5 { animation: rotateCW 15s linear infinite; }

.summon-circle-wrapper.summoning.design-d1 .design-d1-l1 { animation: rotateCW 12s linear infinite; }
.summon-circle-wrapper.summoning.design-d1 .design-d1-l2 { animation: rotateCCW 9s linear infinite; }
.summon-circle-wrapper.summoning.design-d1 .design-d1-l3 { animation: rotateCW 6s linear infinite; }
.summon-circle-wrapper.summoning.design-d1 .design-d1-l4 { animation: rotateCCW 4s linear infinite; }
.summon-circle-wrapper.summoning.design-d1 .design-d1-l5 { animation: rotateCW 3s linear infinite; }

.summon-circle-wrapper.draw-animating.design-d1 .design-d1-l1 { animation: rotateCW 4s linear infinite; }
.summon-circle-wrapper.draw-animating.design-d1 .design-d1-l2 { animation: rotateCCW 3s linear infinite; }
.summon-circle-wrapper.draw-animating.design-d1 .design-d1-l3 { animation: rotateCW 2s linear infinite; }
.summon-circle-wrapper.draw-animating.design-d1 .design-d1-l4 { animation: rotateCCW 1.3s linear infinite; }
.summon-circle-wrapper.draw-animating.design-d1 .design-d1-l5 { animation: rotateCW 1s linear infinite; }

/* 设计 2：星象魔法阵 — 5 层 */
.design-d2 .design-d2-l1 { animation: rotateCW 55s linear infinite; }
.design-d2 .design-d2-l2 { animation: rotateCCW 40s linear infinite; }
.design-d2 .design-d2-l3 { animation: rotateCW 25s linear infinite; }
.design-d2 .design-d2-l4 { animation: rotateCCW 18s linear infinite; }
.design-d2 .design-d2-l5 { animation: rotateCW 12s linear infinite; }

.summon-circle-wrapper.summoning.design-d2 .design-d2-l1 { animation: rotateCW 11s linear infinite; }
.summon-circle-wrapper.summoning.design-d2 .design-d2-l2 { animation: rotateCCW 8s linear infinite; }
.summon-circle-wrapper.summoning.design-d2 .design-d2-l3 { animation: rotateCW 5s linear infinite; }
.summon-circle-wrapper.summoning.design-d2 .design-d2-l4 { animation: rotateCCW 3.6s linear infinite; }
.summon-circle-wrapper.summoning.design-d2 .design-d2-l5 { animation: rotateCW 2.4s linear infinite; }

.summon-circle-wrapper.draw-animating.design-d2 .design-d2-l1 { animation: rotateCW 3.7s linear infinite; }
.summon-circle-wrapper.draw-animating.design-d2 .design-d2-l2 { animation: rotateCCW 2.7s linear infinite; }
.summon-circle-wrapper.draw-animating.design-d2 .design-d2-l3 { animation: rotateCW 1.7s linear infinite; }
.summon-circle-wrapper.draw-animating.design-d2 .design-d2-l4 { animation: rotateCCW 1.2s linear infinite; }
.summon-circle-wrapper.draw-animating.design-d2 .design-d2-l5 { animation: rotateCW 0.8s linear infinite; }

/* 设计 3：炼金术阵 — 5 层 */
.design-d3 .design-d3-l1 { animation: rotateCW 50s linear infinite; }
.design-d3 .design-d3-l2 { animation: rotateCCW 35s linear infinite; }
.design-d3 .design-d3-l3 { animation: rotateCW 22s linear infinite; }
.design-d3 .design-d3-l4 { animation: rotateCCW 16s linear infinite; }
.design-d3 .design-d3-l5 { animation: rotateCW 10s linear infinite; }

.summon-circle-wrapper.summoning.design-d3 .design-d3-l1 { animation: rotateCW 10s linear infinite; }
.summon-circle-wrapper.summoning.design-d3 .design-d3-l2 { animation: rotateCCW 7s linear infinite; }
.summon-circle-wrapper.summoning.design-d3 .design-d3-l3 { animation: rotateCW 4.4s linear infinite; }
.summon-circle-wrapper.summoning.design-d3 .design-d3-l4 { animation: rotateCCW 3.2s linear infinite; }
.summon-circle-wrapper.summoning.design-d3 .design-d3-l5 { animation: rotateCW 2s linear infinite; }

.summon-circle-wrapper.draw-animating.design-d3 .design-d3-l1 { animation: rotateCW 3.3s linear infinite; }
.summon-circle-wrapper.draw-animating.design-d3 .design-d3-l2 { animation: rotateCCW 2.3s linear infinite; }
.summon-circle-wrapper.draw-animating.design-d3 .design-d3-l3 { animation: rotateCW 1.5s linear infinite; }
.summon-circle-wrapper.draw-animating.design-d3 .design-d3-l4 { animation: rotateCCW 1.1s linear infinite; }
.summon-circle-wrapper.draw-animating.design-d3 .design-d3-l5 { animation: rotateCW 0.7s linear infinite; }

/* 设计 4：所罗门封印阵 — 5 层 */
.design-d4 .design-d4-l1 { animation: rotateCW 58s linear infinite; }
.design-d4 .design-d4-l2 { animation: rotateCCW 42s linear infinite; }
.design-d4 .design-d4-l3 { animation: rotateCW 28s linear infinite; }
.design-d4 .design-d4-l4 { animation: rotateCCW 19s linear infinite; }
.design-d4 .design-d4-l5 { animation: rotateCW 13s linear infinite; }

.summon-circle-wrapper.summoning.design-d4 .design-d4-l1 { animation: rotateCW 11.6s linear infinite; }
.summon-circle-wrapper.summoning.design-d4 .design-d4-l2 { animation: rotateCCW 8.4s linear infinite; }
.summon-circle-wrapper.summoning.design-d4 .design-d4-l3 { animation: rotateCW 5.6s linear infinite; }
.summon-circle-wrapper.summoning.design-d4 .design-d4-l4 { animation: rotateCCW 3.8s linear infinite; }
.summon-circle-wrapper.summoning.design-d4 .design-d4-l5 { animation: rotateCW 2.6s linear infinite; }

.summon-circle-wrapper.draw-animating.design-d4 .design-d4-l1 { animation: rotateCW 3.9s linear infinite; }
.summon-circle-wrapper.draw-animating.design-d4 .design-d4-l2 { animation: rotateCCW 2.8s linear infinite; }
.summon-circle-wrapper.draw-animating.design-d4 .design-d4-l3 { animation: rotateCW 1.9s linear infinite; }
.summon-circle-wrapper.draw-animating.design-d4 .design-d4-l4 { animation: rotateCCW 1.3s linear infinite; }
.summon-circle-wrapper.draw-animating.design-d4 .design-d4-l5 { animation: rotateCW 0.9s linear infinite; }

/* 设计 5：星辰封印阵 — 5 层 */
.design-d5 .design-d5-l1 { animation: rotateCW 62s linear infinite; }
.design-d5 .design-d5-l2 { animation: rotateCCW 48s linear infinite; }
.design-d5 .design-d5-l3 { animation: rotateCW 32s linear infinite; }
.design-d5 .design-d5-l4 { animation: rotateCCW 22s linear infinite; }
.design-d5 .design-d5-l5 { animation: rotateCW 14s linear infinite; }

.summon-circle-wrapper.summoning.design-d5 .design-d5-l1 { animation: rotateCW 12.4s linear infinite; }
.summon-circle-wrapper.summoning.design-d5 .design-d5-l2 { animation: rotateCCW 9.6s linear infinite; }
.summon-circle-wrapper.summoning.design-d5 .design-d5-l3 { animation: rotateCW 6.4s linear infinite; }
.summon-circle-wrapper.summoning.design-d5 .design-d5-l4 { animation: rotateCCW 4.4s linear infinite; }
.summon-circle-wrapper.summoning.design-d5 .design-d5-l5 { animation: rotateCW 2.8s linear infinite; }

.summon-circle-wrapper.draw-animating.design-d5 .design-d5-l1 { animation: rotateCW 4.1s linear infinite; }
.summon-circle-wrapper.draw-animating.design-d5 .design-d5-l2 { animation: rotateCCW 3.2s linear infinite; }
.summon-circle-wrapper.draw-animating.design-d5 .design-d5-l3 { animation: rotateCW 2.1s linear infinite; }
.summon-circle-wrapper.draw-animating.design-d5 .design-d5-l4 { animation: rotateCCW 1.5s linear infinite; }
.summon-circle-wrapper.draw-animating.design-d5 .design-d5-l5 { animation: rotateCW 0.9s linear infinite; }

/* 设计 6：机械朋克阵 — 5 层 */
.design-d6 .design-d6-l1 { animation: rotateCW 65s linear infinite; }
.design-d6 .design-d6-l2 { animation: rotateCCW 50s linear infinite; }
.design-d6 .design-d6-l3 { animation: rotateCW 35s linear infinite; }
.design-d6 .design-d6-l4 { animation: rotateCCW 24s linear infinite; }
.design-d6 .design-d6-l5 { animation: rotateCW 16s linear infinite; }

.summon-circle-wrapper.summoning.design-d6 .design-d6-l1 { animation: rotateCW 13s linear infinite; }
.summon-circle-wrapper.summoning.design-d6 .design-d6-l2 { animation: rotateCCW 10s linear infinite; }
.summon-circle-wrapper.summoning.design-d6 .design-d6-l3 { animation: rotateCW 7s linear infinite; }
.summon-circle-wrapper.summoning.design-d6 .design-d6-l4 { animation: rotateCCW 4.8s linear infinite; }
.summon-circle-wrapper.summoning.design-d6 .design-d6-l5 { animation: rotateCW 3.2s linear infinite; }

.summon-circle-wrapper.draw-animating.design-d6 .design-d6-l1 { animation: rotateCW 4.33s linear infinite; }
.summon-circle-wrapper.draw-animating.design-d6 .design-d6-l2 { animation: rotateCCW 3.33s linear infinite; }
.summon-circle-wrapper.draw-animating.design-d6 .design-d6-l3 { animation: rotateCW 2.33s linear infinite; }
.summon-circle-wrapper.draw-animating.design-d6 .design-d6-l4 { animation: rotateCCW 1.6s linear infinite; }
.summon-circle-wrapper.draw-animating.design-d6 .design-d6-l5 { animation: rotateCW 1.07s linear infinite; }

/* 设计 7：赛博朋克阵 — 5 层 */
.design-d7 .design-d7-l1 { animation: rotateCW 58s linear infinite; }
.design-d7 .design-d7-l2 { animation: rotateCCW 42s linear infinite; }
.design-d7 .design-d7-l3 { animation: rotateCW 28s linear infinite; }
.design-d7 .design-d7-l4 { animation: rotateCCW 19s linear infinite; }
.design-d7 .design-d7-l5 { animation: rotateCW 12s linear infinite; }

.summon-circle-wrapper.summoning.design-d7 .design-d7-l1 { animation: rotateCW 11.6s linear infinite; }
.summon-circle-wrapper.summoning.design-d7 .design-d7-l2 { animation: rotateCCW 8.4s linear infinite; }
.summon-circle-wrapper.summoning.design-d7 .design-d7-l3 { animation: rotateCW 5.6s linear infinite; }
.summon-circle-wrapper.summoning.design-d7 .design-d7-l4 { animation: rotateCCW 3.8s linear infinite; }
.summon-circle-wrapper.summoning.design-d7 .design-d7-l5 { animation: rotateCW 2.4s linear infinite; }

.summon-circle-wrapper.draw-animating.design-d7 .design-d7-l1 { animation: rotateCW 3.87s linear infinite; }
.summon-circle-wrapper.draw-animating.design-d7 .design-d7-l2 { animation: rotateCCW 2.8s linear infinite; }
.summon-circle-wrapper.draw-animating.design-d7 .design-d7-l3 { animation: rotateCW 1.87s linear infinite; }
.summon-circle-wrapper.draw-animating.design-d7 .design-d7-l4 { animation: rotateCCW 1.27s linear infinite; }
.summon-circle-wrapper.draw-animating.design-d7 .design-d7-l5 { animation: rotateCW 0.8s linear infinite; }

/* 设计 8：东方仙灵阵 — 5 层 */
.design-d8 .design-d8-l1 { animation: rotateCW 55s linear infinite; }
.design-d8 .design-d8-l2 { animation: rotateCCW 40s linear infinite; }
.design-d8 .design-d8-l3 { animation: rotateCW 26s linear infinite; }
.design-d8 .design-d8-l4 { animation: rotateCCW 18s linear infinite; }
.design-d8 .design-d8-l5 { animation: rotateCW 11s linear infinite; }

.summon-circle-wrapper.summoning.design-d8 .design-d8-l1 { animation: rotateCW 11s linear infinite; }
.summon-circle-wrapper.summoning.design-d8 .design-d8-l2 { animation: rotateCCW 8s linear infinite; }
.summon-circle-wrapper.summoning.design-d8 .design-d8-l3 { animation: rotateCW 5.2s linear infinite; }
.summon-circle-wrapper.summoning.design-d8 .design-d8-l4 { animation: rotateCCW 3.6s linear infinite; }
.summon-circle-wrapper.summoning.design-d8 .design-d8-l5 { animation: rotateCW 2.2s linear infinite; }

.summon-circle-wrapper.draw-animating.design-d8 .design-d8-l1 { animation: rotateCW 3.67s linear infinite; }
.summon-circle-wrapper.draw-animating.design-d8 .design-d8-l2 { animation: rotateCCW 2.67s linear infinite; }
.summon-circle-wrapper.draw-animating.design-d8 .design-d8-l3 { animation: rotateCW 1.73s linear infinite; }
.summon-circle-wrapper.draw-animating.design-d8 .design-d8-l4 { animation: rotateCCW 1.2s linear infinite; }
.summon-circle-wrapper.draw-animating.design-d8 .design-d8-l5 { animation: rotateCW 0.73s linear infinite; }

/* 设计 9：哥特暗影阵 — 5 层 */
.design-d9 .design-d9-l1 { animation: rotateCW 60s linear infinite; }
.design-d9 .design-d9-l2 { animation: rotateCCW 45s linear infinite; }
.design-d9 .design-d9-l3 { animation: rotateCW 30s linear infinite; }
.design-d9 .design-d9-l4 { animation: rotateCCW 20s linear infinite; }
.design-d9 .design-d9-l5 { animation: rotateCW 14s linear infinite; }

.summon-circle-wrapper.summoning.design-d9 .design-d9-l1 { animation: rotateCW 12s linear infinite; }
.summon-circle-wrapper.summoning.design-d9 .design-d9-l2 { animation: rotateCCW 9s linear infinite; }
.summon-circle-wrapper.summoning.design-d9 .design-d9-l3 { animation: rotateCW 6s linear infinite; }
.summon-circle-wrapper.summoning.design-d9 .design-d9-l4 { animation: rotateCCW 4s linear infinite; }
.summon-circle-wrapper.summoning.design-d9 .design-d9-l5 { animation: rotateCW 2.8s linear infinite; }

.summon-circle-wrapper.draw-animating.design-d9 .design-d9-l1 { animation: rotateCW 4s linear infinite; }
.summon-circle-wrapper.draw-animating.design-d9 .design-d9-l2 { animation: rotateCCW 3s linear infinite; }
.summon-circle-wrapper.draw-animating.design-d9 .design-d9-l3 { animation: rotateCW 2s linear infinite; }
.summon-circle-wrapper.draw-animating.design-d9 .design-d9-l4 { animation: rotateCCW 1.33s linear infinite; }
.summon-circle-wrapper.draw-animating.design-d9 .design-d9-l5 { animation: rotateCW 0.93s linear infinite; }

/* 设计 10：深海神殿阵 — 5 层 */
.design-d10 .design-d10-l1 { animation: rotateCW 52s linear infinite; }
.design-d10 .design-d10-l2 { animation: rotateCCW 38s linear infinite; }
.design-d10 .design-d10-l3 { animation: rotateCW 25s linear infinite; }
.design-d10 .design-d10-l4 { animation: rotateCCW 17s linear infinite; }
.design-d10 .design-d10-l5 { animation: rotateCW 10s linear infinite; }

.summon-circle-wrapper.summoning.design-d10 .design-d10-l1 { animation: rotateCW 10.4s linear infinite; }
.summon-circle-wrapper.summoning.design-d10 .design-d10-l2 { animation: rotateCCW 7.6s linear infinite; }
.summon-circle-wrapper.summoning.design-d10 .design-d10-l3 { animation: rotateCW 5s linear infinite; }
.summon-circle-wrapper.summoning.design-d10 .design-d10-l4 { animation: rotateCCW 3.4s linear infinite; }
.summon-circle-wrapper.summoning.design-d10 .design-d10-l5 { animation: rotateCW 2s linear infinite; }

.summon-circle-wrapper.draw-animating.design-d10 .design-d10-l1 { animation: rotateCW 3.47s linear infinite; }
.summon-circle-wrapper.draw-animating.design-d10 .design-d10-l2 { animation: rotateCCW 2.53s linear infinite; }
.summon-circle-wrapper.draw-animating.design-d10 .design-d10-l3 { animation: rotateCW 1.67s linear infinite; }
.summon-circle-wrapper.draw-animating.design-d10 .design-d10-l4 { animation: rotateCCW 1.13s linear infinite; }
.summon-circle-wrapper.draw-animating.design-d10 .design-d10-l5 { animation: rotateCW 0.67s linear infinite; }

/* 设计 11：原始图腾阵 — 5 层 */
.design-d11 .design-d11-l1 { animation: rotateCW 56s linear infinite; }
.design-d11 .design-d11-l2 { animation: rotateCCW 41s linear infinite; }
.design-d11 .design-d11-l3 { animation: rotateCW 27s linear infinite; }
.design-d11 .design-d11-l4 { animation: rotateCCW 18s linear infinite; }
.design-d11 .design-d11-l5 { animation: rotateCW 12s linear infinite; }

.summon-circle-wrapper.summoning.design-d11 .design-d11-l1 { animation: rotateCW 11.2s linear infinite; }
.summon-circle-wrapper.summoning.design-d11 .design-d11-l2 { animation: rotateCCW 8.2s linear infinite; }
.summon-circle-wrapper.summoning.design-d11 .design-d11-l3 { animation: rotateCW 5.4s linear infinite; }
.summon-circle-wrapper.summoning.design-d11 .design-d11-l4 { animation: rotateCCW 3.6s linear infinite; }
.summon-circle-wrapper.summoning.design-d11 .design-d11-l5 { animation: rotateCW 2.4s linear infinite; }

.summon-circle-wrapper.draw-animating.design-d11 .design-d11-l1 { animation: rotateCW 3.73s linear infinite; }
.summon-circle-wrapper.draw-animating.design-d11 .design-d11-l2 { animation: rotateCCW 2.73s linear infinite; }
.summon-circle-wrapper.draw-animating.design-d11 .design-d11-l3 { animation: rotateCW 1.8s linear infinite; }
.summon-circle-wrapper.draw-animating.design-d11 .design-d11-l4 { animation: rotateCCW 1.2s linear infinite; }
.summon-circle-wrapper.draw-animating.design-d11 .design-d11-l5 { animation: rotateCW 0.8s linear infinite; }

/* 设计 12：量子矩阵阵 — 5 层 */
.design-d12 .design-d12-l1 { animation: rotateCW 54s linear infinite; }
.design-d12 .design-d12-l2 { animation: rotateCCW 39s linear infinite; }
.design-d12 .design-d12-l3 { animation: rotateCW 24s linear infinite; }
.design-d12 .design-d12-l4 { animation: rotateCCW 16s linear infinite; }
.design-d12 .design-d12-l5 { animation: rotateCW 10s linear infinite; }

.summon-circle-wrapper.summoning.design-d12 .design-d12-l1 { animation: rotateCW 10.8s linear infinite; }
.summon-circle-wrapper.summoning.design-d12 .design-d12-l2 { animation: rotateCCW 7.8s linear infinite; }
.summon-circle-wrapper.summoning.design-d12 .design-d12-l3 { animation: rotateCW 4.8s linear infinite; }
.summon-circle-wrapper.summoning.design-d12 .design-d12-l4 { animation: rotateCCW 3.2s linear infinite; }
.summon-circle-wrapper.summoning.design-d12 .design-d12-l5 { animation: rotateCW 2s linear infinite; }

.summon-circle-wrapper.draw-animating.design-d12 .design-d12-l1 { animation: rotateCW 3.6s linear infinite; }
.summon-circle-wrapper.draw-animating.design-d12 .design-d12-l2 { animation: rotateCCW 2.6s linear infinite; }
.summon-circle-wrapper.draw-animating.design-d12 .design-d12-l3 { animation: rotateCW 1.6s linear infinite; }
.summon-circle-wrapper.draw-animating.design-d12 .design-d12-l4 { animation: rotateCCW 1.07s linear infinite; }
.summon-circle-wrapper.draw-animating.design-d12 .design-d12-l5 { animation: rotateCW 0.67s linear infinite; }

/* 设计 13：时空裂隙阵 — 5 层 */
.design-d13 .design-d13-l1 { animation: rotateCW 62s linear infinite; }
.design-d13 .design-d13-l2 { animation: rotateCCW 46s linear infinite; }
.design-d13 .design-d13-l3 { animation: rotateCW 30s linear infinite; }
.design-d13 .design-d13-l4 { animation: rotateCCW 20s linear infinite; }
.design-d13 .design-d13-l5 { animation: rotateCW 13s linear infinite; }

.summon-circle-wrapper.summoning.design-d13 .design-d13-l1 { animation: rotateCW 12.4s linear infinite; }
.summon-circle-wrapper.summoning.design-d13 .design-d13-l2 { animation: rotateCCW 9.2s linear infinite; }
.summon-circle-wrapper.summoning.design-d13 .design-d13-l3 { animation: rotateCW 6s linear infinite; }
.summon-circle-wrapper.summoning.design-d13 .design-d13-l4 { animation: rotateCCW 4s linear infinite; }
.summon-circle-wrapper.summoning.design-d13 .design-d13-l5 { animation: rotateCW 2.6s linear infinite; }

.summon-circle-wrapper.draw-animating.design-d13 .design-d13-l1 { animation: rotateCW 4.13s linear infinite; }
.summon-circle-wrapper.draw-animating.design-d13 .design-d13-l2 { animation: rotateCCW 3.07s linear infinite; }
.summon-circle-wrapper.draw-animating.design-d13 .design-d13-l3 { animation: rotateCW 2s linear infinite; }
.summon-circle-wrapper.draw-animating.design-d13 .design-d13-l4 { animation: rotateCCW 1.33s linear infinite; }
.summon-circle-wrapper.draw-animating.design-d13 .design-d13-l5 { animation: rotateCW 0.87s linear infinite; }

/* 设计 14：圣光教堂阵 — 5 层 */
.design-d14 .design-d14-l1 { animation: rotateCW 57s linear infinite; }
.design-d14 .design-d14-l2 { animation: rotateCCW 42s linear infinite; }
.design-d14 .design-d14-l3 { animation: rotateCW 27s linear infinite; }
.design-d14 .design-d14-l4 { animation: rotateCCW 18s linear infinite; }
.design-d14 .design-d14-l5 { animation: rotateCW 12s linear infinite; }

.summon-circle-wrapper.summoning.design-d14 .design-d14-l1 { animation: rotateCW 11.4s linear infinite; }
.summon-circle-wrapper.summoning.design-d14 .design-d14-l2 { animation: rotateCCW 8.4s linear infinite; }
.summon-circle-wrapper.summoning.design-d14 .design-d14-l3 { animation: rotateCW 5.4s linear infinite; }
.summon-circle-wrapper.summoning.design-d14 .design-d14-l4 { animation: rotateCCW 3.6s linear infinite; }
.summon-circle-wrapper.summoning.design-d14 .design-d14-l5 { animation: rotateCW 2.4s linear infinite; }

.summon-circle-wrapper.draw-animating.design-d14 .design-d14-l1 { animation: rotateCW 3.8s linear infinite; }
.summon-circle-wrapper.draw-animating.design-d14 .design-d14-l2 { animation: rotateCCW 2.8s linear infinite; }
.summon-circle-wrapper.draw-animating.design-d14 .design-d14-l3 { animation: rotateCW 1.8s linear infinite; }
.summon-circle-wrapper.draw-animating.design-d14 .design-d14-l4 { animation: rotateCCW 1.2s linear infinite; }
.summon-circle-wrapper.draw-animating.design-d14 .design-d14-l5 { animation: rotateCW 0.8s linear infinite; }

/* 设计 15：幻境迷宫阵 — 5 层 */
.design-d15 .design-d15-l1 { animation: rotateCW 59s linear infinite; }
.design-d15 .design-d15-l2 { animation: rotateCCW 43s linear infinite; }
.design-d15 .design-d15-l3 { animation: rotateCW 28s linear infinite; }
.design-d15 .design-d15-l4 { animation: rotateCCW 19s linear infinite; }
.design-d15 .design-d15-l5 { animation: rotateCW 12s linear infinite; }

.summon-circle-wrapper.summoning.design-d15 .design-d15-l1 { animation: rotateCW 11.8s linear infinite; }
.summon-circle-wrapper.summoning.design-d15 .design-d15-l2 { animation: rotateCCW 8.6s linear infinite; }
.summon-circle-wrapper.summoning.design-d15 .design-d15-l3 { animation: rotateCW 5.6s linear infinite; }
.summon-circle-wrapper.summoning.design-d15 .design-d15-l4 { animation: rotateCCW 3.8s linear infinite; }
.summon-circle-wrapper.summoning.design-d15 .design-d15-l5 { animation: rotateCW 2.4s linear infinite; }

.summon-circle-wrapper.draw-animating.design-d15 .design-d15-l1 { animation: rotateCW 3.93s linear infinite; }
.summon-circle-wrapper.draw-animating.design-d15 .design-d15-l2 { animation: rotateCCW 2.87s linear infinite; }
.summon-circle-wrapper.draw-animating.design-d15 .design-d15-l3 { animation: rotateCW 1.87s linear infinite; }
.summon-circle-wrapper.draw-animating.design-d15 .design-d15-l4 { animation: rotateCCW 1.27s linear infinite; }
.summon-circle-wrapper.draw-animating.design-d15 .design-d15-l5 { animation: rotateCW 0.8s linear infinite; }


/* ════════════════════════════════════════════════════════════
   结果展示区 — 卡牌悬浮于召唤阵位置
   ════════════════════════════════════════════════════════════ */

.gacha-result-area {
    display: none;
    position: absolute;
    inset: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-lg);
    /* 提高 z-index 确保卡牌在所有召唤阵元素之上 */
    z-index: 100;
    /* perspective 单独存在，不与 transform 混用，避免创建层叠上下文破坏 backface-visibility */
    perspective: 1200px;
    /* 不使用 transform 居中，改用 inset:0 + flexbox，避免 transform 创建层叠上下文 */
    opacity: 0;
    animation: resultAreaAppear 0.5s ease-out forwards;
}

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


/* ── 结果卡牌 ── */
/* 设计参考：原神祈愿结果展示，卡牌从光中浮现并翻转 */

.gacha-result-card {
    position: relative;
    width: var(--card-width);
    /* 使用明确的高度计算，不依赖 aspect-ratio（避免浏览器兼容性问题导致高度为0） */
    height: calc(var(--card-width) * 4 / 3);
    min-height: 320px;
    /* perspective 已移到 .gacha-result-area，避免与 cardAppear 的 transform 冲突 */
    border-radius: var(--radius-xl);
    box-shadow:
        0 0 30px var(--glow-shadow),
        0 10px 40px rgba(0, 0, 0, 0.5);
    animation: cardAppear 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes cardAppear {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(-50px);
        filter: blur(10px);
    }
    60% {
        opacity: 1;
        transform: scale(1.05) translateY(0);
        filter: blur(0);
    }
    100% {
        opacity: 1;
        transform: none;
        filter: blur(0);
    }
}

/* 热度档位边框光效 —— 2026-06-26 反馈5：UR/SSR配色交换 */
.gacha-result-card.tier-UR {
    --glow-color: #fbbf24;
    --glow-shadow: rgba(251, 191, 36, 0.6);
    box-shadow:
        0 0 40px rgba(251, 191, 36, 0.6),
        0 0 80px rgba(251, 191, 36, 0.3),
        0 10px 40px rgba(0, 0, 0, 0.5);
    animation: cardAppear 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards, urPulseGacha 2s ease-in-out infinite 0.6s;
}

.gacha-result-card.tier-SSR {
    --glow-color: #f472b6;
    --glow-shadow: rgba(244, 114, 182, 0.6);
    box-shadow:
        0 0 30px rgba(244, 114, 182, 0.6),
        0 0 60px rgba(244, 114, 182, 0.3),
        0 10px 40px rgba(0, 0, 0, 0.5);
    animation: cardAppear 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards, ssrPulse 2.5s ease-in-out infinite 0.6s;
}

.gacha-result-card.tier-SR {
    --glow-color: #c084fc;
    --glow-shadow: rgba(192, 132, 252, 0.5);
    box-shadow:
        0 0 35px rgba(192, 132, 252, 0.65),
        0 0 65px rgba(192, 132, 252, 0.35),
        0 10px 40px rgba(0, 0, 0, 0.5);
    animation: cardAppear 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards, srPulse 2.5s ease-in-out infinite 0.6s;
}

.gacha-result-card.tier-R {
    --glow-color: #60a5fa;
    --glow-shadow: rgba(96, 165, 250, 0.4);
    box-shadow:
        0 0 30px rgba(96, 165, 250, 0.6),
        0 0 55px rgba(96, 165, 250, 0.3),
        0 10px 40px rgba(0, 0, 0, 0.5);
    animation: cardAppear 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards, rPulse 2.5s ease-in-out infinite 0.6s;
}

.gacha-result-card.tier-N {
    --glow-color: #9ca3af;
    --glow-shadow: rgba(156, 163, 175, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* UR/SSR 持续脉冲光效 */
/* 2026-06-27 修复：v=20260633 交换 UR/SSR 配色时遗漏了动画 keyframes，
   urPulseGacha 仍用粉色（SSR色）、ssrPulse 仍用金色（UR色），导致动画覆盖静态 box-shadow。
   现修正：urPulseGacha=金色 rgba(251,191,36)、ssrPulse=粉色 rgba(244,114,182) */
@keyframes urPulseGacha {
    0%, 100% {
        box-shadow:
            0 0 40px rgba(251, 191, 36, 0.6),
            0 0 80px rgba(251, 191, 36, 0.3),
            0 10px 40px rgba(0, 0, 0, 0.5);
    }
    50% {
        box-shadow:
            0 0 60px rgba(251, 191, 36, 0.8),
            0 0 120px rgba(251, 191, 36, 0.4),
            0 10px 40px rgba(0, 0, 0, 0.5);
    }
}

@keyframes ssrPulse {
    0%, 100% {
        box-shadow:
            0 0 30px rgba(244, 114, 182, 0.6),
            0 0 60px rgba(244, 114, 182, 0.3),
            0 10px 40px rgba(0, 0, 0, 0.5);
    }
    50% {
        box-shadow:
            0 0 50px rgba(244, 114, 182, 0.8),
            0 0 100px rgba(244, 114, 182, 0.4),
            0 10px 40px rgba(0, 0, 0, 0.5);
    }
}

/* SR 紫色脉冲：与 UR 方案完全一致（box-shadow 动画），仅颜色不同
   2026-06-27 修复：回退 ::after 伪元素方案（z-index:-1 被遮挡不可见），
   恢复 box-shadow 脉冲，幅度与 urPulseGacha 完全一致（40/80→60/120） */
@keyframes srPulse {
    0%, 100% {
        box-shadow:
            0 0 40px rgba(192, 132, 252, 0.7),
            0 0 80px rgba(192, 132, 252, 0.4),
            0 10px 40px rgba(0, 0, 0, 0.5);
    }
    50% {
        box-shadow:
            0 0 60px rgba(192, 132, 252, 0.85),
            0 0 120px rgba(192, 132, 252, 0.45),
            0 10px 40px rgba(0, 0, 0, 0.5);
    }
}

/* R 蓝色脉冲：与 UR 方案完全一致（box-shadow 动画），仅颜色不同 */
@keyframes rPulse {
    0%, 100% {
        box-shadow:
            0 0 40px rgba(96, 165, 250, 0.7),
            0 0 80px rgba(96, 165, 250, 0.4),
            0 10px 40px rgba(0, 0, 0, 0.5);
    }
    50% {
        box-shadow:
            0 0 60px rgba(96, 165, 250, 0.85),
            0 0 120px rgba(96, 165, 250, 0.45),
            0 10px 40px rgba(0, 0, 0, 0.5);
    }
}


/* ── 卡牌翻转容器 ── */
/* 3D 翻转：先显示卡背，cardAppear 结束后翻转显示卡面 */
/* perspective 在 .gacha-result-area 上，此处不重复设置 */

.gacha-card-flipper {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: var(--radius-xl);
    /* overflow: hidden 已移除 — 它会破坏 transform-style: preserve-3d，
       导致 backface-visibility 失效。圆角裁切由子元素 .gacha-card-front/.gacha-card-back 各自处理 */
}

.gacha-card-flipper.flipped {
    transform: rotateY(180deg);
}

/* 卡背 */
.gacha-card-back {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at center, rgba(212, 175, 55, 0.15) 0%, transparent 60%),
        linear-gradient(135deg, #1a1a2e 0%, #0f0f18 100%);
    border: 2px solid var(--border-gold);
    border-radius: var(--radius-xl);
}

.card-back-pattern {
    font-size: clamp(3rem, 8vw, 5rem);
    color: var(--gold);
    opacity: 0.6;
    filter: drop-shadow(0 0 12px var(--glow-shadow));
    animation: backPatternSpin 8s linear infinite;
}

@keyframes backPatternSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 卡面 */
.gacha-card-front {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-xl);
    overflow: hidden;
    /* 2026-06-26 修复：移除深色背景 var(--bg-darker)，改为透明。
       原问题：gacha-card-front 有深色背景，gacha-card-info 只占底部20%，
       导致下半部分呈现纯黑色。移除后让 gacha-card-info 的渐变背景直接可见。 */
    background: transparent;
    border: 2px solid var(--glow-color);
}

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

.gacha-card-info {
    flex: 1;
    padding: var(--space-sm) var(--space-md);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--space-xs);
    /* 2026-06-26 修复：使用从透明到半透明的渐变，避免下半部分纯黑色。
       配合父元素透明背景，让卡牌图片色调自然过渡到底部信息区。 */
    /* 增强渐变：底部 0.7→0.85，使卡片底部信息区更清晰可读（避免"透明"观感） */
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.5) 50%,
        rgba(0, 0, 0, 0.85) 100%
    );
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.gacha-card-tier {
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 0 0 8px currentColor;
}

.gacha-card-name {
    font-family: var(--font-title);
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.gacha-card-wish {
    margin-top: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    background: linear-gradient(90deg, transparent, rgba(244, 114, 182, 0.2), transparent);
    color: #f472b6;
    font-size: var(--text-xs);
    font-weight: 600;
    text-align: center;
    letter-spacing: 2px;
    text-shadow: 0 0 8px rgba(244, 114, 182, 0.6);
    animation: wishShimmer 2s ease-in-out infinite;
}

/* 收集成功后展示的热度信息区 */
.gacha-card-heat-info {
    margin-top: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    gap: 2px;
    animation: heatInfoAppear 0.5s ease-out forwards;
}

@keyframes heatInfoAppear {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.gacha-card-heat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-xs);
    font-size: var(--text-xs);
}

.gacha-card-heat-label {
    color: var(--text-tertiary);
    font-weight: 400;
}

.gacha-card-heat-value {
    color: var(--gold-light);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.gacha-card-heat-pct {
    color: var(--text-tertiary);
    font-size: 10px;
    font-variant-numeric: tabular-nums;
}

@keyframes wishShimmer {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}


/* ════════════════════════════════════════════════════════════
   收集按钮区
   ════════════════════════════════════════════════════════════ */

.gacha-claim-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    width: 100%;
    max-width: 320px;
}

.gacha-claim-btn {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-medium);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-tertiary);
    font-size: var(--text-base);
    font-weight: 500;
    cursor: not-allowed;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    font-family: var(--font-body);
}

.gacha-claim-btn.ready {
    cursor: pointer;
    background: var(--gradient-gold);
    color: #000;
    font-weight: 700;
    border-color: var(--gold);
    box-shadow: var(--shadow-gold);
    animation: claimReadyPulse 1.5s ease-in-out infinite;
}

@keyframes claimReadyPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(212, 175, 55, 0.4); }
    50% { box-shadow: 0 0 30px rgba(212, 175, 55, 0.7), 0 0 50px rgba(212, 175, 55, 0.3); }
}

.gacha-claim-btn.ready:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.6), 0 0 40px rgba(212, 175, 55, 0.4);
}

.gacha-claim-btn.ready:active {
    transform: translateY(0);
}

.gacha-claim-btn.claimed {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.5);
    color: #4ade80;
    cursor: default;
    animation: none;
}

.claim-btn-countdown {
    font-size: var(--text-sm);
    font-variant-numeric: tabular-nums;
    opacity: 0.8;
}

.claim-btn-text {
    font-size: var(--text-base);
    font-weight: inherit;
}

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

.gacha-reset-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border-color: var(--border-gold);
}


/* ── 已被抢夺状态（群组内人员先行收集） ── */

.gacha-result-card.claimed-by-other {
    filter: grayscale(1) brightness(0.5);
    opacity: 0.6;
}

.gacha-result-card.claimed-by-other::after {
    content: "已被抢夺";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #f87171;
    font-size: var(--text-2xl);
    font-weight: 900;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 0, 0, 0.6);
    z-index: 10;
    letter-spacing: 4px;
    pointer-events: none;
}

.gacha-claim-btn.claimed-by-other {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.5);
    color: #f87171;
    cursor: not-allowed;
    animation: none;
}


/* ════════════════════════════════════════════════════════════
   历史记录区
   ════════════════════════════════════════════════════════════ */

.gacha-history-area {
    width: 100%;
    max-width: 800px;
    margin-top: var(--space-xl);
}

.gacha-history-area:empty {
    display: none;
}


/* ════════════════════════════════════════════════════════════
   全屏闪光（SSR/UR 专属）
   ════════════════════════════════════════════════════════════ */
/* 设计参考：原神 5 星祈愿的金色全屏闪光 */

.gacha-flash {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    /* 2026-06-27 修复：fallback 从金色改为银白色，防止 --glow-color 变量未设置时回退金色（暗示UR） */
    background: radial-gradient(
        circle at center,
        rgba(255, 255, 255, 0.9) 0%,
        var(--glow-color, rgba(229, 231, 235, 0.6)) 30%,
        transparent 70%
    );
    animation: flashBurst 1s ease-out forwards;
}

@keyframes flashBurst {
    0% { opacity: 0; transform: scale(0.5); }
    15% { opacity: 1; transform: scale(1.2); }
    30% { opacity: 0.8; transform: scale(1.5); }
    100% { opacity: 0; transform: scale(2); }
}

/* ── 全屏闪光递减方案（2026-06-27 新增）── */
/* 设计原则：从 UR 往下逐级递减，三维度同时递减
   1. 持续时间递减：UR 1s > SSR 0.8s > SR 0.6s
   2. 透明度/强度递减：UR opacity峰值1.0 > SSR 0.85 > SR 0.7
   3. 闪光范围递减：UR transparent 70%/scale 2.0 > SSR 60%/1.7 > SR 50%/1.4
   R 档位无全屏闪光 */

/* UR 全屏闪光 - 最强（保留原 flashBurst 参数作为基准） */
.gacha-flash.tier-UR {
    animation: urFlashBurst 1s ease-out forwards;
}
@keyframes urFlashBurst {
    0% { opacity: 0; transform: scale(0.5); }
    15% { opacity: 1; transform: scale(1.2); }
    30% { opacity: 0.8; transform: scale(1.5); }
    100% { opacity: 0; transform: scale(2); }
}

/* SSR 全屏闪光 - 次强：0.8s，opacity峰值0.85，scale峰值1.7，transparent 60% */
.gacha-flash.tier-SSR {
    animation: ssrFlashBurst 0.8s ease-out forwards;
    background: radial-gradient(
        circle at center,
        rgba(255, 255, 255, 0.85) 0%,
        var(--glow-color, rgba(229, 231, 235, 0.6)) 30%,
        transparent 60%
    );
}
@keyframes ssrFlashBurst {
    0% { opacity: 0; transform: scale(0.5); }
    15% { opacity: 0.85; transform: scale(1.0); }
    30% { opacity: 0.65; transform: scale(1.3); }
    100% { opacity: 0; transform: scale(1.7); }
}

/* SR 全屏闪光 - 最弱：0.6s，opacity峰值0.7，scale峰值1.4，transparent 50% */
.gacha-flash.tier-SR {
    animation: srFlashBurst 0.6s ease-out forwards;
    background: radial-gradient(
        circle at center,
        rgba(255, 255, 255, 0.7) 0%,
        var(--glow-color, rgba(229, 231, 235, 0.6)) 30%,
        transparent 50%
    );
}
@keyframes srFlashBurst {
    0% { opacity: 0; transform: scale(0.5); }
    15% { opacity: 0.7; transform: scale(0.9); }
    30% { opacity: 0.55; transform: scale(1.1); }
    100% { opacity: 0; transform: scale(1.4); }
}


/* ════════════════════════════════════════════════════════════
   流星雨星轨特效（召唤时触发）
   ════════════════════════════════════════════════════════════ */
/* 设计理念：相机长曝光拍摄夜空，流星逐步填充形成星轨 */
/* 沿用 base.css 中 .starfield::before/::after 的流星外观 */
/* 统一方向：从右上至左下（135deg），由疏至密逐步铺满全屏 */

.gacha-startrails {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.5s ease;
    /* 2026-06-27 修复：mask-image 径向遮罩，在魔法阵区域创建透明洞
       避免流星雨遮挡魔法阵观看，流星雨接近魔法阵时平滑变透明
       透明区域半径 = 魔法阵半径 clamp(140px,20vw,210px) + 过渡区 60px */
    --startrail-mask-radius: clamp(140px, 20vw, 210px);
    --startrail-mask-feather: 60px;
    mask-image: radial-gradient(
        circle at 50% calc(50% + 30px),
        transparent 0%,
        transparent var(--startrail-mask-radius),
        black calc(var(--startrail-mask-radius) + var(--startrail-mask-feather))
    );
    -webkit-mask-image: radial-gradient(
        circle at 50% calc(50% + 30px),
        transparent 0%,
        transparent var(--startrail-mask-radius),
        black calc(var(--startrail-mask-radius) + var(--startrail-mask-feather))
    );
}

.gacha-startrails.active {
    opacity: 1;
}

.gacha-startrails.fading {
    opacity: 0;
    transition: opacity 1.5s ease;
}

/* 单条流星轨迹 — 沿用 base.css 流星外观 */
/* base.css 流星特征：细线 + 线性渐变（亮头在右端）+ rotate(135deg) */
.startrail {
    position: absolute;
    /* 流星本体：一条细线（与 base.css 的 height: 1.5px 一致） */
    width: var(--trail-length, 280px);
    height: 1.5px;
    /* 线性渐变：透明 → 半透明白 → 亮白（亮头在右端，与 base.css 一致） */
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.2) 30%,
        rgba(255, 255, 255, 0.9) 80%,
        #ffffff 100%
    );
    border-radius: var(--radius-full);
    /* 统一角度：135deg（从右上至左下，与 base.css 一致） */
    transform: translate(0, 0) rotate(var(--trail-angle, 135deg));
    /* 亮头为枢轴（与 base.css 的 transform-origin: right center 一致） */
    transform-origin: right center;
    opacity: 0;
    /* 光晕效果（与 base.css 的 filter: drop-shadow 一致） */
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.6));
    pointer-events: none;
}

/* 流星划过动画：从右上飞向左下，带长曳尾 + 显隐交替（模拟长曝光星光闪烁） */
/* 延长展示时长（8-12秒），曳尾修长连贯 */
@keyframes startrailSweep {
    0% {
        opacity: 0;
        transform: translate(0, 0) rotate(var(--trail-angle, 135deg));
    }
    5% {
        opacity: 0.9;
    }
    15% {
        opacity: 0.4;
    }
    30% {
        opacity: 1;
    }
    45% {
        opacity: 0.5;
    }
    60% {
        opacity: 1;
    }
    75% {
        opacity: 0.4;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        opacity: 0;
        transform: translate(var(--trail-dx, -600px), var(--trail-dy, 600px)) rotate(var(--trail-angle, 135deg));
    }
}

/* 高热度档位的流星颜色 —— 2026-06-26 反馈5：UR/SSR配色交换 */
.gacha-startrails.tier-UR .startrail {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(251, 191, 36, 0.2) 30%,
        rgba(253, 230, 138, 0.9) 80%,
        #fde68a 100%
    );
    filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.6));
}

.gacha-startrails.tier-SSR .startrail {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(244, 114, 182, 0.2) 30%,
        rgba(249, 168, 212, 0.9) 80%,
        #f9a8d4 100%
    );
    filter: drop-shadow(0 0 4px rgba(244, 114, 182, 0.6));
}

.gacha-startrails.tier-SR .startrail {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(192, 132, 252, 0.2) 30%,
        rgba(221, 214, 254, 0.9) 80%,
        #ddd6fe 100%
    );
    filter: drop-shadow(0 0 4px rgba(192, 132, 252, 0.5));
}


/* ════════════════════════════════════════════════════════════
   响应式适配
   ════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .gacha-page {
        padding: var(--space-lg) var(--space-md) var(--space-2xl);
        gap: var(--space-lg);
    }

    .gacha-status-bar {
        gap: var(--space-sm);
        padding: var(--space-sm) var(--space-md);
    }

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

    .summon-btn {
        width: 80px;
        height: 80px;
    }

    .summon-btn-icon {
        font-size: 1.5rem;
    }

    .summon-btn-text {
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .gacha-page {
        --summon-size: 260px;
        --card-width: 220px;
    }

    .gacha-result-card {
        height: calc(var(--card-width) * 4 / 3);
        min-height: 280px;
    }

    .gacha-status-bar {
        flex-direction: column;
        gap: var(--space-xs);
    }

    .gacha-status-item {
        width: 100%;
        justify-content: center;
    }
}


/* ════════════════════════════════════════════════════════════
   无障碍：尊重用户动画偏好
   ════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
    .summon-ring-runes,
    .summon-ring-petals,
    .summon-ring-hex,
    .summon-ring-octa,
    .summon-ring-core {
        animation-duration: 60s !important;
    }

    .summon-particle {
        animation: none !important;
        opacity: 0.5;
    }

    .summon-circle-wrapper.summoning .summon-particle,
    .summon-circle-wrapper.draw-animating .summon-particle {
        animation: none !important;
        opacity: 0.7;
    }

    .gacha-flash {
        animation-duration: 0.3s !important;
    }

    /* 2026-06-27 移除：此前在 prefers-reduced-motion 下用 !important 覆盖 UR/SSR 的 animation，
       移除了 urPulseGacha/ssrPulse 脉冲动画，导致用户反馈"脉冲波效果没了"。
       现保留脉冲动画，仅减弱强度（通过延长周期实现）。
       SR/R 的 srPulse/rPulse 不受此规则影响，保持原有周期。 */

    .gacha-claim-btn.ready {
        animation: none !important;
    }
}
