/**
 * 动画效果文件
 * 包含各种炫酷的动画、过渡效果、hover效果
 * 灵感来自 uiverse.io 的设计风格
 */

/* ==================== 全局动画配置 ==================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes slideInUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInDown {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-30px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(30px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes zoomOut {
    from {
        transform: scale(1.2);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes wiggle {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-3deg);
    }
    75% {
        transform: rotate(3deg);
    }
}

/* ==================== 按钮悬浮特效 ==================== */
.btn {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* 发光效果 */
.btn-primary::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-primary:hover::after {
    width: 300px;
    height: 300px;
}

/* 3D按钮效果 */
.btn-3d {
    box-shadow: 0 6px 0 var(--color-primary-dark), 0 6px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.1s ease;
}

.btn-3d:hover {
    transform: translateY(2px);
    box-shadow: 0 4px 0 var(--color-primary-dark), 0 4px 8px rgba(0, 0, 0, 0.3);
}

.btn-3d:active {
    transform: translateY(6px);
    box-shadow: 0 0 0 var(--color-primary-dark), 0 0 4px rgba(0, 0, 0, 0.3);
}

/* 霓虹灯效果 */
@keyframes neonGlow {
    0%, 100% {
        box-shadow: 0 0 5px var(--color-primary),
                    0 0 10px var(--color-primary),
                    0 0 15px var(--color-primary);
    }
    50% {
        box-shadow: 0 0 10px var(--color-primary),
                    0 0 20px var(--color-primary),
                    0 0 30px var(--color-primary);
    }
}

.btn-neon:hover {
    animation: neonGlow 1.5s ease-in-out infinite;
}

/* ==================== 卡片动画效果 ==================== */
.dashboard-card {
    animation: slideInUp 0.4s ease-out;
}

.dashboard-card:nth-child(1) { animation-delay: 0.1s; }
.dashboard-card:nth-child(2) { animation-delay: 0.2s; }
.dashboard-card:nth-child(3) { animation-delay: 0.3s; }
.dashboard-card:nth-child(4) { animation-delay: 0.4s; }
.dashboard-card:nth-child(5) { animation-delay: 0.5s; }

/* 卡片悬浮效果 */
.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(99, 102, 241, 0.05) 100%);
    opacity: 0;
    transition: opacity var(--transition-base);
    pointer-events: none;
    border-radius: var(--radius-xl);
}

.dashboard-card:hover::before {
    opacity: 1;
}

/* 卡片翻转效果 */
@keyframes cardFlip {
    0% {
        transform: perspective(1000px) rotateY(0deg);
    }
    50% {
        transform: perspective(1000px) rotateY(180deg);
    }
    100% {
        transform: perspective(1000px) rotateY(360deg);
    }
}

.card-flip-animation {
    animation: cardFlip 0.8s ease;
}

/* ==================== 导航栏动画 ==================== */
.navbar {
    animation: slideInDown 0.5s ease-out;
}

.nav-link {
    position: relative;
}

/* 导航链接下划线动画 */
.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width 0.3s ease, left 0.3s ease;
}

.nav-link:hover::before {
    width: 100%;
    left: 0;
}

.nav-link.active::before {
    width: 100%;
    left: 0;
}

/* 导航图标动画 */
.nav-icon {
    transition: transform var(--transition-base);
}

.nav-link:hover .nav-icon {
    transform: scale(1.2) rotate(10deg);
}

/* ==================== 统计卡片动画 ==================== */
.stat-card {
    animation: zoomIn 0.5s ease-out;
    animation-fill-mode: both;
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }

/* 统计数字滚动效果 */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-value {
    animation: countUp 0.6s ease-out;
}

/* 统计图标呼吸效果 */
@keyframes breathe {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.stat-icon {
    animation: breathe 3s ease-in-out infinite;
}

/* ==================== 套餐卡片动画 ==================== */
.plan-card {
    animation: fadeIn 0.5s ease-out;
    animation-fill-mode: both;
}

.plan-card:nth-child(1) { animation-delay: 0.1s; }
.plan-card:nth-child(2) { animation-delay: 0.2s; }
.plan-card:nth-child(3) { animation-delay: 0.3s; }
.plan-card:nth-child(4) { animation-delay: 0.4s; }

/* 套餐卡片边框发光 */
@keyframes borderGlow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(99, 102, 241, 0.3),
                    0 0 10px rgba(99, 102, 241, 0.2);
    }
    50% {
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.5),
                    0 0 30px rgba(99, 102, 241, 0.3);
    }
}

