/* ==============================================
   ASK TPM - STYLESHEET
   A space-themed landing page with day/night modes
   ============================================== */

/* ==============================================
   RESET & BASE STYLES
   ============================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overflow: hidden;
}

/* ==============================================
   SHOOTING STARS
   Meteor-like streaks that cross the screen
   - Star 1: Left to right, larger and slower
   - Star 2: Bottom-right to top-left, smaller and faster
   ============================================== */
.shooting-star {
  position: fixed;
  border-radius: 50%;
  top: -10px;
  left: -10px;
  opacity: 0;
  z-index: 15;
  pointer-events: none;
}

/* Tail base (both stars) */
.shooting-star::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 100%;
  transform: translateY(-50%);
}

/* Star 1: Large meteor, left to right trajectory */
.shooting-star-1 {
  width: 8px;
  height: 8px;
  /* Bright core with radial glow */
  background: radial-gradient(circle, white 0%, rgba(255,255,255,0.8) 40%, transparent 70%);
  /* Layered glow effect for realism */
  box-shadow:
    0 0 10px 5px rgba(255, 255, 255, 1),
    0 0 30px 10px rgba(255, 255, 255, 0.8),
    0 0 60px 20px rgba(200, 220, 255, 0.4);
}

/* Star 1: Main tail gradient */
.shooting-star-1::after {
  width: 500px;
  height: 8px;
  background: linear-gradient(to left,
    rgba(255, 255, 255, 1),
    rgba(255, 255, 255, 0.9) 2%,
    rgba(255, 255, 255, 0.5) 8%,
    rgba(200, 220, 255, 0.3) 20%,
    rgba(200, 220, 255, 0.1) 40%,
    rgba(150, 180, 220, 0.05) 60%,
    transparent);
  filter: blur(1px);
  border-radius: 4px 0 0 4px;
}

/* Star 1: Diffuse glow halo around tail */
.shooting-star-1::before {
  content: '';
  position: absolute;
  top: 50%;
  right: 100%;
  transform: translateY(-50%);
  width: 500px;
  height: 30px;
  background: linear-gradient(to left,
    rgba(255, 255, 255, 0.2),
    rgba(200, 220, 255, 0.1) 15%,
    rgba(150, 180, 220, 0.05) 35%,
    transparent 70%);
  filter: blur(8px);
  border-radius: 50%;
}

.shooting-star-1.active {
  animation: shootAcross1 1.8s ease-out forwards;
}

@keyframes shootAcross1 {
  0% {
    top: 10%;
    left: -10%;
    opacity: 1;
  }
  100% {
    top: 50%;
    left: 110%;
    opacity: 0;
  }
}

/* Star 2: Smaller meteor, bottom-right to top-left */
.shooting-star-2 {
  width: 6px;
  height: 6px;
  background: radial-gradient(circle, white 0%, rgba(200,220,255,0.8) 40%, transparent 70%);
  box-shadow:
    0 0 8px 4px rgba(255, 255, 255, 0.9),
    0 0 20px 8px rgba(200, 220, 255, 0.6),
    0 0 40px 15px rgba(200, 220, 255, 0.3);
  /* Rotate to match diagonal trajectory */
  transform: rotate(-135deg);
}

.shooting-star-2::after {
  width: 350px;
  height: 6px;
  background: linear-gradient(to left,
    rgba(255, 255, 255, 0.95),
    rgba(255, 255, 255, 0.7) 3%,
    rgba(200, 220, 255, 0.4) 12%,
    rgba(200, 220, 255, 0.15) 30%,
    rgba(150, 180, 220, 0.05) 55%,
    transparent);
  filter: blur(1px);
  border-radius: 3px 0 0 3px;
}

.shooting-star-2::before {
  content: '';
  position: absolute;
  top: 50%;
  right: 100%;
  transform: translateY(-50%);
  width: 350px;
  height: 24px;
  background: linear-gradient(to left,
    rgba(255, 255, 255, 0.15),
    rgba(200, 220, 255, 0.08) 20%,
    rgba(150, 180, 220, 0.03) 45%,
    transparent 75%);
  filter: blur(6px);
  border-radius: 50%;
}

.shooting-star-2.active {
  animation: shootAcross2 0.6s ease-out forwards;
}

@keyframes shootAcross2 {
  0% {
    bottom: 5%;
    right: -10%;
    top: auto;
    left: auto;
    opacity: 1;
  }
  100% {
    bottom: 80%;
    right: 95%;
    top: auto;
    left: auto;
    opacity: 0;
  }
}

