/* Respira Mejor - Estilos Personalizados */

/* Fuentes personalizadas */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

body {
    font-family: 'Inter', 'Arial', sans-serif;
    scroll-behavior: smooth;
}

/* Animaciones personalizadas */
@keyframes breathe {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
    }
    50% { 
        transform: scale(1.1);
        box-shadow: 0 0 30px rgba(59, 130, 246, 0.6);
    }
}

@keyframes pulse-gentle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Clases de utilidad */
.animate-breathe {
    animation: breathe 4s ease-in-out infinite;
}

.animate-pulse-gentle {
    animation: pulse-gentle 2s ease-in-out infinite;
}

.animate-slide-in-up {
    animation: slideInUp 0.6s ease-out;
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-in;
}

/* Estilos del círculo de respiración */
.breathing-circle {
    background: radial-gradient(circle, #3B82F6 0%, #1E40AF 50%, #1E3A8A 100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.breathing-circle.active {
    animation: breathe 4s ease-in-out infinite;
}

.breathing-circle:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4);
}

/* Estilos de navegación */
.nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #3B82F6, #8B5CF6);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Estilos de tarjetas */
.exercise-card,
.achievement-card {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.exercise-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.achievement-card:hover {
    transform: translateY(-2px);
}

/* Estilos de botones */
.btn-primary {
    background: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
    background: white;
    color: #3B82F6;
    border: 2px solid #3B82F6;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary:hover {
    background: #EFF6FF;
    transform: translateY(-1px);
}

/* Estilos del slider de rango */
.slider {
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    border-radius: 4px;
    background: #E5E7EB;
    outline: none;
    transition: all 0.3s ease;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3B82F6, #8B5CF6);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.5);
}

.slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3B82F6, #8B5CF6);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* Estilos del modal */
.modal-backdrop {
    backdrop-filter: blur(8px);
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

/* Estilos de progreso */
.progress-bar {
    background: linear-gradient(90deg, #3B82F6, #8B5CF6);
    border-radius: 9999px;
    transition: width 0.5s ease-out;
}

.progress-container {
    background: #E5E7EB;
    border-radius: 9999px;
    overflow: hidden;
}

/* Estilos de las estrellas de rating */
.rating-star {
    cursor: pointer;
    transition: all 0.2s ease;
}

.rating-star:hover {
    transform: scale(1.2);
}

/* Estilos responsivos mejorados */
@media (max-width: 768px) {
    .exercise-card:hover {
        transform: none;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .breathing-circle {
        width: 80px !important;
        height: 80px !important;
    }
}

/* Estilos de filtros */
.filter-btn {
    transition: all 0.3s ease;
    border-radius: 9999px;
    font-weight: 600;
    padding: 12px 24px;
    border: 2px solid transparent;
}

.filter-btn.active {
    background: linear-gradient(135deg, #3B82F6, #8B5CF6);
    color: white;
    border-color: transparent;
}

.filter-btn:not(.active) {
    background: rgba(255, 255, 255, 0.7);
    color: #4B5563;
    border-color: #D1D5DB;
}

.filter-btn:not(.active):hover {
    background: #F3F4F6;
    border-color: #9CA3AF;
}

/* Estilos del gráfico de progreso */
.chart-container {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 24px;
}

.chart-bar {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 4px 4px 0 0;
}

.chart-bar:hover {
    opacity: 0.8;
    transform: scaleY(1.05);
}

/* Efectos de glassmorphism */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.glass-strong {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* Estilos de carga y estados */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #3B82F6;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

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

/* Mejoras de accesibilidad */
.focus-visible:focus {
    outline: 2px solid #3B82F6;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Estilos de tooltip */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 120px;
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px 8px;
    font-size: 12px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Animaciones de entrada para las secciones */
.section-content {
    animation: slideInUp 0.6s ease-out;
}

/* Estilos del reproductor de audio */
.audio-card {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.featured-audio {
    animation: pulse-gentle 3s ease-in-out infinite;
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.2);
}

.featured-audio:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(245, 158, 11, 0.3);
}

.audio-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.audio-category-btn {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.audio-category-btn:hover {
    transform: translateY(-2px);
}

/* Estilos de los filtros de audio */
.audio-filter-btn {
    transition: all 0.3s ease;
    border-radius: 9999px;
    font-weight: 600;
    padding: 12px 24px;
    border: 2px solid transparent;
}

.audio-filter-btn.active {
    background: linear-gradient(135deg, #3B82F6, #8B5CF6);
    color: white;
    border-color: transparent;
}

.audio-filter-btn:not(.active) {
    background: rgba(255, 255, 255, 0.7);
    color: #4B5563;
    border-color: #D1D5DB;
}

.audio-filter-btn:not(.active):hover {
    background: #F3F4F6;
    border-color: #9CA3AF;
}

/* Estilos del reproductor principal */
#main-audio-player {
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    animation: slideInUp 0.5s ease-out;
}

/* Controles del reproductor de audio */
.audio-control-btn {
    transition: all 0.2s ease;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.audio-control-btn:hover {
    background: rgba(59, 130, 246, 0.1);
    transform: scale(1.1);
}

/* Barra de progreso del audio */
#audio-progress-container {
    position: relative;
    cursor: pointer;
    border-radius: 9999px;
    overflow: hidden;
}

#audio-progress-container:hover #audio-progress-bar {
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.5);
}

#audio-progress-bar {
    background: linear-gradient(90deg, #3B82F6, #8B5CF6);
    border-radius: 9999px;
    transition: all 0.3s ease;
}

/* Control de volumen personalizado */
#volume-control {
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    border-radius: 2px;
    background: #E5E7EB;
    outline: none;
    transition: all 0.3s ease;
}

#volume-control::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3B82F6, #8B5CF6);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
}

#volume-control::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.5);
}

#volume-control::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3B82F6, #8B5CF6);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

/* Animaciones del reproductor */
@keyframes audioWave {
    0%, 100% { height: 4px; }
    50% { height: 12px; }
}

.audio-wave {
    animation: audioWave 1s ease-in-out infinite;
}

.audio-wave:nth-child(2) { animation-delay: 0.1s; }
.audio-wave:nth-child(3) { animation-delay: 0.2s; }
.audio-wave:nth-child(4) { animation-delay: 0.3s; }

/* Notificaciones */
.notification {
    backdrop-filter: blur(10px);
    background: rgba(59, 130, 246, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Estados de carga para audio */
.audio-loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.audio-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #3B82F6;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

/* Estilos especiales para móviles */
@media (max-width: 640px) {
    .mobile-padding {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    .mobile-text-sm {
        font-size: 14px;
    }
    
    .mobile-hidden {
        display: none;
    }
    
    /* Ajustes del reproductor para móviles */
    #main-audio-player {
        margin: 0;
        border-radius: 16px 16px 0 0;
        bottom: 0;
    }
    
    .audio-card:hover {
        transform: none;
    }
    
    .audio-filter-btn {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    #volume-control {
        width: 60px;
    }
}

/* =======================================================
   ANIMACIÓN DE ENERGÍA VITAL PARA HEADER
   ======================================================= */

/* Contenedor principal de la animación de energía */
.vital-energy-container {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Núcleo central de energía */
.energy-core {
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, 
        rgba(255, 255, 255, 0.9), 
        #3B82F6 40%, 
        #8B5CF6 70%, 
        #1E40AF 100%
    );
    animation: energyPulse 3s ease-in-out infinite;
    z-index: 10;
    box-shadow: 
        0 0 20px rgba(59, 130, 246, 0.8),
        inset 0 0 20px rgba(255, 255, 255, 0.3);
}

/* Ondas de energía que se expanden */
.energy-wave {
    position: absolute;
    border-radius: 50%;
    border: 3px solid;
    animation: energyWaveExpand 4s ease-out infinite;
}

.energy-wave:nth-child(1) {
    border-color: rgba(59, 130, 246, 0.6);
    animation-delay: 0s;
}

.energy-wave:nth-child(2) {
    border-color: rgba(139, 92, 246, 0.5);
    animation-delay: 0.8s;
}

.energy-wave:nth-child(3) {
    border-color: rgba(255, 255, 255, 0.4);
    animation-delay: 1.6s;
}

.energy-wave:nth-child(4) {
    border-color: rgba(30, 64, 175, 0.3);
    animation-delay: 2.4s;
}

/* Auras de energía rotatorias */
.energy-aura {
    position: absolute;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        rgba(59, 130, 246, 0.3) 60deg,
        rgba(139, 92, 246, 0.5) 120deg,
        rgba(255, 255, 255, 0.4) 180deg,
        rgba(30, 64, 175, 0.3) 240deg,
        transparent 300deg,
        transparent 360deg
    );
    animation: energyAuraRotate 6s linear infinite;
}

.energy-aura:nth-child(5) {
    width: 90px;
    height: 90px;
    animation-direction: normal;
}

.energy-aura:nth-child(6) {
    width: 110px;
    height: 110px;
    animation-direction: reverse;
    animation-duration: 8s;
}

/* Chispas de luz que aparecen y desaparecen */
.energy-spark {
    position: absolute;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, #FFFFFF, #60A5FA);
    border-radius: 50%;
    animation: energySpark 2.5s ease-in-out infinite;
}

.energy-spark:nth-child(7) {
    top: 10%;
    left: 20%;
    animation-delay: 0s;
}

.energy-spark:nth-child(8) {
    top: 15%;
    right: 25%;
    animation-delay: 0.5s;
}

.energy-spark:nth-child(9) {
    bottom: 20%;
    left: 15%;
    animation-delay: 1s;
}

.energy-spark:nth-child(10) {
    bottom: 25%;
    right: 20%;
    animation-delay: 1.5s;
}

.energy-spark:nth-child(11) {
    top: 50%;
    left: 5%;
    animation-delay: 2s;
}

.energy-spark:nth-child(12) {
    top: 45%;
    right: 8%;
    animation-delay: 0.8s;
}

/* Animaciones keyframes */
@keyframes energyPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 
            0 0 20px rgba(59, 130, 246, 0.8),
            inset 0 0 20px rgba(255, 255, 255, 0.3);
    }
    25% {
        transform: scale(1.1);
        box-shadow: 
            0 0 30px rgba(139, 92, 246, 0.9),
            inset 0 0 25px rgba(255, 255, 255, 0.4);
    }
    50% {
        transform: scale(1.15);
        box-shadow: 
            0 0 40px rgba(255, 255, 255, 1),
            inset 0 0 30px rgba(139, 92, 246, 0.5);
    }
    75% {
        transform: scale(1.08);
        box-shadow: 
            0 0 35px rgba(30, 64, 175, 0.8),
            inset 0 0 25px rgba(255, 255, 255, 0.3);
    }
}

@keyframes energyWaveExpand {
    0% {
        width: 60px;
        height: 60px;
        opacity: 0.8;
        transform: scale(1);
    }
    50% {
        width: 90px;
        height: 90px;
        opacity: 0.5;
        transform: scale(1.1);
    }
    100% {
        width: 120px;
        height: 120px;
        opacity: 0;
        transform: scale(1.2);
    }
}

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

@keyframes energySpark {
    0%, 100% {
        opacity: 0;
        transform: scale(0.5) translateY(0px);
    }
    25% {
        opacity: 1;
        transform: scale(1) translateY(-5px);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.2) translateY(-8px);
    }
    75% {
        opacity: 0.6;
        transform: scale(0.8) translateY(-3px);
    }
}

