/**
 * Deepswag Dance Studio - Animations & Effects
 * Modern 2025 animation styles
 */

/* ==================== KEYFRAME ANIMATIONS ==================== */

/* Fade In Up */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In Down */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In Left */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Fade In Right */
@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scale In */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Rotate In */
@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-180deg) scale(0.5);
    }
    to {
        opacity: 1;
        transform: rotate(0) scale(1);
    }
}

/* Bounce */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

/* Pulse */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

/* Glow Pulse */
@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 0, 110, 0.6), 0 0 40px rgba(255, 0, 110, 0.4);
    }
    50% {
        box-shadow: 0 0 30px rgba(255, 0, 110, 0.8), 0 0 60px rgba(255, 0, 110, 0.6);
    }
}

/* Shake */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

/* Float */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Slide In Blur */
@keyframes slideInBlur {
    from {
        opacity: 0;
        transform: translateX(-100px);
        filter: blur(10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
        filter: blur(0);
    }
}

/* Neon Glow */
@keyframes neonGlow {
    0%, 100% {
        text-shadow: 0 0 10px rgba(255, 0, 110, 0.8),
                     0 0 20px rgba(255, 0, 110, 0.6),
                     0 0 30px rgba(255, 0, 110, 0.4);
    }
    50% {
        text-shadow: 0 0 20px rgba(255, 0, 110, 1),
                     0 0 40px rgba(255, 0, 110, 0.8),
                     0 0 60px rgba(255, 0, 110, 0.6);
    }
}

/* Gradient Shift */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* ==================== CLASS CARD ANIMATIONS ==================== */

.class-card {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.class-image {
    position: relative;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
    height: 300px;
}

.class-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.class-card:hover .class-image img {
    transform: scale(1.1);
}

.class-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 0, 110, 0.9) 0%, rgba(139, 92, 246, 0.9) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.class-card:hover .class-overlay {
    opacity: 1;
}

.class-content {
    padding: 25px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0 0 20px 20px;
}

.class-meta {
    display: flex;
    gap: 20px;
    margin-top: 15px;
    color: var(--text-gray);
    font-size: 0.9rem;
}

.class-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ==================== STATS SECTION ANIMATIONS ==================== */

.stats-section {
    background: linear-gradient(135deg, rgba(255, 0, 110, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    position: relative;
    overflow: hidden;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 0, 110, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

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

.stat-card {
    background: rgba(10, 10, 10, 0.8);
    border: 2px solid rgba(255, 0, 110, 0.3);
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.5s ease;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(135deg, rgba(255, 0, 110, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
    transform: rotate(45deg);
    transition: all 0.5s ease;
}

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

.stat-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 20px 50px rgba(255, 0, 110, 0.4);
}

.stat-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: pulse 2s ease-in-out infinite;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 10px 0;
}

.stat-label {
    color: var(--text-gray);
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ==================== TESTIMONIALS ANIMATIONS ==================== */

.testimonials-section {
    position: relative;
    overflow: hidden;
}

.testimonials-slider {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    min-height: 300px;
}

.testimonial-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 0, 110, 0.3);
    border-radius: 20px;
    padding: 40px;
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.5s ease;
    pointer-events: none;
}

.testimonial-card.active {
    position: relative;
    opacity: 1;
    transform: translateX(0);
    pointer-events: all;
}

.testimonial-rating {
    color: #FFD700;
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.testimonial-text {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-gray);
    font-style: italic;
    margin-bottom: 30px;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 20px;
}

.testimonial-author img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid var(--primary-color);
    object-fit: cover;
}

.testimonial-author h4 {
    color: var(--text-white);
    margin-bottom: 5px;
}

.testimonial-author p {
    color: var(--text-gray);
    font-size: 0.9rem;
    margin: 0;
}

.testimonial-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
}

.testimonial-prev,
.testimonial-next {
    width: 50px;
    height: 50px;
    border: 2px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.testimonial-prev:hover,
.testimonial-next:hover {
    background: var(--primary-color);
    color: var(--text-white);
    box-shadow: var(--glow-pink);
    transform: scale(1.1);
}

/* ==================== CTA SECTION ANIMATIONS ==================== */

.cta-section {
    background: linear-gradient(135deg, rgba(255, 0, 110, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,0,110,0.1)" 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"></path></svg>') no-repeat bottom;
    background-size: cover;
    animation: wave 10s ease-in-out infinite;
}

@keyframes wave {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(-50px);
    }
}

.cta-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.cta-content h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 20px;
    animation: neonGlow 2s ease-in-out infinite;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 30px;
}

/* ==================== CUSTOM CURSOR ==================== */

.custom-cursor {
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
    transition: transform 0.2s ease;
}

.custom-cursor.hover {
    transform: scale(2);
}

.cursor-follower {
    width: 40px;
    height: 40px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    transition: transform 0.3s ease;
}

.cursor-follower.hover {
    transform: scale(1.5);
}

/* ==================== NOTIFICATION ==================== */

.notification {
    position: fixed;
    top: 100px;
    right: -400px;
    background: rgba(10, 10, 10, 0.95);
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    padding: 20px 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 10000;
    transition: right 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.notification.show {
    right: 30px;
}

.notification i {
    font-size: 1.5rem;
}

.notification.success {
    border-color: #10b981;
    color: #10b981;
}

.notification.error {
    border-color: #ef4444;
    color: #ef4444;
}

/* ==================== PRELOADER ==================== */

.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-darker);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.5s ease;
}

.preloader-content {
    text-align: center;
}

.preloader-logo {
    font-size: 3rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: pulse 1.5s ease-in-out infinite;
}

.preloader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 0, 110, 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

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

/* ==================== FORM INPUT ANIMATIONS ==================== */

input.error,
textarea.error,
select.error {
    border-color: #ef4444 !important;
    animation: shake 0.5s ease;
}

input:focus,
textarea:focus,
select:focus {
    animation: glowPulse 1s ease-in-out;
}

/* ==================== HOVER EFFECTS ==================== */

.hover-lift {
    transition: transform 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-10px);
}

.hover-glow:hover {
    animation: glowPulse 1s ease-in-out infinite;
}

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* ==================== MOBILE OPTIMIZATIONS ==================== */

@media (max-width: 768px) {
    .custom-cursor,
    .cursor-follower {
        display: none;
    }
    
    .particle {
        display: none;
    }
}
