/* ==================== VARIABLES Y RESET ==================== */
:root {
    --bg-primary: #1a073f;
    --bg-secondary: #240c57;
    --bg-card: rgba(36, 12, 87, 0.65);
    --border-color: rgba(255, 255, 255, 0.1);
    --border-glow: rgba(141, 105, 255, 0.35);
    
    --text-primary: #ffffff;
    --text-secondary: #c4bcdc;
    --text-muted: #877fa3;
    
    --accent-primary: #8d69ff;
    --accent-light: #c4b5fd;
    --accent-dark: #5b21b6;
    --accent-glow: rgba(141, 105, 255, 0.5);
    
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Space Grotesk', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-primary);
    background-image: 
        radial-gradient(circle at 50% 15%, rgba(141, 105, 255, 0.22) 0%, transparent 55%),
        radial-gradient(circle at 80% 85%, rgba(91, 33, 182, 0.2) 0%, transparent 45%);
    color: var(--text-primary);
    font-family: var(--font-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}


/* ==================== MAIN CONTENT ==================== */
.main-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 20px 60px 20px;
}

.kuphia-section {
    width: 100%;
    max-width: 800px;
}

.kuphia-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 10;
}

/* Badge de Estado */
.kuphia-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(141, 105, 255, 0.12);
    border: 1px solid rgba(141, 105, 255, 0.35);
    padding: 6px 16px;
    border-radius: 50px;
    margin-bottom: 24px;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-light);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--accent-light);
    animation: pulseDot 2s infinite ease-in-out;
}

.badge-text {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    color: var(--accent-light);
}

/* Soundwave Visualizer Container */
.soundwave-container {
    position: relative;
    width: 100%;
    max-width: 760px;
    height: 180px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#soundwaveCanvas {
    width: 100%;
    max-width: 760px;
    height: 180px;
    display: block;
    filter: drop-shadow(0 0 25px rgba(141, 105, 255, 0.4));
}

/* Textos Centrales */
.kuphia-header-text {
    margin-bottom: 28px;
}

.kuphia-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 12px;
}

.kuphia-subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 540px;
    line-height: 1.6;
    margin: 0 auto;
}

/* Caja de Respuestas */
.kuphia-response-box {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-glow);
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 24px;
    text-align: left;
    backdrop-filter: blur(16px);
    box-shadow: 0 16px 35px rgba(0, 0, 0, 0.45);
    animation: fadeIn 0.3s ease;
}

.response-content {
    color: #f8fafc;
    font-size: 0.98rem;
    line-height: 1.7;
}

/* Consola de Entrada */
.kuphia-input-container {
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    transition: all 0.3s ease;
}

.input-glow-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(36, 12, 87, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 6px 8px 6px 18px;
    backdrop-filter: blur(12px);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.input-glow-wrapper:focus-within {
    border-color: var(--accent-light);
    box-shadow: 0 0 25px rgba(141, 105, 255, 0.35);
}

.input-glow-wrapper input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 0.98rem;
}

.input-glow-wrapper input::placeholder {
    color: var(--text-muted);
}

/* Botón Alternador de Voz */
.voice-toggle-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-muted);
    border-radius: 10px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-right: 6px;
    transition: all 0.25s ease;
}

.voice-toggle-btn.active {
    background: rgba(141, 105, 255, 0.22);
    border-color: var(--accent-primary);
    color: var(--accent-light);
    box-shadow: 0 0 14px rgba(141, 105, 255, 0.4);
}

.voice-toggle-btn:hover {
    transform: scale(1.05);
    border-color: var(--accent-light);
    color: #ffffff;
}

.send-button {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-dark));
    color: #ffffff;
    border: none;
    border-radius: 10px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.send-button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 18px var(--accent-glow);
}

/* Prompt Chips */
.quick-prompts {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
}

.prompt-chip {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: all 0.2s ease;
}

.prompt-chip:hover {
    background: rgba(141, 105, 255, 0.2);
    border-color: var(--accent-light);
    color: #ffffff;
}

/* ==================== FOOTER ==================== */
.footer {
    border-top: 1px solid var(--border-color);
    background: rgba(18, 5, 46, 0.9);
    padding: 24px 20px;
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.footer-legal {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.footer-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: var(--accent-light);
}

.footer-divider {
    color: var(--border-color);
    font-size: 0.75rem;
}

.footer-copy p {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ==================== ANIMACIONES ==================== */
@keyframes pulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

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

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .mobile-toggle {
        display: flex;
    }

    

    

    

    .kuphia-title {
        font-size: 2rem;
    }

    .kuphia-subtitle {
        font-size: 0.95rem;
    }
}

/* Boton de Microfono */
.mic-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-secondary);
    border-radius: 10px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-right: 6px;
    transition: all 0.25s ease;
}

.mic-btn:hover {
    transform: scale(1.05);
    border-color: var(--accent-light);
    color: #ffffff;
}

.mic-btn.listening {
    background: rgba(239, 68, 68, 0.25);
    border-color: #ef4444;
    color: #fca5a5;
    box-shadow: 0 0 18px rgba(239, 68, 68, 0.55);
    animation: pulseMic 1.2s infinite ease-in-out;
}

