:root {
  color-scheme: dark;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  --header-height: 68px;
  --bg-primary: radial-gradient(circle at 20% 20%, #1d2f65 0%, #0b1023 55%, #05070f 100%);
  --panel-bg: rgba(12, 18, 36, 0.78);
  --panel-border: rgba(133, 168, 255, 0.28);
  --surface-bg: rgba(18, 27, 49, 0.85);
  --surface-border: rgba(140, 168, 238, 0.22);
  --accent: #8da7ff;
  --accent-strong: #bdd4ff;
  --text-muted: #a7b8de;
  --text-soft: #ced7f0;
  --danger: #ff6f8f;
}

.panel-toggle {
  position: fixed;
  top: calc(var(--header-height) + 12px);
  left: 20px;
  z-index: 12;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(141, 167, 255, 0.4);
  background: rgba(13, 21, 40, 0.92);
  color: var(--accent-strong);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  display: none;
}

.panel-toggle:hover {
  background: rgba(141, 167, 255, 0.18);
  color: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg-primary);
  color: #f2f5ff;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  padding-top: var(--header-height);
}


a {
  color: var(--accent-strong);
  text-decoration: none;
}

a:hover {
  color: #ffffff;
}


body.mobile-panel-open {
  overflow: hidden;
}

#app {
  position: relative;
  width: 100vw;
  min-height: calc(100vh - var(--header-height));
  overflow: hidden;
}

canvas {
  display: block;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 15;
  background: rgba(6, 11, 24, 0.75);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(141, 167, 255, 0.25);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  color: #f6f7ff;
}

.brand-mark {
  font-size: 24px;
}

.brand small {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.site-nav a {
  color: #dfe7ff;
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.site-nav a:hover {
  color: var(--accent-strong);
}

.ui-panel {
  position: absolute;
  top: calc(var(--header-height) + 20px);
  left: 20px;
  z-index: 10;
  width: min(360px, calc(100vw - 40px));
  background: var(--panel-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--panel-border);
  border-radius: 22px;
  padding: 22px 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  max-height: calc(100vh - var(--header-height) - 40px);
  overflow-y: auto;
}

.ui-panel h1 {
  margin: 0 0 18px 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.4px;
}

.control-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 16px;
}

.control-group {
  padding: 16px;
  border-radius: 18px;
  background: var(--surface-bg);
  border: 1px solid var(--surface-border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.control-group h2 {
  margin: 0;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-strong);
}

.control-group label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.control-group input,
.control-group select {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(10, 15, 28, 0.9);
  color: inherit;
  font-size: 14px;
}

.control-group input:focus,
.control-group select:focus {
  outline: 1px solid var(--accent);
}

.control-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.hint {
  margin: 4px 0 0 0;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.primary {
  margin-top: 4px;
  border: none;
  padding: 12px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #0b0e18;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(129, 161, 255, 0.35);
}

.chip-button {
  border: 1px solid rgba(141, 167, 255, 0.32);
  background: rgba(13, 21, 40, 0.7);
  color: var(--accent-strong);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.chip-button:hover {
  background: rgba(141, 167, 255, 0.18);
  color: #ffffff;
}

.chip-button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.status-message {
  min-height: 24px;
  margin: 6px 0 12px;
  font-size: 13px;
  color: var(--text-muted);
}

.legend {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
  margin-bottom: 12px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(16, 26, 48, 0.7);
}

.legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.legend-earth {
  background: #3da9fb;
}

.legend-satellite {
  background: #ffcc6f;
}

.legend-orbit {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 0;
}

.satellite-list {
  max-height: 260px;
  overflow-y: auto;
  display: grid;
  gap: 8px;
  padding-right: 4px;
}

.satellite-entry {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(18, 27, 46, 0.82);
  border: 1px solid transparent;
  cursor: pointer;
  transition: border 0.2s ease, transform 0.2s ease;
  color: #f4f7ff;
}

.satellite-entry strong {
  font-size: 13px;
}

.satellite-entry span {
  font-size: 12px;
  color: var(--text-muted);
}

.satellite-entry:hover {
  border-color: rgba(140, 168, 238, 0.5);
  transform: translateY(-1px);
}

.satellite-entry.active {
  border-color: rgba(230, 236, 255, 0.9);
  background: rgba(39, 55, 92, 0.95);
}

.selection-panel {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: min(380px, calc(100vw - 40px));
  background: var(--panel-bg);
  border-radius: 22px;
  border: 1px solid var(--panel-border);
  padding: 22px 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(16px);
  z-index: 9;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: calc(100vh - 60px);
  overflow-y: auto;
}

.selection-panel.hidden {
  display: none;
}

.selection-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.selection-header h2 {
  margin: 0;
  font-size: 20px;
}

.selection-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

#closeSelection {
  border: none;
  background: transparent;
  color: var(--text-soft);
  font-size: 20px;
  cursor: pointer;
}

#closeSelection:hover {
  color: #ffffff;
}

#selectionDetails {
  margin: 0;
  display: grid;
  gap: 6px;
  font-size: 13px;
  grid-template-columns: auto auto;
  column-gap: 14px;
}

#selectionDetails dt {
  font-weight: 600;
  color: var(--accent-strong);
}