/* Efectos hover para mayor interactividad */
.vital-energy-container:hover .energy-core {
    animation-duration: 1.5s;
    transform: scale(1.2);
}

.vital-energy-container:hover .energy-wave {
    animation-duration: 2s;
}

.vital-energy-container:hover .energy-aura {
    animation-duration: 3s;
}

.vital-energy-container:hover .energy-spark {
    animation-duration: 1.2s;
}

/* Responsividad para móviles */
@media (max-width: 768px) {
    .vital-energy-container {
        width: 80px;
        height: 80px;
    }
    
    .energy-core {
        width: 40px;
        height: 40px;
    }
    
    .energy-aura:nth-child(5) {
        width: 60px;
        height: 60px;
    }
    
    .energy-aura:nth-child(6) {
        width: 75px;
        height: 75px;
    }
}

/* =======================================================
   ANIMACIONES ESPECIALES PARA ARQUERO ZEN
   ======================================================= */

/* Animación del arco siendo tensado */
@keyframes zenArcherDraw {
    0% { 
        transform: scale(1) rotate(0deg);
        border-width: 3px;
        border-color: #8B5CF6;
        box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
    }
    25% { 
        transform: scale(1.05) rotate(1deg);
        border-width: 4px;
        border-color: #3B82F6;
        box-shadow: 0 0 25px rgba(59, 130, 246, 0.4);
    }
    50% { 
        transform: scale(1.1) rotate(-1deg);
        border-width: 5px;
        border-color: #1D4ED8;
        box-shadow: 0 0 30px rgba(29, 78, 216, 0.5);
    }
    75% { 
        transform: scale(1.08) rotate(0.5deg);
        border-width: 4px;
        border-color: #3730A3;
        box-shadow: 0 0 35px rgba(55, 48, 163, 0.6);
    }
    100% { 
        transform: scale(1.05) rotate(0deg);
        border-width: 3px;
        border-color: #312E81;
        box-shadow: 0 0 25px rgba(49, 46, 129, 0.4);
    }
}

