/* Clean, Solid Aesthetic matching Leypakshe, Now Fullscreen & Vibrant */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap');

body {
    background-color: #1a1a1a;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    padding: 0;
}

.chat-wrapper {
    width: 100vw;
    height: 100vh;
    padding: 0;
    display: flex;
    justify-content: center;
    z-index: 10;
}

.chat-engine {
    width: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    height: 100%;

    /* Solid flat flat card style, full screen */
    background-color: #111;
    border: none;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
}

/* Header */
.chat-top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.08);
    background-color: #ff1493;
    /* rb-pink */
    z-index: 50;
    border-radius: 0;
}

.amiya-header {
    display: flex;
    align-items: center;
    gap: 16px;
}

.amiya-avatar {
    width: 50px;
    height: 50px;
    background-color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Soft border like app */
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.amiya-avatar i {
    font-size: 1.6rem;
    color: #111;
}

.amiya-title h3 {
    margin: 0;
    font-weight: 800;
    font-size: 1.6rem;
    color: #fff;
    letter-spacing: -0.5px;
}

.amiya-title small {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* Chat container details */
.chat-container {
    flex-grow: 1;
    overflow-y: auto;
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    scroll-behavior: smooth;
    background-color: #111;
}

/* Scrollbar */
.chat-container::-webkit-scrollbar {
    width: 6px;
}

.chat-container::-webkit-scrollbar-track {
    background: transparent;
}

.chat-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

/* Chat bubbles */
.chat-bubble {
    max-width: 80%;
    padding: 16px 24px;
    border-radius: 20px;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.5;
    animation: slideUpFade 0.3s ease forwards;
    word-wrap: break-word;
    opacity: 0;
    transform: translateY(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.chat-bubble.user {
    align-self: flex-end;
    background-color: #0c61ac;
    /* rb-blue */
    color: #fff;
    border-bottom-right-radius: 4px;
    border: none;
}

.chat-bubble.model {
    align-self: flex-start;
    background-color: #222;
    color: #fff;
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-bubble.error {
    align-self: center;
    background-color: crimson;
    /* rb-red */
    color: #fff;
    font-weight: 600;
    border-radius: 20px;
    border: none;
}

/* Input Area */
.input-bar {
    padding: 20px 32px;
    background-color: #111;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 16px;
    align-items: center;
}

.input-wrapper {
    flex-grow: 1;
    position: relative;
    display: flex;
    align-items: center;
}

#messageInput {
    width: 100%;
    background-color: #222;
    border: 2px solid transparent;
    color: #fff;
    padding: 18px 24px;
    border-radius: 30px;
    font-size: 1.05rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    outline: none;
    transition: all 0.2s ease;
}

#messageInput::placeholder {
    color: #888;
}

#messageInput:focus {
    background-color: #222;
    border-color: #0c61ac;
    box-shadow: 0 4px 15px rgba(12, 97, 172, 0.2);
}

#messageInput:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#sendBtn {
    background-color: #ff1493;
    /* Match header */
    color: #fff;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 15px rgba(255, 20, 147, 0.3);
}

#sendBtn:hover:not(:disabled) {
    background-color: #d11078;
    transform: translateY(-2px);
}

#sendBtn:active:not(:disabled) {
    transform: translateY(1px);
}

#sendBtn:disabled {
    background-color: #333;
    color: #888;
    box-shadow: none;
    cursor: not-allowed;
}

/* Buttons for Top Nav */
.btn-reset {
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    border: none;
    padding: 10px 18px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-reset:hover {
    background-color: rgba(255, 255, 255, 0.35);
}

/* Loader */
.typing-indicator {
    align-self: flex-start;
    display: flex;
    gap: 6px;
    padding: 16px 20px;
    background-color: #222;
    border-radius: 20px;
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideUpFade 0.3s forwards;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background-color: #fff;
    border-radius: 50%;
    animation: pulse 1.4s infinite ease-in-out both;
}

.typing-indicator span:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-indicator span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes pulse {

    0%,
    80%,
    100% {
        transform: scale(0.6);
        opacity: 0.4;
    }

    40% {
        transform: scale(1);
        opacity: 1;
        background-color: #ff1493;
    }
}

@keyframes slideUpFade {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .chat-wrapper {
        padding: 0;
        height: 100vh;
    }

    .chat-engine {
        border-radius: 0;
        border: none;
        box-shadow: none;
    }

    .chat-top-nav {
        padding: 18px 20px;
        border-radius: 0;
    }

    .chat-bubble {
        max-width: 90%;
        font-size: 1.05rem;
        padding: 14px 20px;
    }

    #messageInput {
        padding: 16px 20px;
    }

    #sendBtn {
        width: 55px;
        height: 55px;
        font-size: 1.2rem;
    }

    .btn-reset {
        padding: 10px;
        border-radius: 50%;
        width: 45px;
        height: 45px;
        justify-content: center;
    }

    .hide-mobile {
        display: none;
    }
}