/* Global Styles */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  transition: background 0.3s, color 0.3s;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  border-bottom: 2px solid var(--accent);
}

.title {
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  font-size: 17px;
  font-weight: bold;
  color: #ffffff;
}

button {
  padding: 6px 12px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  background: var(--accent);
  color: white;
  font-weight: bold;
}

button:hover {
  opacity: 0.85;
}

main {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 70px);
}

.chat-box {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
}

.message {
  margin: 8px 0;
  padding: 10px;
  border-radius: 8px;
  max-width: 70%;
}

.message.user {
  background: var(--accent);
  color: white;
  align-self: flex-end;
}

.message.bot {
  background: var(--bubble);
  color: var(--text);
  align-self: flex-start;
}

.input-area {
  display: flex;
  padding: 10px;
  border-top: 2px solid var(--accent);
}

input {
  flex: 1;
  padding: 10px;
  border: 2px solid var(--accent);
  border-radius: 5px;
}

#send-btn {
  margin-left: 10px;
}

/* Galaxy Theme */
body.galaxy {
  --text: #ffffff;
  --accent: #ff69b4;
  --bubble: rgba(20, 20, 40, 0.7);
  background: radial-gradient(circle at bottom, #0b0033, #000000 90%);
  color: var(--text);
  overflow: hidden;
  position: relative; /* Needed for layering */
}

/* Galaxy Gradient Background */
body.galaxy::before {
  content: "";
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: radial-gradient(circle at 50% 70%, #4b0082, #0b0033 60%, #000000 100%);
  z-index: -2;
}

/* Moving star layer */
body.galaxy::after {
  content: "";
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: transparent url("https://www.transparenttextures.com/patterns/stardust.png") repeat;
  background-size: 400px 400px; /* make stars more visible */
  opacity: 0.4;
  animation: moveStars 90s linear infinite;
  z-index: -1;
  pointer-events: none;
}

@keyframes moveStars {
  from { background-position: 0 0; }
  to { background-position: -1000px -1000px; }
}

/* Keep UI above stars */
main, header {
  position: relative;
  z-index: 1;
}