/* Animación de liberación de la flecha */
@keyframes zenArcherRelease {
    0% { 
        transform: scale(1.1) rotate(0deg);
        border-width: 5px;
        border-color: #312E81;
        box-shadow: 0 0 40px rgba(49, 46, 129, 0.7);
    }
    20% { 
        transform: scale(0.95) rotate(-2deg);
        border-width: 2px;
        border-color: #1E40AF;
        box-shadow: 0 0 20px rgba(30, 64, 175, 0.5);
    }
    40% { 
        transform: scale(0.9) rotate(1deg);
        border-width: 1px;
        border-color: #3B82F6;
        box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
    }
    60% { 
        transform: scale(1.0) rotate(-0.5deg);
        border-width: 2px;
        border-color: #60A5FA;
        box-shadow: 0 0 25px rgba(96, 165, 250, 0.5);
    }
    80% { 
        transform: scale(1.05) rotate(0.2deg);
        border-width: 3px;
        border-color: #93C5FD;
        box-shadow: 0 0 30px rgba(147, 197, 253, 0.6);
    }
    100% { 
        transform: scale(1) rotate(0deg);
        border-width: 3px;
        border-color: #DBEAFE;
        box-shadow: 0 0 20px rgba(219, 234, 254, 0.4);
    }
}

