.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    background-color: var(--bg-main);
}


/* Messages Scroll Box */

.messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px 20px 140px 20px;
    /* Bottom padding so text doesn't hide behind input */
    display: flex;
    flex-direction: column;
    gap: 20px;
    scroll-behavior: smooth;
}


/* Welcome Screen */

.welcome-screen {
    margin: auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--text-secondary);
}

.welcome-screen h1 {
    font-size: 32px;
    color: var(--text-primary);
    font-weight: 600;
}

.welcome-screen p {
    font-size: 16px;
}


/* Message Items */

.message {
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    display: flex;
}

.message-content {
    padding: 12px 18px;
    border-radius: 12px;
    line-height: 1.6;
    font-size: 14.5px;
    word-break: break-word;
}

.message--user {
    justify-content: flex-end;
}

.message--user .message-content {
    background-color: var(--user-msg-bg);
    color: var(--text-primary);
    border-radius: 18px 18px 4px 18px;
}

.message--assistant .message-content {
    background-color: transparent;
    color: var(--text-primary);
    width: 100%;
}


/* Code Blocks & Copy Button Container */

pre {
    position: relative;
    background-color: #1e1f20 !important;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 40px 16px 16px 16px;
    margin: 12px 0;
    overflow-x: auto;
}

code {
    font-family: 'Fira Code', Consolas, Monaco, monospace;
    font-size: 13.5px;
}

.copy-code-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: #2b2c2f;
    color: #e3e3e3;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 5;
}

.copy-code-btn:hover {
    background-color: #3c3d41;
}

.copy-code-btn.copied {
    background-color: #2e6b38;
    color: #81c784;
}


/* Bottom Input Bar */


/* Clean & Responsive Input Box Area */

.input-area {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(transparent, var(--bg-main) 50%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.input-box {
    width: 100%;
    max-width: 760px;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    display: flex;
    align-items: center;
    padding: 8px 12px 8px 18px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    transition: border-color 0.2s ease;
}

.input-box:focus-within {
    border-color: #4a4d51;
}

.input-box textarea {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 14.5px;
    resize: none;
    max-height: 150px;
    font-family: inherit;
    line-height: 1.5;
    padding: 6px 0;
    overflow-y: auto;
}


/* Hide default browser scrollbar for small text */

.input-box textarea::-webkit-scrollbar {
    width: 0px;
}

.input-box textarea::placeholder {
    color: var(--text-secondary);
}

.input-box button {
    background-color: var(--text-primary);
    color: var(--bg-main);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    flex-shrink: 0;
    margin-left: 10px;
    transition: transform 0.1s ease, opacity 0.2s ease;
}

.input-box button:hover {
    transform: scale(1.05);
}

.input-box button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 820px) {
    .input-area button {
        right: 32px;
    }
}