/* ============================================
   ANTIGRAVITY & Custom Animations
   영어회화 어플추천 - hi.soritune.com
   ============================================ */

/* ============================================
   1. Particle Tornado Effect
   ============================================ */
.particle-tornado-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary);
    border-radius: 50%;
    opacity: 0.6;
    animation: tornado 8s linear infinite;
}

@keyframes tornado {
    0% {
        transform: translate(0, 100vh) rotate(0deg) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
        transform: translate(0, 80vh) rotate(36deg) scale(1);
    }
    50% {
        transform: translate(calc(50vw - 50%), 50vh) rotate(180deg) scale(1.5);
    }
    90% {
        opacity: 0.6;
        transform: translate(0, 20vh) rotate(324deg) scale(1);
    }
    100% {
        transform: translate(0, 0) rotate(360deg) scale(0);
        opacity: 0;
    }
}

/* Different particle delays */
.particle:nth-child(1) { animation-delay: 0s; left: 10%; }
.particle:nth-child(2) { animation-delay: 0.5s; left: 20%; background: var(--secondary); }
.particle:nth-child(3) { animation-delay: 1s; left: 30%; }
.particle:nth-child(4) { animation-delay: 1.5s; left: 40%; background: var(--accent); }
.particle:nth-child(5) { animation-delay: 2s; left: 50%; }
.particle:nth-child(6) { animation-delay: 2.5s; left: 60%; background: var(--secondary); }
.particle:nth-child(7) { animation-delay: 3s; left: 70%; }
.particle:nth-child(8) { animation-delay: 3.5s; left: 80%; background: var(--accent); }
.particle:nth-child(9) { animation-delay: 4s; left: 90%; }
.particle:nth-child(10) { animation-delay: 4.5s; left: 15%; background: var(--primary); }

/* ============================================
   2. Light Point Effect
   ============================================ */
.light-point-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.light-point {
    position: absolute;
    width: 6px;
    height: 6px;
    background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, transparent 70%);
    border-radius: 50%;
    animation: lightPulse 4s ease-in-out infinite;
}

@keyframes lightPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.3;
        box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
    }
    50% {
        transform: scale(2);
        opacity: 0.8;
        box-shadow: 0 0 30px rgba(102, 126, 234, 0.8), 0 0 60px rgba(118, 75, 162, 0.4);
    }
}

.light-point:nth-child(1) { top: 10%; left: 15%; animation-delay: 0s; }
.light-point:nth-child(2) { top: 20%; left: 80%; animation-delay: 0.5s; }
.light-point:nth-child(3) { top: 40%; left: 25%; animation-delay: 1s; }
.light-point:nth-child(4) { top: 60%; left: 70%; animation-delay: 1.5s; }
.light-point:nth-child(5) { top: 80%; left: 40%; animation-delay: 2s; }
.light-point:nth-child(6) { top: 15%; left: 60%; animation-delay: 2.5s; }
.light-point:nth-child(7) { top: 70%; left: 10%; animation-delay: 3s; }
.light-point:nth-child(8) { top: 50%; left: 90%; animation-delay: 3.5s; }

/* ============================================
   3. Cube Turn Effect
   ============================================ */
.cube-container {
    perspective: 1000px;
    width: 100px;
    height: 100px;
    margin: 0 auto;
}

.cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: cubeRotate 10s linear infinite;
}

@keyframes cubeRotate {
    0% { transform: rotateX(0deg) rotateY(0deg); }
    25% { transform: rotateX(90deg) rotateY(90deg); }
    50% { transform: rotateX(180deg) rotateY(180deg); }
    75% { transform: rotateX(270deg) rotateY(270deg); }
    100% { transform: rotateX(360deg) rotateY(360deg); }
}

.cube-face {
    position: absolute;
    width: 100px;
    height: 100px;
    border: 2px solid var(--primary);
    background: rgba(102, 126, 234, 0.1);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-light);
}

.cube-face-front { transform: translateZ(50px); }
.cube-face-back { transform: rotateY(180deg) translateZ(50px); }
.cube-face-right { transform: rotateY(90deg) translateZ(50px); }
.cube-face-left { transform: rotateY(-90deg) translateZ(50px); }
.cube-face-top { transform: rotateX(90deg) translateZ(50px); }
.cube-face-bottom { transform: rotateX(-90deg) translateZ(50px); }