/* Animación de contemplación después de la liberación */
@keyframes zenArcherContemplation {
    0% { 
        transform: scale(1);
        opacity: 1;
        box-shadow: 0 0 20px rgba(219, 234, 254, 0.4);
    }
    50% { 
        transform: scale(0.98);
        opacity: 0.7;
        box-shadow: 0 0 15px rgba(147, 197, 253, 0.3);
    }
    100% { 
        transform: scale(1);
        opacity: 1;
        box-shadow: 0 0 20px rgba(96, 165, 250, 0.4);
    }
}

/* Clases de animación para el Arquero Zen */
.zen-archer-draw {
    animation: zenArcherDraw 6s ease-in-out;
}

.zen-archer-hold {
    animation: pulse-gentle 4s ease-in-out;
    border: 5px solid #312E81;
    box-shadow: 0 0 40px rgba(49, 46, 129, 0.7);
}

.zen-archer-release {
    animation: zenArcherRelease 8s ease-out;
}

.zen-archer-contemplation {
    animation: zenArcherContemplation 2s ease-in-out;
}

/* Partículas de energía para el Arquero Zen */
@keyframes zenParticleFloat {
    0% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.8;
    }
    25% {
        transform: translateY(-10px) rotate(90deg);
        opacity: 1;
    }
    50% {
        transform: translateY(-5px) rotate(180deg);
        opacity: 0.9;
    }
    75% {
        transform: translateY(-15px) rotate(270deg);
        opacity: 0.7;
    }
    100% {
        transform: translateY(0px) rotate(360deg);
        opacity: 0.8;
    }
}

.zen-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, #60A5FA, #3B82F6);
    border-radius: 50%;
    animation: zenParticleFloat 3s ease-in-out infinite;
}

.zen-particle:nth-child(1) { 
    top: 20%; 
    left: 15%; 
    animation-delay: 0s; 
}
.zen-particle:nth-child(2) { 
    top: 30%; 
    right: 20%; 
    animation-delay: 0.5s; 
}
.zen-particle:nth-child(3) { 
    bottom: 25%; 
    left: 25%; 
    animation-delay: 1s; 
}
.zen-particle:nth-child(4) { 
    bottom: 35%; 
    right: 15%; 
    animation-delay: 1.5s; 
}
.zen-particle:nth-child(5) { 
    top: 50%; 
    left: 10%; 
    animation-delay: 2s; 
}
.zen-particle:nth-child(6) { 
    top: 60%; 
    right: 25%; 
    animation-delay: 2.5s; 
}

