/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #000000 100%);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    overflow: hidden;
}

/* Glassmorphism Container */
.chat-container {
    width: 90%;
    max-width: 1000px;
    height: 85vh;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* Header */
.chat-header {
    background: rgba(15, 23, 42, 0.6);
    padding: 20px 30px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #fbbf24; /* Gold border */
    margin-right: 15px;
    object-fit: cover;
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
}

.header-info h1 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #f1f5f9;
}

.header-info p {
    font-size: 0.85rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: #10b981; /* Green online */
    border-radius: 50%;
    margin-right: 6px;
    box-shadow: 0 0 5px #10b981;
}

/* Chat Area */
.chat-messages {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    scroll-behavior: smooth;
}

/* Scrollbar styling */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}
.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}
.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

/* Message Bubbles */
.message {
    max-width: 80%;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.3s ease-up;
}

.message.bot {
    align-self: flex-start;
}

.message.user {
    align-self: flex-end;
    align-items: flex-end;
}

.bubble {
    padding: 12px 18px;
    border-radius: 16px;
    font-size: 0.95rem;
    line-height: 1.6;
    position: relative;
    word-wrap: break-word;
}

.message.bot .bubble {
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    border-top-left-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.message.user .bubble {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    border-top-right-radius: 4px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Input Area */
.chat-input-area {
    padding: 20px 30px;
    background: rgba(15, 23, 42, 0.6);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 15px;
}

.input-wrapper {
    flex: 1;
    position: relative;
}

input[type="text"] {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 16px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.2s;
    outline: none;
}

input[type="text"]:focus {
    border-color: #3b82f6;
    background: rgba(0, 0, 0, 0.3);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

button.send-btn {
    background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%); /* Gold gradient */
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s;
    display: flex;
    align-items: center;
    gap: 8px;
}

button.send-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

button.send-btn:active {
    transform: translateY(1px);
}

/* Markdown Styles inside bot messages */
.bubble p { margin-bottom: 8px; }
.bubble p:last-child { margin-bottom: 0; }
.bubble ul { margin-left: 20px; margin-bottom: 8px; }
.bubble strong { color: #fbbf24; } /* Gold highlight */

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    background: #94a3b8;
    border-radius: 50%;
    display: inline-block;
    animation: bounce 1.4s infinite ease-in-out both;
    margin: 0 2px;
}

.typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.typing-indicator span:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}
