* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #fafaff;
    color: #4d3bb8;
}


/* =========================
   CONTENEDOR
========================= */

.container {
    padding: 22px 56px 50px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 16px;
    color: #5946c5;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
}

.back-link > span:first-child {
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border: 1px solid #dcd7ff;
    border-radius: 50%;
    background: #fff;
    font-size: 22px;
    line-height: 1;
    transition: background-color 0.2s, transform 0.2s;
}

.back-link:hover > span:first-child {
    background: #eeeaff;
    transform: translateX(-2px);
}

.back-link:focus-visible {
    outline: 2px solid #8c78e8;
    outline-offset: 3px;
    border-radius: 4px;
}


/* =========================
   ENCABEZADO
========================= */

.welcome {
    background: linear-gradient(
        110deg,
        #f1efff,
        #f6f4ff
    );

    border: 1px solid #e4e0ff;
    border-radius: 15px;

    padding: 26px 29px;

    margin-bottom: 20px;
}

.welcome h1 {
    font-size: 47px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #4935b5;
}

.welcome p {
    font-size: 17px;
    line-height: 1.45;
    color: #7566dc;
}


/* =========================
   CHAT
========================= */

.chat-container {
    height: 617px;

    background: white;
    border: 1px solid #ddd9ff;
    border-radius: 15px;

    display: flex;
    flex-direction: column;

    overflow: hidden;
}


/* Cabecera */

.chat-header {
    min-height: 103px;

    display: flex;
    align-items: center;

    gap: 24px;

    padding: 18px 28px;

    border-bottom: 1px solid #e6e3ff;
}

.bot-icon {
    width: 42px;
    height: 42px;

    flex-shrink: 0;

    border-radius: 50%;

    background: #eeeaff;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 20px;
}

.bot-icon.large {
    width: 70px;
    height: 70px;

    font-size: 31px;
}

.chat-header h2 {
    font-size: 20px;
    color: #674dd3;
    margin-bottom: 5px;
}

.chat-header p {
    color: #8073dc;
    font-size: 15px;
}


/* Mensajes */

.chat-messages {
    flex: 1;
    padding: 28px 38px;

    overflow-y: auto;
}

.message {
    display: flex;
    align-items: flex-start;

    gap: 18px;

    margin-bottom: 28px;
}

.bot-message {
    justify-content: flex-start;
}

.user-message {
    justify-content: flex-end;
}


/* Burbujas */

.message-bubble {
    max-width: 510px;

    padding: 13px 17px;

    border-radius: 14px;

    font-size: 14px;
    line-height: 1.6;

    color: #7567d8;

    background: #f0efff;
}

.user-message .message-bubble {
    background: linear-gradient(
        135deg,
        #9a83ed,
        #7659d9
    );

    color: white;

    border-radius: 15px 15px 4px 15px;
}


/* =========================
   INPUT
========================= */

.chat-input {
    display: flex;
    gap: 14px;

    padding: 0 28px 27px;
}

.chat-input input {
    flex: 1;

    height: 60px;

    border: 1px solid #ddd9ff;
    border-radius: 15px;

    padding: 0 24px;

    outline: none;

    font-size: 15px;

    color: #6555ce;
}

.chat-input input::placeholder {
    color: #a49be9;
}

.chat-input input:focus {
    border-color: #8c78e8;
    box-shadow: 0 0 0 3px #f0edff;
}

.chat-input button {
    width: 57px;
    height: 57px;

    border: none;
    border-radius: 14px;

    background: linear-gradient(
        135deg,
        #9075eb,
        #7251d4
    );

    color: white;

    font-size: 23px;

    cursor: pointer;

    transition: 0.2s;
}

.chat-input button:hover {
    transform: translateY(-2px);
}


/* =========================
   RESPONSIVE
========================= */

@media (max-width: 700px) {

    .container {
        padding: 20px;
    }

    .welcome h1 {
        font-size: 35px;
    }

    .welcome p br {
        display: none;
    }

    .chat-container {
        height: 600px;
    }

    .chat-messages {
        padding: 20px;
    }
}