@keyframes pulseMic {
    0%, 100% { transform: scale(1); box-shadow: 0 0 14px rgba(239, 68, 68, 0.4); }
    50% { transform: scale(1.1); box-shadow: 0 0 24px rgba(239, 68, 68, 0.8); }
}

/* Fondo Lluvia de Datos al 20% de Opacidad y Capa Ultra Profunda */
#halftoneCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: -10;
    opacity: 0.20;
}


/* Prioridad y Permiso de Clic Absoluto para Interaccion */
.ai-interface-container,
.input-wrapper,
#userInput,
#sendBtn,
.prompt-chips,
.prompt-chip,
#micBtn {
    position: relative !important;
    z-index: 100 !important;
    pointer-events: auto !important;
    user-select: text !important;
}

.prompt-chip,
#sendBtn,
#micBtn {
    cursor: pointer !important;
}

/* Evitar que cualquier canvas o fondo capture clics */
#halftoneCanvas,
#soundwaveCanvas,
#jarvisCanvas {
    pointer-events: none !important;
}


/* Letras Blancas Impecables en Todos los Headers */


/* Liquid Ether Background */
.liquid-ether-container {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: -10 !important;
    pointer-events: none !important;
    overflow: hidden !important;
}




/* Header Glass Enhancement */


/* White Card Glass Enhancement */
.liquid-glass-white-card.reactbits-glass-surface {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.92) 0%, rgba(248, 246, 255, 0.86) 100%) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.85) !important;
    border-top: 2.5px solid #ffffff !important;
    box-shadow:
        0 0 2px 1px rgba(255, 255, 255, 0.8) inset,
        0 0 20px 4px rgba(255, 255, 255, 0.3) inset,
        0 30px 80px rgba(0, 0, 0, 0.65),
        0 0 35px rgba(255, 255, 255, 0.08) !important;
}




.glass-surface--svg {
  background: rgba(255, 255, 255, var(--glass-frost, 0.08)) !important;
  backdrop-filter: var(--filter-id, blur(20px)) blur(14px) saturate(var(--glass-saturation, 1.8)) brightness(1.15) !important;
  -webkit-backdrop-filter: blur(14px) saturate(1.8) brightness(1.15) !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  border-top: 1.8px solid rgba(255, 255, 255, 0.85) !important;
  box-shadow:
    0 0 2px 1px rgba(255, 255, 255, 0.5) inset,
    0 0 12px 3px rgba(255, 255, 255, 0.15) inset,
    0px 4px 16px rgba(0, 0, 0, 0.25),
    0px 8px 24px rgba(0, 0, 0, 0.25),
    0px 16px 56px rgba(0, 0, 0, 0.35) !important;
}

/* Tarjeta Blanca con Refraccion */
.liquid-glass-white-card.glass-surface--svg {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92) 0%, rgba(248, 246, 255, 0.86) 100%) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.85) !important;
  border-top: 2.5px solid #ffffff !important;
  box-shadow:
    0 0 2px 1px rgba(255, 255, 255, 0.8) inset,
    0 0 20px 4px rgba(255, 255, 255, 0.3) inset,
    0 30px 80px rgba(0, 0, 0, 0.65),
    0 0 35px rgba(255, 255, 255, 0.08) !important;
}


/* LIQUID GLASS APPLE VISION PRO DEFINITIVO */




/* Tarjeta Blanca de Liquid Glass en Contactanos */
.liquid-glass-white-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.92) 0%, rgba(248, 246, 255, 0.86) 100%) !important;
    backdrop-filter: blur(40px) saturate(200%) brightness(1.05) !important;
    -webkit-backdrop-filter: blur(40px) saturate(200%) brightness(1.05) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.9) !important;
    border-top: 2.5px solid #ffffff !important;
    border-radius: 30px !important;
    box-shadow:
        inset 0 2px 2px 0 rgba(255, 255, 255, 1),
        inset 0 -1px 2px 0 rgba(255, 255, 255, 0.4),
        0 30px 80px rgba(0, 0, 0, 0.65),
        0 0 35px rgba(255, 255, 255, 0.1) !important;
}


/* MODULADOR DE SONIDO VERTICAL EN EL LADO DERECHO */
.vertical-sound-dock {
    position: fixed;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 14px 8px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.03) 100%);
    backdrop-filter: blur(30px) saturate(200%);
    -webkit-backdrop-filter: blur(30px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-top: 1.5px solid rgba(255, 255, 255, 0.80);
    border-radius: 999px;
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.7),
        0 15px 35px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(168, 85, 247, 0.15);
    transition: all 0.3s ease;
}

.vertical-sound-dock:hover {
    border-color: rgba(0, 240, 255, 0.5);
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.9),
        0 20px 45px rgba(0, 0, 0, 0.5),
        0 0 25px rgba(0, 240, 255, 0.25);
}

