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

body {
  font-family: 'Courier New', monospace;
  background: #000;
  color: #fff;
  overflow: hidden;
  height: 100vh;
}

#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, #0a0a0a, #1a1a2e, #16213e);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  transition: opacity 0.5s ease-out;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid #333;
  border-top: 3px solid #00ffff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

#app {
  position: relative;
  width: 100%;
  height: 100vh;
}

#space-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

#ui-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  pointer-events: none;
}

#ui-overlay > * {
  pointer-events: auto;
}

#header {
  text-align: center;
  padding: 20px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 255, 255, 0.1),
    transparent
  );
  border-bottom: 2px solid #00ffff;
}

#header h1 {
  font-size: 3rem;
  font-weight: bold;
  text-shadow: 0 0 20px #00ffff;
  margin-bottom: 10px;
  animation: glow 2s ease-in-out infinite alternate;
}

#header p {
  font-size: 1.2rem;
  color: #00ffff;
  text-shadow: 0 0 10px #00ffff;
}

@keyframes glow {
  from {
    text-shadow: 0 0 20px #00ffff;
  }
  to {
    text-shadow: 0 0 30px #00ffff, 0 0 40px #00ffff;
  }
}

#countdown-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

#countdown-display {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

.time-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(0, 0, 0, 0.7);
  border: 2px solid #00ffff;
  border-radius: 15px;
  padding: 20px;
  min-width: 120px;
  backdrop-filter: blur(10px);
  box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
  transition: transform 0.3s ease;
}

.time-unit:hover {
  transform: scale(1.05);
  box-shadow: 0 0 40px rgba(0, 255, 255, 0.5);
}

.time-unit .number {
  font-size: 3rem;
  font-weight: bold;
  color: #00ffff;
  text-shadow: 0 0 15px #00ffff;
  margin-bottom: 10px;
  font-family: 'Courier New', monospace;
}

.time-unit .label {
  font-size: 1rem;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 2px;
}

#mission-status {
  position: absolute;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  background: rgba(0, 0, 0, 0.8);
  padding: 20px;
  border-radius: 10px;
  border: 1px solid #00ffff;
  backdrop-filter: blur(10px);
}

#status-text {
  font-size: 1.2rem;
  color: #00ffff;
  margin-bottom: 15px;
  text-shadow: 0 0 10px #00ffff;
}

#progress-bar {
  width: 300px;
  height: 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid #00ffff;
}

#progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #00ffff, #0080ff);
  width: 0%;
  transition: width 1s ease;
  box-shadow: 0 0 10px #00ffff;
}

#controls {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 10px;
}

.control-btn {
  background: rgba(0, 0, 0, 0.7);
  border: 2px solid #00ffff;
  color: #00ffff;
  padding: 10px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.control-btn:hover {
  background: rgba(0, 255, 255, 0.2);
  box-shadow: 0 0 20px #00ffff;
  transform: scale(1.1);
}

/* Responsive Design */
@media (max-width: 768px) {
  #header h1 {
    font-size: 2rem;
  }

  #countdown-display {
    gap: 15px;
  }

  .time-unit {
    min-width: 80px;
    padding: 15px;
  }

  .time-unit .number {
    font-size: 2rem;
  }

  #progress-bar {
    width: 250px;
  }
}

@media (max-width: 480px) {
  #countdown-display {
    gap: 10px;
  }

  .time-unit {
    min-width: 70px;
    padding: 10px;
  }

  .time-unit .number {
    font-size: 1.5rem;
  }

  .time-unit .label {
    font-size: 0.8rem;
  }

  #progress-bar {
    width: 200px;
  }
}

/* Animation for countdown numbers */
@keyframes countdownPulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

.time-unit .number.updating {
  animation: countdownPulse 0.5s ease;
}
