/* Aurora Background Effect */
.aurora-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: transparent;
    pointer-events: none;
}

.aurora-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.8;
}

.aurora-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse 80% 60% at 30% 40%, rgba(147, 51, 234, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse 70% 80% at 70% 60%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse 60% 70% at 50% 80%, rgba(16, 185, 129, 0.1) 0%, transparent 50%);
    mix-blend-mode: screen;
    animation: aurora-overlay 45s infinite cubic-bezier(0.4, 0, 0.6, 1);
    will-change: transform, opacity;
}

@keyframes aurora-overlay {
    0% {
        opacity: 0.2;
        transform: scale(1) rotate(0deg);
    }
    
    20% {
        opacity: 0.4;
        transform: scale(1.05) rotate(36deg);
    }
    
    40% {
        opacity: 0.6;
        transform: scale(0.95) rotate(144deg);
    }
    
    60% {
        opacity: 0.8;
        transform: scale(1.1) rotate(216deg);
    }
    
    80% {
        opacity: 0.5;
        transform: scale(1.02) rotate(288deg);
    }

    100% {
        opacity: 0.2;
        transform: scale(1) rotate(360deg);
    }
}

.aurora-item {
    position: absolute;
    border-radius: 50%;
    mix-blend-mode: screen;
    opacity: 0.5;
    transition: all 2s ease-in-out;
    will-change: transform, opacity;
}

.aurora-item:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

.aurora-item:nth-child(6n+1) {
    width: 450px;
    height: 450px;
    background: radial-gradient(ellipse 60% 80%, rgba(147, 51, 234, 0.4) 0%, rgba(147, 51, 234, 0.2) 40%, rgba(147, 51, 234, 0.08) 70%, transparent 100%);
    top: 15%;
    left: 20%;
    animation: aurora-move 28s infinite cubic-bezier(0.4, 0, 0.6, 1), 
               aurora-breathe 15s infinite ease-in-out;
    animation-delay: 0s, -3s;
}

.aurora-item:nth-child(6n+2) {
    width: 500px;
    height: 500px;
    background: radial-gradient(ellipse 70% 90%, rgba(59, 130, 246, 0.35) 0%, rgba(59, 130, 246, 0.18) 40%, rgba(59, 130, 246, 0.06) 70%, transparent 100%);
    top: 8%;
    right: 15%;
    animation: aurora-move 35s infinite cubic-bezier(0.25, 0.46, 0.45, 0.94),
               aurora-breathe 18s infinite ease-in-out;
    animation-delay: -7s, -5s;
}

.aurora-item:nth-child(6n+3) {
    width: 380px;
    height: 380px;
    background: radial-gradient(ellipse 80% 60%, rgba(16, 185, 129, 0.4) 0%, rgba(16, 185, 129, 0.2) 40%, rgba(16, 185, 129, 0.08) 70%, transparent 100%);
    bottom: 25%;
    left: 15%;
    animation: aurora-move 42s infinite cubic-bezier(0.68, -0.55, 0.265, 1.55),
               aurora-breathe 22s infinite ease-in-out;
    animation-delay: -12s, -8s;
}

.aurora-item:nth-child(6n+4) {
    width: 420px;
    height: 420px;
    background: radial-gradient(ellipse 65% 85%, rgba(236, 72, 153, 0.35) 0%, rgba(236, 72, 153, 0.18) 40%, rgba(236, 72, 153, 0.06) 70%, transparent 100%);
    bottom: 15%;
    right: 20%;
    animation: aurora-move 32s infinite cubic-bezier(0.175, 0.885, 0.32, 1.275),
               aurora-breathe 20s infinite ease-in-out;
    animation-delay: -18s, -12s;
}

.aurora-item:nth-child(6n+5) {
    width: 350px;
    height: 350px;
    background: radial-gradient(ellipse 75% 70%, rgba(251, 191, 36, 0.4) 0%, rgba(251, 191, 36, 0.2) 40%, rgba(251, 191, 36, 0.08) 70%, transparent 100%);
    top: 35%;
    left: 40%;
    animation: aurora-move 26s infinite cubic-bezier(0.23, 1, 0.32, 1),
               aurora-breathe 16s infinite ease-in-out;
    animation-delay: -10s, -6s;
}

