:root {
	--bg-color: #0f172a;
	--text-color: #f8fafc;
	--accent-color: #38bdf8;
	--accent-gradient: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
	--glass-bg: rgba(30, 41, 59, 0.7);
	--glass-border: rgba(255, 255, 255, 0.1);
	--bot-msg-bg: rgba(51, 65, 85, 0.5);
	--user-msg-bg: rgba(56, 189, 248, 0.2);
	--user-msg-border: rgba(56, 189, 248, 0.3);
	--font-family: "Inter", sans-serif;
}

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

body {
	background-color: var(--bg-color);
	color: var(--text-color);
	font-family: var(--font-family);
	height: 100vh;
	display: flex;
	justify-content: center;
	align-items: center;
	overflow: hidden;
}

.background-glow {
	position: absolute;
	width: 600px;
	height: 600px;
	background: radial-gradient(
		circle,
		rgba(56, 189, 248, 0.15) 0%,
		rgba(15, 23, 42, 0) 70%
	);
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: -1;
	pointer-events: none;
}

.chat-container {
	width: 100%;
	max-width: 480px;
	height: 85vh;
	display: flex;
	flex-direction: column;
	border-radius: 20px;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
	overflow: hidden;
	position: relative;
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
}

.glass-panel {
	background: var(--glass-bg);
	border: 1px solid var(--glass-border);
}

/* Header */
.chat-header {
	padding: 20px;
	display: flex;
	align-items: center;
	border-bottom: 1px solid var(--glass-border);
	gap: 12px;
}

.status-indicator {
	width: 10px;
	height: 10px;
	background-color: #4ade80;
	border-radius: 50%;
	box-shadow: 0 0 10px rgba(74, 222, 128, 0.5);
}

.header-info h1 {
	font-size: 1.1rem;
	font-weight: 600;
}

.header-info .subtitle {
	font-size: 0.8rem;
	color: #94a3b8;
}

.header-controls {
	margin-left: auto;
}

#theme-toggle {
	background: none;
	border: none;
	color: #94a3b8;
	cursor: pointer;
	transition: color 0.2s;
}

#theme-toggle:hover {
	color: var(--text-color);
}

/* Chat History */
.chat-history {
	flex: 1;
	overflow-y: auto;
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 16px;
	scroll-behavior: smooth;
}

.message {
	max-width: 85%;
	display: flex;
	flex-direction: column;
	gap: 4px;
	animation: fadeIn 0.3s ease-out;
}

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

.message-content {
	padding: 12px 16px;
	border-radius: 12px;
	font-size: 0.95rem;
	line-height: 1.5;
}

.message-meta {
	font-size: 0.7rem;
	color: #64748b;
	margin-left: 4px;
}

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

.bot-message .message-content {
	background-color: var(--bot-msg-bg);
	border-bottom-left-radius: 2px;
	border: 1px solid var(--glass-border);
}

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

.user-message .message-content {
	background: var(--user-msg-bg);
	border: 1px solid var(--user-msg-border);
	border-bottom-right-radius: 2px;
	color: #e0f2fe;
}

.user-message .message-meta {
	align-self: flex-end;
	margin-right: 4px;
}

/* Input Area */
.chat-input-area {
	padding: 20px;
	border-top: 1px solid var(--glass-border);
	display: flex;
	gap: 10px;
}

#user-input {
	flex: 1;
	background: rgba(15, 23, 42, 0.3);
	border: 1px solid var(--glass-border);
	border-radius: 24px;
	padding: 12px 20px;
	color: var(--text-color);
	font-family: inherit;
	font-size: 0.95rem;
	outline: none;
	transition: border-color 0.2s;
}

#user-input:focus {
	border-color: var(--accent-color);
}

#send-btn {
	background: var(--accent-gradient);
	border: none;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	display: flex;
	justify-content: center;
	align-items: center;
	cursor: pointer;
	color: white;
	box-shadow: 0 4px 12px rgba(56, 189, 248, 0.3);
	transition: transform 0.2s, box-shadow 0.2s;
}

#send-btn:hover {
	transform: scale(1.05);
	box-shadow: 0 6px 16px rgba(56, 189, 248, 0.4);
}

#send-btn:active {
	transform: scale(0.95);
}

/* Loading Indicator */
.typing-indicator {
	display: flex;
	gap: 4px;
	padding: 12px 16px;
	background-color: var(--bot-msg-bg);
	border-radius: 12px;
	align-self: flex-start;
	border-bottom-left-radius: 2px;
	margin-bottom: 10px;
}

.dot {
	width: 6px;
	height: 6px;
	background-color: #94a3b8;
	border-radius: 50%;
	animation: bounce 1.4s infinite ease-in-out;
}

.dot:nth-child(1) {
	animation-delay: -0.32s;
}
.dot:nth-child(2) {
	animation-delay: -0.16s;
}

@keyframes bounce {
	0%,
	80%,
	100% {
		transform: scale(0);
	}
	40% {
		transform: scale(1);
	}
}
