/* Reset & Base Styling */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: #0f172a;
    color: #f8fafc;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #1e293b;
    padding: 14px 20px;
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pulse-dot {
    width: 10px;
    height: 10px;
    background-color: #6366f1;
    border-radius: 50%;
    box-shadow: 0 0 8px #6366f1;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.8; }
}

.header h1 {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.badge {
    background: #1e293b;
    border: 1px solid #334155;
    color: #94a3b8;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 20px;
}

/* Chat Container */
.chat-container {
    flex: 1;
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
    margin-bottom: 80px;
}

.chat-container::-webkit-scrollbar {
    width: 6px;
}

.chat-container::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}

/* Message Bubbles */
.message {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    max-width: 85%;
}

.ai-message {
    align-self: flex-start;
}

.user-message {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    flex-shrink: 0;
}

.ai-avatar {
    background: #4f46e5;
    color: white;
}

.user-avatar {
    background: #334155;
    color: #cbd5e1;
}

.bubble {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(51, 65, 85, 0.6);
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 0.9rem;
    line-height: 1.5;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.user-message .bubble {
    background: #4f46e5;
    border-color: #6366f1;
    color: white;
}

/* Footer / Input Form */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(12px);
    border-top: 1px solid #1e293b;
    padding: 12px 16px;
}

.chat-form {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    gap: 10px;
}

.chat-form input {
    flex: 1;
    background: #020617;
    border: 1px solid #1e293b;
    border-radius: 12px;
    padding: 12px 16px;
    color: #f8fafc;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}

.chat-form input:focus {
    border-color: #6366f1;
}

.chat-form input::placeholder {
    color: #64748b;
}

.chat-form button {
    background: #4f46e5;
    color: white;
    border: none;
    border-radius: 12px;
    padding: 0 20px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.chat-form button:hover {
    background: #4338ca;
}

.chat-form button:active {
    transform: scale(0.98);
}