.aurora-item:nth-child(6n+6) {
    width: 480px;
    height: 480px;
    background: radial-gradient(ellipse 55% 95%, rgba(139, 92, 246, 0.35) 0%, rgba(139, 92, 246, 0.18) 40%, rgba(139, 92, 246, 0.06) 70%, transparent 100%);
    top: 55%;
    right: 35%;
    animation: aurora-move 38s infinite cubic-bezier(0.645, 0.045, 0.355, 1),
               aurora-breathe 24s infinite ease-in-out;
    animation-delay: -15s, -10s;
}

@keyframes aurora-move {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(1);
        opacity: 0.5;
    }

    15% {
        transform: translate(25px, -15px) rotate(45deg) scale(1.1);
        opacity: 0.8;
    }

    30% {
        transform: translate(40px, 20px) rotate(120deg) scale(0.9);
        opacity: 0.6;
    }

    45% {
        transform: translate(-15px, 35px) rotate(200deg) scale(1.15);
        opacity: 0.9;
    }

    60% {
        transform: translate(-35px, -10px) rotate(270deg) scale(0.85);
        opacity: 0.3;
    }

    75% {
        transform: translate(-20px, -30px) rotate(320deg) scale(1.05);
        opacity: 0.7;
    }

    90% {
        transform: translate(10px, -25px) rotate(380deg) scale(1.2);
        opacity: 0.8;
    }

    100% {
        transform: translate(0, 0) rotate(360deg) scale(1);
        opacity: 0.5;
    }
}

/* 添加呼吸效果 */
@keyframes aurora-breathe {
    0%, 100% {
        filter: blur(80px) brightness(1);
    }
    25% {
        filter: blur(75px) brightness(1.1);
    }
    50% {
        filter: blur(85px) brightness(0.9);
    }
    75% {
        filter: blur(80px) brightness(1.05);
    }
}

/* 深色模式专用呼吸效果 */
@keyframes aurora-breathe-dark {
    0%, 100% {
        filter: blur(70px) brightness(1.2);
    }
    25% {
        filter: blur(65px) brightness(1.4);
    }
    50% {
        filter: blur(75px) brightness(1);
    }
    75% {
        filter: blur(68px) brightness(1.3);
    }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .aurora-item {
        filter: blur(40px);
    }

    .aurora-item:nth-child(6n+1) {
        width: 280px;
        height: 280px;
        top: 20%;
        left: 15%;
    }

    .aurora-item:nth-child(6n+2) {
        width: 320px;
        height: 320px;
        top: 12%;
        right: 10%;
    }

    .aurora-item:nth-child(6n+3) {
        width: 250px;
        height: 250px;
    }

    .aurora-item:nth-child(6n+4) {
        width: 290px;
        height: 290px;
    }

    .aurora-item:nth-child(6n+5) {
        width: 220px;
        height: 220px;
        top: 38%;
        left: 35%;
    }

    .aurora-item:nth-child(6n+6) {
        width: 300px;
        height: 300px;
    }

    .aurora-container::before {
        opacity: 0.8;
    }
}

/* Aurora背景作为覆盖层，不替换原有背景 */
.aurora-background {
    background: transparent;
}

/* 暗色主题适配 */
[data-theme="dark"] .aurora-background {
    background: transparent;
}

[data-theme="dark"] .aurora-container {
    opacity: 0.9;
}

[data-theme="dark"] .aurora-item {
    opacity: 0.7;
    mix-blend-mode: screen;
}

/* 深色模式下增强颜色对比 */
[data-theme="dark"] .aurora-item:nth-child(6n+1) {
    background: radial-gradient(ellipse 60% 80%, rgba(147, 51, 234, 0.5) 0%, rgba(147, 51, 234, 0.25) 40%, rgba(147, 51, 234, 0.1) 70%, transparent 100%);
    animation: aurora-move 28s infinite cubic-bezier(0.4, 0, 0.6, 1), 
               aurora-breathe-dark 15s infinite ease-in-out;
    animation-delay: 0s, -3s;
}

