* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #deebf8;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.chat-container {
    width: 100%;
    max-width: 650px;
    height: 88vh;
    background: #FFFFFF;
    border-radius: 18px;
    box-shadow: 0 10px 35px rgba(23, 59, 94, 0.31);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}


.chat-header {
    background: #173B5E;
    color: #FFFFFF;
    padding: 18px 22px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-container {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(229, 185, 92, 0.45);
    border-radius: 50%;
}

.logo-container img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.brand-text h1 {
    font-size: 1.65rem;
    font-weight: 700;
    margin-bottom: 3px;
}

.brand-text p {
    font-size: 1rem;
    color: #DCE8F2;
}


.chat-messages {
    flex: 1;
    padding: 24px 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background-color: #F4F8FC;
}


.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #C8D6E3;
    border-radius: 10px;
}


.message {
    max-width: 78%;
    padding: 13px 17px;
    border-radius: 15px;
    font-size: 0.95rem;
    line-height: 1.5;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.user-message {
    background-color: #3F78A8;
    color: #FFFFFF;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.bot-message {
    background-color: #E8F0F6;
    color: #1F2937;
    align-self: flex-start;
    border-bottom-left-radius: 2px;
    border: 1px solid #DCE7EF;
}


.bot-message.error {
    background-color: #FDECEC;
    color: #B42318;
    border-color: #F5C2C0;
}


.bot-message.loading {
    color: #64748B;
}


.chat-input-area {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    background: #FFFFFF;
    border-top: 1px solid #E1E9F0;
    gap: 10px;
}

.chat-input-area input {
    flex: 1;
    height: 48px;
    padding: 0 16px;
    border: 1px solid #CBD8E3;
    border-radius: 24px;
    outline: none;
    font-size: 0.95rem;
    color: #1F2937;
    background-color: #FFFFFF;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.chat-input-area input::placeholder {
    color: #8A9AAA;
}

.chat-input-area input:focus {
    border-color: #3F78A8;
}


.chat-input-area button {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #debe3c;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.15s, box-shadow 0.2s;
}

.chat-input-area button img {
    width: 21px;
    height: 21px;
    object-fit: contain;
}

.chat-input-area button:hover {
    background-color: #D5A846;
}


@media (max-width: 700px) {

    body {
        align-items: stretch;
    }

    .chat-container {
        width: 100%;
        height: 100vh;
        max-width: none;
        border-radius: 0;
    }

    .chat-messages {
        padding: 18px 14px;
    }

    .message {
        max-width: 85%;
    }

    .chat-header {
        padding: 15px 17px;
    }

    .brand-text h1 {
        font-size: 1.3rem;
    }

    .brand-text p {
        font-size: 0.76rem;
    }
}