/* Animación especial para Mente de Principiante */
@keyframes beginnersMindReset {
    0% { 
        transform: scale(1);
        filter: hue-rotate(0deg);
        opacity: 1;
    }
    50% { 
        transform: scale(0.95);
        filter: hue-rotate(180deg);
        opacity: 0.8;
    }
    100% { 
        transform: scale(1);
        filter: hue-rotate(360deg);
        opacity: 1;
    }
}

.zen-beginners-mind {
    animation: beginnersMindReset 5s ease-in-out infinite;
}

/* Animación de bendición para San Francisco */
@keyframes blessingRadiance {
    0% { 
        transform: scale(1);
        box-shadow: 0 0 20px rgba(251, 191, 36, 0.3);
    }
    33% { 
        transform: scale(1.03);
        box-shadow: 0 0 30px rgba(245, 158, 11, 0.5);
    }
    66% { 
        transform: scale(1.05);
        box-shadow: 0 0 40px rgba(217, 119, 6, 0.7);
    }
    100% { 
        transform: scale(1);
        box-shadow: 0 0 20px rgba(194, 65, 12, 0.4);
    }
}

.zen-blessing {
    animation: blessingRadiance 6s ease-in-out infinite;
    border: 3px solid #F59E0B;
}

/* Animación de liberación emocional */
@keyframes emotionalLiberation {
    0% { 
        transform: scale(1) rotate(0deg);
        box-shadow: 0 0 15px rgba(239, 68, 68, 0.5);
        border-color: #EF4444;
    }
    25% { 
        transform: scale(1.1) rotate(1deg);
        box-shadow: 0 0 25px rgba(245, 101, 101, 0.6);
        border-color: #F56565;
    }
    50% { 
        transform: scale(1.05) rotate(-1deg);
        box-shadow: 0 0 30px rgba(248, 113, 113, 0.7);
        border-color: #F87171;
    }
    75% { 
        transform: scale(0.95) rotate(0.5deg);
        box-shadow: 0 0 20px rgba(34, 197, 94, 0.6);
        border-color: #22C55E;
    }
    100% { 
        transform: scale(1) rotate(0deg);
        box-shadow: 0 0 25px rgba(16, 185, 129, 0.5);
        border-color: #10B981;
    }
}

.zen-liberation {
    animation: emotionalLiberation 7s ease-in-out;
}

/* Texto guía para ejercicios Zen */
.zen-instruction {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(59, 130, 246, 0.1));
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 12px;
    padding: 16px;
    margin: 12px 0;
    font-style: italic;
    color: #4C1D95;
    position: relative;
    overflow: hidden;
}

.zen-instruction::before {
    content: '🏹';
    position: absolute;
    top: -5px;
    right: 10px;
    font-size: 24px;
    opacity: 0.3;
}

/* Modo oscuro para las animaciones Zen */
.dark .zen-instruction {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(59, 130, 246, 0.2));
    border-color: rgba(139, 92, 246, 0.4);
    color: #C4B5FD;
}

.dark .zen-particle {
    background: radial-gradient(circle, #A78BFA, #8B5CF6);
}

/* Indicadores de estado para ejercicios Zen */
.zen-status-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #10B981;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
    animation: pulse-gentle 2s ease-in-out infinite;
}