#selectionDetails dd {
  margin: 0;
  color: var(--text-soft);
}

.selection-section {
  padding: 16px;
  border-radius: 18px;
  background: var(--surface-bg);
  border: 1px solid var(--surface-border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.selection-section.hidden {
  display: none;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.section-header h3 {
  margin: 0;
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.section-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.section-text {
  margin: 0;
  font-size: 13px;
  color: var(--text-soft);
}

.pass-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pass-entry {
  padding: 12px;
  border-radius: 14px;
  background: rgba(10, 16, 30, 0.85);
  border: 1px solid rgba(142, 169, 238, 0.24);
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: var(--text-soft);
}

.pass-entry__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.pass-entry__header span {
  font-size: 12px;
  color: var(--accent-strong);
}

.pass-entry__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--text-muted);
}

.tle-block {
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(15, 24, 43, 0.85);
  border: 1px solid rgba(127, 157, 255, 0.25);
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
  line-height: 1.4;
  color: #dfe7ff;
  white-space: pre-wrap;
  word-break: break-word;
}

.content-sections {
  position: relative;
  z-index: 1;
  padding: 60px 20px 80px;
  background: linear-gradient(180deg, rgba(5, 7, 15, 0) 0%, rgba(7, 10, 18, 0.85) 35%, #05070f 100%);
}

.content-section {
  max-width: 960px;
  margin: 0 auto 48px auto;
  padding: 32px 36px;
  background: rgba(9, 14, 26, 0.78);
  border: 1px solid rgba(140, 168, 238, 0.22);
  border-radius: 24px;
  backdrop-filter: blur(12px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  scroll-margin-top: calc(var(--header-height) + 24px);
}

.content-section h2 {
  margin-top: 0;
  font-size: 26px;
  letter-spacing: 0.04em;
}

.content-section p {
  font-size: 15px;
  line-height: 1.7;
  color: #e4ebff;
}

.section-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.feature-card {
  padding: 20px;
  border-radius: 18px;
  background: rgba(15, 22, 40, 0.85);
  border: 1px solid rgba(150, 178, 246, 0.2);
  font-size: 14px;
  line-height: 1.6;
}

.steps-list {
  margin: 0;
  padding-left: 20px;
  font-size: 15px;
  line-height: 1.7;
  color: #d7e2ff;
}

.steps-list strong {
  color: var(--accent-strong);
}

.faq-list details {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(140, 168, 238, 0.2);
  border-radius: 16px;
  padding: 14px 18px;
  margin-bottom: 12px;
}

.faq-list summary {
  font-weight: 600;
  cursor: pointer;
  color: #f5f8ff;
}

.faq-list p {
  margin: 10px 0 0 0;
  color: var(--text-soft);
}

.site-footer {
  position: relative;
  z-index: 1;
  padding: 40px 24px;
  background: rgba(5, 7, 14, 0.95);
  border-top: 1px solid rgba(141, 167, 255, 0.25);
  color: #cdd7ff;
}

.footer-columns {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin-bottom: 24px;
}

.footer-columns h3,
.footer-columns h4 {
  margin-top: 0;
  margin-bottom: 12px;
}

.footer-columns ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.footer-columns a {
  color: var(--accent-strong);
  text-decoration: none;
}

.footer-columns a:hover {
  text-decoration: underline;
}

.site-footer .copyright {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  background: rgba(28, 39, 64, 0.95);
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 999px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  transition: opacity 0.3s ease;
  z-index: 16;
  font-size: 13px;
}

.toast.hidden {
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 1200px) {
  .site-nav {
    gap: 14px;
  }
}

@media (max-width: 920px) {
  body {
    overflow-y: auto;
  }

  #app {
    min-height: calc(100vh - var(--header-height));
  }

  .panel-toggle {
    display: inline-flex;
  }

  body.mobile-panel-closed .ui-panel {
    display: none;
  }

  body.mobile-panel-open .ui-panel {
    display: block;
  }

  .ui-panel {
    width: calc(100vw - 32px);
    left: 50%;
    transform: translateX(-50%);
  }

  .selection-panel {
    left: 20px;
    right: 20px;
    width: auto;
  }
}

@media (max-width: 760px) {
  .site-nav {
    gap: 10px;
    font-size: 13px;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding: 0 16px;
  }

  .site-nav {
    overflow-x: auto;
    padding-bottom: 6px;
  }

  .control-row {
    grid-template-columns: 1fr;
  }

  .selection-panel {
    max-height: calc(100vh - 140px);
  }

  .content-section {
    padding: 24px;
  }
}

@media (max-width: 520px) {
  .panel-toggle {
    top: calc(var(--header-height) + 10px);
    left: 16px;
  }

  .ui-panel {
    top: calc(var(--header-height) + 12px);
    left: 12px;
    right: 12px;
    transform: none;
    width: calc(100vw - 24px);
    padding: 18px 18px 20px;
  }

  .selection-panel {
    bottom: 12px;
    left: 12px;
    right: 12px;
    width: calc(100vw - 24px);
    padding: 18px;
  }

  .primary {
    width: 100%;
  }

  .satellite-list {
    max-height: 220px;
  }

  .site-nav {
    display: none;
  }

  .content-sections {
    padding: 48px 16px 72px;
  }
}
