/* Reset & Fonts */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', sans-serif;
}

body {
  background: linear-gradient(135deg, #1f1f2f, #3a3a5a);
  color: #fff;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: background 0.5s;
}

/* Chat Container */
.chat-container {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  width: 100%;
  max-width: 420px;
  height: 85vh;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(16px);
  box-shadow: 0 0 20px rgba(0,0,0,0.3);
  overflow: hidden;
  margin: 0 auto;
}

/* Header */
header {
  background: rgba(255, 255, 255, 0.08);
  padding: 1rem;
  text-align: center;
  position: relative;
}

header h1 {
  font-size: 1.4rem;
}

#theme-toggle {
  position: absolute;
  top: 15px;
  right: 15px;
  background: transparent;
  color: white;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
}

/* Chat Window */
.chat-window {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  scroll-behavior: smooth;
}

.bot-message,
.user-message {
  max-width: 75%;
  padding: 0.8rem;
  border-radius: 1rem;
  font-size: 0.95rem;
  line-height: 1.4;
  animation: fadeIn 0.4s ease;
}

.bot-message {
  background: rgba(0, 255, 255, 0.15);
  align-self: flex-start;
}

.user-message {
  background: rgba(255, 255, 255, 0.1);
  align-self: flex-end;
}

/* Input Area */
.chat-input {
  display: flex;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.08);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-input input {
  flex: 1;
  background: transparent;
  border: none;
  color: white;
  padding: 0.6rem;
  font-size: 1rem;
  outline: none;
}

.chat-input button {
  background: #00ffff;
  border: none;
  color: #111;
  padding: 0.6rem 1rem;
  border-radius: 12px;
  margin-left: 0.5rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s;
}

.chat-input button:hover {
  background: #00d6d6;
}

/* Footer */
.footer {
  text-align: center;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.85rem;
  color: #ccc;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer a {
  color: #00ffff;
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Dark mode toggle */
body.dark {
  background: linear-gradient(135deg, #fff8f0, #e2e2e2);
  color: #111;
}

body.dark .chat-container {
  background: rgba(255, 255, 255, 0.3);
}

body.dark .chat-input button {
  background: #222;
  color: white;
}

body.dark .chat-input button:hover {
  background: #444;
}

body.dark .bot-message {
  background: rgba(0, 0, 0, 0.1);
}

body.dark .user-message {
  background: rgba(0, 0, 0, 0.2);
}

body.dark .footer {
  background: rgba(0, 0, 0, 0.05);
  color: #333;
}
