/* 钢子出击 - 全局动画 */

/* 数字滚动/闪烁 */
.flash-up {
    animation: flashUp 0.3s ease;
}
.flash-down {
    animation: flashDown 0.3s ease;
}

@keyframes flashUp {
    0% { color: var(--green); text-shadow: 0 0 8px rgba(0,214,143,0.4); }
    100% { color: inherit; text-shadow: none; }
}
@keyframes flashDown {
    0% { color: var(--red); text-shadow: 0 0 8px rgba(255,71,87,0.4); }
    100% { color: inherit; text-shadow: none; }
}

/* 卡片依次滑入 */
.slide-in {
    animation: slideIn 0.5s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}
.slide-in:nth-child(1) { animation-delay: 0.05s; }
.slide-in:nth-child(2) { animation-delay: 0.1s; }
.slide-in:nth-child(3) { animation-delay: 0.15s; }
.slide-in:nth-child(4) { animation-delay: 0.2s; }
.slide-in:nth-child(5) { animation-delay: 0.25s; }
.slide-in:nth-child(6) { animation-delay: 0.3s; }

@keyframes slideIn {
    to { opacity: 1; transform: translateY(0); }
}

/* 脉冲发光（新信号） */
.pulse-glow {
    animation: pulseGlow 1.5s ease;
}
@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 rgba(59,130,246,0); }
    30% { box-shadow: 0 0 30px rgba(59,130,246,0.2), 0 0 60px rgba(59,130,246,0.1); }
    100% { box-shadow: 0 0 0 rgba(59,130,246,0); }
}

/* Tab 淡入 */
.tab-page {
    animation: fadeInTab 0.3s ease;
}
@keyframes fadeInTab {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 呼吸光效 */
.glow-breathe {
    animation: glowBreathe 3s ease-in-out infinite;
}
@keyframes glowBreathe {
    0%, 100% { box-shadow: 0 0 10px rgba(59,130,246,0.1); }
    50% { box-shadow: 0 0 20px rgba(59,130,246,0.2); }
}

/* 按钮 hover 发光 */
.debate-btn:hover, .login-btn:hover {
    box-shadow: 0 0 20px rgba(59,130,246,0.3);
}

/* 角色卡片翻转 */
.role-card {
    transition: all 0.3s cubic-bezier(.22,1,.36,1);
}
.role-card.new-data {
    animation: cardFlip 0.5s ease;
}
@keyframes cardFlip {
    0% { transform: rotateY(0); }
    50% { transform: rotateY(90deg); opacity: 0.5; }
    100% { transform: rotateY(0); opacity: 1; }
}

/* 减少动画（无障碍） */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .ticker-track { animation: none !important; }
    .skeleton, .skeleton-card, .skeleton-line {
        animation: none !important;
        background: var(--border) !important;
    }
}

/* 程序控制减少动画（通过 .reduce-motion 类） */
.reduce-motion *,
.reduce-motion *::before,
.reduce-motion *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
}
.reduce-motion .ticker-track {
    animation: none !important;
}
.reduce-motion .skeleton,
.reduce-motion .skeleton-card,
.reduce-motion .skeleton-line {
    animation: none !important;
    background: var(--border) !important;
}