.zen-status-indicator.preparing {
    background: #F59E0B;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

.zen-status-indicator.focusing {
    background: #3B82F6;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

.zen-status-indicator.releasing {
    background: #8B5CF6;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}

.zen-status-indicator.contemplating {
    background: #06B6D4;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
}

/* =======================================================
   ANIMACIONES PARA FRASES INSPIRACIONALES
   ======================================================= */

/* Contenedor principal de frases */
.quote-container {
    position: relative;
    overflow: hidden;
    min-height: 300px;
    background: linear-gradient(135deg, 
        rgba(99, 102, 241, 0.05), 
        rgba(168, 85, 247, 0.05),
        rgba(59, 130, 246, 0.05)
    );
    border: 2px solid transparent;
    background-clip: padding-box;
    transition: all 0.5s ease;
}

.quote-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.2), 
        transparent
    );
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Animación de entrada de frases */
@keyframes quoteSlideIn {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    50% {
        opacity: 0.7;
        transform: translateY(-5px) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes quoteSlideOut {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    50% {
        opacity: 0.3;
        transform: translateY(-10px) scale(0.98);
    }
    100% {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
}

/* Estados de animación para el texto */
.quote-text {
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.quote-text.entering {
    animation: quoteSlideIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.quote-text.exiting {
    animation: quoteSlideOut 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Animación del autor */
@keyframes authorFade {
    0% {
        opacity: 0;
        transform: translateX(-20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.quote-author {
    transition: all 0.6s ease;
}

.quote-author.entering {
    animation: authorFade 0.6s ease 0.3s both;
}

.quote-author.exiting {
    animation: authorFade 0.4s ease reverse both;
}

/* Indicador de progreso */
.quote-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, #6366F1, #A855F7, #3B82F6);
    border-radius: 2px;
    animation: progressBar 8s linear infinite;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

@keyframes progressBar {
    0% { width: 0%; }
    100% { width: 100%; }
}

/* Partículas flotantes de inspiración */
.inspiration-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: radial-gradient(circle, #6366F1, #A855F7);
    border-radius: 50%;
    opacity: 0.7;
    animation: floatParticle 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes floatParticle {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.7;
    }
    25% {
        transform: translateY(-15px) rotate(90deg);
        opacity: 1;
    }
    50% {
        transform: translateY(-8px) rotate(180deg);
        opacity: 0.8;
    }
    75% {
        transform: translateY(-20px) rotate(270deg);
        opacity: 0.9;
    }
}

/* Diferentes posiciones y delays para las partículas */
.inspiration-particle:nth-child(1) { 
    top: 20%; 
    left: 10%; 
    animation-delay: 0s;
    animation-duration: 4s;
}

.inspiration-particle:nth-child(2) { 
    top: 15%; 
    right: 15%; 
    animation-delay: 0.8s;
    animation-duration: 3.5s;
}

.inspiration-particle:nth-child(3) { 
    bottom: 30%; 
    left: 20%; 
    animation-delay: 1.6s;
    animation-duration: 4.5s;
}

.inspiration-particle:nth-child(4) { 
    bottom: 25%; 
    right: 25%; 
    animation-delay: 2.4s;
    animation-duration: 3.8s;
}

.inspiration-particle:nth-child(5) { 
    top: 50%; 
    left: 5%; 
    animation-delay: 3.2s;
    animation-duration: 4.2s;
}

.inspiration-particle:nth-child(6) { 
    top: 60%; 
    right: 8%; 
    animation-delay: 4s;
    animation-duration: 3.6s;
}

/* Efecto hover mejorado para el contenedor */
.quote-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.3);
}

.quote-container:hover .quote-progress {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.8);
}

/* Botón de nueva sabiduría mejorado */
.new-wisdom-btn {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #6366F1, #A855F7);
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    transform-style: preserve-3d;
}

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

.new-wisdom-btn:hover {
    transform: translateY(-2px) rotateX(5deg);
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.4);
}

.new-wisdom-btn:hover::before {
    left: 100%;
}

.new-wisdom-btn:active {
    transform: translateY(0) rotateX(0deg);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3);
}

/* Icono de comillas mejorado */
.quote-icon {
    position: relative;
    display: inline-block;
    animation: quotePulse 3s ease-in-out infinite;
}

@keyframes quotePulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

/* Contador de frases */
.quote-counter {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(99, 102, 241, 0.1);
    color: #6366F1;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

/* Modo oscuro para las frases */
.dark .quote-container {
    background: linear-gradient(135deg, 
        rgba(99, 102, 241, 0.1), 
        rgba(168, 85, 247, 0.1),
        rgba(59, 130, 246, 0.1)
    );
    border-color: rgba(99, 102, 241, 0.3);
}

.dark .inspiration-particle {
    background: radial-gradient(circle, #8B5CF6, #6366F1);
}

.dark .quote-counter {
    background: rgba(99, 102, 241, 0.2);
    color: #C4B5FD;
    border-color: rgba(99, 102, 241, 0.3);
}

/* =======================================================
   SISTEMA DE CHAT INTELIGENTE ESPECIALIZADO
   ======================================================= */

/* Botón flotante para abrir el chat */
#chat-toggle-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    backdrop-filter: blur(10px);
    animation: chatPulse 3s ease-in-out infinite;
}

#chat-toggle-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 40px rgba(59, 130, 246, 0.4);
    background: linear-gradient(135deg, #1E40AF 0%, #7C3AED 100%);
}

#chat-toggle-btn:active {
    transform: translateY(-1px) scale(1.02);
}

/* Animación de pulsación suave para el botón */
@keyframes chatPulse {
    0%, 100% {
        box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
    }
    50% {
        box-shadow: 0 8px 25px rgba(59, 130, 246, 0.5);
    }
}

/* Indicador de notificación */
#chat-toggle-btn .notification-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 12px;
    height: 12px;
    background: #EF4444;
    border-radius: 50%;
    border: 2px solid white;
    animation: notificationBounce 2s ease-in-out infinite;
}

@keyframes notificationBounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

/* Contenedor principal del chat */
#smart-chat-container {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 380px;
    height: 500px;
    z-index: 999;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: chatSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#smart-chat-container.show {
    display: flex;
}

/* Animaciones de entrada y salida */
@keyframes chatSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes chatSlideOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
}

/* Header del chat */
.chat-header {
    background: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%);
    color: white;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 20px 20px 0 0;
}

.chat-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.chat-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Área de mensajes */
.chat-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: rgba(248, 250, 252, 0.5);
}

