#chat-toggle {
    position: fixed;
    bottom: 25px;
    right: 180px;
    width: 110px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 600;
    color: white;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(225, 29, 72, 0.1);
    z-index: 9999;
    transition: all .3s ease, color .2s ease;
    animation: pulse-innobot 2s infinite;
}

#chat-toggle:hover {
    animation: none;
    transform: translateY(-3px);
    background: #A4161A;
    border-color: #A4161A;
    color: white !important;
    backdrop-filter: none;
    box-shadow: 0 12px 40px rgba(164, 22, 27, 0.621), 0 0 0 1px rgba(230, 58, 64, 0.723);
}

#chat-toggle.ib-dark-text {
    color: #1a1a2e;
}

@keyframes pulse-innobot {
    0% {
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 0 rgb(225, 29, 71);
    }
    70% {
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 12px rgba(225, 29, 72, 0);
    }
    100% {
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 0 rgba(225, 29, 72, 0);
    }
}

/* Responsive */
@media (max-width: 1024px) {
    #chat-toggle { right: 175px; width: 100px; height: 56px; font-size: 13px; border-radius: 16px; }
}
@media (max-width: 768px) {
    #chat-toggle { bottom: 16px; right: 95px; width: 90px; height: 52px; font-size: 12px; border-radius: 15px; gap: 8px; }
}
@media (max-width: 480px) {
    #chat-toggle { bottom: 14px; right: 82px; width: 82px; height: 48px; font-size: 11px; border-radius: 14px; padding: 8px; }
}

/* CHAT CONTAINER */
#chat-container {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 310px;
    height: 450px;
    display: none;
    flex-direction: column;
    background: rgb(255, 255, 255);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-radius: 20px;
    border: 1px solid rgba(255, 253, 253, 0.186) !important;
    box-shadow: 0 20px 60px rgba(255, 253, 253, 0.186) !important;
    overflow: visible;
    z-index: 9999;
    padding-top: 58px;
}

/* Avatar flotante */
.bot-avatar-wrap {
    position: absolute;
    top: -48px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.bot-avatar-glow {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 2px solid rgb(244, 6, 33);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 0 0 5px rgba(186, 24, 27, 0.12), 0 0 0 10px rgba(186, 24, 27, 0.06), 0 0 28px rgba(186, 24, 27, 0.55), 0 0 55px rgba(186, 24, 27, 0.20), 0 10px 28px rgba(0, 0, 0, 0.5);
    animation: avatar-pulse 3s ease-in-out infinite;
}

.bot-avatar-img {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

@keyframes avatar-pulse {
    0%, 100% {
        box-shadow: 0 0 0 4px rgba(186, 24, 27, 0.12), 0 0 0 8px rgba(186, 24, 27, 0.06), 0 0 26px rgba(186, 24, 27, 0.55), 0 0 50px rgba(186, 24, 27, 0.20), 0 8px 24px rgba(0,0,0,0.5);
    }
    50% {
        box-shadow: 0 0 0 7px rgba(225, 29, 72, 0.18), 0 0 0 14px rgba(225, 29, 72, 0.08), 0 0 38px rgba(225, 29, 72, 0.70), 0 0 70px rgba(225, 29, 72, 0.30), 0 10px 28px rgba(0,0,0,0.65);
    }
}

/* Badge IA */
.bot-status-badge {
    position: absolute;
    top: -10px;
    right: 10px;
    background: linear-gradient(135deg, #a0a5a2, #929593);
    border: 2px solid #1a080f;
    border-radius: 20px;
    padding: 2px 8px;
    font-size: 9px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.06em;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(236, 13, 13, 0.55);
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
}

.bot-status-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #f82008;
    display: inline-block;
    animation: blink-dot 1.5s ease-in-out infinite;
}

@keyframes blink-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Header */
.chat-header {
    text-align: center;
    padding: 4px 16px 14px;
    border-bottom: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.chat-header-label {
    font-size: 10px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-family: 'Inter', sans-serif;
}

.chat-header-title {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.05em;
    font-family: 'Inter', sans-serif;
}

/* ========== SCROLLBAR ROJO ========== */
#chat-box {
    flex: 1;
    padding: 12px 12px 12px 40px;
    overflow-y: auto;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: #e11d48 rgba(225, 29, 72, 0.2);
}

#chat-box::-webkit-scrollbar {
    width: 6px;
}

#chat-box::-webkit-scrollbar-track {
    background: rgba(225, 29, 72, 0.15);
    border-radius: 10px;
    margin: 5px 0;
}