/* ==============================================
   THEME: NIGHT MODE
   Dark space background with stars
   ============================================== */
.night-mode {
  background: radial-gradient(ellipse at bottom, #1b2735 0%, #090a0f 100%);
}

.night-mode .night-elements {
  opacity: 1;
  pointer-events: auto;
}

.night-mode .day-elements {
  opacity: 0;
  pointer-events: none;
}

.night-mode .logo {
  color: #ffffff;
}

.night-mode .blurb {
  color: rgba(255, 255, 255, 0.7);
}

.night-mode .coming-soon {
  color: #4a9fff;
  border-color: rgba(74, 159, 255, 0.3);
}

/* ==============================================
   THEME: DAY MODE
   Blue sky gradient with clouds
   ============================================== */
.day-mode {
  background: linear-gradient(180deg, #87CEEB 0%, #B0E0E6 50%, #E0F4FF 100%);
}

.day-mode .night-elements {
  opacity: 0;
  pointer-events: none;
}

.day-mode .day-elements {
  opacity: 1;
  pointer-events: auto;
}

.day-mode .logo {
  color: #1a1a2e;
}

.day-mode .blurb {
  color: rgba(0, 0, 0, 0.6);
}

.day-mode .coming-soon {
  color: #0056b3;
  border-color: rgba(0, 86, 179, 0.3);
}

/* ==============================================
   THEME ELEMENT CONTAINERS
   Full-screen overlays that fade between modes
   ============================================== */
.night-elements,
.day-elements {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

/* ==============================================
   MAIN CONTENT CONTAINER
   ============================================== */
.container {
  text-align: center;
  z-index: 10;
  position: relative;
}

/* Site title - Roboto Slab for bold, serif look */
.logo {
  font-family: 'Roboto Slab', serif;
  font-size: 4.5rem;
  font-weight: 700;
  letter-spacing: 0.1rem;
  text-transform: lowercase;
  margin-bottom: 10px;
  transition: color 0.5s ease;
}

/* Title cursor - blinks then fades out */
.logo-cursor {
  animation: blink-cursor 0.7s step-end infinite;
  font-weight: 300;
  margin-left: 2px;
}

.logo-cursor.fade-out {
  animation: cursor-fade 0.5s ease forwards;
}

@keyframes cursor-fade {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

/* Tagline with decorative em-dash below */
.blurb {
  font-size: 1rem;
  font-weight: 300;
  max-width: 400px;
  margin: 0 auto 3rem;
  line-height: 1.8;
  letter-spacing: 0.02rem;
  position: relative;
  transition: all 0.5s ease;
}

.blurb::before,
.blurb::after {
  content: '—';
  display: block;
  letter-spacing: 0.5rem;
  opacity: 0.3;
  margin: 0.5rem 0;
}

/* Hide top em-dash, only show bottom */
.blurb::before {
  display: none;
}

/* ==============================================
   STATUS BADGES
   Fixed position corner indicators
   ============================================== */

/* "Under Construction" - top left */
.chat-status {
  position: fixed;
  top: 1.5rem;
  left: 1.5rem;
  font-size: 0.6rem;
  font-weight: 600;
  padding: 0.4rem 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15rem;
  border-radius: 2px;
  z-index: 20;
  animation: pulse-status 3s ease-in-out infinite;
}

.night-mode .chat-status {
  color: #4a9fff;
  background: rgba(74, 159, 255, 0.1);
  border: 1px solid rgba(74, 159, 255, 0.3);
}

.day-mode .chat-status {
  color: #0056b3;
  background: rgba(0, 86, 179, 0.08);
  border: 1px solid rgba(0, 86, 179, 0.25);
}

@keyframes pulse-status {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* "Coming Soon" - top right */
.coming-soon {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.15rem;
  text-transform: uppercase;
  padding: 0.4rem 0.8rem;
  border: 1px solid;
  border-radius: 2px;
  z-index: 20;
  transition: all 0.5s ease;
}

/* ==============================================
   CHAT INTERFACE
   Interactive chatbot preview component
   ============================================== */
.chatbot-preview {
  width: 100%;
  max-width: 520px;
  margin: 0 auto 2.5rem;
  overflow: hidden;
  transition: all 0.5s ease;
}

.chat-body {
  padding: 0;
}

/* Message history container - starts collapsed, expands smoothly */
.chat-messages {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.6s ease, margin 0.6s ease;
  margin-bottom: 0;
}

.chat-messages.active {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 1rem;
  /* Fade out messages at the top as they scroll */
  mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 100%);
}

/* Individual chat message bubble */
.chat-msg {
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  line-height: 1.5;
  animation: fadeIn 0.3s ease;
}

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

/* User messages: right-aligned, terminal prompt style */
.chat-msg.user {
  text-align: right;
  font-family: 'Courier New', monospace;
  letter-spacing: 0.05rem;
}

.chat-msg.user::before {
  content: '> ';
  opacity: 0.5;
}

/* Bot messages: left-aligned, Space Mono font */
.chat-msg.bot {
  text-align: left;
  font-family: 'Space Mono', monospace;
  letter-spacing: 0.02rem;
}

/* Bot name prefix styling */
.bot-name {
  opacity: 0.5;
  font-weight: 600;
}

/* Theme-specific message colors */
.night-mode .chat-msg.user {
  color: rgba(74, 159, 255, 0.9);
}

.night-mode .chat-msg.bot {
  color: rgba(255, 255, 255, 0.75);
}

.day-mode .chat-msg.user {
  color: rgba(0, 86, 179, 0.9);
}

.day-mode .chat-msg.bot {
  color: rgba(0, 0, 0, 0.7);
}

/* Resource links in bot responses */
.chat-msg.bot a {
  margin-left: 0.5rem;
  font-size: 0.8em;
  text-decoration: none;
  border-bottom: 1px solid;
  transition: opacity 0.2s ease;
}

.chat-msg.bot a:hover {
  opacity: 0.7;
}

.night-mode .chat-msg.bot a {
  color: #4a9fff;
  border-color: rgba(74, 159, 255, 0.4);
}

.day-mode .chat-msg.bot a {
  color: #0056b3;
  border-color: rgba(0, 86, 179, 0.4);
}

/* Source link in bot responses */
.chat-msg.bot .source-link {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.75em;
  opacity: 0.6;
}

.chat-msg.bot strong {
  font-weight: 700;
}

/* Suggested prompt chips */
.prompt-chips {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  flex-wrap: wrap;
}

.chip {
  font-family: 'Courier New', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.05rem;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  border: 1px solid;
  cursor: pointer;
  transition: all 0.2s ease;
  background: transparent;
}

.night-mode .chip {
  color: rgba(74, 159, 255, 0.7);
  border-color: rgba(74, 159, 255, 0.3);
}

.night-mode .chip:hover {
  background: rgba(74, 159, 255, 0.15);
  color: #4a9fff;
}

.day-mode .chip {
  color: rgba(0, 86, 179, 0.7);
  border-color: rgba(0, 86, 179, 0.3);
}

.day-mode .chip:hover {
  background: rgba(0, 86, 179, 0.1);
  color: #0056b3;
}

/* Typing indicator animation (three dots) */
.typing-indicator {
  display: inline-block;
  font-family: 'Courier New', monospace;
}

.typing-indicator span {
  animation: blink-dot 1.4s infinite;
  animation-fill-mode: both;
}

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

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

@keyframes blink-dot {
  0%, 80%, 100% { opacity: 0.2; }
  40% { opacity: 1; }
}

/* ==============================================
   CHAT ACTION BUTTONS
   Export and Clear buttons below input
   ============================================== */
.chat-actions {
  display: none;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.chat-actions.visible {
  display: flex;
}

.email-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.email-input {
  padding: 0.4rem 0.8rem;
  font-family: 'Courier New', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.1rem;
  text-transform: uppercase;
  background: transparent;
  border: 1px solid;
  border-radius: 2px;
  outline: none;
  width: 180px;
  transition: all 0.2s ease;
}

.email-input::placeholder {
  opacity: 0.5;
}

.night-mode .email-input {
  color: rgba(74, 159, 255, 0.9);
  border-color: rgba(74, 159, 255, 0.3);
}

.night-mode .email-input::placeholder {
  color: rgba(74, 159, 255, 0.5);
}

.night-mode .email-input:focus {
  border-color: rgba(74, 159, 255, 0.6);
}

.day-mode .email-input {
  color: rgba(0, 86, 179, 0.9);
  border-color: rgba(0, 86, 179, 0.25);
}

.day-mode .email-input::placeholder {
  color: rgba(0, 86, 179, 0.4);
}

.day-mode .email-input:focus {
  border-color: rgba(0, 86, 179, 0.5);
}

/* Override browser autofill styling */
.email-input:-webkit-autofill,
.email-input:-webkit-autofill:hover,
.email-input:-webkit-autofill:focus {
  -webkit-text-fill-color: inherit;
  -webkit-box-shadow: 0 0 0px 1000px transparent inset;
  transition: background-color 5000s ease-in-out 0s;
}

.night-mode .email-input:-webkit-autofill {
  -webkit-text-fill-color: rgba(74, 159, 255, 0.9);
}

.day-mode .email-input:-webkit-autofill {
  -webkit-text-fill-color: rgba(0, 86, 179, 0.9);
}

.email-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem;
  background: transparent;
  border: 1px solid;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.email-btn svg {
  width: 16px;
  height: 16px;
}

.night-mode .email-btn {
  color: rgba(74, 159, 255, 0.7);
  border-color: rgba(74, 159, 255, 0.3);
}

.night-mode .email-btn:hover {
  color: rgba(74, 159, 255, 1);
  border-color: rgba(74, 159, 255, 0.6);
}

.day-mode .email-btn {
  color: rgba(0, 86, 179, 0.6);
  border-color: rgba(0, 86, 179, 0.25);
}

.day-mode .email-btn:hover {
  color: rgba(0, 86, 179, 1);
  border-color: rgba(0, 86, 179, 0.5);
}

.email-success {
  display: none;
  font-family: 'Courier New', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.1rem;
  padding: 0.4rem 0.8rem;
  animation: fadeIn 0.3s ease;
}

.email-success.visible {
  display: block;
}

.night-mode .email-success {
  color: rgba(74, 159, 255, 0.9);
}

.day-mode .email-success {
  color: rgba(0, 86, 179, 0.8);
}

/* ==============================================
   INPUT FIELD
   Text input with animated placeholder
   ============================================== */
.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

/* Send button (rocket icon) - appears when typing */
.send-btn {
  position: absolute;
  right: 0.75rem;
  width: 32px;
  height: 32px;
  padding: 6px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.2s ease;
  pointer-events: none;
}

.send-btn.visible {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.send-btn svg {
  width: 100%;
  height: 100%;
}

.night-mode .send-btn {
  background: rgba(74, 159, 255, 0.2);
  color: #4a9fff;
}

.night-mode .send-btn:hover {
  background: rgba(74, 159, 255, 0.4);
}

.day-mode .send-btn {
  background: rgba(0, 86, 179, 0.15);
  color: #0056b3;
}

.day-mode .send-btn:hover {
  background: rgba(0, 86, 179, 0.3);
}

/* Text input field */
.chat-input {
  width: 100%;
  padding: 1rem 1.5rem;
  font-size: 0.85rem;
  font-family: 'Courier New', monospace;
  letter-spacing: 0.1rem;
  text-align: center;
  border: none;
  border-radius: 4px;
  outline: none;
  caret-color: currentColor;
  transition: box-shadow 0.3s ease;
}

.night-mode .chat-input {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(74, 159, 255, 0.08);
  box-shadow: none;
  caret-color: #4a9fff;
}

.night-mode .chat-input::placeholder {
  color: transparent;
}

.day-mode .chat-input {
  color: rgba(0, 0, 0, 0.8);
  background: rgba(0, 86, 179, 0.06);
  box-shadow: none;
  caret-color: #0056b3;
}

.day-mode .chat-input::placeholder {
  color: transparent;
}

/* Animated typing text overlay */
.typing-text {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.85rem;
  font-family: 'Courier New', monospace;
  letter-spacing: 0.1rem;
  pointer-events: none;
  white-space: nowrap;
  transition: opacity 0.3s ease;
}

/* Blinking cursor after typing text */
.typing-text::after {
  content: '|';
  animation: blink-cursor 0.7s step-end infinite;
}

.night-mode .typing-text {
  color: rgba(74, 159, 255, 0.7);
}

.day-mode .typing-text {
  color: rgba(0, 86, 179, 0.6);
}

@keyframes blink-cursor {
  50% { opacity: 0; }
}

/* ==============================================
   NIGHT SKY: TWINKLING STARS
   Two layers of stars with offset twinkle timing
   ============================================== */
.stars, .stars2 {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Primary star layer - larger, brighter stars */
.stars {
  background:
    radial-gradient(2px 2px at 10% 20%, rgba(255,255,255,1), transparent),
    radial-gradient(1.5px 1.5px at 20% 50%, rgba(255,255,255,0.9), transparent),
    radial-gradient(1.5px 1.5px at 30% 10%, rgba(255,255,255,0.95), transparent),
    radial-gradient(2px 2px at 40% 70%, rgba(255,255,255,1), transparent),
    radial-gradient(1.5px 1.5px at 50% 30%, rgba(255,255,255,0.85), transparent),
    radial-gradient(1.5px 1.5px at 60% 80%, rgba(255,255,255,0.9), transparent),
    radial-gradient(1.5px 1.5px at 70% 15%, rgba(255,255,255,0.9), transparent),
    radial-gradient(2px 2px at 80% 45%, rgba(255,255,255,1), transparent),
    radial-gradient(1.5px 1.5px at 90% 65%, rgba(255,255,255,0.85), transparent),
    radial-gradient(1.5px 1.5px at 15% 85%, rgba(255,255,255,0.9), transparent),
    radial-gradient(1.5px 1.5px at 25% 35%, rgba(255,255,255,0.9), transparent),
    radial-gradient(2px 2px at 35% 90%, rgba(255,255,255,1), transparent),
    radial-gradient(1.5px 1.5px at 45% 5%, rgba(255,255,255,0.85), transparent),
    radial-gradient(1.5px 1.5px at 55% 55%, rgba(255,255,255,0.9), transparent),
    radial-gradient(1.5px 1.5px at 65% 40%, rgba(255,255,255,0.9), transparent),
    radial-gradient(2px 2px at 75% 75%, rgba(255,255,255,1), transparent),
    radial-gradient(1.5px 1.5px at 85% 25%, rgba(255,255,255,0.85), transparent),
    radial-gradient(1.5px 1.5px at 95% 95%, rgba(255,255,255,0.9), transparent);
  background-size: 100% 100%;
  animation: twinkle 4s ease-in-out infinite;
}

/* Secondary star layer - smaller, dimmer stars with offset timing */
.stars2 {
  background:
    radial-gradient(1px 1px at 5% 40%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1.5px 1.5px at 12% 70%, rgba(255,255,255,0.8), transparent),
    radial-gradient(1px 1px at 22% 15%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 32% 85%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1.5px 1.5px at 42% 25%, rgba(255,255,255,0.9), transparent),
    radial-gradient(1px 1px at 52% 60%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 62% 5%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 72% 50%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1.5px 1.5px at 82% 80%, rgba(255,255,255,0.8), transparent),
    radial-gradient(1px 1px at 92% 35%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 8% 95%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 18% 55%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1.5px 1.5px at 28% 30%, rgba(255,255,255,0.8), transparent),
    radial-gradient(1px 1px at 38% 65%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 48% 10%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 58% 90%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1.5px 1.5px at 68% 20%, rgba(255,255,255,0.9), transparent),
    radial-gradient(1px 1px at 78% 60%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 88% 45%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 98% 75%, rgba(255,255,255,0.7), transparent);
  background-size: 100% 100%;
  animation: twinkle 10s ease-in-out infinite 3s;
}

@keyframes twinkle {
  0%, 100% { opacity: 1; }
  25% { opacity: 0.7; }
  50% { opacity: 0.3; }
  75% { opacity: 0.8; }
}

/* ==============================================
   FLYING STARSHIP (Night Mode)
   Animated rocket ascending with engine glow
   Click to toggle day/night theme
   ============================================== */
.starship-flying {
  position: absolute;
  right: 10%;
  width: 45px;
  z-index: 5;
  animation: flyUp 25s ease-out infinite;
  cursor: pointer;
  pointer-events: auto;
}

.starship-flying svg {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 0 20px rgba(74, 159, 255, 0.3));
}

.starship-flying:hover {
  filter: brightness(1.2);
}

/* Engine exhaust glow beneath ship */
.engine-glow {
  position: absolute;
  bottom: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 50px;
  background: linear-gradient(to bottom,
    rgba(74, 159, 255, 0.9),
    rgba(74, 159, 255, 0.4),
    rgba(255, 150, 50, 0.2),
    transparent);
  border-radius: 40%;
  animation: thruster 0.15s ease-in-out infinite alternate;
}

/* Ship ascent animation */
@keyframes flyUp {
  0% {
    bottom: -25%;
    opacity: 0;
  }
  3% {
    opacity: 1;
  }
  97% {
    opacity: 1;
  }
  100% {
    bottom: 115%;
    opacity: 0;
  }
}

/* Thruster flicker effect */
@keyframes thruster {
  0% { opacity: 0.7; height: 45px; }
  100% { opacity: 1; height: 55px; }
}

/* ==============================================
   DAY SKY: DRIFTING CLOUDS
   ============================================== */
.clouds {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* Cloud base - uses ::before and ::after for puffs */
.cloud {
  position: absolute;
  background: white;
  border-radius: 50%;
  opacity: 0.9;
  filter: blur(2px);
}

.cloud::before,
.cloud::after {
  content: '';
  position: absolute;
  background: white;
  border-radius: 50%;
}

/* Cloud 1 - smallest, fastest */
.cloud-1 {
  width: 100px;
  height: 40px;
  top: 10%;
  animation: drift 35s linear infinite;
}

.cloud-1::before {
  width: 50px;
  height: 50px;
  top: -25px;
  left: 15px;
}

.cloud-1::after {
  width: 60px;
  height: 45px;
  top: -20px;
  right: 15px;
}

/* Cloud 2 - largest, slowest */
.cloud-2 {
  width: 120px;
  height: 45px;
  top: 25%;
  animation: drift 45s linear infinite 10s;
}

.cloud-2::before {
  width: 60px;
  height: 55px;
  top: -30px;
  left: 20px;
}

.cloud-2::after {
  width: 70px;
  height: 50px;
  top: -25px;
  right: 20px;
}

/* Cloud 3 - medium */
.cloud-3 {
  width: 80px;
  height: 35px;
  top: 15%;
  animation: drift 40s linear infinite 20s;
}

.cloud-3::before {
  width: 45px;
  height: 45px;
  top: -22px;
  left: 10px;
}

.cloud-3::after {
  width: 50px;
  height: 40px;
  top: -18px;
  right: 10px;
}

@keyframes drift {
  0% { left: -20%; }
  100% { left: 120%; }
}

/* ==============================================
   LAUNCH PAD SCENE (Day Mode)
   Ground-based starship with support tower
   ============================================== */
.hangar-scene {
  position: absolute;
  bottom: 0;
  right: 10%;
  width: 200px;
  height: 300px;
}

/* Concrete launch platform */
.launch-pad {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 20px;
  background: linear-gradient(to bottom, #505050, #303030);
  border-radius: 3px 3px 0 0;
}

.launch-pad::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 10%;
  right: 10%;
  height: 5px;
  background: #606060;
  border-radius: 2px;
}

/* Service tower */
.tower {
  position: absolute;
  bottom: 20px;
  left: 20px;
  width: 15px;
  height: 180px;
  background: linear-gradient(to right, #707070, #909090, #707070);
}

/* Tower arms */
.tower::before {
  content: '';
  position: absolute;
  top: 0;
  right: -30px;
  width: 35px;
  height: 8px;
  background: #808080;
}

.tower::after {
  content: '';
  position: absolute;
  top: 40px;
  right: -25px;
  width: 30px;
  height: 6px;
  background: #757575;
}

/* ==============================================
   GROUNDED STARSHIP (Day Mode)
   Stationary rocket with exhaust vapor
   Click to toggle day/night theme
   ============================================== */
.starship-grounded {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  z-index: 5;
  cursor: pointer;
  pointer-events: auto;
}

.starship-grounded svg {
  width: 100%;
  height: auto;
  filter: drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.3));
}

.starship-grounded:hover {
  filter: brightness(1.1);
}

/* ==============================================
   EXHAUST VAPOR (Day Mode)
   Rising steam clouds from grounded ship
   ============================================== */
.exhaust-vapor {
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 60px;
}

.vapor {
  position: absolute;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  filter: blur(4px);
}

.vapor-1 {
  width: 15px;
  height: 15px;
  left: 5px;
  animation: rise 3s ease-out infinite;
}

.vapor-2 {
  width: 20px;
  height: 20px;
  left: 12px;
  animation: rise 3.5s ease-out infinite 0.5s;
}

.vapor-3 {
  width: 12px;
  height: 12px;
  left: 20px;
  animation: rise 2.8s ease-out infinite 1s;
}

@keyframes rise {
  0% {
    bottom: 0;
    opacity: 0.7;
    transform: scale(1) translateX(0);
  }
  50% {
    opacity: 0.5;
  }
  100% {
    bottom: 80px;
    opacity: 0;
    transform: scale(2) translateX(-10px);
  }
}
