html, body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  width: 100%;
  height: 100%;
}

body {
  font-family: system-ui, sans-serif;
  text-align: center;
  background: #f8f9fa;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden; /* Hide overflow in all directions */
  height: 100vh; /* Ensure full height */
  width: 100vw; /* Ensure full width */
  align-items: center; /* Center content horizontally */
  margin: 0; /* Ensure no margin */
}

.nav-bar {
  background-color: #00112b;
  padding: 0.7rem 1rem;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  border-bottom: 1px solid #0a3872;
}

.title {
  color: white;
  font-weight: 500;
  margin-right: 1rem;
}

#status-indicator {
  font-size: 0.8rem;
  animation: blink 1s infinite;
  margin-left: 10px;
}

@keyframes blink {
  0% { opacity: 1; }
  50% { opacity: 0.3; }
  100% { opacity: 1; }
}

.back-link {
  color: white;
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.back-link:hover {
  color: #3498db;
}

h1 {
  margin: 0.5rem;
  padding: 0;
  color: #2c3e50;
  font-size: 1.5rem;
}

.info-header {
  background-color: rgba(0, 13, 36, 0.95);
  color: #fff;
  padding: 0.5rem 0;
  border-bottom: 1px solid #0e4686;
  flex-shrink: 0;
  width: 100%;
  z-index: 10;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.info-header h1 {
  margin: 0.2rem 0 0.5rem;
  font-size: 1.1rem;
  color: #fff;
  font-weight: 500;
}

.orbital-data {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-bottom: 0.3rem;
  font-family: 'Roboto Mono', monospace, system-ui;
}

.data-group {
  padding: 0 0.5rem;
  min-width: 100px;
  flex: 1;
  text-align: center;
}

.data-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: #7fb1ff;
  letter-spacing: 0.05rem;
}

.data-value {
  font-size: 0.95rem;
  font-weight: 500;
  color: #fff;
  text-shadow: 0 0 10px rgba(72, 169, 255, 0.4);
}

/* NASA-style static map container */
#map-container {
  height: calc(100vh - 115px);
  width: 100%;
  margin: 0;
  padding: 0;
  position: relative;
  flex-grow: 1;
  overflow: hidden;
  background-color: #000d24;
  transition: height 0.3s ease;
  left: 0;
  right: 0;
  bottom: 0;
}

/* Ensure viewport is properly handled */
@viewport {
  width: device-width;
  zoom: 1.0;
}

/* Fix for iOS devices that might have scrolling issues */
html.ios, html.ios body {
  height: 100% !important;
}

/* Ensure map container has no horizontal overflow */
html, body, #map-container {
  max-width: 100% !important;
  overflow: hidden !important;
}

/* Ensure map is responsive on all devices */
@media screen and (max-width: 768px) {
  #map-container {
    width: 100vw !important;
    height: 80vh !important;
  }
}

/* NASA-style coordinate labels */
.coordinate-labels {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
  color: rgba(100, 180, 255, 0.8);
  font-size: 11px;
  font-family: 'Roboto Mono', monospace;
  z-index: 22;
}

.lat-labels {
  position: absolute;
  left: 8px;
  top: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px 0;
  text-shadow: 0 0 3px rgba(0, 0, 0, 0.8);
}

.lng-labels {
  position: absolute;
  bottom: 8px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 10px;
  box-sizing: border-box;
  text-shadow: 0 0 3px rgba(0, 0, 0, 0.8);
}

/* Trajectory line styling */
.iss-trajectory {
  stroke: #ffcc00;
  stroke-width: 2;
  stroke-dasharray: 5, 5;
  fill: none;
  pointer-events: none;
}

/* Fix edge issues */
@media screen and (min-width: 768px) {
  #map-container {
    width: 100vw !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}

/* NASA-style enhancements */
.iss-icon {
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.8));
}

/* Add a subtle earth glow effect */
.earth-glow {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(0, 60, 120, 0.15), transparent 70%);
  z-index: 400;
}

/* Night/day terminator styling */
.day-night-terminator {
  stroke: rgba(255, 255, 0, 0.5);
  stroke-width: 1;
  stroke-dasharray: 5, 5;
  fill: rgba(255, 255, 0, 0.05);
}

/* Add Google font for NASA-like look */
@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400;500&display=swap');

/* Mobile adjustments */
@media screen and (max-width: 768px) {
  .orbital-data {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .data-group {
    padding: 0.2rem;
    min-width: 80px;
    margin-bottom: 0.3rem;
  }
  
  .info-header h1 {
    font-size: 1rem;
  }
}

/* Static world map background */
.world-map-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('https://eoimages.gsfc.nasa.gov/images/imagerecords/57000/57752/land_shallow_topo_2048.jpg');
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 10;
  filter: brightness(0.7) saturate(1.2) contrast(1.1);
}

/* Grid overlay for NASA-style look */
.grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(to right, rgba(50, 100, 200, 0.3) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(50, 100, 200, 0.3) 1px, transparent 1px);
  background-size: calc(100% / 12) calc(100% / 6);
  z-index: 20;
  pointer-events: none;
}

/* Special equator line */
.grid-overlay:before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 1px;
  background-color: rgba(100, 150, 255, 0.8);
  z-index: 21;
}

/* Special prime meridian line */
.grid-overlay:after {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  width: 1px;
  height: 100%;
  background-color: rgba(100, 150, 255, 0.5);
  z-index: 21;
}

/* ISS Icon styling */
#iss-icon {
  position: absolute;
  width: 42px;
  height: 30px;
  background-image: url('https://upload.wikimedia.org/wikipedia/commons/d/d0/International_Space_Station.svg');
  background-size: contain;
  background-repeat: no-repeat;
  transform: translate(-50%, -50%);
  z-index: 30;
  filter: drop-shadow(0 0 10px rgba(255, 255, 0, 0.9)) brightness(1.3);
  transition: all 1s linear;
  background-color: rgba(0, 0, 0, 0.5);
  padding: 6px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(255, 255, 0, 0.6);
}

/* Orbit path styling - enhanced for visibility */
.orbit-path {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 25;
  pointer-events: none;
  /* Make sure this container doesn't interfere with path visibility */
  filter: none;
  overflow: visible;
  /* Debug outline - comment out in production */
  /* outline: 1px solid red; */
}

/* Make sure the SVG paths stand out */
.orbit-path svg {
  overflow: visible;
  width: 100%;
  height: 100%;
}
