/**
 * 🌟 StoryVerse Effects - Efeitos Especiais Disruptivos
 * Efeitos avançados para o universo mágico das histórias
 */

/* ===== CANVAS DE PARTÍCULAS ===== */
.storyverse-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.6;
}

.storyverse-body {
    background: linear-gradient(135deg, 
        #667eea 0%, 
        #764ba2 25%, 
        #f093fb 50%, 
        #f5576c 75%, 
        #4facfe 100%
    );
    background-size: 400% 400%;
    animation: gradientShift 20s ease infinite;
    min-height: 100vh;
    position: relative;
}

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

/* ===== EFEITOS DE LENTE ===== */
.lens-effect {
    position: relative;
    overflow: hidden;
    cursor: none;
}

.lens-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        circle 150px at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(255, 255, 255, 0.2) 0%,
        rgba(255, 255, 255, 0.1) 30%,
        transparent 60%
    );
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.lens-effect:hover::before {
    opacity: 1;
}

/* ===== ELEMENTOS MORFING ===== */
.morphing-element {
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-origin: center;
}

.morphing-element:hover {
    transform: scale(1.1) rotate(5deg);
    filter: hue-rotate(45deg) saturate(1.5);
}

.morphing-card {
    background: linear-gradient(145deg, 
        rgba(255, 255, 255, 0.9) 0%, 
        rgba(255, 255, 255, 0.7) 100%
    );
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

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

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

.morphing-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* ===== TRANSIÇÕES CINEMATOGRÁFICAS ===== */
.cinematic-entrance {
    opacity: 0;
    transform: translateY(100px) scale(0.8);
    transition: all 1s cubic-bezier(0.23, 1, 0.320, 1);
}

.cinematic-entrance.active {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #667eea, #764ba2);
    z-index: 9999;
    transform: translateX(-100%);
    transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1);
}

.page-transition.active {
    transform: translateX(0);
}

/* ===== EFEITOS DE HOVER AVANÇADOS ===== */
.hover-lift {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.hover-lift:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.1),
        0 0 20px rgba(255, 107, 157, 0.3);
}

.hover-glow {
    position: relative;
    overflow: hidden;
}

.hover-glow::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(
        circle,
        rgba(255, 107, 157, 0.6) 0%,
        rgba(78, 205, 196, 0.4) 50%,
        transparent 70%
    );
    transition: all 0.4s ease;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: -1;
}

.hover-glow:hover::after {
    width: 200%;
    height: 200%;
}

/* ===== PARTÍCULAS MÁGICAS ===== */
.magic-particle-system {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.magic-particle {
    position: absolute;
    border-radius: 50%;
    animation: particleFloat 6s linear infinite;
    opacity: 0;
}

@keyframes particleFloat {
    0% {
        opacity: 0;
        transform: translateY(100vh) scale(0);
    }
    10% {
        opacity: 1;
        transform: translateY(90vh) scale(1);
    }
    90% {
        opacity: 1;
        transform: translateY(-10vh) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-20vh) scale(0);
    }
}

/* ===== EFEITOS DE TEXTO MÁGICO ===== */
.magic-text {
    background: linear-gradient(
        45deg,
        #ff6b9d,
        #4ecdc4,
        #45b7d1,
        #dda0dd,
        #ffd700
    );
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textShimmer 3s ease-in-out infinite;
    font-weight: 700;
}

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

.magic-text-glow {
    text-shadow: 
        0 0 10px rgba(255, 107, 157, 0.8),
        0 0 20px rgba(78, 205, 196, 0.6),
        0 0 30px rgba(69, 183, 209, 0.4);
    animation: textGlow 2s ease-in-out infinite alternate;
}

@keyframes textGlow {
    from {
        text-shadow: 
            0 0 10px rgba(255, 107, 157, 0.8),
            0 0 20px rgba(78, 205, 196, 0.6),
            0 0 30px rgba(69, 183, 209, 0.4);
    }
    to {
        text-shadow: 
            0 0 20px rgba(255, 107, 157, 1),
            0 0 30px rgba(78, 205, 196, 0.8),
            0 0 40px rgba(69, 183, 209, 0.6);
    }
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {
    .storyverse-canvas {
        opacity: 0.3;
    }
    
    .floating-element {
        font-size: 2rem !important;
    }
    
    .magic-particle {
        display: none;
    }
    
    .lens-effect::before {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .storyverse-canvas,
    .magic-particle,
    .floating-element {
        animation: none;
    }
    
    .morphing-element,
    .morphing-card,
    .hover-lift {
        transition: none;
    }
}