.dock-btn {
    background: transparent;
    border: none;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.dock-btn:hover {
    color: #00f0ff;
    transform: scale(1.1);
}

.dock-btn.is-muted {
    color: #f43f5e !important;
}

.slider-track-container {
    position: relative;
    width: 6px;
    height: 120px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    overflow: hidden;
    cursor: pointer;
}

.slider-track-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, #00f0ff 0%, #a855f7 100%);
    border-radius: 999px;
    transition: height 0.05s ease;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

.vertical-volume-range {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    writing-mode: bt-lr; /* IE/Edge */
    -webkit-appearance: slider-vertical;
}

.volume-value-text {
    font-size: 0.72rem;
    font-weight: 700;
    color: #c4b5fd;
    letter-spacing: -0.02em;
    user-select: none;
}

/* Indicador de silencio en el boton de voz principal */
#voiceToggleBtn.is-muted {
    color: #f43f5e !important;
    border-color: rgba(244, 63, 94, 0.4) !important;
    background: rgba(244, 63, 94, 0.12) !important;
}
#voiceToggleBtn.is-muted svg {
    stroke: #f43f5e !important;
}


/* SPECTER ORB AVATAR CENTRAL */
.specter-orb-avatar {
    width: 320px;
    height: 320px;
    margin: 0 auto 10px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 5;
    filter: drop-shadow(0 0 45px rgba(110, 38, 200, 0.45)) drop-shadow(0 0 25px rgba(0, 240, 255, 0.3));
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.specter-orb-avatar:hover {
    transform: scale(1.04);
}

@media (max-width: 768px) {
    .specter-orb-avatar {
        width: 250px;
        height: 250px;
    }
}


/* AVATAR SPECTER ORB 3D */
.soundwave-container {
    display: none !important;
}

.specter-orb-avatar {
    width: 320px;
    height: 320px;
    margin: 15px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10;
    pointer-events: auto;
    filter: drop-shadow(0 0 50px rgba(110, 38, 200, 0.6)) drop-shadow(0 0 30px rgba(0, 240, 255, 0.4));
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.specter-orb-avatar canvas {
    width: 100% !important;
    height: 100% !important;
    border-radius: 50%;
}

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

@media (max-width: 768px) {
    .specter-orb-avatar {
        width: 240px;
        height: 240px;
    }
}


/* SPECTER ORB 3D DIMENSIONES GARANTIZADAS */
.specter-orb-avatar {
    width: 320px !important;
    height: 320px !important;
    min-width: 320px !important;
    min-height: 320px !important;
    margin: 10px auto 25px auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    z-index: 50 !important;
    filter: drop-shadow(0 0 50px rgba(110, 38, 200, 0.6)) drop-shadow(0 0 25px rgba(0, 240, 255, 0.4));
}

.specter-orb-avatar canvas {
    width: 320px !important;
    height: 320px !important;
    display: block !important;
    border-radius: 50% !important;
}

@media (max-width: 768px) {
    .specter-orb-avatar, .specter-orb-avatar canvas {
        width: 250px !important;
        height: 250px !important;
        min-width: 250px !important;
        min-height: 250px !important;
    }
}



/* CENTRADO PERFECTO DE STRANDS (DESKTOP & MÓVIL) */
.strands-avatar-container {
    width: 100% !important;
    max-width: 340px !important;
    height: 340px !important;
    margin: 5px auto 20px auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    z-index: 50 !important;
    left: 0 !important;
    right: 0 !important;
    filter: drop-shadow(0 0 45px rgba(130, 61, 247, 0.45)) drop-shadow(0 0 25px rgba(62, 118, 110, 0.3));
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.strands-avatar-container canvas {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    display: block !important;
    margin: 0 auto !important;
    border-radius: 50% !important;
}

@media (max-width: 768px) {
    .strands-avatar-container {
        max-width: 270px !important;
        height: 270px !important;
        margin: 0 auto 15px auto !important;
    }
}

@media (max-width: 480px) {
    .strands-avatar-container {
        max-width: 240px !important;
        height: 240px !important;
        margin: 0 auto 10px auto !important;
    }
}

/* ESTADOS DE MICRÓFONO Y AUDIO MUTUO */
@keyframes recordingPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 240, 255, 0.7), inset 0 0 10px rgba(0, 240, 255, 0.4);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(0, 240, 255, 0), inset 0 0 15px rgba(0, 240, 255, 0.7);
        transform: scale(1.08);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 240, 255, 0), inset 0 0 10px rgba(0, 240, 255, 0.4);
        transform: scale(1);
    }
}

#micBtn.recording {
    background: rgba(0, 240, 255, 0.20) !important;
    border-color: rgba(0, 240, 255, 0.8) !important;
    animation: recordingPulse 1.4s infinite ease-in-out !important;
}

#micBtn.is-muted {
    background: rgba(244, 63, 94, 0.10) !important;
    border-color: rgba(244, 63, 94, 0.4) !important;
}

#micBtn.is-muted svg {
    stroke: #f43f5e !important;
}


/* AJUSTE RESPONSIVE DEL MODULADOR VERTICAL EN MÓVIL */
@media (max-width: 768px) {
    .vertical-sound-dock {
        right: 8px !important;
        transform: translateY(-50%) scale(0.85) !important;
        transform-origin: right center !important;
        padding: 10px 6px !important;
        gap: 8px !important;
    }
    .slider-track-container {
        height: 90px !important;
    }
    .kuphia-title {
        padding: 0 15px !important;
    }
}


