/* 二次元风格增强样式 */

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #ff6b9d, #4ecdc4);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #ff8fab, #5fd3cc);
}

/* 选择文本样式 */
::selection {
    background: rgba(255, 107, 157, 0.3);
    color: white;
}

::-moz-selection {
    background: rgba(255, 107, 157, 0.3);
    color: white;
}

/* 加载动画 */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ff6b9d;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 悬浮动画 */
.float-animation {
    animation: float-gentle 3s ease-in-out infinite;
}

@keyframes float-gentle {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* 脉冲动画 */
.pulse-animation {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* 渐变文字动画 */
.gradient-text {
    background: linear-gradient(45deg, #ff6b9d, #4ecdc4, #ffe66d, #a8e6cf);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 星星背景动画 */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    animation: twinkle 2s ease-in-out infinite;
}

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

/* 按钮点击波纹效果 */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::before {
    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, height 0.6s;
}

.ripple:active::before {
    width: 300px;
    height: 300px;
}

/* 卡片翻转效果 */
.flip-card {
    perspective: 1000px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 15px;
}

.flip-card-back {
    transform: rotateY(180deg);
}

/* 霓虹灯效果 */
.neon-text {
    color: #fff;
    text-shadow:
        0 0 5px #ff6b9d,
        0 0 10px #ff6b9d,
        0 0 15px #ff6b9d,
        0 0 20px #ff6b9d,
        0 0 35px #ff6b9d,
        0 0 40px #ff6b9d;
    animation: neon-flicker 1.5s ease-in-out infinite alternate;
}

@keyframes neon-flicker {
    from {
        text-shadow:
            0 0 5px #ff6b9d,
            0 0 10px #ff6b9d,
            0 0 15px #ff6b9d,
            0 0 20px #ff6b9d,
            0 0 35px #ff6b9d,
            0 0 40px #ff6b9d;
    }
    to {
        text-shadow:
            0 0 2px #ff6b9d,
            0 0 5px #ff6b9d,
            0 0 8px #ff6b9d,
            0 0 12px #ff6b9d,
            0 0 18px #ff6b9d,
            0 0 25px #ff6b9d;
    }
}

/* 彩虹边框 */
.rainbow-border {
    position: relative;
    border-radius: 15px;
    padding: 2px;
    background: linear-gradient(45deg, #ff6b9d, #4ecdc4, #ffe66d, #a8e6cf, #ff6b9d);
    background-size: 400% 400%;
    animation: rainbow-rotate 3s linear infinite;
}

.rainbow-border::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 13px;
    backdrop-filter: blur(20px);
}

@keyframes rainbow-rotate {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 粒子效果容器 */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 107, 157, 0.6);
    border-radius: 50%;
    animation: particle-float 6s ease-in-out infinite;
}

@keyframes particle-float {
    0%, 100% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) scale(1);
        opacity: 0;
    }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .neon-text {
        font-size: 1.5rem;
    }
    
    .rainbow-border {
        margin: 0 1rem;
    }
    
    .particle {
        width: 2px;
        height: 2px;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    .star {
        background: #ffe66d;
    }
}