/* Scroll personalizado */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.3);
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.5);
}

/* Estilos de mensajes */
.message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.4;
    animation: messageSlideIn 0.3s ease-out;
    position: relative;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Mensaje del usuario */
.message.user {
    align-self: flex-end;
    background: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%);
    color: white;
    border-bottom-right-radius: 4px;
    margin-left: 40px;
}

/* Mensaje del asistente */
.message.assistant {
    align-self: flex-start;
    background: white;
    color: #1F2937;
    border: 1px solid #E5E7EB;
    border-bottom-left-radius: 4px;
    margin-right: 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Timestamp de mensajes */
.message-timestamp {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 4px;
    text-align: right;
}

.message.assistant .message-timestamp {
    text-align: left;
}

/* Indicador de escritura */
.typing-indicator {
    align-self: flex-start;
    background: white;
    color: #1F2937;
    border: 1px solid #E5E7EB;
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    padding: 12px 16px;
    margin-right: 40px;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: messageSlideIn 0.3s ease-out;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6B7280;
    animation: typingBounce 1.4s ease-in-out infinite;
}

.typing-dot:nth-child(1) { animation-delay: 0ms; }
.typing-dot:nth-child(2) { animation-delay: 160ms; }
.typing-dot:nth-child(3) { animation-delay: 320ms; }

@keyframes typingBounce {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}

/* Sugerencias de preguntas */
.chat-suggestions {
    padding: 12px 16px;
    background: rgba(248, 250, 252, 0.8);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.chat-suggestions h4 {
    margin: 0 0 8px 0;
    font-size: 12px;
    font-weight: 600;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.suggestions-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.suggestion-btn {
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12px;
    text-align: left;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
}

.suggestion-btn:hover {
    background: #F3F4F6;
    border-color: #3B82F6;
    color: #3B82F6;
    transform: translateX(4px);
}

/* Área de entrada de texto */
.chat-input-area {
    padding: 16px;
    background: rgba(255, 255, 255, 0.9);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0 0 20px 20px;
}

.chat-input-container {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    position: relative;
}

.chat-input {
    flex: 1;
    min-height: 40px;
    max-height: 100px;
    padding: 12px 16px;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    font-size: 14px;
    font-family: inherit;
    resize: none;
    outline: none;
    transition: all 0.2s ease;
    background: white;
}

.chat-input:focus {
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.chat-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.chat-send-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Mensaje de bienvenida */
.welcome-message {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    text-align: center;
}

.welcome-message h4 {
    margin: 0 0 8px 0;
    color: #3B82F6;
    font-weight: 600;
    font-size: 14px;
}

.welcome-message p {
    margin: 0;
    font-size: 12px;
    color: #6B7280;
    line-height: 1.4;
}

/* Estados del chat */
.chat-status {
    padding: 8px 16px;
    background: rgba(59, 130, 246, 0.1);
    color: #3B82F6;
    font-size: 12px;
    text-align: center;
    border-top: 1px solid rgba(59, 130, 246, 0.2);
}

.chat-status.connecting {
    background: rgba(245, 158, 11, 0.1);
    color: #F59E0B;
    border-color: rgba(245, 158, 11, 0.2);
}

.chat-status.error {
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
    border-color: rgba(239, 68, 68, 0.2);
}

/* Modo durante la práctica */
.practice-mode {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.1));
    border-color: rgba(16, 185, 129, 0.3);
}

.practice-mode .chat-header {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
}

.practice-mode-indicator {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #10B981;
    color: white;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: practiceGlow 2s ease-in-out infinite;
}

@keyframes practiceGlow {
    0%, 100% {
        box-shadow: 0 0 8px rgba(16, 185, 129, 0.3);
    }
    50% {
        box-shadow: 0 0 16px rgba(16, 185, 129, 0.6);
    }
}

/* Modo noche/oscuro para el chat */
.dark #smart-chat-container {
    background: rgba(17, 24, 39, 0.95);
    border-color: rgba(75, 85, 99, 0.3);
}

.dark .chat-messages {
    background: rgba(31, 41, 55, 0.5);
}

.dark .message.assistant {
    background: rgba(55, 65, 81, 0.8);
    color: #F9FAFB;
    border-color: rgba(75, 85, 99, 0.3);
}

.dark .typing-indicator {
    background: rgba(55, 65, 81, 0.8);
    color: #F9FAFB;
    border-color: rgba(75, 85, 99, 0.3);
}

.dark .chat-suggestions {
    background: rgba(31, 41, 55, 0.8);
    border-color: rgba(75, 85, 99, 0.3);
}

.dark .suggestion-btn {
    background: rgba(55, 65, 81, 0.5);
    border-color: rgba(75, 85, 99, 0.3);
    color: #D1D5DB;
}

.dark .suggestion-btn:hover {
    background: rgba(75, 85, 99, 0.5);
    border-color: #3B82F6;
    color: #60A5FA;
}

.dark .chat-input-area {
    background: rgba(31, 41, 55, 0.9);
    border-color: rgba(75, 85, 99, 0.3);
}

.dark .chat-input {
    background: rgba(55, 65, 81, 0.5);
    border-color: rgba(75, 85, 99, 0.3);
    color: #F9FAFB;
}

.dark .chat-input:focus {
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.dark .welcome-message {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.3);
}

.dark .welcome-message h4 {
    color: #60A5FA;
}

.dark .welcome-message p {
    color: #9CA3AF;
}

/* Responsividad para móviles */
@media (max-width: 768px) {
    #smart-chat-container {
        bottom: 90px;
        right: 15px;
        left: 15px;
        width: auto;
        height: 450px;
        border-radius: 16px;
    }
    
    #chat-toggle-btn {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .chat-header {
        padding: 12px 16px;
        border-radius: 16px 16px 0 0;
    }
    
    .chat-header h3 {
        font-size: 14px;
    }
    
    .message {
        font-size: 13px;
        padding: 10px 12px;
        max-width: 90%;
    }
    
    .message.user {
        margin-left: 20px;
    }
    
    .message.assistant {
        margin-right: 20px;
    }
    
    .chat-input {
        font-size: 16px; /* Previene zoom en iOS */
    }
    
    .suggestion-btn {
        padding: 10px;
        font-size: 13px;
    }
}