/* ELASTIC SLIDER REACT BITS */
.elastic-slider-root {
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: none;
    user-select: none;
}

.elastic-slider-root.vertical {
    width: 24px;
    height: 120px;
    padding: 6px 0;
}

.elastic-slider-track-wrap {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    touch-action: none;
}

.elastic-slider-track-wrap:active {
    cursor: grabbing;
}

.elastic-slider-track {
    position: relative;
    width: 6px;
    height: 100%;
    background: rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    overflow: hidden;
    transition: transform 0.05s ease-out;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
}

.elastic-slider-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, #00f0ff 0%, #a855f7 100%);
    border-radius: 999px;
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.6);
}


/* ESTILOS LIQUID GLASS PARA EL ELASTIC SLIDER */
.elastic-slider-container {
    width: 28px !important;
    height: 120px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    margin: 4px 0 !important;
}

.elastic-slider-root.vertical {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.elastic-slider-track-wrap {
    width: 24px !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: grab !important;
    touch-action: none !important;
}

.elastic-slider-track-wrap:active {
    cursor: grabbing !important;
}

.elastic-slider-track {
    width: 6px !important;
    height: 100% !important;
    background: rgba(255, 255, 255, 0.20) !important;
    border-radius: 999px !important;
    position: relative !important;
    overflow: hidden !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5) !important;
}

.elastic-slider-fill {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    background: linear-gradient(to top, #00f0ff 0%, #823df7 100%) !important;
    border-radius: 999px !important;
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.7) !important;
}

.volume-value-text {
    font-size: 11px !important;
    font-weight: 600 !important;
    color: rgba(255, 255, 255, 0.85) !important;
    letter-spacing: 0.5px !important;
}





/* TEXTO VERDE NEÓN TURQUESA DE MÁXIMO CONTRASTE Y BRILLO */
.gooey-nav-item.active .gooey-nav-link,
.gooey-nav-item.hovered .gooey-nav-link {
    color: #00ffcc !important;
    font-weight: 700 !important;
    text-shadow: 0 0 10px rgba(0, 255, 204, 0.7), 0 0 20px rgba(0, 255, 204, 0.35) !important;
}

.gooey-effect {
    position: absolute;
    opacity: 1;
    pointer-events: none;
    display: grid;
    place-items: center;
    border-radius: 9999px;
    transition: left 0.35s var(--gooey-linear-ease), top 0.35s var(--gooey-linear-ease), width 0.35s ease, height 0.35s ease;
}

.gooey-effect.text {
    display: none !important;
}

.gooey-effect.filter {
    z-index: 1 !important;
    pointer-events: none;
}

.gooey-effect.filter::before {
    display: none !important;
}

/* CÁPSULA GOOEY LIQUID GLASS OSCURA CON RESPLANDOR TURQUESA-VIOLETA */
.gooey-effect.filter::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(14, 6, 30, 0.92) 0%, rgba(30, 10, 58, 0.92) 100%) !important;
    border: 1px solid rgba(0, 255, 204, 0.55) !important;
    box-shadow: 0 0 16px rgba(0, 255, 204, 0.45), 0 0 28px rgba(130, 61, 247, 0.4) !important;
    transform: scale(1);
    opacity: 1;
    z-index: 1 !important;
    border-radius: 9999px;
}

.gooey-particle,
.gooey-point {
    display: block;
    opacity: 0;
    width: 12px;
    height: 12px;
    border-radius: 9999px;
    transform-origin: center;
    z-index: 2 !important;
}

.gooey-particle {
    --time: 5s;
    position: absolute;
    top: calc(50% - 6px);
    left: calc(50% - 6px);
    animation: gooeyParticleAnim calc(var(--time)) ease 1 -350ms;
}

.gooey-point {
    background: var(--color);
    box-shadow: 0 0 10px var(--color);
    opacity: 1;
    animation: gooeyPointAnim calc(var(--time)) ease 1 -350ms;
}

/* TEXTO OSCURO DE MÁXIMO CONTRASTE SOBRE LA PÍLDORA CIAN */
.gooey-nav-item.active .gooey-nav-link,
.gooey-nav-item.hovered .gooey-nav-link {
    color: #070114 !important;
    font-weight: 700 !important;
    text-shadow: none !important;
}

.gooey-effect {
    position: absolute;
    opacity: 1;
    pointer-events: none;
    display: grid;
    place-items: center;
    border-radius: 9999px;
    transition: left 0.35s var(--gooey-linear-ease), top 0.35s var(--gooey-linear-ease), width 0.35s ease, height 0.35s ease;
}

.gooey-effect.text {
    display: none !important;
}

.gooey-effect.filter {
    z-index: 1 !important;
    pointer-events: none;
}

.gooey-effect.filter::before {
    display: none !important;
}

.gooey-effect.filter::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #00f0ff 0%, #823df7 100%) !important;
    box-shadow: 0 0 18px rgba(0, 240, 255, 0.65), 0 0 32px rgba(130, 61, 247, 0.45) !important;
    transform: scale(1);
    opacity: 1;
    z-index: 1 !important;
    border-radius: 9999px;
}

