/* ==========================================================================
   VANGUARD MISSION — Stylesheet
   Theme: Deep space, Saturn mission, futuristic command center
   ========================================================================== */

:root {
  --color-bg: #0a0a1a;
  --color-surface: #12122a;
  --color-accent: #4ecdc4;
  --color-accent-dim: #2a8a84;
  --color-orange: #ff6b35;
  --color-gold: #ffd700;
  --color-text: #e0e0e8;
  --color-text-dim: #8888a0;
  --color-danger: #ff4757;
  --font-display: 'Orbitron', monospace;
  --font-body: 'Inter', -apple-system, sans-serif;
}

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

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  overflow-x: hidden;
  min-height: 100vh;
}

/* ==========================================================================
   DEMO BANNER
   ========================================================================== */

.demo-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: linear-gradient(90deg, #f48120, #f6851f);
  color: #fff;
  text-align: center;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-body);
  letter-spacing: 0.5px;
}

.demo-banner-icon {
  margin-right: 8px;
}

/* ==========================================================================
   STARS BACKGROUND (CSS-only parallax starfield)
   ========================================================================== */

.stars, .stars2, .stars3 {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}

.stars {
  background: radial-gradient(1px 1px at 20px 30px, #fff, transparent),
              radial-gradient(1px 1px at 40px 70px, #ccc, transparent),
              radial-gradient(1px 1px at 90px 40px, #fff, transparent),
              radial-gradient(1px 1px at 130px 80px, #ddd, transparent),
              radial-gradient(1px 1px at 160px 30px, #fff, transparent);
  background-size: 200px 200px;
  animation: starsMove 120s linear infinite;
}

.stars2 {
  background: radial-gradient(1.5px 1.5px at 70px 120px, var(--color-accent), transparent),
              radial-gradient(1px 1px at 150px 50px, #aaa, transparent),
              radial-gradient(1.5px 1.5px at 200px 180px, #fff, transparent);
  background-size: 300px 300px;
  animation: starsMove 180s linear infinite;
  opacity: 0.6;
}

.stars3 {
  background: radial-gradient(2px 2px at 50px 160px, var(--color-gold), transparent),
              radial-gradient(1px 1px at 180px 90px, #fff, transparent);
  background-size: 400px 400px;
  animation: starsMove 240s linear infinite;
  opacity: 0.4;
}

@keyframes starsMove {
  from { transform: translateY(0); }
  to { transform: translateY(-200px); }
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px 40px;
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 680px;
  text-align: center;
}

/* Mission badge */
.mission-badge {
  width: 80px;
  height: 80px;
  margin: 0 auto 32px;
  position: relative;
}

.badge-ring {
  width: 80px;
  height: 80px;
  border: 2px solid var(--color-accent);
  border-radius: 50%;
  animation: badgePulse 3s ease-in-out infinite;
}

.badge-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 900;
  color: var(--color-accent);
  letter-spacing: 2px;
}

@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 20px rgba(78, 205, 196, 0.3); }
  50% { box-shadow: 0 0 40px rgba(78, 205, 196, 0.6); }
}

/* Typography */
.title {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 900;
  letter-spacing: 4px;
  line-height: 1.2;
  margin-bottom: 16px;
}

.title-prefix {
  display: block;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 8px;
  color: var(--color-accent);
  margin-bottom: 8px;
}

.subtitle {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 400;
  color: var(--color-gold);
  letter-spacing: 3px;
  margin-bottom: 32px;
  text-transform: uppercase;
}

.description {
  font-size: 15px;
  line-height: 1.8;
  color: var(--color-text-dim);
  max-width: 540px;
  margin: 0 auto 40px;
}

/* CTA Buttons */
.cta-group {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-decoration: none;
  text-transform: uppercase;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dim));
  color: #0a0a1a;
  box-shadow: 0 4px 20px rgba(78, 205, 196, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 8px 40px rgba(78, 205, 196, 0.5);
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: var(--color-accent);
  border: 1.5px solid var(--color-accent);
}

.btn-secondary:hover {
  background: rgba(78, 205, 196, 0.1);
  transform: translateY(-2px);
}

.btn-icon {
  font-size: 16px;
}

/* Tech badges */
.tech-badges {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.badge {
  padding: 6px 14px;
  background: rgba(78, 205, 196, 0.08);
  border: 1px solid rgba(78, 205, 196, 0.2);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  color: var(--color-accent);
  letter-spacing: 0.5px;
}

/* ==========================================================================
   ROCKET
   ========================================================================== */

.rocket-container {
  position: fixed;
  right: 5%;
  bottom: 10%;
  z-index: 5;
  animation: rocketFloat 6s ease-in-out infinite;
  opacity: 0.7;
}

.rocket {
  width: 80px;
  height: 160px;
}

.flame {
  animation: flameFlicker 0.3s ease-in-out infinite alternate;
}

@keyframes rocketFloat {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  50% { transform: translateY(-20px) rotate(-5deg); }
}

@keyframes flameFlicker {
  0% { opacity: 0.7; transform: scaleY(0.9); }
  100% { opacity: 1; transform: scaleY(1.1); }
}

/* ==========================================================================
   SATURN
   ========================================================================== */

.saturn-container {
  position: fixed;
  left: 5%;
  top: 20%;
  z-index: 2;
  opacity: 0.25;
  animation: saturnDrift 20s ease-in-out infinite;
}

.saturn {
  position: relative;
  width: 120px;
  height: 120px;
}

.saturn-body {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #e8c874, #c4944a, #8b6914);
  border-radius: 50%;
  position: absolute;
  top: 20px;
  left: 20px;
  box-shadow: inset -10px -5px 20px rgba(0,0,0,0.5);
}

.saturn-ring {
  width: 120px;
  height: 30px;
  border: 3px solid rgba(232, 200, 116, 0.5);
  border-radius: 50%;
  position: absolute;
  top: 42px;
  left: 0;
  transform: rotateX(70deg);
}

@keyframes saturnDrift {
  0%, 100% { transform: translateY(0) translateX(0); }
  50% { transform: translateY(15px) translateX(10px); }
}

/* ==========================================================================
   CHAT POPUP
   ========================================================================== */

.chat-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  justify-content: center;
  align-items: center;
  padding: 24px;
}

.chat-overlay.active {
  display: flex;
}

.chat-window {
  width: 100%;
  max-width: 560px;
  height: 70vh;
  max-height: 600px;
  background: var(--color-surface);
  border: 1px solid rgba(78, 205, 196, 0.2);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}

/* Chat header */
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: rgba(78, 205, 196, 0.06);
  border-bottom: 1px solid rgba(78, 205, 196, 0.1);
  gap: 12px;
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--color-accent);
}

.chat-status-dot {
  width: 8px;
  height: 8px;
  background: #4ecdc4;
  border-radius: 50%;
  animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.chat-tier-toggle {
  flex-shrink: 0;
}

.tier-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--color-text-dim);
  cursor: pointer;
}

.tier-label input[type="checkbox"] {
  accent-color: var(--color-orange);
}

.chat-close {
  background: none;
  border: none;
  color: var(--color-text-dim);
  font-size: 24px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.chat-close:hover {
  color: var(--color-danger);
}

/* Chat messages */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-message {
  max-width: 90%;
}

.chat-message.assistant {
  align-self: flex-start;
}

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

.message-content {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.6;
}

.assistant .message-content {
  background: rgba(78, 205, 196, 0.08);
  border: 1px solid rgba(78, 205, 196, 0.12);
  color: var(--color-text);
}

.user .message-content {
  background: var(--color-accent);
  color: #0a0a1a;
  font-weight: 500;
}

.message-meta {
  font-size: 10px;
  color: var(--color-text-dim);
  margin-top: 4px;
  padding: 0 4px;
  font-family: var(--font-body);
}

/* Chat input */
.chat-input-area {
  display: flex;
  padding: 12px 16px;
  gap: 8px;
  border-top: 1px solid rgba(78, 205, 196, 0.1);
  background: rgba(0, 0, 0, 0.2);
}

#chat-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(78, 205, 196, 0.2);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
}

#chat-input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px rgba(78, 205, 196, 0.15);
}

#chat-input::placeholder {
  color: var(--color-text-dim);
}

.chat-send-btn {
  width: 42px;
  height: 42px;
  background: var(--color-accent);
  color: #0a0a1a;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.chat-send-btn:hover {
  background: #5eded6;
}

.chat-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Loading indicator */
.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
}

.typing-indicator span {
  width: 6px;
  height: 6px;
  background: var(--color-accent);
  border-radius: 50%;
  animation: typingBounce 1.4s ease-in-out infinite;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 768px) {
  .rocket-container { display: none; }
  .saturn-container { display: none; }
  .chat-window { height: 85vh; max-height: none; }
}
