/* Variables */
:root {
  --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* Cosmic Color Palette */
  --bg-deep: #05050a;
  --bg-nebula: radial-gradient(circle at 50% 50%, #0c0822 0%, #030307 100%);
  --panel-bg: rgba(9, 9, 20, 0.55);
  --panel-border: rgba(255, 255, 255, 0.08);
  --panel-border-hover: rgba(0, 240, 255, 0.25);
  
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  
  /* Glow Colors */
  --cyan: #00f0ff;
  --cyan-glow: rgba(0, 240, 255, 0.4);
  --purple: #bc00dd;
  --purple-glow: rgba(188, 0, 221, 0.4);
  --gold: #ffdd67;
  --gold-glow: rgba(255, 221, 103, 0.4);
  --green: #10b981;
  --green-glow: rgba(16, 185, 129, 0.4);
  --orange: #f97316;
  --orange-glow: rgba(249, 115, 22, 0.4);
  --red: #ef4444;
  --red-glow: rgba(239, 68, 68, 0.4);
  
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --glow-light: 0 0 15px rgba(0, 240, 255, 0.15);
}
/* Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  background-color: var(--bg-deep);
  background-image: var(--bg-nebula);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}
/* Starry background canvas */
#stars-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 1.5rem;
  position: relative;
  z-index: 1;
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
}
/* Glassmorphism panel base style */
.glass-panel {
  background: var(--panel-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  box-shadow: var(--shadow-lg), var(--glow-light);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.glass-panel:hover {
  border-color: rgba(255, 255, 255, 0.12);
}
/* Utilities */
.text-cyan { color: var(--cyan); }
.text-purple { color: var(--purple); }
.text-gold { color: var(--gold); }
.text-green { color: var(--green); }
.text-orange { color: var(--orange); }
.text-red { color: var(--red); }
.text-muted { color: var(--text-muted); }
/* Buttons & Inputs */
.btn {
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-family: var(--font-display);
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.btn-primary {
  background: linear-gradient(135deg, var(--cyan) 0%, #0099ff 100%);
  color: #030307;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}
.btn-primary:hover {
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.6);
  transform: translateY(-1px);
}
.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid var(--panel-border);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}
.icon-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  border-radius: 8px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.icon-btn:hover {
  background: rgba(0, 240, 255, 0.1);
  color: var(--cyan);
  border-color: var(--cyan);
}
.badge {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
}
.badge-green {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--green);
}
.badge-orange {
  background: rgba(249, 115, 22, 0.15);
  border-color: rgba(249, 115, 22, 0.3);
  color: var(--orange);
}
.badge-purple {
  background: rgba(188, 0, 221, 0.15);
  border-color: rgba(188, 0, 221, 0.3);
  color: var(--purple);
}
.badge-red {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: var(--red);
}
.badge-cyan {
  background: rgba(0, 240, 255, 0.15);
  border-color: rgba(0, 240, 255, 0.3);
  color: var(--cyan);
}
/* ==========================================================================
   Header Styling
   ========================================================================== */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  gap: 1.5rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.logo-pulse {
  background: linear-gradient(135deg, var(--cyan) 0%, var(--purple) 100%);
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #fff;
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
  animation: logo-float 4s ease-in-out infinite alternate;
}
.app-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(to right, #ffffff, #8899ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.app-tagline {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text-secondary);
  font-size: 0.95rem;
}
.header-metadata {
  display: flex;
  padding: 0.5rem 1rem;
  gap: 1.5rem;
  align-items: center;
}
.meta-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.meta-item i {
  font-size: 1.2rem;
}
.meta-text {
  display: flex;
  flex-direction: column;
}
.meta-label {
  font-size: 0.65rem;
  font-family: var(--font-display);
  letter-spacing: 0.5px;
  color: var(--text-muted);
}
.meta-value {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}
/* ==========================================================================
   Main Grid Layout
   ========================================================================== */
.main-grid {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 1.5rem;
  flex: 1;
  min-height: 0; /* Important for scroll container behavior */
}
.dashboard-area {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.dashboard-row {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.grid-2-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
/* Cards Layout */
.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
}
.card-header {
  padding: 1.2rem 1.5rem 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.card-header h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
/* Live Indicator pulse */
.live-indicator {
  font-size: 0.7rem;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--cyan);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  letter-spacing: 1px;
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--cyan);
  display: inline-block;
}
.green-dot {
  background-color: var(--green);
}
/* ==========================================================================
   Live ISS Tracker Widget
   ========================================================================== */
.map-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 1;
  background: radial-gradient(circle at 50% 50%, #0a323b 0%, #021013 100%);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  overflow: hidden;
}
#map-bg-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  z-index: 1;
  opacity: 0.85;
  filter: brightness(0.9) sepia(0.05);
}
#iss-map-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  display: block;
}
.map-overlay-coordinates {
  position: absolute;
  bottom: 8px;
  right: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.coord-readout {
  background: rgba(4, 4, 8, 0.8);
  border: 1px solid rgba(0, 240, 255, 0.2);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.75rem;
  display: flex;
  gap: 6px;
}
.coord-readout .lbl { color: var(--text-muted); }
.coord-readout .val { color: var(--cyan); text-shadow: 0 0 5px var(--cyan-glow); }
.iss-telemetry {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 1rem;
}
.telemetry-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  padding: 0.6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.t-label {
  font-size: 0.6rem;
  font-family: var(--font-display);
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.t-value {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}
/* ==========================================================================
   Moon Phase Widget
   ========================================================================== */
.moon-layout {
  flex-direction: row;
  align-items: center;
  gap: 1.5rem;
}
.moon-render-container {
  position: relative;
  width: 100px;
  height: 100px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.moon-glow {
  position: absolute;
  top: 5px;
  left: 5px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, rgba(255, 221, 103, 0.05) 50%, transparent 70%);
  box-shadow: 0 0 25px rgba(255, 221, 103, 0.2);
  pointer-events: none;
}
#moon-svg {
  width: 90px;
  height: 90px;
  filter: drop-shadow(0 0 10px rgba(255, 221, 103, 0.15));
}
.moon-details {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}
.detail-row {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  padding-bottom: 4px;
}
.d-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.d-value {
  font-size: 0.85rem;
  font-weight: 600;
}
/* ==========================================================================
   Satellites Overhead Widget
   ========================================================================== */
.satellite-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}
.satellite-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  transition: border-color 0.2s, background-color 0.2s;
}
.satellite-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(16, 185, 129, 0.25);
}
.sat-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.1);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}
.sat-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.sat-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}
.sat-details {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.sat-status {
  font-size: 0.7rem;
  font-family: var(--font-display);
  font-weight: 700;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  color: var(--text-secondary);
}
.sat-status.pulse-text {
  color: var(--green);
  background: rgba(16, 185, 129, 0.15);
  animation: text-pulse 2s infinite ease-in-out;
}
.sat-status.pass-incoming {
  color: var(--cyan);
  background: rgba(0, 240, 255, 0.1);
}
/* ==========================================================================
   Visible Planets Widget
   ========================================================================== */
.planets-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
  flex: 1;
}
.planet-pill {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  transition: all 0.2s ease;
}
.planet-pill:hover {
  background: rgba(255, 255, 255, 0.05);
}
.planet-pill.visible {
  border-color: rgba(188, 0, 221, 0.15);
}
.planet-pill.visible:hover {
  border-color: rgba(188, 0, 221, 0.35);
  box-shadow: 0 0 10px rgba(188, 0, 221, 0.1);
}
.planet-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px currentColor;
}
.planet-dot.Venus { background-color: #eedda8; color: rgba(238, 221, 168, 0.5); }
.planet-dot.Jupiter { background-color: #d8ca9d; color: rgba(216, 202, 157, 0.5); }
.planet-dot.Mars { background-color: #ff5533; color: rgba(255, 85, 51, 0.5); }
.planet-dot.Saturn { background-color: #ead397; color: rgba(234, 211, 151, 0.5); }
.planet-meta {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.planet-name {
  font-size: 0.85rem;
  font-weight: 600;
}
.planet-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.planet-pill i {
  font-size: 0.8rem;
}
/* ==========================================================================
   Cosmic Events & Meteor Showers
   ========================================================================== */
.event-filter {
  display: flex;
  gap: 0.5rem;
}
.filter-tab {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}
.filter-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}
.filter-tab.active {
  color: var(--cyan);
  background: rgba(0, 240, 255, 0.08);
  border-color: rgba(0, 240, 255, 0.2);
}
.events-timeline {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  position: relative;
  padding-left: 1rem;
}
/* Vertical timeline bar */
.events-timeline::before {
  content: '';
  position: absolute;
  top: 5px;
  bottom: 5px;
  left: 0;
  width: 1px;
  background: rgba(255, 255, 255, 0.06);
}
.timeline-item {
  display: flex;
  gap: 1.2rem;
  position: relative;
}
/* Marker node */
.timeline-item::before {
  content: '';
  position: absolute;
  left: -1rem;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  transform: translateX(-50%);
  transition: all 0.3s ease;
}
.timeline-item.active-now::before {
  background: var(--orange);
  box-shadow: 0 0 8px var(--orange);
}
.timeline-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 45px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  padding: 4px;
  text-align: center;
}
.timeline-date .month {
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-secondary);
}
.timeline-date .day {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  margin-top: 2px;
}
.timeline-content {
  flex: 1;
}
.timeline-content h4 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  margin-top: 4px;
}
.timeline-content p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 2px;
}
.event-tag {
  display: inline-block;
  font-size: 0.6rem;
  font-family: var(--font-display);
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
}
/* ==========================================================================
   Space AI Stargazer Chatbox Widget
   ========================================================================== */