.gooey-particle,
.gooey-point {
    display: block;
    opacity: 0;
    width: 12px;
    height: 12px;
    border-radius: 9999px;
    transform-origin: center;
    z-index: 2 !important;
}

.gooey-particle {
    --time: 5s;
    position: absolute;
    top: calc(50% - 6px);
    left: calc(50% - 6px);
    animation: gooeyParticleAnim calc(var(--time)) ease 1 -350ms;
}

.gooey-point {
    background: var(--color);
    box-shadow: 0 0 8px var(--color);
    opacity: 1;
    animation: gooeyPointAnim calc(var(--time)) ease 1 -350ms;
}



/* LETRAS EN VERDE NEÓN TURQUESA (#00ffcc) */
.gooey-nav-item.active .gooey-nav-link,
.gooey-nav-item.hovered .gooey-nav-link,
.gooey-nav-item.active a,
.gooey-nav-item.hovered a {
    color: #00ffcc !important;
    font-weight: 700 !important;
    text-shadow: 0 0 10px rgba(0, 255, 204, 0.85), 0 0 20px rgba(0, 255, 204, 0.45) !important;
}

.gooey-effect {
    position: absolute;
    opacity: 1;
    pointer-events: none;
    display: grid;
    place-items: center;
    border-radius: 9999px;
    transition: left 0.35s var(--gooey-linear-ease), top 0.35s var(--gooey-linear-ease), width 0.35s ease, height 0.35s ease;
}

.gooey-effect.text {
    display: none !important;
}

.gooey-effect.filter {
    z-index: 1 !important;
    pointer-events: none;
}

.gooey-effect.filter::before {
    display: none !important;
}

/* CÁPSULA GOOEY LIQUID GLASS OSCURA CON RESPLANDOR */
.gooey-effect.filter::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(14, 6, 30, 0.94) 0%, rgba(30, 10, 58, 0.94) 100%) !important;
    border: 1px solid rgba(0, 255, 204, 0.55) !important;
    box-shadow: 0 0 16px rgba(0, 255, 204, 0.45), 0 0 28px rgba(130, 61, 247, 0.4) !important;
    transform: scale(1);
    opacity: 1;
    z-index: 1 !important;
    border-radius: 9999px;
}

.gooey-particle,
.gooey-point {
    display: block;
    opacity: 0;
    width: 12px;
    height: 12px;
    border-radius: 9999px;
    transform-origin: center;
    z-index: 2 !important;
}

.gooey-particle {
    --time: 5s;
    position: absolute;
    top: calc(50% - 6px);
    left: calc(50% - 6px);
    animation: gooeyParticleAnim calc(var(--time)) ease 1 -350ms;
}

.gooey-point {
    background: var(--color);
    box-shadow: 0 0 10px var(--color);
    opacity: 1;
    animation: gooeyPointAnim calc(var(--time)) ease 1 -350ms;
}



/* TEXTO VERDE NEÓN TURQUESA (#00ffcc) */
.gooey-nav-item.active .gooey-nav-link,
.gooey-nav-item.hovered .gooey-nav-link,
.gooey-nav-item.active a,
.gooey-nav-item.hovered a {
    color: #00ffcc !important;
    font-weight: 700 !important;
    text-shadow: 0 0 10px rgba(0, 255, 204, 0.85), 0 0 20px rgba(0, 255, 204, 0.45) !important;
}

.gooey-effect {
    position: absolute;
    opacity: 1;
    pointer-events: none;
    display: grid;
    place-items: center;
    border-radius: 9999px;
    transition: left 0.38s var(--gooey-linear-ease), top 0.38s var(--gooey-linear-ease), width 0.38s ease, height 0.38s ease;
    z-index: 1 !important;
}

/* CÁPSULA EN MORADO CLARITO SUTIL CON RESPLANDOR LAVANDA */
.gooey-effect.filter::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.25) 0%, rgba(196, 181, 253, 0.20) 100%) !important;
    border: 1px solid rgba(196, 181, 253, 0.50) !important;
    box-shadow: 0 0 20px rgba(167, 139, 250, 0.35), inset 0 0 10px rgba(196, 181, 253, 0.25) !important;
    backdrop-filter: blur(10px) !important;
    transform: scale(1);
    opacity: 1;
    z-index: 1 !important;
    border-radius: 9999px;
}

/* EMISOR DE 15 PARTÍCULAS METABALL */
.gooey-particles-emitter {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 25 !important;
}

.gooey-particle-bubble {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.2);
    opacity: 1;
    animation: bubbleParticleBurst ease-out forwards;
}

@keyframes bubbleParticleBurst {
    0% {
        transform: translate(-50%, -50%) scale(0.3);
        opacity: 1;
    }
    50% {
        transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(1.1);
        opacity: 0.9;
    }
    100% {
        transform: translate(calc(-50% + var(--tx) * 1.3), calc(-50% + var(--ty) * 1.3)) scale(0);
        opacity: 0;
    }
}