/* Animaciones de carga para respuestas */
.loading-response {
    opacity: 0.7;
    position: relative;
}

.loading-response::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 12px;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    border: 2px solid #3B82F6;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

/* Efectos especiales para respuestas del maestro */
.master-response {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(217, 119, 6, 0.1));
    border-color: rgba(245, 158, 11, 0.3);
    position: relative;
}

.master-response::before {
    content: '🧘';
    position: absolute;
    top: -5px;
    left: -5px;
    font-size: 16px;
    animation: masterGlow 3s ease-in-out infinite;
}

@keyframes masterGlow {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        filter: hue-rotate(0deg);
    }
    50% {
        transform: scale(1.1) rotate(5deg);
        filter: hue-rotate(30deg);
    }
}

/* Efectos para respuestas científicas */
.science-response {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.1));
    border-color: rgba(16, 185, 129, 0.3);
    position: relative;
}

.science-response::before {
    content: '🔬';
    position: absolute;
    top: -5px;
    left: -5px;
    font-size: 16px;
}

/* Efectos para respuestas técnicas */
.technique-response {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(124, 58, 237, 0.1));
    border-color: rgba(139, 92, 246, 0.3);
    position: relative;
}

.technique-response::before {
    content: '🫁';
    position: absolute;
    top: -5px;
    left: -5px;
    font-size: 16px;
}