#chat-box::-webkit-scrollbar-thumb {
    background: #e11d48;
    border-radius: 10px;
    transition: background 0.2s ease;
}

#chat-box::-webkit-scrollbar-thumb:hover {
    background: #ff2a5c;
    box-shadow: 0 0 4px #e11d48;
}

/* ========== MENSAJES DEL BOT (GRISES - MÁS GRANDES, ICONO AFUERA) ========== */
.bot-message {
    background: linear-gradient(135deg, #2d2d3a, #1e1e28);
    border-left: 3px solid #6b7280;
    color: #f0f0f0;
    font-weight: 500;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    position: relative;
    padding: 10px 14px;
    margin: 10px 0 10px 35px;
    border-radius: 14px;
    max-width: 80%;
    font-family: 'Inter', sans-serif;
    line-height: 1.45;
    display: inline-block;
    clear: both;
}

.bot-message:hover {
    transform: translateX(2px);
    background: linear-gradient(135deg, #3a3a4a, #2a2a38);
    border-left-width: 4px;
    border-left-color: #9ca3af;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

/* Icono 🤖 bien afuera a la izquierda - más grande */
.bot-message::before {
    content: '';
    position: absolute;
    left: -38px;
    top: 50%;
    transform: translateY(-50%);
    background: url('images/robot.png') no-repeat center center;
    background-size: cover;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    border: 2px solid #e11d48;
}

/* ========== MENSAJES DEL USUARIO (ROJO - MÁS GRANDES, ICONO AFUERA) ========== */
.user-message {
    background: linear-gradient(115deg, #e11d48, #be123c);
    color: white;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 2px 10px rgba(225, 29, 72, 0.45);
    border-radius: 18px 18px 6px 18px;
    transition: all 0.2s ease;
    position: relative;
    border: 1px solid rgba(255, 200, 200, 0.25);
    padding: 10px 14px;
    margin: 10px 35px 10px 0;
    max-width: 80%;
    margin-left: auto;
    font-family: 'Inter', sans-serif;
    line-height: 1.45;
    display: inline-block;
    clear: both;
}

.user-message:hover {
    transform: scale(1.01);
    background: linear-gradient(115deg, #ff1f4a, #e11d48);
    box-shadow: 0 4px 16px rgba(225, 29, 72, 0.65);
}

/* Icono 👤 bien afuera a la derecha - más grande */
.user-message::after {
    content: '👤';
    position: absolute;
    right: -38px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 26px;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.2));
    background: rgba(225,29,72,0.45);
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Animación de entrada */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bot-message, .user-message {
    animation: fadeInUp 0.3s ease-out;
}

/* ========== CHAT OPTIONS ========== */
.chat-options {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px;
}

.chat-options button {
    flex: 1 1 auto;
    min-width: fit-content;
    padding: 8px 12px;
    border-radius: 20px;
    border: 1px solid rgba(225, 29, 72, 0.5);
    background: rgba(255,255,255,0.08);
    color: white;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
}

.chat-options button:hover {
    background: #e11d48;
    box-shadow: 0 0 12px rgba(225, 29, 72, 0.6);
    border-color: #e11d48;
}

/* Video embebido */
.video-embed {
    padding: 10px !important;
    background: rgba(0,0,0,0.3) !important;
}

.video-embed iframe {
    display: block;
    border-radius: 10px;
}

/* INPUT */
.chat-input {
    display: none;
    padding: 12px 14px 16px;
    gap: 10px;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: transparent;
}

.chat-input input {
    flex: 1;
    padding: 10px 12px;
    border-radius: 12px;
    border: none;
    font-size: 13px;
}

.chat-input button {
    margin-left: 5px;
    padding: 10px 14px;
    border: none;
    border-radius: 12px;
    background: #e11d48;
    color: white;
    cursor: pointer;
    font-size: 13px;
}

/* Modos claro/oscuro */
#chat-container {
    background: rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(186, 24, 27, 0.25);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transition: background 0.4s ease, border 0.4s ease, box-shadow 0.4s ease;
}

#chat-container.chat-light-mode {
    background: rgba(11, 9, 10, 0.85) !important;
    border: 1px solid rgba(186, 24, 27, 0.4) !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6) !important;
}

/* Video flotante */
#floatingVideo iframe {
    transition: all 0.3s ease;
}

#floatingVideo iframe:hover {
    transform: scale(1.02);
}

#floatingVideo {
    transition: width 0.2s ease;
    font-family: 'Inter', system-ui, sans-serif;
}

#floatingVideo button {
    font-family: inherit;
}

#floatingVideo button:hover {
    color: white !important;
}

.video-container iframe {
    transition: height 0.2s ease;
}