/**
 * Mira SaaS — Estilos CSS Principales
 * Tailwind CSS + Custom CSS Variables & Component Styles
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@500;700&display=swap');

:root {
    --theme-bg: #ffffff;
    --theme-btn: #0f172a;
    --theme-text: #ffffff;
    --theme-accent: #6366f1;
}

/* ─── Temas Predefinidos de Perfil ───────────────────────── */

/* 1. Minimal Clean */
.theme-minimal {
    --theme-bg: #ffffff;
    --theme-btn: #18181b;
    --theme-text: #ffffff;
    --theme-accent: #18181b;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* 2. Dark Modern (Glassmorphism) */
.theme-dark {
    --theme-bg: #090d16;
    --theme-btn: rgba(255, 255, 255, 0.08);
    --theme-text: #f8fafc;
    --theme-accent: #a855f7;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* 3. Vibrant Pop (Retro Web) */
.theme-vibrant {
    --theme-bg: #f59e0b;
    --theme-btn: #ffffff;
    --theme-text: #000000;
    --theme-accent: #ec4899;
    font-family: 'Space Grotesk', cursive, sans-serif;
}

/* 4. Sunset Warm (Atardecer Cálido) */
.theme-sunset {
    --theme-bg: #fff7ed;
    --theme-btn: #ea580c;
    --theme-text: #431407;
    --theme-accent: #f97316;
    font-family: 'Outfit', sans-serif;
}

/* 5. Cyber Neon Matrix */
.theme-cyber {
    --theme-bg: #050505;
    --theme-btn: rgba(6, 182, 212, 0.15);
    --theme-text: #06b6d4;
    --theme-accent: #22d3ee;
    font-family: 'Space Grotesk', monospace, sans-serif;
}

/* 6. Forest & Mint (Verde Bosque) */
.theme-forest {
    --theme-bg: #f0fdf4;
    --theme-btn: #059669;
    --theme-text: #064e3b;
    --theme-accent: #10b981;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* ─── Estilos de Botón (Plan Plus & Free) ─────────────────── */
.btn-style-shadow {
    box-shadow: 4px 4px 0px 0px rgba(15, 23, 42, 0.9) !important;
    border: 2px solid #0f172a !important;
}

.btn-style-outline {
    background-color: transparent !important;
    background-image: none !important;
    border: 2px solid var(--theme-btn, currentColor) !important;
}

/* ─── Animaciones Spotlight (Plan Plus) ──────────────────── */
@keyframes pulseSoft {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.025); }
}

@keyframes bounceSoft {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

@keyframes glowGleam {
    0%, 100% { box-shadow: 0 0 10px rgba(99, 102, 241, 0.4); }
    50% { box-shadow: 0 0 24px rgba(236, 72, 153, 0.8), 0 0 8px rgba(99, 102, 241, 0.6); }
}

.spotlight-pulse {
    animation: pulseSoft 2s ease-in-out infinite !important;
}

.spotlight-bounce {
    animation: bounceSoft 1.8s ease-in-out infinite !important;
}

.spotlight-glow {
    animation: glowGleam 2.5s ease-in-out infinite !important;
}

/* ─── Glassmorphism Utility ─────────────────────────────── */
.glass-panel {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

/* ─── Smartphone Mockup Frame ────────────────────────────── */
.phone-mockup-outer {
    position: relative;
    width: 320px;
    height: 640px;
    background: #0f172a;
    border-radius: 48px;
    padding: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.phone-mockup-inner {
    width: 100%;
    height: 100%;
    border-radius: 38px;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
}

/* Scrollbar sutil para el preview */
.phone-mockup-inner::-webkit-scrollbar {
    width: 4px;
}
.phone-mockup-inner::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
}

/* ─── Animaciones ────────────────────────────────────────── */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        opacity: 0.4;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.animate-pulse-glow {
    animation: pulseGlow 6s ease-in-out infinite;
}



/* ─── Efectos Visuales Prémium Plan Plus ─────────────────── */
@keyframes meshShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes auroraShift {
    0%, 100% { filter: hue-rotate(0deg) brightness(1); }
    50% { filter: hue-rotate(35deg) brightness(1.15); }
}

.effect-mesh-gradient {
    background: linear-gradient(135deg, var(--theme-bg, #0f172a), #4338ca, #ec4899, #06b6d4, var(--theme-bg, #0f172a)) !important;
    background-size: 300% 300% !important;
    animation: meshShift 16s ease infinite !important;
}

.effect-aurora-wave {
    background: radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.45) 0%, transparent 45%),
                radial-gradient(circle at 90% 80%, rgba(236, 72, 153, 0.4) 0%, transparent 45%),
                radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.3) 0%, transparent 60%),
                var(--theme-bg, #090d16) !important;
    background-size: 150% 150% !important;
    animation: auroraShift 12s ease-in-out infinite !important;
}

.effect-glassmorphism .preview-link-item,
.effect-glassmorphism .theme-glass-card,
.effect-glassmorphism .theme-minimal-card,
.effect-glassmorphism .theme-pop-card,
.effect-glassmorphism .profile-link-btn {
    background-color: rgba(255, 255, 255, 0.16) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(255, 255, 255, 0.28) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.22) !important;
}

.effect-subtle-float .preview-link-item,
.effect-subtle-float .theme-glass-card,
.effect-subtle-float .theme-minimal-card,
.effect-subtle-float .theme-pop-card,
.effect-subtle-float .profile-link-btn {
    box-shadow: 0 10px 20px -3px rgba(0, 0, 0, 0.22), 0 4px 6px -2px rgba(0, 0, 0, 0.12) !important;
    transform: translateY(-2px);
    transition: all 0.25s ease !important;
}

.effect-neon-glow .preview-link-item,
.effect-neon-glow a.group,
.effect-neon-glow button.group,
.effect-neon-glow .profile-link-btn {
    box-shadow: 0 0 15px var(--glow-color, rgba(99, 102, 241, 0.5)), 0 0 30px var(--glow-color-subtle, rgba(99, 102, 241, 0.25)) !important;
    transition: all 0.25s ease !important;
}

.effect-interactive-border .preview-link-item:not(.btn-style-outline),
.effect-interactive-border a.group:not(.btn-style-outline),
.effect-interactive-border button.group:not(.btn-style-outline),
.effect-interactive-border .profile-link-btn:not(.btn-style-outline) {
    border: 2px solid transparent !important;
    background-origin: border-box !important;
    background-clip: padding-box, border-box !important;
    -webkit-background-clip: padding-box, border-box !important;
    background-image: linear-gradient(to right, var(--theme-btn, #0f172a), var(--theme-btn, #0f172a)), linear-gradient(135deg, #6366f1, #ec4899, #06b6d4) !important;
    transition: all 0.25s ease !important;
}

.effect-interactive-border .preview-link-item.btn-style-outline,
.effect-interactive-border a.group.btn-style-outline,
.effect-interactive-border a.btn-style-outline,
.effect-interactive-border button.btn-style-outline,
.effect-interactive-border .profile-link-btn.btn-style-outline {
    background-color: transparent !important;
    background-image: none !important;
    border: 2px solid transparent !important;
    position: relative !important;
    transition: all 0.25s ease !important;
}

.effect-interactive-border .preview-link-item.btn-style-outline::before,
.effect-interactive-border a.group.btn-style-outline::before,
.effect-interactive-border a.btn-style-outline::before,
.effect-interactive-border button.btn-style-outline::before,
.effect-interactive-border .profile-link-btn.btn-style-outline::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(135deg, #6366f1, #ec4899, #06b6d4);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 0;
}

/* ── Nuevos Efectos de Fondo ── */
@keyframes gridMove {
    0% { background-position: 0 0; }
    100% { background-position: 36px 36px; }
}

.effect-cyber-grid {
    background-color: var(--theme-bg, #090d16) !important;
    background-image: 
        linear-gradient(to right, rgba(99, 102, 241, 0.18) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(99, 102, 241, 0.18) 1px, transparent 1px) !important;
    background-size: 36px 36px !important;
    animation: gridMove 18s linear infinite !important;
}

@keyframes nebulaPulse {
    0%, 100% {
        background-size: 140% 140%, 130% 130%, 100% 100%;
        filter: hue-rotate(0deg) saturate(1);
    }
    50% {
        background-size: 165% 165%, 150% 150%, 100% 100%;
        filter: hue-rotate(30deg) saturate(1.35);
    }
}

.effect-cosmic-nebula {
    background: 
        radial-gradient(ellipse at 20% 30%, rgba(147, 51, 234, 0.5) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 70%, rgba(59, 130, 246, 0.45) 0%, transparent 55%),
        radial-gradient(circle at 50% 50%, rgba(236, 72, 153, 0.35) 0%, transparent 65%),
        var(--theme-bg, #09090b) !important;
    background-size: 140% 140%, 130% 130%, 100% 100% !important;
    animation: nebulaPulse 14s ease-in-out infinite !important;
}

/* ── Nuevos Efectos de Tarjetas: Shimmer ── */
@keyframes shimmerSweep {
    0% {
        transform: translateX(-160%) skewX(-20deg);
    }
    30%, 100% {
        transform: translateX(260%) skewX(-20deg);
    }
}

.effect-card-shimmer .preview-link-item,
.effect-card-shimmer .theme-glass-card,
.effect-card-shimmer .theme-minimal-card,
.effect-card-shimmer .theme-pop-card,
.effect-card-shimmer .theme-sunset-card,
.effect-card-shimmer .theme-cyber-card,
.effect-card-shimmer .theme-forest-card,
.effect-card-shimmer .profile-link-btn {
    position: relative;
    overflow: hidden !important;
}

.effect-card-shimmer .preview-link-item::after,
.effect-card-shimmer .theme-glass-card::after,
.effect-card-shimmer .theme-minimal-card::after,
.effect-card-shimmer .theme-pop-card::after,
.effect-card-shimmer .theme-sunset-card::after,
.effect-card-shimmer .theme-cyber-card::after,
.effect-card-shimmer .theme-forest-card::after,
.effect-card-shimmer .profile-link-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.28),
        transparent
    );
    animation: shimmerSweep 3.5s ease-in-out infinite;
    pointer-events: none;
}

/* ── Nuevos Efectos de Botones: Aura Pulse ── */
@keyframes auraPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 var(--glow-color, rgba(99, 102, 241, 0.6)),
                    0 4px 14px 0 rgba(0, 0, 0, 0.12);
    }
    50% {
        box-shadow: 0 0 0 7px var(--glow-color-subtle, rgba(99, 102, 241, 0.2)),
                    0 6px 22px 0 var(--glow-color, rgba(99, 102, 241, 0.4));
    }
}

.effect-button-pulse .preview-link-item,
.effect-button-pulse a.group,
.effect-button-pulse button.group,
.effect-button-pulse .profile-link-btn {
    animation: auraPulse 3s ease-in-out infinite !important;
    transition: all 0.25s ease !important;
}

/* ── Lienzo Canvas para Partículas ── */
.mira-particles-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}