.chat-card {
  height: 100%;
}
.chat-header {
  padding: 1.2rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.bot-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.bot-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--purple) 0%, #a200ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #fff;
}
.bot-info h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
}
.status-text {
  font-size: 0.7rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}
.status-text .dot {
  width: 5px;
  height: 5px;
}
.chat-messages {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 500px;
  scroll-behavior: smooth;
}
/* Scrollbar styling for message box */
.chat-messages::-webkit-scrollbar {
  width: 4px;
}
.chat-messages::-webkit-scrollbar-track {
  background: transparent;
}
.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 20px;
}
.message {
  display: flex;
  flex-direction: column;
  max-width: 85%;
  animation: bubble-enter 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
  transform: translateY(8px);
}
.message-content {
  padding: 0.8rem 1rem;
  border-radius: 12px;
  font-size: 0.85rem;
}
.message-time {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 4px;
  align-self: flex-start;
}
.bot-message {
  align-self: flex-start;
}
.bot-message .message-content {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-top-left-radius: 2px;
}
.bot-message .message-content p + p {
  margin-top: 0.5rem;
}
.user-message {
  align-self: flex-end;
}
.user-message .message-content {
  background: linear-gradient(135deg, rgba(188, 0, 221, 0.45) 0%, rgba(100, 0, 221, 0.45) 100%);
  border: 1px solid rgba(188, 0, 221, 0.3);
  color: #fff;
  border-top-right-radius: 2px;
  box-shadow: 0 4px 10px rgba(188, 0, 221, 0.1);
}
.user-message .message-time {
  align-self: flex-end;
}
/* Typing indicator anim */
.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 4px 8px;
}
.typing-dot {
  width: 6px;
  height: 6px;
  background-color: var(--text-secondary);
  border-radius: 50%;
  animation: typing-wave 1.4s infinite ease-in-out;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
/* Suggestions box */
.chat-suggestions-box {
  padding: 0.8rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
}
.suggestion-label {
  font-size: 0.7rem;
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.4rem;
}
.suggestions-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.suggestion-btn {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 0.75rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}
.suggestion-btn:hover {
  background: rgba(188, 0, 221, 0.08);
  border-color: rgba(188, 0, 221, 0.25);
  color: var(--text-primary);
}
/* Input Form */
.chat-input-area {
  padding: 1rem 1.5rem 1.5rem;
  display: flex;
  gap: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}
.chat-input-area input {
  flex: 1;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.85rem;
  transition: all 0.2s ease;
}
.chat-input-area input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--purple);
  box-shadow: 0 0 10px rgba(188, 0, 221, 0.15);
}
.send-btn {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--purple) 0%, #9900ee 100%);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(188, 0, 221, 0.2);
  transition: all 0.2s ease;
}
.send-btn:hover {
  box-shadow: 0 4px 15px rgba(188, 0, 221, 0.5);
  transform: scale(1.03);
}
/* ==========================================================================
   Modals
   ========================================================================== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(3, 3, 6, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.modal.active {
  display: flex;
  animation: fade-in 0.2s forwards;
}
.modal-content {
  width: 100%;
  max-width: 480px;
  padding: 2rem;
  position: relative;
  animation: zoom-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.close-btn {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
  transition: color 0.2s;
}
.close-btn:hover {
  color: var(--text-primary);
}
.modal h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.modal-description {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}
.search-box {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.search-box input {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.85rem;
}
.search-box input:focus {
  outline: none;
  border-color: var(--cyan);
}
.quick-cities {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.quick-city-tag {
  font-size: 0.75rem;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: all 0.2s;
}
.quick-city-tag:hover {
  background: rgba(0, 240, 255, 0.08);
  border-color: rgba(0, 240, 255, 0.2);
  color: var(--cyan);
}
.divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-family: var(--font-display);
  margin-bottom: 1.5rem;
}
.divider::before,
.divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.divider:not(:empty)::before {
  margin-right: .5em;
}
.divider:not(:empty)::after {
  margin-left: .5em;
}
#use-gps-btn {
  width: 100%;
  justify-content: center;
}
/* ==========================================================================
   Footer
   ========================================================================== */
