:root {
  --bg: #131722;
  --panel: #131722;
  --footer-bg: #0b0e14;
  --border: #232938;
  --text: #e8ecf4;
  --text-dim: #8a92a6;
  --accent: #ff6b3d;
  --urgent: #ff3b3b;
  --critical: #ffffff;
  --go: #3ddc84;
  --hold: #f5c542;
  --tbd: #6c7688;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
html::-webkit-scrollbar {
  width: 8px;
}
html::-webkit-scrollbar-track {
  background: transparent;
}
html::-webkit-scrollbar-thumb {
  background-color: var(--border);
  border-radius: 4px;
}
html::-webkit-scrollbar-thumb:hover {
  background-color: var(--text-dim);
}
body {
  margin: 0;
  padding-top: 60px;
  background: var(--bg);
  color: var(--text);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
}
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  padding: 0 20px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
header .brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text);
  text-decoration: none;
}
header .brand:hover,
header .brand:visited {
  color: var(--text);
}
header .brand-logo {
  width: 26px;
  height: 26px;
  object-fit: contain;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}
header .nav-link {
  color: var(--text-dim);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.15s ease;
}
header .nav-link:hover {
  color: var(--text);
}
.hero {
  display: flex;
  height: calc(100vh - 60px);
  min-height: 480px;
}
.hero-panel {
  flex: 0 0 400px;
  width: 400px;
  min-height: 0;
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin: 20px 20px 20px 0;
  padding: 20px 20px 24px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.hero-panel::-webkit-scrollbar {
  width: 8px;
}
.hero-panel::-webkit-scrollbar-track {
  background: transparent;
}
.hero-panel::-webkit-scrollbar-thumb {
  background-color: var(--border);
  border-radius: 4px;
}
.hero-panel::-webkit-scrollbar-thumb:hover {
  background-color: var(--text-dim);
}
#next-launch {
  padding-bottom: 20px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  text-align: center;
}
#next-launch .label {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 8px;
}
#next-launch .name {
  font-size: 1.4rem;
  font-weight: 600;
}
#next-launch .mission {
  color: var(--text-dim);
  font-size: 0.95rem;
  margin-top: 2px;
  margin-bottom: 4px;
}
#next-launch .sub {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 16px;
}
#next-launch .urgency-badge {
  margin-bottom: 10px;
}
#next-launch.imminent #next-label {
  color: var(--urgent);
}
#next-launch.critical #next-label {
  color: var(--critical);
}
#next-launch .next-country {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 4px;
}
#countdown {
  display: flex;
  justify-content: center;
  gap: 14px;
}
#countdown .unit {
  min-width: 64px;
}
#countdown .num {
  font-size: 2rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
#countdown .lbl {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
h2.section-title {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin: 0 0 14px;
}
.section-title-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.section-title-row h2.section-title {
  margin: 0;
}
.last-updated {
  margin-bottom: 14px;
  color: var(--text-dim);
  font-size: 0.72rem;
  white-space: nowrap;
}
#globe-container {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  background: var(--panel);
  overflow: hidden;
}

.globe-connector {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
}
.globe-connector line {
  stroke: var(--accent);
  stroke-width: 1;
}
.globe-connector line.imminent {
  stroke: var(--urgent);
  stroke-width: 1.5;
}
.globe-connector line.critical {
  stroke: var(--critical);
  stroke-width: 2;
}

.globe-hover-tooltip {
  position: absolute;
  z-index: 6;
  max-width: 220px;
  pointer-events: none;
  background: var(--panel);
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 0.78rem;
  line-height: 1.4;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}