/* CAPA DEL FLUIDO VISCOSO CON FILTRO SVG METABALL */
.gooey-fluid-layer {
    position: absolute;
    inset: -30px;
    filter: url("#gooeyMetaballFilter");
    pointer-events: none;
    z-index: 1;
}

.gooey-pill {
    position: absolute;
    border-radius: 9999px;
    background: rgba(167, 139, 250, 0.38) !important;
    box-shadow: 0 0 16px rgba(167, 139, 250, 0.45);
    transition: left 0.36s var(--gooey-linear-ease), top 0.36s var(--gooey-linear-ease), width 0.36s ease, height 0.36s ease;
    border: 1px solid rgba(196, 181, 253, 0.55);
}

/* CAPA DE TEXTO Y ENLACES (NÍTIDOS Y POR ENCIMA) */
.gooey-nav {
    position: relative;
    display: flex;
    z-index: 10 !important;
}

.gooey-nav-list {
    display: flex;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
    z-index: 10 !important;
}

.gooey-nav-item {
    border-radius: 9999px;
    position: relative;
    cursor: pointer;
    z-index: 10 !important;
}

.gooey-nav-link {
    outline: none;
    padding: 0.55em 1.25em;
    display: inline-block;
    color: rgba(255, 255, 255, 0.80) !important;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    position: relative;
    z-index: 12 !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
    transition: color 0.25s ease;
}

.gooey-nav-item:hover .gooey-nav-link {
    color: #ffffff !important;
}

/* TEXTO VERDE NEÓN TURQUESA (#00ffcc) */
.gooey-nav-item.active .gooey-nav-link,
.gooey-nav-item.hovered .gooey-nav-link {
    color: #00ffcc !important;
    font-weight: 700 !important;
    text-shadow: 0 0 10px rgba(0, 255, 204, 0.85), 0 0 20px rgba(0, 255, 204, 0.45) !important;
}

/* PARTÍCULAS METABALL QUE SE ESTIRAN COMO LÍQUIDO */
.gooey-particle,
.gooey-point {
    display: block;
    opacity: 0;
    width: 22px;
    height: 22px;
    border-radius: 9999px;
    transform-origin: center;
}

.gooey-particle {
    position: absolute;
    transform: translate(-50%, -50%);
    animation: gooeyParticleMotion var(--time) cubic-bezier(0.55, 0, 1, 0.45) 1;
}

.gooey-point {
    background: var(--color);
    box-shadow: 0 0 10px var(--color);
    opacity: 1;
    animation: gooeyPointScale var(--time) cubic-bezier(0.55, 0, 1, 0.45) 1;
}

@keyframes gooeyParticleMotion {
    0% {
        transform: translate(-50%, -50%) rotate(0deg) translate(0px, 0px);
        opacity: 1;
    }
    60% {
        transform: translate(-50%, -50%) rotate(calc(var(--rotate) * 0.6)) translate(var(--end-x), var(--end-y));
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) rotate(calc(var(--rotate) * 1.2)) translate(calc(var(--end-x) * 1.3), calc(var(--end-y) * 1.3));
        opacity: 0;
    }
}

@keyframes gooeyPointScale {
    0% {
        transform: scale(0.2);
        opacity: 0;
    }
    20% {
        transform: scale(0.6);
        opacity: 1;
    }
    60% {
        transform: scale(var(--scale));
        opacity: 1;
    }
    100% {
        transform: scale(0);
        opacity: 0;
    }
}




/* HOVER: Morado muy sutil */


/* SECCIÓN ACTIVA: Circulito/Cápsula Morada Leve */


















/* ==================== MOBILE TOGGLE BUTTON ==================== */
.mobile-toggle {
    display: none !important;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px;
    flex-direction: column;
    gap: 5px;
    z-index: 1001;
}

.mobile-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #ffffff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .mobile-toggle {
        display: flex !important;
    }
}



/* ANIMACIÓN DE VUELO HACIA ARRIBA */
#sendBtn.fly-takeoff svg,
.send-button.fly-takeoff svg {
    animation: airplaneTakeoff 0.75s cubic-bezier(0.22, 1, 0.36, 1) forwards !important;
}

@keyframes airplaneTakeoff {
    0% {
        transform: translate(0, 0) scale(1) rotate(0deg);
        opacity: 1;
    }
    25% {
        transform: translate(-3px, 3px) scale(0.85) rotate(-10deg);
        opacity: 1;
    }
    55% {
        transform: translate(32px, -32px) scale(0.4) rotate(35deg);
        opacity: 0;
    }
    56% {
        transform: translate(-28px, 28px) scale(0.4) rotate(35deg);
        opacity: 0;
    }
    100% {
        transform: translate(0, 0) scale(1) rotate(0deg);
        opacity: 1;
    }
}


