/* ======================================================
   🥃 CONTENEDOR PRINCIPAL – VIDRIO ESCOARCHADO PREMIUM
====================================================== */
#celeste-chat {
    position: fixed;
    bottom: 100px;
    right: 40px;
    width: 360px;
    height: 520px;
    display: none;
    flex-direction: column;
    z-index: 999999;
    backdrop-filter: blur(28px) saturate(140%);
    -webkit-backdrop-filter: blur(28px) saturate(140%);

    /* 🔥 Textura estilo whisky escarchado */
    background:
        url("https://thumbs.dreamstime.com/b/textura-de-vidrio-en-tierra-con-tono-marr%C3%B3n-claro-fondo-abstracto-y-patr%C3%B3n-para-dise%C3%B1adores-color-escarcha-arte-material-163817633.jpg"), /* textura vidrio escarchado suave */
        radial-gradient(at top left, rgba(255,255,255,0.22), rgba(10,10,10,0.88));

    background-size: cover;
    background-blend-mode: overlay;

    border-radius: 30px;
    border: 1px solid rgba(255,255,255,0.22);
    box-shadow:
        0 40px 80px rgba(0,0,0,0.9),
        0 0 60px rgba(255,170,60,0.18),
        inset 0 1px 0 rgba(255,255,255,0.28),
        inset 0 -1px 0 rgba(0,0,0,0.7);

    overflow: hidden;
    animation: fadeIn 0.45s ease-out;
}


/* ======================================================
   ✨ REFLEJO DE VIDRIO – MÁS REALISTA
====================================================== */
#celeste-chat::before {
    content: "";
    position: absolute;
    top: -70%;
    left: -90%;
    width: 240%;
    height: 240%;
    background: linear-gradient(
        120deg,
        transparent 35%,
        rgba(255,255,255,0.18) 47%,
        rgba(255,255,255,0.33) 50%,
        rgba(255,255,255,0.18) 53%,
        transparent 65%
    );
    transform: rotate(8deg);
    pointer-events: none;
    animation: glassReflection 14s ease-in-out infinite;
    mix-blend-mode: screen;
}

/* ======================================================
   🌫️ HUMO INTERNO – AÚN MÁS SUAVE
====================================================== */
#celeste-chat::after {
    content: "";
    position: absolute;
    inset: -25%;
    background:
        radial-gradient(circle at 30% 40%, rgba(255,255,255,0.06), transparent 65%),
        radial-gradient(circle at 75% 65%, rgba(255,255,255,0.05), transparent 70%);
    filter: blur(45px);
    opacity: 0.35;
    pointer-events: none;
    animation: smokeMove 22s ease-in-out infinite alternate;
}

/* ======================================================
   🟦 HEADER
====================================================== */
.celeste-header {
    padding: 10px 18px;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(10px);
    color: rgba(255,255,255,0.95);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.18);
}

/* Botón cerrar */
#celeste-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.75);
    font-size: 22px;
    cursor: pointer;
    transition: 0.25s;
}
#celeste-close:hover {
    color: white;
    transform: rotate(90deg);
}

/* ======================================================
   💬 MENSAJES
====================================================== */
#celeste-msgs {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    color: white;
}

/* Usuario */
.user {
    align-self: flex-end;
    max-width: 78%;
    margin-bottom: 14px;
    padding: 12px 16px;
    background: rgba(255,255,255,0.9);
    color: #111;
    border-radius: 18px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

/* Bot */
.bot {
    align-self: flex-start;
    max-width: 78%;
    margin-bottom: 14px;
    padding: 14px 16px;
    background: rgba(15,15,15,0.88);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.92);
    border-radius: 18px;
    box-shadow: 0 10px 22px rgba(0,0,0,0.45);
}

/* ======================================================
   ✏️ INPUT
====================================================== */
.celeste-input {
    display: flex;
    gap: 10px;
    padding: 14px;
    background: rgba(0,0,0,0.6);
    border-top: 1px solid rgba(255,255,255,0.18);
}

#celeste-input {
    flex: 1;
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.9);
}
#celeste-input::placeholder {
    color: rgba(255,255,255,0.55);
}

/* ======================================================
   🔘 BOTÓN ENVIAR – ORO PREMIUM
====================================================== */
#celeste-send {
    background: linear-gradient(to bottom, #ffdca0, #ffb347);
    color: #000;
    border: none;
    border-radius: 999px;
    padding: 10px 18px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.25s;
}
#celeste-send:hover {
    filter: brightness(1.12);
}

/* ======================================================
   💬 BOTÓN FLOTANTE
====================================================== */
#celeste-launcher {
    position: fixed;
    bottom: 25px;
    right: 30px;
    z-index: 1000000;
    background: radial-gradient(circle at top left, #ffe0b0, #ffb347);
    color: #000;
    font-size: 26px;
    padding: 18px;
    border-radius: 50%;
    box-shadow: 0 14px 30px rgba(0,0,0,0.5);
    cursor: pointer;
    backdrop-filter: blur(5px);
}


/* ======================================================
   ✨ ANIMACIONES
====================================================== */

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes glassReflection {
    0%   { transform: translateX(-65%) rotate(8deg); opacity: 0; }
    35%  { opacity: 0.45; }
    50%  { transform: translateX(40%) rotate(8deg); opacity: 0.28; }
    70%  { opacity: 0.45; }
    100% { transform: translateX(150%) rotate(8deg); opacity: 0; }
}

@keyframes smokeMove {
    from { transform: translateY(-10px); }
    to   { transform: translateY(20px); }
}


#celeste-mic {
    background: linear-gradient(to bottom, #ffd28a, #ffb347);
    color: #000;
    border: none;
    border-radius: 999px;
    padding: 0 14px;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.25s;
    box-shadow: 0 4px 14px rgba(0,0,0,0.35);
}

/* ======================================================
   ✨  MICROFONO
====================================================== */

#celeste-mic:hover {
    filter: brightness(1.12);
}

#celeste-mic.listening {
    animation: micPulse 1.2s infinite;
    background: linear-gradient(to bottom, #ffe6b8, #ffc46b);
}

@keyframes micPulse {
    0% { transform: scale(1); box-shadow: 0 0 0px rgba(255,180,80,0.3); }
    50% { transform: scale(1.1); box-shadow: 0 0 12px rgba(255,180,80,0.6); }
    100% { transform: scale(1); box-shadow: 0 0 0px rgba(255,180,80,0.3); }
}