html, body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #000;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: #e8e8e8;
}
#canvas-container {
  position: fixed;
  inset: 0;
}
#ui-panel {
  position: fixed;
  top: 16px;
  left: 16px;
  background: rgba(10, 14, 24, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 14px 16px;
  min-width: 230px;
  user-select: none;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}
#ui-panel h1 {
  margin: 0 0 10px 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffd27d;
}
.control-row {
  margin-bottom: 12px;
}
.control-row:last-child {
  margin-bottom: 0;
}
label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #9aa4b8;
  margin-bottom: 4px;
}
select {
  width: 100%;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #e8e8e8;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  font-size: 13px;
  outline: none;
  cursor: pointer;
}
select option {
  background: #141a28;
  color: #e8e8e8;
}
input[type="range"] {
  width: 100%;
  accent-color: #ffd27d;
  cursor: pointer;
}
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.checkbox-row label {
  margin: 0;
  cursor: pointer;
}
input[type="checkbox"] {
  accent-color: #ffd27d;
  cursor: pointer;
  width: 15px;
  height: 15px;
}
#speed-value {
  color: #ffd27d;
  font-variant-numeric: tabular-nums;
}
#selected-name {
  font-size: 12px;
  color: #7fc4ff;
  min-height: 14px;
}
#hint {
  position: fixed;
  bottom: 12px;
  left: 16px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  pointer-events: none;
}
#label-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
}
.planet-label {
  pointer-events: auto;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  background: rgba(10, 14, 24, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  padding: 2px 7px 3px 7px;
  transition: background 0.15s, border-color 0.15s;
}
.planet-label:hover {
  background: rgba(30, 44, 70, 0.85);
  border-color: rgba(127, 196, 255, 0.6);
}
.planet-label.tracked {
  border-color: #ffd27d;
}
.planet-label .label-name {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #e8e8e8;
  letter-spacing: 0.03em;
}
.planet-label .label-dist {
  display: block;
  font-size: 10px;
  color: #9aa4b8;
  font-variant-numeric: tabular-nums;
}

/* ========== INFO PANEL STYLES ========== */
.info-panel {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 340px;
  max-width: calc(100vw - 40px);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: rgba(10, 15, 30, 0.78);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 24px;
  color: #ffffff;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  z-index: 100;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(0);
  opacity: 1;
}

.info-panel.hidden {
  transform: translateX(calc(100% + 40px));
  opacity: 0;
  pointer-events: none;
}

.info-panel-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.planet-icon {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 12px currentColor;
}

#planet-name {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  flex-grow: 1;
  letter-spacing: -0.3px;
  background: linear-gradient(180deg, #ffffff 0%, #d0d8e8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.7);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.info-divider {
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255,255,255,0.15) 20%,
    rgba(255,255,255,0.15) 80%,
    transparent 100%);
  margin: 14px 0;
}

.info-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.info-label {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(255, 255, 255, 0.5);
  flex-shrink: 0;
}

.info-value {
  font-size: 14px;
  font-weight: 500;
  text-align: right;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.3;
}

.fun-fact-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px 16px;
  margin-top: 4px;
}

.fun-fact-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.fun-fact-icon {
  font-size: 18px;
}

.fun-fact-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.6);
}

.fun-fact-text {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
  font-style: italic;
}

.info-panel::-webkit-scrollbar {
  width: 4px;
}

.info-panel::-webkit-scrollbar-track {
  background: transparent;
}

.info-panel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
}

@media (max-width: 600px) {
  .info-panel {
    width: calc(100vw - 20px);
    right: 10px;
    top: 10px;
    max-height: 50vh;
  }
}

#file-warning {
  position: fixed;
  bottom: 44px;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(640px, calc(100vw - 32px));
  padding: 10px 14px;
  background: rgba(120, 40, 20, 0.92);
  border: 1px solid rgba(255, 180, 100, 0.45);
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.45;
  color: #ffe8d0;
  z-index: 200;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
}

#file-warning code {
  background: rgba(0, 0, 0, 0.25);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 11px;
}

#file-warning a {
  color: #ffd27d;
}