/* ==================== SEND BUTTON AIRPLANE ANIMATION (BLUE TAKEOFF) ==================== */
#sendBtn,
.send-button {
    position: relative !important;
    overflow: hidden !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

#sendBtn svg,
.send-button svg {
    stroke: #ffffff;
    transition: transform 0.25s ease, stroke 0.25s ease, filter 0.25s ease;
    will-change: transform, opacity, stroke, filter;
}

#sendBtn:hover svg,
.send-button:hover svg {
    transform: translate(2px, -2px) rotate(4deg);
}

/* AL PRESIONAR Y DURANTE EL DESPEGUE: AZUL ELÉCTRICO BRILLANTE */
#sendBtn:active,
.send-button:active,
#sendBtn.fly-takeoff,
.send-button.fly-takeoff {
    background: rgba(0, 240, 255, 0.18) !important;
    border: 1px solid rgba(0, 240, 255, 0.65) !important;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.45), inset 0 0 10px rgba(0, 240, 255, 0.20) !important;
}

#sendBtn:active svg,
.send-button:active svg,
#sendBtn.fly-takeoff svg,
.send-button.fly-takeoff svg {
    stroke: #00f0ff !important;
    filter: drop-shadow(0 0 8px rgba(0, 240, 255, 0.95)) drop-shadow(0 0 16px rgba(0, 240, 255, 0.60)) !important;
    animation: airplaneTakeoff 0.75s cubic-bezier(0.22, 1, 0.36, 1) forwards !important;
}

@keyframes airplaneTakeoff {
    0% {
        transform: translate(0, 0) scale(1) rotate(0deg);
        opacity: 1;
    }
    25% {
        transform: translate(-3px, 3px) scale(0.85) rotate(-10deg);
        opacity: 1;
    }
    55% {
        transform: translate(32px, -32px) scale(0.4) rotate(35deg);
        opacity: 0;
    }
    56% {
        transform: translate(-28px, 28px) scale(0.4) rotate(35deg);
        opacity: 0;
    }
    100% {
        transform: translate(0, 0) scale(1) rotate(0deg);
        opacity: 1;
    }
}


/* ==================== HEADER Y NAVEGACIÓN UNIFICADA (PC & MÓVIL) ==================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 16px 20px;
    display: flex;
    justify-content: center;
    pointer-events: none;
}

.nav-container {
    pointer-events: auto;
    position: relative;
    width: 100%;
    max-width: 860px;
    height: 64px;
    background: rgba(26, 7, 63, 0.5);
    background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.02) 100%);
    backdrop-filter: blur(24px) saturate(190%);
    -webkit-backdrop-filter: blur(24px) saturate(190%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 40px;
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 
        0 16px 40px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(141, 105, 255, 0.2),
        inset 0 1px 1px rgba(255, 255, 255, 0.25);
    transition: all 0.3s ease;
}

.brand-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: 38px;
    width: auto;
    object-fit: contain;
}

/* --- MODO PC (HORIZONTAL) --- */
.nav-menu {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    gap: 28px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-link {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    transition: color 0.2s ease;
    position: relative;
    padding: 6px 0;
}

.nav-link:hover {
    color: #ffffff;
}

.nav-link.active {
    color: #ffffff;
    font-weight: 600;
}

.nav-link::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #00f0ff, #823df7);
    transition: width 0.3s ease;
    border-radius: 2px;
}

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

.mobile-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    z-index: 1001;
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.mobile-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #ffffff;
    border-radius: 2px;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    transform-origin: center;
}

.mobile-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

.mobile-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* --- MODO MÓVIL (≤ 768px) --- */
@media (max-width: 768px) {
    .header {
        padding: 12px 16px !important;
    }

    .nav-container {
        width: 100% !important;
        height: 56px !important;
        padding: 0 18px !important;
    }

    .mobile-toggle {
        display: flex !important;
    }

    .nav-menu {
        position: absolute !important;
        top: calc(100% + 12px) !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        background: rgba(22, 9, 48, 0.94) !important;
        backdrop-filter: blur(28px) saturate(200%) !important;
        -webkit-backdrop-filter: blur(28px) saturate(200%) !important;
        border: 1px solid rgba(255, 255, 255, 0.18) !important;
        border-top: 1.5px solid rgba(255, 255, 255, 0.45) !important;
        border-radius: 24px !important;
        padding: 16px !important;
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.70), 0 0 30px rgba(141, 105, 255, 0.25) !important;
        
        opacity: 0 !important;
        visibility: hidden !important;
        transform: translateY(-10px) scale(0.97) !important;
        pointer-events: none !important;
        transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
        z-index: 9999 !important;
        display: block !important;
    }

    .nav-menu.open {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(0) scale(1) !important;
        pointer-events: auto !important;
    }

    .nav-list {
        flex-direction: column !important;
        gap: 8px !important;
        width: 100% !important;
    }

    .nav-item {
        width: 100% !important;
    }

    .nav-link {
        display: block !important;
        width: 100% !important;
        padding: 12px 16px !important;
        font-size: 1.02rem !important;
        text-align: center !important;
        border-radius: 14px !important;
    }

    .nav-link:hover,
    .nav-link:active {
        background: rgba(255, 255, 255, 0.10) !important;
        color: #ffffff !important;
    }

    .nav-link.active {
        color: #00ffcc !important;
        background: rgba(0, 255, 204, 0.12) !important;
        border: 1px solid rgba(0, 255, 204, 0.35) !important;
    }

    .nav-link::after {
        display: none !important;
    }
}




