/* ============================================================
   ZY电竞系统 — 视觉盛宴特效系统
   Visual Effects System — Particles, Glow, Motion, 3D
   ============================================================ */

/* ================================
   DESIGN TOKENS — MOTION
   ================================ */
:root {
    --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
    --ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-in-quart: cubic-bezier(0.5, 0, 0.75, 0);
    --duration-instant: 100ms;
    --duration-fast: 200ms;
    --duration-normal: 350ms;
    --duration-slow: 550ms;
    --duration-entrance: 700ms;
}

/* ================================
   REDUCED MOTION
   ================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ================================
   GLOBAL PARTICLE BACKGROUND
   ================================ */
.zy-particle-bg {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}
.zy-particle-bg .particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(10, 10, 10, 0.04);
    animation: particleFloat linear infinite;
}
.zy-particle-bg .particle-accent {
    background: rgba(10, 10, 10, 0.08);
    box-shadow: 0 0 6px rgba(10, 10, 10, 0.06);
}

@keyframes particleFloat {
    0% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(60px) scale(0.4);
        opacity: 0;
    }
}

/* ================================
   GRID / DOT PATTERN OVERLAY
   ================================ */
.zy-grid-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.03;
    background-image:
        radial-gradient(circle, rgba(10,10,10,.5) 1px, transparent 1px);
    background-size: 32px 32px;
}

/* ================================
   SCROLL-DRIVEN PROGRESS BAR
   ================================ */
.zy-scroll-progress {
    position: fixed;
    top: 0; left: 0;
    height: 2px;
    background: linear-gradient(90deg, #0A0A0A, #333, #0A0A0A);
    z-index: 10000;
    transition: width 0.1s linear;
    border-radius: 0 2px 2px 0;
}

/* ================================
   BUTTON RIPPLE EFFECT
   ================================ */
.zy-ripple {
    position: relative;
    overflow: hidden;
}
.zy-ripple .ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    transform: scale(0);
    animation: rippleExpand 0.6s var(--ease-out-quart) forwards;
    pointer-events: none;
}
@keyframes rippleExpand {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ================================
   GLOW PULSE — Accent Elements
   ================================ */
.zy-glow-pulse {
    animation: glowPulse 3s var(--ease-out-quart) infinite;
}
@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(10, 10, 10, 0.1);
    }
    50% {
        box-shadow: 0 0 20px 4px rgba(10, 10, 10, 0.06);
    }
}

/* ================================
   SHIMMER TEXT EFFECT
   ================================ */
.zy-shimmer-text {
    background: linear-gradient(
        90deg,
        #0A0A0A 0%,
        #0A0A0A 40%,
        #666 50%,
        #0A0A0A 60%,
        #0A0A0A 100%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmerText 3s ease-in-out infinite;
}
@keyframes shimmerText {
    0%, 100% { background-position: -200% 0; }
    50% { background-position: 200% 0; }
}

/* ================================
   FLOATING ANIMATION
   ================================ */
.zy-float {
    animation: zyFloat 4s var(--ease-out-quart) infinite;
}
@keyframes zyFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

.zy-float-slow {
    animation: zyFloatSlow 6s var(--ease-out-quart) infinite;
}
@keyframes zyFloatSlow {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-6px) rotate(1deg); }
    66% { transform: translateY(3px) rotate(-1deg); }
}

/* ================================
   ENTRANCE ANIMATIONS
   ================================ */
.zy-entrance-fade-up {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity var(--duration-slow) var(--ease-out-expo),
                transform var(--duration-slow) var(--ease-out-expo);
}
.zy-entrance-fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.zy-entrance-fade-in {
    opacity: 0;
    transition: opacity var(--duration-slow) var(--ease-out-expo);
}
.zy-entrance-fade-in.visible {
    opacity: 1;
}

.zy-entrance-scale {
    opacity: 0;
    transform: scale(0.92);
    transition: opacity var(--duration-slow) var(--ease-out-expo),
                transform var(--duration-slow) var(--ease-out-expo);
}
.zy-entrance-scale.visible {
    opacity: 1;
    transform: scale(1);
}

.zy-entrance-slide-left {
    opacity: 0;
    transform: translateX(-32px);
    transition: opacity var(--duration-slow) var(--ease-out-expo),
                transform var(--duration-slow) var(--ease-out-expo);
}
.zy-entrance-slide-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.zy-entrance-slide-right {
    opacity: 0;
    transform: translateX(32px);
    transition: opacity var(--duration-slow) var(--ease-out-expo),
                transform var(--duration-slow) var(--ease-out-expo);
}
.zy-entrance-slide-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ================================
   STAGGER DELAYS
   ================================ */
