:root {
    --bg-dark: #121212;
    --panel-bg: #1e1e1e;
    --accent: #bb86fc;
    --text-main: #ffffff;
    --text-dim: #a0a0a0;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    visibility: hidden;
    opacity: 0;
    transition: 0.3s;
}

.overlay.active {
    visibility: visible;
    opacity: 1;
}

.login-box {
    background: var(--panel-bg);
    padding: 3rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 1px solid #333;
}

.login-box h1 { margin-bottom: 10px; color: var(--accent); }
.login-box p { color: var(--text-dim); margin-bottom: 20px; }
.login-box input {
    width: 100%; padding: 12px; border-radius: 8px;
    border: 1px solid #444; background: #2a2a2a; color: white;
    font-size: 1rem; margin-bottom: 15px; outline: none;
}
.login-box button {
    width: 100%; padding: 12px; border-radius: 8px;
    background: var(--accent); color: #000; font-weight: bold;
    border: none; cursor: pointer; font-size: 1rem;
    transition: 0.2s;
}
.login-box button:hover { opacity: 0.9; transform: translateY(-2px); }

/* Chat UI */
.chat-container {
    width: 100%;
    max-width: 800px;
    height: 90vh;
    background: var(--panel-bg);
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
    border: 1px solid #333;
    overflow: hidden;
}

header {
    padding: 20px;
    background: #252525;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
}

.status { font-size: 0.85rem; }
.status i { color: #00e676; margin-right: 5px; animation: pulse 2s infinite; }

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.chat-display {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.msg {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 15px;
    line-height: 1.4;
    word-wrap: break-word;
}

.msg.system { align-self: center; background: #333; color: var(--text-dim); font-size: 0.85rem; border-radius: 20px;}
.msg.me { align-self: flex-end; background: var(--accent); color: #000; border-bottom-right-radius: 2px;}
.msg.other { align-self: flex-start; background: #3a3a3a; border-bottom-left-radius: 2px;}
.msg.bot { align-self: flex-start; background: #ff4081; color: white; border-bottom-left-radius: 2px; box-shadow: 0 0 15px rgba(255, 64, 129, 0.3);}

.username-label { font-size: 0.75rem; opacity: 0.7; margin-bottom: 4px; display: block; font-weight: bold; }

.typing-indicator {
    padding: 5px 20px;
    color: var(--text-dim);
    font-size: 0.85rem;
    font-style: italic;
}
.hidden { display: none; }

.input-area {
    padding: 15px 20px;
    background: #252525;
    border-top: 1px solid #333;
    display: flex;
    gap: 10px;
    align-items: center;
}

.input-area input {
    flex: 1;
    padding: 15px;
    border-radius: 25px;
    border: none;
    background: #1e1e1e;
    color: white;
    font-size: 1rem;
    outline: none;
}

.mic-btn, .send-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 0.2s;
}

.send-btn { background: var(--accent); color: #000; }
.mic-btn { background: #333; color: white; }
.mic-btn.recording { background: #ff3366; color: white; animation: pulse 1s infinite; }