/* ============================================
   Hero Floating Elements Animation
   ============================================ */
.hero-floating {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.4;
    animation: heroFloat 8s ease-in-out infinite;
}

.hero-floating-1 {
    width: 400px;
    height: 400px;
    background: var(--gradient-cosmic);
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.hero-floating-2 {
    width: 300px;
    height: 300px;
    background: var(--accent);
    bottom: -50px;
    left: -50px;
    animation-delay: -3s;
}

.hero-floating-3 {
    width: 200px;
    height: 200px;
    background: var(--vak-kinesthetic);
    top: 50%;
    left: 50%;
    animation-delay: -5s;
}

@keyframes heroFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(20px, -20px) scale(1.05);
    }
    50% {
        transform: translate(-10px, 10px) scale(0.95);
    }
    75% {
        transform: translate(-20px, -10px) scale(1.02);
    }
}

/* ============================================
   Text Gradient Animation
   ============================================ */
.text-gradient-animated {
    background: linear-gradient(
        90deg,
        var(--primary),
        var(--secondary),
        var(--accent),
        var(--primary)
    );
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 5s ease infinite;
}

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

/* ============================================
   Card Hover Effects
   ============================================ */
.card-hover-glow {
    position: relative;
    overflow: hidden;
}

.card-hover-glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transition: left 0.5s ease;
}

.card-hover-glow:hover::before {
    left: 100%;
}

/* Tilt Effect */
.card-tilt {
    transition: transform 0.3s ease;
    transform-style: preserve-3d;
}

.card-tilt:hover {
    transform: perspective(1000px) rotateX(5deg) rotateY(-5deg);
}

/* ============================================
   Button Effects
   ============================================ */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-ripple:active::after {
    width: 300px;
    height: 300px;
}

/* Pulse Button */
.btn-pulse {
    animation: btnPulse 2s ease-in-out infinite;
}

@keyframes btnPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7);
    }
    50% {
        box-shadow: 0 0 0 15px rgba(102, 126, 234, 0);
    }
}

/* ============================================
   Loading Animations
   ============================================ */
.loader-cosmic {
    width: 50px;
    height: 50px;
    position: relative;
}

.loader-cosmic::before,
.loader-cosmic::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid transparent;
}

.loader-cosmic::before {
    border-top-color: var(--primary);
    animation: spin 1s linear infinite;
}

.loader-cosmic::after {
    border-bottom-color: var(--secondary);
    animation: spin 1.5s linear infinite reverse;
}

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

/* Dots Loader */
.loader-dots {
    display: flex;
    gap: 8px;
}

.loader-dots span {
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 50%;
    animation: dotBounce 1.4s ease-in-out infinite both;
}

.loader-dots span:nth-child(1) { animation-delay: -0.32s; }
.loader-dots span:nth-child(2) { animation-delay: -0.16s; }
.loader-dots span:nth-child(3) { animation-delay: 0s; }

@keyframes dotBounce {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ============================================
   Scroll Progress Indicator
   ============================================ */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--gradient-cosmic);
    z-index: 9999;
    transition: width 0.1s ease;
}

/* ============================================
   Mouse Follower
   ============================================ */
.mouse-follower {
    position: fixed;
    width: 30px;
    height: 30px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.15s ease, width 0.2s ease, height 0.2s ease;
    transform: translate(-50%, -50%);
}

.mouse-follower.active {
    width: 50px;
    height: 50px;
    border-color: var(--accent);
}

.mouse-follower-dot {
    position: fixed;
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
}

/* ============================================
   Typewriter Effect
   ============================================ */
.typewriter {
    overflow: hidden;
    border-right: 3px solid var(--primary);
    white-space: nowrap;
    animation:
        typing 3.5s steps(40, end),
        blink 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    from, to { border-color: transparent; }
    50% { border-color: var(--primary); }
}

/* ============================================
   Parallax Effect Classes
   ============================================ */