.zy-stagger > *:nth-child(1) { transition-delay: 0ms; }
.zy-stagger > *:nth-child(2) { transition-delay: 80ms; }
.zy-stagger > *:nth-child(3) { transition-delay: 160ms; }
.zy-stagger > *:nth-child(4) { transition-delay: 240ms; }
.zy-stagger > *:nth-child(5) { transition-delay: 320ms; }
.zy-stagger > *:nth-child(6) { transition-delay: 400ms; }
.zy-stagger > *:nth-child(7) { transition-delay: 480ms; }
.zy-stagger > *:nth-child(8) { transition-delay: 560ms; }

/* ================================
   HOVER LIFT + GLOW
   ================================ */
.zy-hover-lift {
    transition: transform var(--duration-fast) var(--ease-out-quart),
                box-shadow var(--duration-fast) var(--ease-out-quart),
                border-color var(--duration-fast) var(--ease-out-quart);
}
.zy-hover-lift:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.15);
}

.zy-hover-glow {
    transition: box-shadow var(--duration-fast) var(--ease-out-quart),
                transform var(--duration-fast) var(--ease-out-quart);
}
.zy-hover-glow:hover {
    box-shadow: 0 0 0 3px rgba(10, 10, 10, 0.06),
                0 8px 24px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

/* ================================
   SKELETON LOADING
   ================================ */
.zy-skeleton {
    background: linear-gradient(
        90deg,
        #f0f0f2 25%,
        #e8e8ec 50%,
        #f0f0f2 75%
    );
    background-size: 200% 100%;
    animation: skeletonShimmer 1.6s ease-in-out infinite;
    border-radius: 6px;
}
@keyframes skeletonShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ================================
   TYPING CARET
   ================================ */
.zy-typing-caret {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: currentColor;
    margin-left: 2px;
    animation: caretBlink 0.8s step-end infinite;
    vertical-align: text-bottom;
}
@keyframes caretBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ================================
   SUCCESS CHECKMARK
   ================================ */
.zy-checkmark {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0fdf4;
    margin: 0 auto 16px;
    animation: checkmarkScale 0.5s var(--ease-out-back) forwards;
}
.zy-checkmark svg {
    width: 28px;
    height: 28px;
    stroke: #16a34a;
    stroke-width: 2.5;
    fill: none;
    stroke-dasharray: 24;
    stroke-dashoffset: 24;
    animation: checkmarkDraw 0.4s var(--ease-out-quart) 0.3s forwards;
}
@keyframes checkmarkScale {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
@keyframes checkmarkDraw {
    to { stroke-dashoffset: 0; }
}

/* ================================
   NUMBER COUNTER
   ================================ */
.zy-counter {
    display: inline-block;
    font-variant-numeric: tabular-nums;
}

/* ================================
   GLASS MORPHISM CARD
   ================================ */
.zy-glass {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

/* ================================
   BORDER GLOW ANIMATION
   ================================ */
.zy-border-glow {
    position: relative;
}
.zy-border-glow::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: linear-gradient(
        45deg,
        transparent 40%,
        rgba(10, 10, 10, 0.06) 50%,
        transparent 60%
    );
    background-size: 200% 200%;
    animation: borderGlowSweep 3s linear infinite;
    z-index: -1;
    pointer-events: none;
}
@keyframes borderGlowSweep {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* ================================
   PAGE TRANSITION OVERLAY
   ================================ */
.zy-page-transition {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: #fff;
    z-index: 99999;
    pointer-events: none;
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.5s var(--ease-out-expo);
}
.zy-page-transition.active {
    transform: scaleY(1);
    transform-origin: bottom;
}

/* ================================
   CARD TILT ON HOVER (3D)
   ================================ */
.zy-tilt {
    perspective: 1000px;
    transform-style: preserve-3d;
}
.zy-tilt-inner {
    transition: transform 0.15s ease-out;
}

/* ================================
   GRADIENT BORDER
   ================================ */
.zy-gradient-border {
    position: relative;
    background: #fff;
    border-radius: 12px;
}
.zy-gradient-border::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(0,0,0,.08), rgba(0,0,0,.02), rgba(0,0,0,.08));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* ================================
   ORBITING DECORATION
   ================================ */
.zy-orbit-ring {
    position: absolute;
    border: 1px solid rgba(10, 10, 10, 0.04);
    border-radius: 50%;
    animation: orbitSpin 20s linear infinite;
}
@keyframes orbitSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ================================
   PULSE DOT INDICATOR
   ================================ */
.zy-pulse-dot {
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #16a34a;
    position: relative;
}
.zy-pulse-dot::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid #16a34a;
    animation: pulseRing 2s var(--ease-out-quart) infinite;
}
@keyframes pulseRing {
    0% { transform: scale(0.8); opacity: 0.8; }
    100% { transform: scale(2.5); opacity: 0; }
}

/* ================================
   HERO PARALLAX SHAPES
   ================================ */
.zy-hero-shapes {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}
.zy-hero-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.04;
    background: #0A0A0A;
}
.zy-hero-shape-1 {
    width: 300px; height: 300px;
    top: -100px; right: -50px;
    animation: heroShapeFloat 8s var(--ease-out-quart) infinite;
}
.zy-hero-shape-2 {
    width: 200px; height: 200px;
    bottom: -50px; left: 10%;
    animation: heroShapeFloat 6s var(--ease-out-quart) 2s infinite reverse;
}
.zy-hero-shape-3 {
    width: 150px; height: 150px;
    top: 40%; left: -30px;
    opacity: 0.02;
    animation: heroShapeFloat 10s var(--ease-out-quart) 1s infinite;
}
@keyframes heroShapeFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -20px) scale(1.05); }
    66% { transform: translate(-20px, 15px) scale(0.95); }
}