.globe-hover-tooltip.imminent {
  border-color: var(--urgent);
}
.globe-hover-tooltip.critical {
  border-color: var(--critical);
  box-shadow: 0 4px 18px rgba(255, 255, 255, 0.25);
}
.globe-hover-tooltip .t-site {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-dim);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 5px;
}
.globe-hover-tooltip .t-subsite + .t-subsite {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid var(--border);
}
.globe-hover-tooltip .t-launches {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.globe-hover-tooltip .t-launch {
  display: flex;
  flex-direction: column;
}
.globe-hover-tooltip .t-launch + .t-launch {
  padding-top: 6px;
  border-top: 1px solid var(--border);
}
.globe-hover-tooltip .t-mission {
  color: var(--accent);
  font-weight: 600;
}
.globe-hover-tooltip .t-pad {
  color: var(--text-dim);
  font-size: 0.85em;
}
.globe-hover-tooltip .t-date {
  color: var(--text-dim);
  font-size: 0.92em;
}
.globe-hover-tooltip .t-countdown {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  font-size: 0.88em;
  margin-top: 1px;
}
.globe-hover-tooltip .t-launch.imminent .t-mission,
.globe-hover-tooltip .t-launch.imminent .t-countdown {
  color: var(--urgent);
}
.globe-hover-tooltip .t-launch.critical .t-mission,
.globe-hover-tooltip .t-launch.critical .t-countdown {
  color: var(--critical);
}
.globe-hover-tooltip .t-launch.imminent .t-countdown,
.globe-hover-tooltip .t-launch.critical .t-countdown {
  font-weight: 700;
}

#launch-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.card {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 14px;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 22px 14px;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}
.card.imminent {
  border-color: var(--urgent);
  animation: imminent-pulse 1.6s ease-in-out infinite;
}
.card.imminent:hover {
  border-color: var(--urgent);
}
.card.imminent .meta .countdown {
  color: var(--urgent);
  font-weight: 700;
}
@keyframes imminent-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(255, 59, 59, 0.45);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(255, 59, 59, 0);
  }
}
.card.critical {
  border-color: var(--critical);
  animation: critical-pulse 0.9s ease-in-out infinite;
}
.card.critical:hover {
  border-color: var(--critical);
}
.card.critical .meta .countdown {
  color: var(--critical);
  font-weight: 700;
}
@keyframes critical-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.6);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
  }
}
.card img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 4px;
  background: #1a1f2c;
}
.card .info .rocket {
  font-weight: 600;
  font-size: 0.98rem;
}
.card .info .mission {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-top: 2px;
}
.card .info .pad {
  color: var(--text-dim);
  font-size: 0.78rem;
  margin-top: 4px;
}
.card .info .pad-country {
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
}
.card .info .pad-location {
  margin-top: 2px;
}
.flag {
  width: 14px !important;
  height: 10px !important;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
}
.card .meta {
  text-align: right;
  font-size: 0.82rem;
  white-space: nowrap;
}
.card .meta .date {
  color: var(--text);
  font-weight: 500;
}
.card .meta .countdown {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  font-size: 0.78rem;
  margin-top: 2px;
}
.urgency-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.urgency-badge.imminent {
  color: var(--urgent);
  background: rgba(255, 59, 59, 0.15);
}
.urgency-badge.critical {
  color: #0b0e14;
  background: var(--critical);
}
.status {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.status.go,
.status.success {
  color: var(--go);
}
.status.hold {
  color: var(--hold);
}
.status.tbd {
  color: var(--tbd);
}
.status.failure {
  color: #ff5a5a;
}

.hero-panel .card {
  grid-template-columns: 48px 1fr;
  padding: 14px 12px;
}
.hero-panel .card img {
  width: 48px;
  height: 48px;
}
.hero-panel .card .meta {
  grid-column: 1 / -1;
  text-align: left;
  margin-top: 4px;
}

#loading,
#error {
  text-align: center;
  color: var(--text-dim);
  padding: 40px 0;
}
#error {
  color: #ff8877;
  display: none;
}

.newsletter {
  scroll-margin-top: 60px;
  border-top: 1px solid var(--border);
  padding: 48px 16px;
}
.newsletter-inner {
  max-width: 480px;
  margin: 0 auto;
  text-align: center;
}
.newsletter-inner .section-title {
  margin: 0 0 8px;
}
.newsletter-sub {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin: 0 0 20px;
}
.subscribe-form {
  display: flex;
  gap: 10px;
}
.subscribe-form input {
  flex: 1;
  min-width: 0;
  padding: 11px 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-size: 0.9rem;
}
.subscribe-form input::placeholder {
  color: var(--text-dim);
}
.subscribe-form input:focus {
  outline: none;
  border-color: var(--accent);
}
.subscribe-form button {
  padding: 11px 20px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  white-space: nowrap;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}
.subscribe-form button:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}
.subscribe-form button:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
  box-shadow: none;
}
.subscribe-message {
  margin-top: 12px;
  font-size: 0.85rem;
}
.subscribe-message.success {
  color: var(--go);
}
.subscribe-message.error {
  color: #ff8877;
}

@media (max-width: 480px) {
  .subscribe-form {
    flex-direction: column;
  }
}

footer {
  background: var(--footer-bg);
  color: var(--text-dim);
  font-size: 0.78rem;
  border-top: 1px solid var(--border);
}
footer a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.15s ease;
}
footer a:hover {
  color: var(--text);
}
footer .container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 16px;
}
footer .footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 20px;
  padding-bottom: 16px;
}
footer .footer-brand {
  display: flex;
  flex-direction: column;
}
footer .footer-name {
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
}
footer .footer-tagline {
  color: var(--text-dim);
  font-size: 0.78rem;
  margin-top: 2px;
}
footer .footer-links {
  display: flex;
  gap: 16px;
}
footer .footer-data {
  text-align: center;
  padding-bottom: 16px;
}
footer .footer-bottom {
  text-align: center;
  padding-bottom: 20px;
}
footer .footer-bottom p {
  margin: 0;
}

@media (max-width: 480px) {
  footer .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .card {
    grid-template-columns: 48px 1fr;
  }
  .card img {
    width: 48px;
    height: 48px;
  }
  .card .meta {
    grid-column: 1 / -1;
    text-align: left;
    margin-top: 4px;
  }
  #countdown .unit {
    min-width: 52px;
  }
  #countdown .num {
    font-size: 1.5rem;
  }
}

@media (max-width: 720px) {
  .hero {
    flex-direction: column;
    height: auto;
    min-height: 0;
  }
  #globe-container {
    height: 360px;
    flex: none;
  }
  .hero-panel {
    flex: none;
    width: auto;
    max-height: none;
    overflow-y: visible;
    margin: 0 16px 16px;
  }
}
