/* ========================================
   ShadowRoom Music - 黑白极简动画效果
   ======================================== */

/* ========================================
   滚动显示动画
   ======================================== */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-80px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(80px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-scale.active {
    opacity: 1;
    transform: scale(1);
}

.reveal-rotate {
    opacity: 0;
    transform: rotateY(90deg);
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-rotate.active {
    opacity: 1;
    transform: rotateY(0);
}

/* 交错动画延迟 */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }

/* ========================================
   鼠标跟随光效 - 极简白色
   ======================================== */
.cursor-glow {
    position: fixed;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 40%, transparent 70%);
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
}

.cursor-dot {
    position: fixed;
    width: 6px;
    height: 6px;
    background: #ffffff;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease, width 0.2s ease, height 0.2s ease;
}

.cursor-dot.hover {
    width: 30px;
    height: 30px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

/* ========================================
   3D卡片悬停效果
   ======================================== */
.card-3d {
    transform-style: preserve-3d;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-3d:hover {
    transform: perspective(1000px) rotateX(var(--rotateX, 0deg)) rotateY(var(--rotateY, 0deg)) translateZ(20px);
}

.card-3d-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}

.card-3d-shine {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.05) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    border-radius: inherit;
}

.card-3d:hover .card-3d-shine {
    opacity: 1;
}

/* ========================================
   磁性按钮效果
   ======================================== */
.magnetic-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.magnetic-btn-inner {
    position: relative;
    z-index: 1;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   文字闪烁效果 - 极简
   ======================================== */
.text-flicker {
    animation: textFlicker 3s infinite alternate;
}

@keyframes textFlicker {
    0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
        opacity: 1;
    }
    20%, 24%, 55% {
        opacity: 0.8;
    }
}

.text-pulse {
    animation: textPulse 2s ease-in-out infinite;
}

@keyframes textPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* ========================================
   打字机效果
   ======================================== */
.typewriter {
    overflow: hidden;
    border-right: 2px solid #ffffff;
    white-space: nowrap;
    animation: typing 3s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: #ffffff; }
}

/* ========================================
   视差滚动效果
   ======================================== */
.parallax-container {
    overflow: hidden;
    position: relative;
}

.parallax-layer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    will-change: transform;
}

.parallax-slow {
    transform: translateZ(-2px) scale(3);
}

.parallax-fast {
    transform: translateZ(0);
}

/* ========================================
   浮动动画
   ======================================== */
.float {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}

.float-delay-1 { animation-delay: -1s; }
.float-delay-2 { animation-delay: -2s; }
.float-delay-3 { animation-delay: -3s; }

/* ========================================
   脉冲光环效果 - 极简
   ======================================== */
.pulse-ring {
    position: relative;
}

.pulse-ring::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    animation: pulseRing 2s ease-out infinite;
}

@keyframes pulseRing {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 0;
    }
}

/* ========================================
   粒子背景效果 - 白色粒子
   ======================================== */
.particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: particleFloat 15s infinite linear;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.5;
    }
    90% {
        opacity: 0.5;
    }
    100% {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}

/* ========================================
   波浪动画 - 极简
   ======================================== */
.wave-animation {
    position: relative;
    overflow: hidden;
}

.wave-animation::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 100px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23ffffff' fill-opacity='0.03' d='M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,112C672,96,768,96,864,112C960,128,1056,160,1152,160C1248,160,1344,128,1392,112L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E");
    background-size: 50% 100%;
    animation: wave 10s linear infinite;
}

@keyframes wave {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ========================================
   故障艺术效果 - 黑白
   ======================================== */
.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    animation: glitch-1 2s infinite linear alternate-reverse;
    color: #666666;
    z-index: -1;
}

.glitch::after {
    animation: glitch-2 3s infinite linear alternate-reverse;
    color: #999999;
    z-index: -2;
}

@keyframes glitch-1 {
    0%, 100% { clip-path: inset(0 0 0 0); transform: translate(0); }
    20% { clip-path: inset(20% 0 60% 0); transform: translate(-2px, 2px); }
    40% { clip-path: inset(40% 0 40% 0); transform: translate(2px, -2px); }
    60% { clip-path: inset(60% 0 20% 0); transform: translate(-2px, 2px); }
    80% { clip-path: inset(80% 0 0% 0); transform: translate(2px, -2px); }
}

@keyframes glitch-2 {
    0%, 100% { clip-path: inset(0 0 0 0); transform: translate(0); }
    20% { clip-path: inset(60% 0 20% 0); transform: translate(2px, -2px); }
    40% { clip-path: inset(40% 0 40% 0); transform: translate(-2px, 2px); }
    60% { clip-path: inset(20% 0 60% 0); transform: translate(2px, -2px); }
    80% { clip-path: inset(0% 0 80% 0); transform: translate(-2px, 2px); }
}

/* ========================================
   模态框动画增强
   ======================================== */
.modal {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    transform: scale(0.8) translateY(50px);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
}

.modal.active .modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* ========================================
   链接下划线动画
   ======================================== */
.link-underline {
    position: relative;
    display: inline-block;
}

.link-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: #ffffff;
    transition: width 0.3s ease;
}

.link-underline:hover::after {
    width: 100%;
}

/* ========================================
   按钮波纹效果
   ======================================== */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.ripple:active::after {
    width: 300px;
    height: 300px;
}

/* ========================================
   扫描线效果 - 极简
   ======================================== */
.scanline {
    position: relative;
    overflow: hidden;
}

.scanline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: scanline 4s linear infinite;
    opacity: 0.3;
}

@keyframes scanline {
    0% { transform: translateY(0); }
    100% { transform: translateY(100vh); }
}

/* ========================================
   渐变边框 - 静态黑白边框
   ======================================== */
.gradient-border {
    position: relative;
    background: #0a0a0a;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ========================================
   图标悬停动画
   ======================================== */
.icon-hover {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.icon-hover:hover {
    transform: scale(1.1);
    opacity: 1;
}

/* ========================================
   图片悬停缩放
   ======================================== */
.img-zoom {
    overflow: hidden;
}

.img-zoom img {
    transition: transform 0.5s ease;
}

.img-zoom:hover img {
    transform: scale(1.1);
}

/* ========================================
   导航栏滚动效果
   ======================================== */
.navbar-scrolled {
    background: rgba(0, 0, 0, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5) !important;
    padding: 0.8rem 0 !important;
}

/* ========================================
   音频可视化效果 - 黑白
   ======================================== */
.audio-visualizer {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 30px;
}

.audio-bar {
    width: 4px;
    background: linear-gradient(to top, #666666, #ffffff);
    border-radius: 2px;
    animation: audioBar 1s ease-in-out infinite;
}

.audio-bar:nth-child(1) { animation-delay: 0s; height: 20%; }
.audio-bar:nth-child(2) { animation-delay: 0.1s; height: 60%; }
.audio-bar:nth-child(3) { animation-delay: 0.2s; height: 40%; }
.audio-bar:nth-child(4) { animation-delay: 0.3s; height: 80%; }
.audio-bar:nth-child(5) { animation-delay: 0.4s; height: 30%; }

@keyframes audioBar {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(1.5); }
}

/* ========================================
   滚动条美化 - 黑白
   ======================================== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #000000;
}

::-webkit-scrollbar-thumb {
    background: #333333;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555555;
}

/* ========================================
   响应式调整
   ======================================== */
@media (max-width: 768px) {
    .cursor-glow,
    .cursor-dot {
        display: none;
    }
    
    .reveal,
    .reveal-left,
    .reveal-right {
        opacity: 1;
        transform: none;
    }
}