/* ================================
   SCROLL-REVEAL LINE
   ================================ */
.zy-reveal-line {
    position: relative;
    overflow: hidden;
}
.zy-reveal-line::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(10,10,10,.04), transparent);
    transform: translateX(-100%);
    animation: revealLineSweep 2.5s var(--ease-out-quart) infinite;
}
@keyframes revealLineSweep {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(200%); }
}

/* ================================
   FOCUS RING ANIMATION
   ================================ */
input:focus.zy-focus-glow,
textarea:focus.zy-focus-glow,
select:focus.zy-focus-glow {
    border-color: #0A0A0A;
    box-shadow: 0 0 0 3px rgba(10, 10, 10, 0.06),
                0 0 20px rgba(10, 10, 10, 0.03);
    transition: box-shadow var(--duration-fast) var(--ease-out-quart),
                border-color var(--duration-fast) var(--ease-out-quart);
}

/* ================================
   HERO TITLE — LETTER BY LETTER
   ================================ */
.zy-title-reveal .char {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    animation: charReveal 0.5s var(--ease-out-expo) forwards;
}
@keyframes charReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================================
   NOTIFICATION BELL RING
   ================================ */
.zy-bell-ring {
    animation: bellRing 0.5s var(--ease-out-back);
}
@keyframes bellRing {
    0%, 100% { transform: rotate(0); }
    20% { transform: rotate(15deg); }
    40% { transform: rotate(-15deg); }
    60% { transform: rotate(8deg); }
    80% { transform: rotate(-5deg); }
}

/* ================================
   IMAGE REVEAL ON LOAD
   ================================ */
.zy-img-reveal {
    opacity: 0;
    filter: blur(10px);
    transform: scale(1.05);
    transition: opacity 0.6s var(--ease-out-expo),
                filter 0.6s var(--ease-out-expo),
                transform 0.6s var(--ease-out-expo);
}
.zy-img-reveal.loaded {
    opacity: 1;
    filter: blur(0);
    transform: scale(1);
}

/* ================================
   DASHBOARD STAT CARD COUNTER
   ================================ */
.zy-stat-counter {
    font-variant-numeric: tabular-nums;
    transition: color 0.3s var(--ease-out-quart);
}

/* ================================
   SIDEBAR ACTIVE INDICATOR ANIMATION
   ================================ */
.menu-item.active::before {
    animation: activeIndicatorIn 0.35s var(--ease-out-expo);
}
@keyframes activeIndicatorIn {
    from {
        transform: scaleY(0);
    }
    to {
        transform: scaleY(1);
    }
}

/* ================================
   DARK THEME AMBIENT (Subtle)
   ================================ */
.zy-ambient-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.03;
    pointer-events: none;
    z-index: -1;
}
.zy-ambient-glow-1 {
    width: 500px; height: 500px;
    top: -200px; right: -200px;
    background: radial-gradient(circle, #0A0A0A, transparent 70%);
    animation: ambientFloat 12s ease-in-out infinite;
}
.zy-ambient-glow-2 {
    width: 400px; height: 400px;
    bottom: -150px; left: -150px;
    background: radial-gradient(circle, #333, transparent 70%);
    animation: ambientFloat 15s ease-in-out 3s infinite reverse;
}
@keyframes ambientFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(40px, -30px) scale(1.1); }
    66% { transform: translate(-30px, 20px) scale(0.9); }
}

/* ================================
   SCROLL DOWN INDICATOR
   ================================ */
.zy-scroll-indicator {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0.5;
    animation: scrollIndicatorFloat 2s var(--ease-out-quart) infinite;
}
.zy-scroll-indicator span {
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #999;
}
.zy-scroll-indicator .scroll-line {
    width: 1px;
    height: 32px;
    background: linear-gradient(to bottom, #999, transparent);
}
@keyframes scrollIndicatorFloat {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}
