/**
 * VOCES ANÓNIMAS - Premium Animations & Transitions
 * Shared CSS file for all pages
 */

/* ========== PREMIUM KEYFRAME ANIMATIONS ========== */

/* Floating animation with rotation */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    25% {
        transform: translateY(-10px) rotate(2deg);
    }

    50% {
        transform: translateY(-20px) rotate(0deg);
    }

    75% {
        transform: translateY(-10px) rotate(-2deg);
    }
}

/* Heartbeat pulse with glow */
@keyframes heartbeat {

    0%,
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.3));
    }

    10%,
    30% {
        transform: scale(1.1);
        filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.5));
    }

    20% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 25px rgba(255, 255, 255, 0.4));
    }
}

/* Smooth pulse glow */
@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(124, 136, 204, 0.3),
            0 0 40px rgba(124, 136, 204, 0.1);
    }

    50% {
        box-shadow: 0 0 40px rgba(124, 136, 204, 0.5),
            0 0 80px rgba(124, 136, 204, 0.2);
    }
}

/* Slide in from bottom with bounce */
@keyframes slide-in-bottom {
    0% {
        transform: translateY(40px);
        opacity: 0;
    }

    60% {
        transform: translateY(-8px);
        opacity: 1;
    }

    80% {
        transform: translateY(4px);
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Slide in from left */
@keyframes slide-in-left {
    0% {
        transform: translateX(-40px);
        opacity: 0;
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Slide in from right */
@keyframes slide-in-right {
    0% {
        transform: translateX(40px);
        opacity: 0;
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Scale in with bounce */
@keyframes scale-in {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    60% {
        transform: scale(1.05);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Fade in with blur */
@keyframes fade-in-blur {
    0% {
        opacity: 0;
        filter: blur(10px);
    }

    100% {
        opacity: 1;
        filter: blur(0);
    }
}

/* Fade in simple */
@keyframes fade-in {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

/* Fade out */
@keyframes fade-out {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

/* Slide out right */
@keyframes slideOutRight {
    0% {
        transform: translateX(0);
        opacity: 1;
    }

    100% {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Gentle bounce for icons */
@keyframes gentle-bounce {

    0%,
    100% {
        transform: scale(1) translateY(0);
    }

    50% {
        transform: scale(1.08) translateY(-5px);
    }
}

/* Shimmer effect for buttons */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* Floating orbs animation */
@keyframes orb-float-1 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(30px, -40px) scale(1.1);
    }

    50% {
        transform: translate(-20px, -80px) scale(0.9);
    }

    75% {
        transform: translate(40px, -40px) scale(1.05);
    }
}

@keyframes orb-float-2 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(-40px, -60px) scale(1.15);
    }

    66% {
        transform: translate(30px, -30px) scale(0.85);
    }
}

@keyframes orb-float-3 {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    50% {
        transform: translate(-50px, -100px) rotate(180deg);
    }
}

/* Ripple effect */
@keyframes ripple {
    0% {
        transform: scale(1);
        opacity: 0.4;
    }

    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

/* Wiggle for emojis */
@keyframes wiggle {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-8deg);
    }

    75% {
        transform: rotate(8deg);
    }
}

/* Glow pulse for selections */
@keyframes glow-pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(124, 136, 204, 0.4);
    }

    50% {
        box-shadow: 0 0 0 10px rgba(124, 136, 204, 0);
    }
}

/* Text gradient animation */
@keyframes gradient-text {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* Spin once */
@keyframes spin-once {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Loading spinner */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Pulse scale */
@keyframes pulse-scale {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* Loading dots */
@keyframes loading-dots {

    0%,
    80%,
    100% {
        transform: scale(0);
        opacity: 0;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ========== STAGGER ANIMATION DELAYS ========== */
.stagger-1 {
    animation-delay: 0.1s;
}

.stagger-2 {
    animation-delay: 0.2s;
}

.stagger-3 {
    animation-delay: 0.3s;
}

.stagger-4 {
    animation-delay: 0.4s;
}

.stagger-5 {
    animation-delay: 0.5s;
}

/* ========== ANIMATION CLASSES ========== */

.float-animation {
    animation: float 6s ease-in-out infinite;
}

.heartbeat {
    animation: heartbeat 1.5s ease-in-out infinite;
}

.pulse-glow {
    animation: pulse-glow 3s ease-in-out infinite;
}

.gentle-bounce {
    animation: gentle-bounce 2s ease-in-out infinite;
}

.fade-in {
    animation: fade-in 0.5s ease-out both;
}

.fade-in-blur {
    animation: fade-in-blur 0.6s ease-out both;
}

.scale-in {
    animation: scale-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.slide-in-left {
    animation: slide-in-left 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.slide-in-right {
    animation: slide-in-right 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.mobile-optimized {
    animation: slide-in-bottom 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* ========== HOVER EFFECTS ========== */

.hover-lift {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.3),
        0 0 40px rgba(124, 136, 204, 0.15);
}

/* Button with shimmer effect */
.btn-shimmer {
    position: relative;
    overflow: hidden;
}

.btn-shimmer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn-shimmer:hover::before {
    left: 100%;
}

/* Ripple effect on click */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 50%;
    left: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 60%);
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    transition: transform 0.5s, opacity 0.3s;
}

.btn-ripple:active::after {
    transform: translate(-50%, -50%) scale(2);
    opacity: 1;
    transition: 0s;
}

/* Icon hover effects */
.icon-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.icon-hover:hover {
    transform: scale(1.2) rotate(10deg);
}

.icon-spin:hover i {
    animation: spin-once 0.5s ease-in-out;
}

/* Card hover glow */
.card-glow {
    transition: all 0.4s ease;
    position: relative;
}

.card-glow::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: linear-gradient(135deg, #7C88CC, #9BA4D4, #7C88CC);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.4s ease;
}

.card-glow:hover::before {
    opacity: 0.5;
    filter: blur(15px);
}

/* Input animations */
.input-animated {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-animated:focus {
    transform: translateY(-2px);
    box-shadow: 0 0 0 4px rgba(124, 136, 204, 0.15),
        0 4px 20px rgba(124, 136, 204, 0.1);
}

/* ========== FLOATING ORBS BACKGROUND ========== */

.orbs-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.4;
}

.orb-1 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(124, 136, 204, 0.6) 0%, transparent 70%);
    top: 10%;
    left: 10%;
    animation: orb-float-1 15s ease-in-out infinite;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(155, 164, 212, 0.5) 0%, transparent 70%);
    top: 50%;
    right: 5%;
    animation: orb-float-2 20s ease-in-out infinite;
}

.orb-3 {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(107, 207, 127, 0.3) 0%, transparent 70%);
    bottom: 20%;
    left: 30%;
    animation: orb-float-3 18s ease-in-out infinite;
}

.orb-4 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 184, 77, 0.3) 0%, transparent 70%);
    top: 30%;
    right: 30%;
    animation: orb-float-1 12s ease-in-out infinite reverse;
}

/* ========== LOADING SCREEN ========== */
/* Los estilos de loading están en js/loading.js (inline styles) */

/* ========== MOBILE OPTIMIZATIONS ========== */

/* ========== HEADER STYLES ========== */

.mobile-header {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 249, 252, 0.98) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(124, 136, 204, 0.15);
    animation: slide-in-bottom 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== NAVIGATION STYLES ========== */

.mobile-nav {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 1) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
}

.mobile-nav-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav-item:active {
    transform: scale(0.95);
}

.mobile-nav-item.active .nav-icon {
    background: linear-gradient(135deg, #7C88CC 0%, #9BA4D4 100%);
    color: white;
    box-shadow: 0 8px 25px rgba(124, 136, 204, 0.4);
    animation: gentle-bounce 2s ease-in-out infinite;
}

.mobile-nav-item.active .nav-label {
    color: #7C88CC;
    font-weight: 700;
}

.nav-icon {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-icon:hover {
    transform: translateY(-3px);
}

/* ========== CARD IMPROVEMENTS ========== */

@media (max-width: 768px) {
    .mobile-card {
        border-radius: 1.5rem;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    }
}

/* ========== SCROLLBAR ========== */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 10px;
    transition: background 0.3s;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.8);
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.6) rgba(255, 255, 255, 0.1);
}

/* ========== HERO SECTION ========== */

.hero-icon {
    animation: heartbeat 1.5s ease-in-out infinite, float 6s ease-in-out infinite;
}

.hero-title {
    background: linear-gradient(135deg, #ffffff 0%, #e8eaf6 50%, #ffffff 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-text 4s ease infinite;
}

@media (max-width: 768px) {
    .hero-icon {
        font-size: 4rem !important;
    }

    .hero-title {
        font-size: 2rem !important;
        line-height: 1.2 !important;
    }

    .hero-subtitle {
        font-size: 1rem !important;
    }
}

/* ========== PAGE CONTENT ANIMATION ========== */

.page-content {
    opacity: 0;
    animation: fade-in-blur 0.8s ease-out 0.3s forwards;
}

.page-content.loaded {
    animation: none;
    opacity: 1;
}