:root {
  --bg: #000000;
  --cyan: #5eead4;
  --cyan-bright: #a7f3d0;
  --text: #f2f5f9;
  --muted: #6b7280;
  --panel: rgba(255, 255, 255, 0.04);
  --panel-border: rgba(94, 234, 212, 0.2);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
}

.stars {
  display: none;
}

/* --- hero / holograma --- */
.hero {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 56px 20px 24px;
  text-align: center;
}

.hologram-wrap {
  position: relative;
  width: 260px;
  animation: float 5s ease-in-out infinite;
  overflow: hidden;
  line-height: 0;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.hologram-img {
  width: 100%;
  height: auto;
  mix-blend-mode: screen;
  display: block;
}

.scan-sweep {
  position: absolute;
  left: 8%;
  width: 84%;
  height: 14px;
  top: 0;
  background: linear-gradient(to bottom, rgba(167, 243, 208, 0), rgba(167, 243, 208, 0.85), rgba(167, 243, 208, 0));
  mix-blend-mode: screen;
  animation: sweep 3.2s ease-in-out infinite;
}
@keyframes sweep {
  0% { top: 8%; opacity: 0; }
  10% { opacity: 1; }
  85% { opacity: 1; }
  100% { top: 92%; opacity: 0; }
}

h1 {
  margin: 18px 0 4px;
  font-size: 2.2rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--cyan-bright);
  text-shadow: 0 0 18px rgba(94, 234, 212, 0.6);
}

.tagline {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

/* --- chat --- */
.chat {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 24px auto 40px;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
}

.messages {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 120px;
  max-height: 48vh;
  overflow-y: auto;
  padding: 20px 4px;
}

.msg {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 14px;
  line-height: 1.45;
  font-size: 0.95rem;
  white-space: pre-wrap;
}

.msg.bot {
  align-self: flex-start;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-bottom-left-radius: 4px;
  color: var(--text);
}

.msg.user {
  align-self: flex-end;
  background: rgba(94, 234, 212, 0.12);
  border: 1px solid rgba(94, 234, 212, 0.35);
  border-bottom-right-radius: 4px;
  color: var(--text);
}

.msg.typing {
  align-self: flex-start;
  color: var(--muted);
  font-style: italic;
}

.msg p {
  margin: 0 0 8px;
}
.msg p:last-child {
  margin-bottom: 0;
}
.msg ul,
.msg ol {
  margin: 0 0 8px;
  padding-left: 20px;
}
.msg ul:last-child,
.msg ol:last-child {
  margin-bottom: 0;
}
.msg li {
  margin-bottom: 4px;
}
.msg a {
  color: var(--cyan-bright);
  text-decoration: underline;
}
.msg strong {
  color: var(--cyan-bright);
  font-weight: 600;
}

#chat-form {
  display: flex;
  gap: 8px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  padding: 6px 6px 6px 18px;
  backdrop-filter: blur(6px);
}

#chat-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 0.95rem;
  padding: 10px 0;
}
#chat-input::placeholder {
  color: var(--muted);
}

#chat-form button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--cyan);
  color: #04241f;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s ease, background 0.15s ease;
}
#chat-form button:hover {
  background: var(--cyan-bright);
  transform: scale(1.05);
}
#chat-form button:disabled {
  opacity: 0.5;
  cursor: default;
  transform: none;
}

@media (max-width: 480px) {
  .hero {
    padding: 20px 16px 8px;
  }
  .hologram-wrap {
    width: 130px;
  }
  h1 {
    font-size: 1.5rem;
    margin: 10px 0 2px;
  }
  .tagline {
    font-size: 0.85rem;
  }
  .chat {
    margin: 8px auto 20px;
  }
  .messages {
    padding: 12px 4px;
    gap: 8px;
  }
  .msg {
    font-size: 0.9rem;
  }
}
