* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: radial-gradient(circle at top, #1e293b, #020617 70%);
  color: #e2e8f0;
  min-height: 100vh;
}

.mission-page {
  width: min(1000px, 92%);
  margin: 0 auto;
  padding: 32px 0 48px;
}

.mission-panel {
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

h1 {
  margin: 0;
  text-align: center;
  font-size: 2.2rem;
}

.subtitle {
  margin: 8px 0 28px;
  text-align: center;
  color: #94a3b8;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}

.status-card {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 16px;
  padding: 18px;
}

.status-card h2 {
  margin: 0 0 10px;
  font-size: 1rem;
  color: #93c5fd;
}

.status-card p {
  margin: 0;
  font-size: 1.1rem;
  font-weight: bold;
}

.rocket-area {
  position: relative;
  height: 360px;
  margin: 20px 0 24px;
  overflow: hidden;
  border-radius: 18px;
  background:
    linear-gradient(to bottom, rgba(15, 23, 42, 0.4), rgba(2, 6, 23, 0.95)),
    radial-gradient(
      circle at 20% 20%,
      rgba(255, 255, 255, 0.08) 1px,
      transparent 2px
    ),
    radial-gradient(
      circle at 70% 30%,
      rgba(255, 255, 255, 0.06) 1px,
      transparent 2px
    ),
    radial-gradient(
      circle at 40% 80%,
      rgba(255, 255, 255, 0.07) 1px,
      transparent 2px
    ),
    #020617;
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.launch-pad {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  height: 16px;
  background: #475569;
  border-radius: 10px;
}

.rocket {
  position: absolute;
  left: 50%;
  bottom: 48px;
  transform: translateX(-50%);
  width: 70px;
  transition: transform 1s ease-in;
}

.rocket-top {
  width: 0;
  height: 0;
  margin: 0 auto;
  border-left: 22px solid transparent;
  border-right: 22px solid transparent;
  border-bottom: 36px solid #f8fafc;
}

.rocket-body {
  position: relative;
  width: 50px;
  height: 110px;
  margin: 0 auto;
  background: #e2e8f0;
  border-radius: 22px;
}

.window {
  position: absolute;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #38bdf8;
  border: 3px solid #0f172a;
}

.rocket-fin {
  position: absolute;
  bottom: 18px;
  width: 18px;
  height: 34px;
  background: #ef4444;
}

.left-fin {
  left: 2px;
  clip-path: polygon(100% 0, 0 100%, 100% 100%);
}

.right-fin {
  right: 2px;
  clip-path: polygon(0 0, 0 100%, 100% 100%);
}

.flame {
  width: 20px;
  height: 38px;
  margin: -4px auto 0;
  background: linear-gradient(to bottom, #facc15, #f97316, #dc2626);
  clip-path: polygon(50% 100%, 0 0, 100% 0);
  animation: flameFlicker 0.2s infinite alternate;
}

.hidden {
  display: none;
}

.smoke {
  position: absolute;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  width: 120px;
  height: 28px;
  border-radius: 50%;
  background: rgba(226, 232, 240, 0.2);
  filter: blur(8px);
}

.actions {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

button {
  border: none;
  border-radius: 12px;
  padding: 14px 22px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  background: #2563eb;
  color: white;
  transition:
    transform 0.15s ease,
    background 0.15s ease;
}

button:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.log-panel {
  background: rgba(2, 6, 23, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 16px;
  padding: 18px;
}

.log-panel h2 {
  margin-top: 0;
  color: #93c5fd;
}

#mission-log {
  margin: 0;
  padding-left: 20px;
  max-height: 240px;
  overflow-y: auto;
}

#mission-log li {
  margin-bottom: 8px;
  color: #cbd5e1;
}

.monitoring-live {
  color: #4ade80;
}

.monitoring-off {
  color: #f87171;
}

.rocket.launching {
  animation: liftoff 5s ease-in forwards;
}

@keyframes flameFlicker {
  from {
    transform: scaleY(1);
    opacity: 0.9;
  }
  to {
    transform: scaleY(1.15);
    opacity: 1;
  }
}

@keyframes liftoff {
  0% {
    transform: translateX(-50%) translateY(0);
  }
  20% {
    transform: translateX(-50%) translateY(-20px);
  }
  40% {
    transform: translateX(-50%) translateY(-80px);
  }
  70% {
    transform: translateX(-50%) translateY(-180px);
  }
  100% {
    transform: translateX(-50%) translateY(-420px);
  }
}

@media (max-width: 700px) {
  .status-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 1.8rem;
  }

  .rocket-area {
    height: 320px;
  }
}