[data-theme="dark"] .aurora-item:nth-child(6n+2) {
    background: radial-gradient(ellipse 70% 90%, rgba(59, 130, 246, 0.45) 0%, rgba(59, 130, 246, 0.22) 40%, rgba(59, 130, 246, 0.08) 70%, transparent 100%);
    animation: aurora-move 35s infinite cubic-bezier(0.25, 0.46, 0.45, 0.94),
               aurora-breathe-dark 18s infinite ease-in-out;
    animation-delay: -7s, -5s;
}

[data-theme="dark"] .aurora-item:nth-child(6n+3) {
    background: radial-gradient(ellipse 80% 60%, rgba(16, 185, 129, 0.5) 0%, rgba(16, 185, 129, 0.25) 40%, rgba(16, 185, 129, 0.1) 70%, transparent 100%);
    animation: aurora-move 42s infinite cubic-bezier(0.68, -0.55, 0.265, 1.55),
               aurora-breathe-dark 22s infinite ease-in-out;
    animation-delay: -12s, -8s;
}

[data-theme="dark"] .aurora-item:nth-child(6n+4) {
    background: radial-gradient(ellipse 65% 85%, rgba(236, 72, 153, 0.45) 0%, rgba(236, 72, 153, 0.22) 40%, rgba(236, 72, 153, 0.08) 70%, transparent 100%);
    animation: aurora-move 32s infinite cubic-bezier(0.175, 0.885, 0.32, 1.275),
               aurora-breathe-dark 20s infinite ease-in-out;
    animation-delay: -18s, -12s;
}

[data-theme="dark"] .aurora-item:nth-child(6n+5) {
    background: radial-gradient(ellipse 75% 70%, rgba(251, 191, 36, 0.5) 0%, rgba(251, 191, 36, 0.25) 40%, rgba(251, 191, 36, 0.1) 70%, transparent 100%);
    animation: aurora-move 26s infinite cubic-bezier(0.23, 1, 0.32, 1),
               aurora-breathe-dark 16s infinite ease-in-out;
    animation-delay: -10s, -6s;
}

[data-theme="dark"] .aurora-item:nth-child(6n+6) {
    background: radial-gradient(ellipse 55% 95%, rgba(139, 92, 246, 0.45) 0%, rgba(139, 92, 246, 0.22) 40%, rgba(139, 92, 246, 0.08) 70%, transparent 100%);
    animation: aurora-move 38s infinite cubic-bezier(0.645, 0.045, 0.355, 1),
               aurora-breathe-dark 24s infinite ease-in-out;
    animation-delay: -15s, -10s;
}

/* 亮色主题适配 */
[data-theme="light"] .aurora-background {
    background: transparent;
}

[data-theme="light"] .aurora-container {
    opacity: 0.6;
}

[data-theme="light"] .aurora-item {
    opacity: 0.8;
    mix-blend-mode: multiply;
}

[data-theme="light"] .aurora-item:nth-child(6n+1) {
    background: radial-gradient(ellipse 60% 80%, rgba(147, 51, 234, 0.25) 0%, rgba(147, 51, 234, 0.12) 40%, rgba(147, 51, 234, 0.05) 70%, transparent 100%);
}

[data-theme="light"] .aurora-item:nth-child(6n+2) {
    background: radial-gradient(ellipse 70% 90%, rgba(59, 130, 246, 0.22) 0%, rgba(59, 130, 246, 0.10) 40%, rgba(59, 130, 246, 0.04) 70%, transparent 100%);
}

[data-theme="light"] .aurora-item:nth-child(6n+3) {
    background: radial-gradient(ellipse 80% 60%, rgba(16, 185, 129, 0.25) 0%, rgba(16, 185, 129, 0.12) 40%, rgba(16, 185, 129, 0.05) 70%, transparent 100%);
}

