/* --- Basic Reset and Global Styles --- */
:root {
    --bg-color: #10172A;
    --container-bg: #1C274C;
    --sidebar-bg: #10172A;
    --primary-blue: #3A7DFF;
    --light-blue: #5A9BFF;
    --text-primary: #F0F4F9;
    --text-secondary: #A9B4CC;
    --border-color: #2a3a6b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', 'Noto Sans Bengali', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* --- Main App Container --- */
.app-container {
    width: 100%;
    max-width: 1400px;
    height: 90vh;
    min-height: 700px;
    background-color: var(--container-bg);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

/* --- Sidebar Styles --- */
.sidebar {
    flex-basis: 260px;
    background-color: var(--sidebar-bg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
}

.new-chat-btn {
    width: 100%;
    padding: 12px;
    background-color: var(--primary-blue);
    color: var(--text-primary);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-family: 'Noto Sans Bengali', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.new-chat-btn:hover {
    background-color: var(--light-blue);
}

.chat-history {
    margin-top: 30px;
}

.history-title {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-weight: 500;
}

.chat-history ul {
    list-style: none;
}

.chat-history li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    text-decoration: none;
    color: var(--text-secondary);
    border-radius: 6px;
    font-size: 15px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.chat-history li a:hover {
    background-color: #2a3a6b;
    color: var(--text-primary);
}


/* --- Chat Area and Header Styles --- */
.chat-area {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--container-bg);
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background-color: var(--primary-blue);
    color: white;
    display: grid;
    place-items: center;
    border-radius: 8px;
    font-weight: 700;
    font-size: 18px;
}

.logo-section h1 {
    font-size: 20px;
    font-weight: 500;
}

.header-nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
}

.header-nav ul li a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 15px;
    transition: color 0.3s ease;
}

.header-nav ul li a:hover {
    color: var(--text-primary);
}

.user-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}

.login-btn {
    padding: 8px 18px;
    background-color: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 6px;
    font-family: 'Noto Sans Bengali', sans-serif;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.login-btn:hover {
    background-color: var(--light-blue);
}

.chat-content-placeholder {
    flex-grow: 1;
    /* We will style this area in the next step */
}
/* --- Chat Interface Styles (NEXT PART) --- */

.chat-interface {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Prevents content from spilling out */
}

.chat-messages {
    flex-grow: 1;
    padding: 30px;
    overflow-y: auto; /* Makes messages scrollable */
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Custom Scrollbar (Optional but looks nice) */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}
.chat-messages::-webkit-scrollbar-thumb {
    background: var(--primary-blue);
    border-radius: 10px;
}
.chat-messages::-webkit-scrollbar-track {
    background: var(--container-bg);
}


.welcome-message {
    text-align: center;
    margin: 40px 0;
    color: var(--text-secondary);
}

.welcome-message h1 {
    font-size: 2.2rem;
    font-weight: 500;
}

/* --- Message Bubble Styles --- */
.message-bubble {
    max-width: 65%;
    padding: 15px 20px;
    border-radius: 20px;
    line-height: 1.6;
    font-size: 16px;
}

.ai-bubble {
    background-color: var(--primary-blue);
    color: var(--text-primary);
    border-bottom-left-radius: 5px;
    align-self: flex-start;
}

.user-bubble {
    background-color: #37436b;
    color: var(--text-primary);
    border-bottom-right-radius: 5px;
    align-self: flex-end;
}

/* --- Chat Input Area Styles --- */
.chat-input-area {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px 30px;
    border-top: 1px solid var(--border-color);
    background-color: var(--container-bg);
}

.chat-input-area input {
    flex-grow: 1;
    height: 50px;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0 20px;
    color: var(--text-primary);
    font-size: 16px;
    font-family: 'Poppins', 'Noto Sans Bengali', sans-serif;
}

.chat-input-area input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(58, 125, 255, 0.3);
}

.action-btn {
    width: 50px;
    height: 50px;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 10px;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background-color: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}
/* --- Typing Indicator Animation --- */
.typing-indicator .dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.7);
    margin: 0 2px;
    animation: wave 1.3s linear infinite;
}

.typing-indicator .dot:nth-child(2) {
    animation-delay: -1.1s;
}

.typing-indicator .dot:nth-child(3) {
    animation-delay: -0.9s;
}

@keyframes wave {
    0%, 60%, 100% {
        transform: initial;
    }
    30% {
        transform: translateY(-8px);
    }
}