.app-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  text-align: center;
}
.app-footer p {
  font-size: 0.75rem;
  color: var(--text-muted);
}
/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes logo-float {
  0% {
    transform: translateY(0);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
  }
  100% {
    transform: translateY(-6px);
    box-shadow: 0 0 25px rgba(188, 0, 221, 0.6);
  }
}
@keyframes bubble-enter {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes typing-wave {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes zoom-in {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes pulse {
  0% { opacity: 0.4; }
  100% { opacity: 1; }
}
.pulse {
  animation: pulse 1.5s infinite alternate ease-in-out;
}
@keyframes text-pulse {
  0%, 100% { opacity: 0.75; }
  50% { opacity: 1; text-shadow: 0 0 6px rgba(16, 185, 129, 0.5); }
}
/* ==========================================================================
   Responsive Viewports
   ========================================================================== */
@media (max-width: 1100px) {
  .main-grid {
    grid-template-columns: 1fr;
  }
  
  .chat-area {
    height: 600px;
  }
}
@media (max-width: 768px) {
  .grid-2-col {
    grid-template-columns: 1fr;
  }
  
  .app-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .header-metadata {
    width: 100%;
    justify-content: space-between;
  }
  
  .moon-layout {
    flex-direction: column;
    text-align: center;
  }
  
  .moon-details {
    width: 100%;
  }
}

/* ==========================================================================
   Space Today & Birthday Sky
   ========================================================================== */
.space-today-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.news-item h4 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.news-item p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.3rem;
}
.mt-3 {
  margin-top: 0.75rem;
}
.birthday-form {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}
.glass-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 0.5rem 0.8rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.85rem;
  color-scheme: dark;
}
.glass-input:focus {
  outline: none;
  border-color: var(--purple);
  background: rgba(255, 255, 255, 0.05);
}
.apod-media {
  width: 100%;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.05);
  max-height: 200px;
}
.apod-error {
  background: rgba(249, 115, 22, 0.1);
  border: 1px solid rgba(249, 115, 22, 0.2);
  padding: 1rem;
  border-radius: 8px;
}