.parallax-slow {
    transition: transform 0.1s ease-out;
}

.parallax-medium {
    transition: transform 0.05s ease-out;
}

.parallax-fast {
    transition: transform 0.02s ease-out;
}

/* ============================================
   Image Reveal Animations
   ============================================ */
.img-reveal {
    position: relative;
    overflow: hidden;
}

.img-reveal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-cosmic);
    transform: translateX(-100%);
    z-index: 1;
}

.img-reveal.active::before {
    animation: imgReveal 1s ease forwards;
}

.img-reveal img {
    opacity: 0;
    transform: scale(1.2);
    transition: opacity 0.3s ease, transform 0.5s ease;
}

.img-reveal.active img {
    opacity: 1;
    transform: scale(1);
    transition-delay: 0.5s;
}

@keyframes imgReveal {
    0% { transform: translateX(-100%); }
    50% { transform: translateX(0); }
    100% { transform: translateX(100%); }
}

/* ============================================
   Number Counter Animation
   ============================================ */
.counter {
    font-variant-numeric: tabular-nums;
}

/* ============================================
   Stagger Animation (for lists)
   ============================================ */
.stagger-item {
    opacity: 0;
    transform: translateY(30px);
}

.stagger-item.visible {
    animation: staggerIn 0.6s ease forwards;
}

.stagger-item:nth-child(1) { animation-delay: 0.1s; }
.stagger-item:nth-child(2) { animation-delay: 0.2s; }
.stagger-item:nth-child(3) { animation-delay: 0.3s; }
.stagger-item:nth-child(4) { animation-delay: 0.4s; }
.stagger-item:nth-child(5) { animation-delay: 0.5s; }
.stagger-item:nth-child(6) { animation-delay: 0.6s; }
.stagger-item:nth-child(7) { animation-delay: 0.7s; }
.stagger-item:nth-child(8) { animation-delay: 0.8s; }

@keyframes staggerIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   VAK Type Specific Animations
   ============================================ */
/* Visual Type - Shimmer Effect */
.vak-visual-effect {
    background: linear-gradient(
        90deg,
        var(--vak-visual) 0%,
        #8a9bef 50%,
        var(--vak-visual) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Auditory Type - Wave Effect */
.vak-auditory-effect {
    position: relative;
}

.vak-auditory-effect::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 20px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 20'%3E%3Cpath d='M0 10 Q25 0 50 10 T100 10' stroke='%23f093fb' fill='none' stroke-width='2'/%3E%3C/svg%3E") repeat-x;
    animation: wave 2s linear infinite;
}

@keyframes wave {
    0% { background-position: 0 0; }
    100% { background-position: 100px 0; }
}

/* Kinesthetic Type - Bounce Effect */
.vak-kinesthetic-effect {
    animation: bounce 2s ease-in-out infinite;
}

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

/* ============================================
   Slider Animations
   ============================================ */
.slide-fade-enter {
    opacity: 0;
    transform: translateX(30px);
}

.slide-fade-enter-active {
    opacity: 1;
    transform: translateX(0);
    transition: all 0.5s ease;
}

.slide-fade-exit {
    opacity: 1;
    transform: translateX(0);
}

.slide-fade-exit-active {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.5s ease;
}

/* ============================================
   Tooltip Animation
   ============================================ */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    padding: 8px 12px;
    background: var(--bg-darker);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
}

.tooltip:hover::after {
    transform: translateX(-50%) translateY(-5px);
    opacity: 1;
    visibility: visible;
}

/* ============================================
   Notification Pop Animation
   ============================================ */
.notification-pop {
    animation: notificationPop 0.5s ease;
}

@keyframes notificationPop {
    0% {
        opacity: 0;
        transform: translateY(-20px) scale(0.9);
    }
    50% {
        transform: translateY(5px) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ============================================
   Skeleton Loading Animation
   ============================================ */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-glass) 25%,
        rgba(255, 255, 255, 0.1) 50%,
        var(--bg-glass) 75%
    );
    background-size: 200% 100%;
    animation: skeleton 1.5s ease-in-out infinite;
}

@keyframes skeleton {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================
   Disable animations for reduced motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
