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

body {
    font-family: 'Outfit', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: #faf9f6; /* Aesthetic off-white */
    color: #2d2d2d;
}

/* Minimalist Container */
.container {
    width: 95%;
    max-width: 850px;
    height: 90vh;
    background: #ffffff;
    border: 1px solid #eaeaea;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header UI */
.header {
    background: #ffffff;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
}

.header-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.avatar {
    width: 40px;
    height: 40px;
    background: #f9f9f9;
    color: #2d2d2d;
    border: 1px solid #eaeaea;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
}

.header h2 {
    font-size: 17px;
    font-weight: 600;
    color: #2d2d2d;
    letter-spacing: -0.3px;
}

.header p {
    font-size: 12px;
    color: #888888;
    margin-top: 3px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 400;
}

.status-dot {
    width: 6px;
    height: 6px;
    background-color: #10b981;
    border-radius: 50%;
    display: inline-block;
}

.menu-btn {
    background: none;
    border: none;
    color: #cccccc;
    font-size: 18px;
    cursor: pointer;
    transition: color 0.3s;
}

.menu-btn:hover {
    color: #2d2d2d;
}

/* Chat Area */
#chat-box {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 25px;
    background: #ffffff;
}

.message {
    display: flex;
    width: 100%;
    animation: fadeIn 0.4s ease-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.message.user {
    justify-content: flex-end;
}

.message.bot {
    justify-content: flex-start;
    gap: 15px;
}

.avatar-small {
    width: 30px;
    height: 30px;
    background: #f5f5f5;
    color: #555555;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 13px;
    flex-shrink: 0;
    margin-top: 4px;
    border: 1px solid #eaeaea;
}

.bubble {
    max-width: 75%;
    padding: 15px 20px;
    font-size: 14px;
    line-height: 1.6;
    font-weight: 300;
}

.user .bubble {
    background: #2d2d2d;
    color: #ffffff;
    border-radius: 14px 14px 4px 14px;
}

.bot .bubble {
    background: #f9f9f9;
    color: #333333;
    border-radius: 14px 14px 14px 4px;
    border: 1px solid #f0f0f0;
}

/* Markdown styling inside bot bubble */
.bot .bubble h1, .bot .bubble h2, .bot .bubble h3 {
    margin-top: 15px;
    margin-bottom: 10px;
    color: #1a1a1a;
    font-weight: 600;
}
.bot .bubble h3 { font-size: 15px; }
.bot .bubble p { margin-bottom: 12px; }
.bot .bubble p:last-child { margin-bottom: 0; }
.bot .bubble ul, .bot .bubble ol { padding-left: 20px; margin-bottom: 12px; }
.bot .bubble li { margin-bottom: 6px; }
.bot .bubble strong { color: #1a1a1a; font-weight: 600; }
.bot .bubble code { 
    background: #eeeeee; 
    padding: 3px 6px; 
    border-radius: 4px; 
    font-family: monospace;
    font-size: 13px;
    color: #555555;
}

.thinking {
    display: flex;
    gap: 8px;
    align-items: center;
    color: #888888;
    font-style: italic;
}

/* Input Area */
.input-area {
    padding: 20px 25px;
    background: #ffffff;
    border-top: 1px solid #f0f0f0;
}

.input-wrapper {
    display: flex;
    background: #f9f9f9;
    border-radius: 12px;
    padding: 6px 10px;
    border: 1px solid #eaeaea;
    transition: all 0.3s ease;
}

.input-wrapper:focus-within {
    background: #ffffff;
    border-color: #cccccc;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.02);
}

input {
    flex: 1;
    padding: 12px 15px;
    background: transparent;
    border: none;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    color: #2d2d2d;
    font-weight: 300;
}

input::placeholder {
    color: #aaaaaa;
}

.send-btn {
    background: #2d2d2d;
    color: white;
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
}

.send-btn:hover {
    background: #1a1a1a;
}

.send-btn:active {
    transform: scale(0.96);
}

.footer-text {
    text-align: center;
    font-size: 11px;
    color: #aaaaaa;
    margin-top: 15px;
    font-weight: 300;
}

/* Scrollbar minimalis */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #e0e0e0;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #cccccc;
}