.plan-card:hover {
    animation: borderGlow 2s ease-in-out infinite;
}

/* 推荐徽章闪烁 */
@keyframes badgeBlink {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
}

.badge-recommend {
    animation: badgeBlink 2s ease-in-out infinite;
}

/* ==================== 进度条动画 ==================== */
.progress-fill {
    animation: progressFill 1s ease-out;
}

@keyframes progressFill {
    from {
        width: 0;
    }
}

/* 进度条条纹动画 */
.progress-striped .progress-fill {
    background-image: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.15) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.15) 75%,
        transparent 75%,
        transparent
    );
    background-size: 30px 30px;
    animation: progressStripes 1s linear infinite;
}

@keyframes progressStripes {
    from {
        background-position: 0 0;
    }
    to {
        background-position: 30px 0;
    }
}

/* ==================== 加载动画 ==================== */
@keyframes loaderSpin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.loader-circle {
    animation: loaderSpin 1s linear infinite;
}

/* 加载点动画 */
@keyframes dotPulse {
    0%, 80%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    40% {
        opacity: 1;
        transform: scale(1);
    }
}

.loading-dots {
    display: inline-flex;
    gap: 4px;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    background: var(--color-primary);
    border-radius: 50%;
    animation: dotPulse 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(1) { animation-delay: 0s; }
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

/* 骨架屏动画 */
@keyframes shimmer {
    0% {
        background-position: -500px 0;
    }
    100% {
        background-position: 500px 0;
    }
}

.skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-tertiary) 0px,
        var(--border-color) 50px,
        var(--bg-tertiary) 100px
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
}

/* ==================== Toast动画 ==================== */
@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.toast-enter {
    animation: toastSlideIn 0.3s ease-out;
}

.toast-exit {
    animation: toastSlideOut 0.3s ease-in;
}

/* Toast图标动画 */
.toast-success .toast-icon {
    animation: zoomIn 0.5s ease-out;
}

.toast-error .toast-icon {
    animation: shake 0.5s ease-out;
}

.toast-warning .toast-icon {
    animation: wiggle 0.5s ease-out;
}

.toast-info .toast-icon {
    animation: pulse 0.5s ease-out;
}

/* ==================== 模态框动画 ==================== */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(4px);
    }
}

.modal-overlay {
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalBounce {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.modal.modal-show .modal-content {
    animation: modalBounce 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ==================== 表单输入动画 ==================== */
.form-input,
.form-select,
.form-textarea {
    transition: all var(--transition-base);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    animation: inputFocus 0.3s ease-out;
}

@keyframes inputFocus {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
    }
}

/* 输入框标签浮动效果 */
.form-floating {
    position: relative;
}

.form-floating .form-label {
    position: absolute;
    top: 50%;
    left: var(--spacing-md);
    transform: translateY(-50%);
    transition: all var(--transition-base);
    pointer-events: none;
    color: var(--text-tertiary);
}

.form-floating .form-input:focus + .form-label,
.form-floating .form-input:not(:placeholder-shown) + .form-label {
    top: 0;
    transform: translateY(-50%) scale(0.85);
    background: var(--bg-primary);
    padding: 0 var(--spacing-xs);
    color: var(--color-primary);
}

/* ==================== 快捷操作动画 ==================== */
.action-btn {
    animation: fadeIn 0.5s ease-out;
    animation-fill-mode: both;
}

.action-btn:nth-child(1) { animation-delay: 0.1s; }
.action-btn:nth-child(2) { animation-delay: 0.15s; }
.action-btn:nth-child(3) { animation-delay: 0.2s; }
.action-btn:nth-child(4) { animation-delay: 0.25s; }
.action-btn:nth-child(5) { animation-delay: 0.3s; }
.action-btn:nth-child(6) { animation-delay: 0.35s; }

/* 操作按钮悬浮涟漪效果 */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

.action-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    background: var(--color-primary);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
}

.action-btn:hover::after {
    animation: ripple 0.6s ease-out;
}

/* ==================== 节点卡片动画 ==================== */
.node-card {
    animation: slideInLeft 0.5s ease-out;
    animation-fill-mode: both;
}

.node-card:nth-child(odd) {
    animation-name: slideInLeft;
}

.node-card:nth-child(even) {
    animation-name: slideInRight;
}

.node-card:nth-child(1) { animation-delay: 0.1s; }
.node-card:nth-child(2) { animation-delay: 0.15s; }
.node-card:nth-child(3) { animation-delay: 0.2s; }
.node-card:nth-child(4) { animation-delay: 0.25s; }
.node-card:nth-child(5) { animation-delay: 0.3s; }

/* 节点在线状态脉冲 */
@keyframes statusPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
    }
}