/* ==================== CHAT FEED & MODO DUAL (VOZ & TEXTO) ==================== */
.interaction-mode-tabs {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(26, 7, 63, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 30px;
    padding: 4px 6px;
    margin-bottom: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.2);
    z-index: 10;
}

.mode-tab-btn {
    background: transparent;
    border: none;
    outline: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.84rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.mode-tab-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.mode-tab-btn.active {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.25) 0%, rgba(130, 61, 247, 0.4) 100%);
    border: 1px solid rgba(0, 240, 255, 0.4);
    box-shadow: 0 0 14px rgba(0, 240, 255, 0.3);
    font-weight: 600;
}

/* --- VENTANA DE MENSAJERÍA TIPO APLICACIÓN --- */
.kuphia-chat-feed {
    display: none;
    width: 100%;
    max-width: 680px;
    background: rgba(14, 5, 34, 0.90);
    backdrop-filter: blur(28px) saturate(190%);
    -webkit-backdrop-filter: blur(28px) saturate(190%);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-top: 1.5px solid rgba(255, 255, 255, 0.35);
    border-radius: 24px;
    padding: 0;
    margin: 0 auto 20px auto;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7), 0 0 35px rgba(130, 61, 247, 0.25);
    animation: fadeInChat 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    text-align: left;
    overflow: hidden;
}

@keyframes fadeInChat {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.kuphia-chat-feed.active {
    display: flex;
    flex-direction: column;
}

/* Header del Chat */
.chat-feed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-header-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-header-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00f0ff, #823df7);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0b021a;
    font-weight: 800;
    font-size: 0.95rem;
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.5);
}

.chat-header-info {
    display: flex;
    flex-direction: column;
}

.chat-header-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.3px;
}

.chat-header-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: #00ffcc;
    font-weight: 500;
}

.pulse-dot {
    width: 7px;
    height: 7px;
    background: #00ffcc;
    border-radius: 50%;
    box-shadow: 0 0 8px #00ffcc;
    animation: pulseGlow 1.8s infinite;
}

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

.chat-clear-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 8px;
    border-radius: 10px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-clear-btn:hover {
    color: #ff4b72;
    background: rgba(255, 75, 114, 0.15);
}

/* Área de Mensajes */
.chat-feed-inner {
    max-height: 360px;
    min-height: 200px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px;
    scroll-behavior: smooth;
}

.chat-feed-inner::-webkit-scrollbar { width: 5px; }
.chat-feed-inner::-webkit-scrollbar-track { background: transparent; }
.chat-feed-inner::-webkit-scrollbar-thumb { background: rgba(130, 61, 247, 0.4); border-radius: 4px; }
.chat-feed-inner::-webkit-scrollbar-thumb:hover { background: #00f0ff; }

/* Contenedor individual de Mensaje */
.chat-msg {
    display: flex;
    width: 100%;
    animation: msgSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* Mensajes de Kuphia (Izquierda) */
.chat-msg.msg-kuphia {
    justify-content: flex-start;
    align-items: flex-end;
    gap: 10px;
}

.msg-kuphia .msg-avatar {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00f0ff, #823df7);
    color: #0b021a;
    font-weight: 800;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.35);
    margin-bottom: 2px;
}

.msg-kuphia .msg-bubble-wrapper {
    max-width: 78%;
    display: flex;
    flex-direction: column;
}

.msg-kuphia .msg-bubble {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.94);
    padding: 12px 16px;
    border-radius: 18px 18px 18px 4px;
    font-size: 0.93rem;
    line-height: 1.5;
    word-break: break-word;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.msg-kuphia .msg-time {
    font-size: 0.70rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 4px;
    margin-left: 4px;
}

/* Mensajes del Usuario (Derecha) */
.chat-msg.msg-user {
    justify-content: flex-end;
}

.msg-user .msg-bubble-wrapper {
    max-width: 78%;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.msg-user .msg-bubble {
    background: linear-gradient(135deg, #0099ff 0%, #7000ff 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 12px 16px;
    border-radius: 18px 18px 4px 18px;
    font-size: 0.93rem;
    line-height: 1.5;
    word-break: break-word;
    box-shadow: 0 6px 20px rgba(0, 153, 255, 0.25);
}

.msg-user .msg-time {
    font-size: 0.70rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 4px;
    margin-right: 4px;
}

/* Indicador de "Kuphia está escribiendo..." */
.typing-bubble {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 16px !important;
}

.typing-bubble span {
    width: 6px;
    height: 6px;
    background: #00f0ff;
    border-radius: 50%;
    animation: typingJump 1.2s infinite;
}

.typing-bubble span:nth-child(2) { animation-delay: 0.2s; }
.typing-bubble span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingJump {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.3; }
    30% { transform: translateY(-6px); opacity: 1; }
}

body.mode-chat-active .strands-avatar-container {
    display: none !important;
}

body.mode-chat-active .kuphia-title {
    font-size: 1.7rem !important;
    margin-bottom: 4px !important;
}

body.mode-chat-active .kuphia-subtitle {
    display: none !important;
}