[data-theme="light"] .aurora-item:nth-child(6n+4) {
    background: radial-gradient(ellipse 65% 85%, rgba(236, 72, 153, 0.22) 0%, rgba(236, 72, 153, 0.10) 40%, rgba(236, 72, 153, 0.04) 70%, transparent 100%);
}

[data-theme="light"] .aurora-item:nth-child(6n+5) {
    background: radial-gradient(ellipse 75% 70%, rgba(251, 191, 36, 0.25) 0%, rgba(251, 191, 36, 0.12) 40%, rgba(251, 191, 36, 0.05) 70%, transparent 100%);
}

[data-theme="light"] .aurora-item:nth-child(6n+6) {
    background: radial-gradient(ellipse 55% 95%, rgba(139, 92, 246, 0.22) 0%, rgba(139, 92, 246, 0.10) 40%, rgba(139, 92, 246, 0.04) 70%, transparent 100%);
}

[data-theme="light"] .aurora-container::before {
    background: radial-gradient(ellipse 80% 60% at 30% 40%, rgba(147, 51, 234, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 70% 80% at 70% 60%, rgba(59, 130, 246, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse 60% 70% at 50% 80%, rgba(16, 185, 129, 0.08) 0%, transparent 50%);
}

/* Split Text Animation */
.split-text {
  overflow: hidden;
  position: relative;
}

.split-text .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform, opacity;
}

.split-text .char.animate {
  opacity: 1;
  transform: translateY(0);
}

/* 为空格添加特殊处理 */
.split-text .char.space {
  width: 0.3em;
}

/* 动画延迟变量 */
.split-text .char:nth-child(1) { transition-delay: 0ms; }
.split-text .char:nth-child(2) { transition-delay: 100ms; }
.split-text .char:nth-child(3) { transition-delay: 200ms; }
.split-text .char:nth-child(4) { transition-delay: 300ms; }
.split-text .char:nth-child(5) { transition-delay: 400ms; }
.split-text .char:nth-child(6) { transition-delay: 500ms; }
.split-text .char:nth-child(7) { transition-delay: 600ms; }
.split-text .char:nth-child(8) { transition-delay: 700ms; }
.split-text .char:nth-child(9) { transition-delay: 800ms; }
.split-text .char:nth-child(10) { transition-delay: 900ms; }
.split-text .char:nth-child(11) { transition-delay: 1000ms; }
.split-text .char:nth-child(12) { transition-delay: 1100ms; }
.split-text .char:nth-child(13) { transition-delay: 1200ms; }
.split-text .char:nth-child(14) { transition-delay: 1300ms; }
.split-text .char:nth-child(15) { transition-delay: 1400ms; }
.split-text .char:nth-child(16) { transition-delay: 1500ms; }
.split-text .char:nth-child(17) { transition-delay: 1600ms; }
.split-text .char:nth-child(18) { transition-delay: 1700ms; }
.split-text .char:nth-child(19) { transition-delay: 1800ms; }
.split-text .char:nth-child(20) { transition-delay: 1900ms; }
.split-text .char:nth-child(21) { transition-delay: 2000ms; }
.split-text .char:nth-child(22) { transition-delay: 2100ms; }
.split-text .char:nth-child(23) { transition-delay: 2200ms; }
.split-text .char:nth-child(24) { transition-delay: 2300ms; }
.split-text .char:nth-child(25) { transition-delay: 2400ms; }
.split-text .char:nth-child(26) { transition-delay: 2500ms; }
.split-text .char:nth-child(27) { transition-delay: 2600ms; }
.split-text .char:nth-child(28) { transition-delay: 2700ms; }
.split-text .char:nth-child(29) { transition-delay: 2800ms; }
.split-text .char:nth-child(30) { transition-delay: 2900ms; }

/* 响应式调整 */
@media (max-width: 768px) {
  .split-text .char {
    transform: translateY(30px);
  }
}

/* 减少动画偏好支持 */
@media (prefers-reduced-motion: reduce) {
  .split-text .char {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}