.node-online .node-status {
    animation: statusPulse 2s ease-in-out infinite;
}

/* ==================== 流量圆环动画 ==================== */
@keyframes drawCircle {
    from {
        stroke-dashoffset: 534;
    }
}

.traffic-circle-progress {
    animation: drawCircle 1.5s ease-out forwards;
}

/* 流量圆环呼吸效果 */
@keyframes circleBreath {
    0%, 100% {
        filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
    }
    50% {
        filter: drop-shadow(0 6px 12px rgba(99, 102, 241, 0.3));
    }
}

.traffic-circle-wrapper:hover .traffic-circle {
    animation: circleBreath 2s ease-in-out infinite;
}

/* 数字滚动动画 */
@keyframes numberRoll {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.traffic-percent,
.summary-value,
.detail-value {
    animation: numberRoll 0.6s ease-out;
}

/* 流量状态徽章动画 */
@keyframes statusPulseBadge {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

.traffic-status-badge {
    animation: statusPulseBadge 2s ease-in-out infinite;
}

/* 流量详情项悬浮动画 */
.traffic-detail-item {
    animation: slideInUp 0.5s ease-out;
    animation-fill-mode: both;
}

.traffic-detail-item:nth-child(1) {
    animation-delay: 0.1s;
}

.traffic-detail-item:nth-child(2) {
    animation-delay: 0.2s;
}

/* ==================== 套餐特性动画 ==================== */
.feature-item-detail {
    animation: fadeInLeft 0.4s ease-out;
    animation-fill-mode: both;
}

.feature-item-detail:nth-child(1) { animation-delay: 0.05s; }
.feature-item-detail:nth-child(2) { animation-delay: 0.1s; }
.feature-item-detail:nth-child(3) { animation-delay: 0.15s; }
.feature-item-detail:nth-child(4) { animation-delay: 0.2s; }
.feature-item-detail:nth-child(5) { animation-delay: 0.25s; }
.feature-item-detail:nth-child(6) { animation-delay: 0.3s; }
.feature-item-detail:nth-child(7) { animation-delay: 0.35s; }
.feature-item-detail:nth-child(8) { animation-delay: 0.4s; }
.feature-item-detail:nth-child(9) { animation-delay: 0.45s; }
.feature-item-detail:nth-child(10) { animation-delay: 0.5s; }

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 特性勾选动画 */
@keyframes checkBounce {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.feature-check {
    animation: checkBounce 0.5s ease-out;
}

/* 高亮关键词动画 */
@keyframes highlightGlow {
    0%, 100% {
        background: rgba(99, 102, 241, 0.1);
    }
    50% {
        background: rgba(99, 102, 241, 0.2);
    }
}

.feature-highlight {
    animation: highlightGlow 2s ease-in-out infinite;
}

/* ==================== 订单筛选动画 ==================== */
.filter-btn {
    animation: fadeIn 0.3s ease-out;
    animation-fill-mode: both;
}

.filter-btn:nth-child(1) { animation-delay: 0.05s; }
.filter-btn:nth-child(2) { animation-delay: 0.1s; }
.filter-btn:nth-child(3) { animation-delay: 0.15s; }
.filter-btn:nth-child(4) { animation-delay: 0.2s; }

/* 筛选按钮激活动画 */
.filter-btn.active {
    animation: pulse 0.3s ease-out;
}

/* ==================== 订单卡片动画 ==================== */
.order-card {
    animation: slideInUp 0.4s ease-out;
    animation-fill-mode: both;
}

.order-card:nth-child(1) { animation-delay: 0.1s; }
.order-card:nth-child(2) { animation-delay: 0.15s; }
.order-card:nth-child(3) { animation-delay: 0.2s; }
.order-card:nth-child(4) { animation-delay: 0.25s; }
.order-card:nth-child(5) { animation-delay: 0.3s; }

/* ==================== 公告动画 ==================== */
.announcement-item {
    animation: slideInLeft 0.4s ease-out;
    animation-fill-mode: both;
}

.announcement-item:nth-child(1) { animation-delay: 0.1s; }
.announcement-item:nth-child(2) { animation-delay: 0.2s; }
.announcement-item:nth-child(3) { animation-delay: 0.3s; }

/* ==================== 背景动画效果 ==================== */
/* 渐变背景动画 */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.animated-gradient {
    background: linear-gradient(
        -45deg,
        var(--color-primary),
        var(--color-primary-light),
        var(--color-primary-dark),
        var(--color-primary)
    );
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

/* 浮动粒子效果 */
@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-20px) rotate(90deg);
    }
    50% {
        transform: translateY(-40px) rotate(180deg);
    }
    75% {
        transform: translateY(-20px) rotate(270deg);
    }
}

.floating-particle {
    animation: float 10s ease-in-out infinite;
}

/* ==================== 文字动画效果 ==================== */
/* 打字机效果 */
@keyframes typewriter {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

.typewriter {
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid var(--color-primary);
    animation: typewriter 3s steps(40) 1s both,
               blink 0.75s step-end infinite;
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

/* 文字渐显效果 */
@keyframes textFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.text-fade-in {
    animation: textFadeIn 0.6s ease-out;
}

/* ==================== 滚动动画 ==================== */
/* 滚动显示动画 */
@keyframes scrollReveal {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scroll-reveal {
    opacity: 0;
    animation: scrollReveal 0.6s ease-out forwards;
}

/* ==================== 特殊效果 ==================== */
/* 闪烁效果 */
@keyframes blinkEffect {
    0%, 50%, 100% {
        opacity: 1;
    }
    25%, 75% {
        opacity: 0.5;
    }
}

.blink {
    animation: blinkEffect 2s ease-in-out infinite;
}

/* 旋转效果 */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.rotate {
    animation: rotate 2s linear infinite;
}

.reset-icon {
    animation: rotate 3s linear infinite;
}

/* 弹跳效果 */
@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.bounce-in {
    animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ==================== 性能优化 ==================== */
/* 减少动画以提升性能（用户偏好设置） */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==================== 响应式动画调整 ==================== */
@media (max-width: 768px) {
    /* 移动端减少复杂动画 */
    .dashboard-card,
    .stat-card,
    .plan-card,
    .node-card,
    .order-card {
        animation-duration: 0.3s;
    }
    
    /* 简化悬浮效果 */
    .dashboard-card:hover,
    .stat-card:hover,
    .plan-card:hover {
        transform: translateY(-2px);
    }
}

/* ==================== 深色模式动画调整 ==================== */
[data-theme="dark"] {
    /* 深色模式下降低发光强度 */
    .btn-primary:hover {
        box-shadow: 0 6px 20px 0 rgba(99, 102, 241, 0.3);
    }
    
    .stat-card:hover {
        box-shadow: 0 10px 30px -3px rgba(0, 0, 0, 0.5);
    }
}

/* ==================== 融合卡片动画 ==================== */
.user-plan-fusion-card {
    animation: slideInUp 0.5s ease-out;
}

.user-avatar-circle {
    animation: zoomIn 0.6s ease-out;
}

.user-balance-section {
    animation: slideInRight 0.6s ease-out;
}

.plan-icon-wrapper {
    animation: bounceIn 0.7s ease-out;
}

.plan-expiry-inline {
    animation: fadeInLeft 0.5s ease-out;
}

/* 余额数字跳动 */
@keyframes balanceJump {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.balance-amount {
    animation: balanceJump 0.6s ease-out;
}

/* 头像呼吸效果 */
@keyframes avatarBreath {
    0%, 100% {
        box-shadow: 0 8px 16px rgba(99, 102, 241, 0.3);
    }
    50% {
        box-shadow: 0 12px 24px rgba(99, 102, 241, 0.5);
    }
}

.user-avatar-circle {
    animation: avatarBreath 3s ease-in-out infinite;
}

/* 套餐图标旋转 */
@keyframes iconFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.plan-icon-large {
    animation: iconFloat 2s ease-in-out infinite;
}

/* 到期警告闪烁 */
.expiry-critical {
    animation: warningBlink 1.5s ease-in-out infinite;
}

@keyframes warningBlink {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.02);
    }
}

/* 分隔线符号旋转 */
@keyframes dividerRotate {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.fusion-divider::after {
    animation: dividerRotate 10s linear infinite;
}

/* 按钮悬浮特效增强 */
.plan-actions-compact .btn {
    position: relative;
    overflow: hidden;
}

.plan-actions-compact .btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.plan-actions-compact .btn:hover::before {
    width: 300px;
    height: 300px;
}

/* 状态徽章脉冲 */
@keyframes badgePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.plan-status-badge.status-active {
    animation: badgePulse 2s ease-in-out infinite;
}

/* ==================== 周期选择器动画 ==================== */
.modal-period-selector .modal-content {
    animation: modalSlideUp 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes modalSlideUp {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.plan-summary-card {
    animation: fadeInDown 0.5s ease-out;
}

.period-options-container {
    animation: fadeInUp 0.6s ease-out;
}

.period-card {
    animation: slideInLeft 0.4s ease-out;
    animation-fill-mode: both;
}

.period-card:nth-child(1) {
    animation-delay: 0.1s;
}

.period-card:nth-child(2) {
    animation-delay: 0.15s;
}

.period-card:nth-child(3) {
    animation-delay: 0.2s;
}

.period-card:nth-child(4) {
    animation-delay: 0.25s;
}

.period-card:nth-child(5) {
    animation-delay: 0.3s;
}

/* 单选按钮动画 */
@keyframes radioCheck {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(0deg);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2) rotate(180deg);
    }
    100% {
        transform: translate(-50%, -50%) scale(1) rotate(360deg);
    }
}

.period-radio input[type="radio"]:checked + label::after {
    animation: radioCheck 0.4s ease-out;
}

/* 推荐标签闪烁 */
@keyframes badgeGlow {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
    }
    50% {
        box-shadow: 0 6px 20px rgba(245, 158, 11, 0.6);
    }
}

.period-badge {
    animation: badgeGlow 2s ease-in-out infinite;
}

/* 节省金额动画 */
@keyframes savingsShine {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
        transform: scale(1.02);
    }
    100% {
        opacity: 1;
    }
}

.period-savings {
    animation: savingsShine 2s ease-in-out infinite;
}

/* 卡片选中动画 */
@keyframes cardSelect {
    0% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(8px);
    }
    100% {
        transform: translateX(4px);
    }
}

.period-card.period-selected {
    animation: cardSelect 0.3s ease-out;
}

/* 价格数字跳动 */
@keyframes priceJump {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.period-card:hover .price-value {
    animation: priceJump 0.5s ease-out;
}

/* 特性标签动画 */
.feature-tag {
    animation: fadeIn 0.4s ease-out;
    animation-fill-mode: both;
}

.feature-tag:nth-child(1) {
    animation-delay: 0.1s;
}

.feature-tag:nth-child(2) {
    animation-delay: 0.15s;
}

.feature-tag:nth-child(3) {
    animation-delay: 0.2s;
}

/* ==================== 支付模态框动画 ==================== */
.modal-payment .modal-content {
    animation: modalSlideUp 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.order-info-card {
    animation: fadeInDown 0.5s ease-out;
}

.payment-methods-container {
    animation: fadeInUp 0.6s ease-out;
}

.payment-tips-card {
    animation: fadeIn 0.7s ease-out;
}

/* 支付方式卡片动画 */
.payment-method-card {
    animation: slideInLeft 0.4s ease-out;
    animation-fill-mode: both;
}

.payment-method-card:nth-child(1) {
    animation-delay: 0.1s;
}

.payment-method-card:nth-child(2) {
    animation-delay: 0.15s;
}

.payment-method-card:nth-child(3) {
    animation-delay: 0.2s;
}

.payment-method-card:nth-child(4) {
    animation-delay: 0.25s;
}

/* 单选按钮选中动画 */
@keyframes radioCheckPayment {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(0deg);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2) rotate(180deg);
    }
    100% {
        transform: translate(-50%, -50%) scale(1) rotate(360deg);
    }
}

.payment-radio input[type="radio"]:checked + label::after {
    animation: radioCheckPayment 0.4s ease-out;
}

/* 选中图标动画 */
@keyframes checkIconPop {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(0deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.payment-method-card.payment-selected .payment-check-icon {
    animation: checkIconPop 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* 支付图标加载动画 */
@keyframes iconFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.payment-icon-img {
    animation: iconFadeIn 0.5s ease-out;
}

/* 卡片选中动画 */
@keyframes cardSelectPayment {
    0% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(8px);
    }
    100% {
        transform: translateX(4px);
    }
}

.payment-method-card.payment-selected {
    animation: cardSelectPayment 0.3s ease-out;
}

/* 复制按钮点击动画 */
@keyframes copyBounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

.btn-copy-inline:active {
    animation: copyBounce 0.3s ease-out;
}

/* 订单号数字滚动 */
.order-number-value {
    animation: fadeIn 0.6s ease-out;
}