:root {
  --bg-primary: #0a0a0f;
  --text-primary: #e8e8f0;
  --accent-gold: #ffdd44;
  --accent-blue: #00aaff;
  --panel-bg: rgba(5, 5, 16, 0.92);
  --border-subtle: rgba(255, 255, 255, 0.08);
}
body.light-theme {
  --bg-primary: #e8ecf0;
  --text-primary: #1a1a2e;
  --accent-gold: #c49420;
  --accent-blue: #0066aa;
  --panel-bg: rgba(240, 245, 255, 0.95);
  --border-subtle: rgba(0, 0, 0, 0.1);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

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

html, body {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  overflow: hidden;
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: background 0.3s, color 0.3s;
}

#canvas-container {
  width: 100%;
  height: 100%;
}

#canvas-container canvas {
  display: block;
  width: 100%;
  height: 100%;
}

#brightness-panel {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border: 1px solid rgba(255, 210, 50, 0.25);
  border-radius: 24px;
  background: rgba(50, 35, 0, 0.5);
  color: #ffdd44;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  text-shadow: 0 0 6px rgba(255, 220, 60, 0.4);
}

#brightness-panel svg {
  filter: drop-shadow(0 0 4px #ffdd44);
}

#brightness-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 120px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 210, 50, 0.2);
  outline: none;
  cursor: pointer;
  box-shadow: 0 0 6px rgba(255, 220, 60, 0.15);
}

#brightness-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffdd44;
  border: none;
  cursor: pointer;
  box-shadow: 0 0 8px #ffdd44, 0 0 16px rgba(255, 220, 60, 0.4);
  transition: transform 0.15s, box-shadow 0.15s;
}

#brightness-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 0 12px #ffdd44, 0 0 24px rgba(255, 220, 60, 0.5);
}

#brightness-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffdd44;
  border: none;
  cursor: pointer;
  box-shadow: 0 0 8px #ffdd44, 0 0 16px rgba(255, 220, 60, 0.4);
}

#return-btn {
  position: fixed;
  top: 24px;
  left: 24px;
  z-index: 10;
  display: none;
  padding: 8px 18px;
  border: 1px solid rgba(0, 150, 255, 0.3);
  border-radius: 24px;
  background: rgba(0, 30, 60, 0.6);
  color: #00aaff;
  font: 700 13px/1.4 'Orbitron', sans-serif;
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  text-shadow: 0 0 6px #00aaff, 0 0 14px rgba(0, 170, 255, 0.4);
  transition: background 0.2s, border-color 0.2s, opacity 0.3s;
}

#return-btn:hover {
  background: rgba(0, 60, 120, 0.7);
  border-color: rgba(0, 170, 255, 0.5);
}

#center-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 20;
  padding: 8px 18px;
  border: 1px solid rgba(68, 255, 102, 0.35);
  border-radius: 24px;
  background: rgba(0, 40, 10, 0.6);
  color: #44ff66;
  font: 700 13px/1.4 'Orbitron', sans-serif;
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  text-shadow: 0 0 6px #44ff66, 0 0 14px rgba(68, 255, 102, 0.4);
  transition: background 0.2s, border-color 0.2s;
}

#center-btn:hover {
  background: rgba(0, 70, 20, 0.7);
  border-color: rgba(100, 255, 136, 0.55);
}

/* ── Right sidebar (brightness + action buttons) ── */
.right-sidebar {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  width: 180px;
}
.sidebar-item-wrapper {
  position: relative;
}
.right-sidebar button {
  width: 100%;
}

#map-btn {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  padding: 8px 20px;
  border: 1px solid rgba(255, 40, 40, 0.35);
  border-radius: 24px;
  background: rgba(60, 0, 0, 0.6);
  color: #ff3333;
  font: 700 13px/1.4 'Orbitron', sans-serif;
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  text-shadow: 0 0 6px #ff3333, 0 0 14px rgba(255, 50, 50, 0.4);
  transition: background 0.2s, border-color 0.2s;
}

#map-btn:hover {
  background: rgba(100, 0, 0, 0.7);
  border-color: rgba(255, 60, 60, 0.55);
}

#constellation-toggle {
  padding: 8px 16px;
  border: 1px solid rgba(150, 100, 255, 0.35);
  border-radius: 24px;
  background: rgba(30, 0, 50, 0.6);
  color: rgba(180, 140, 255, 0.9);
  font: 700 12px/1.4 'Orbitron', sans-serif;
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
#constellation-toggle:hover {
  background: rgba(50, 20, 80, 0.7);
  border-color: rgba(180, 140, 255, 0.5);
}
#constellation-toggle.active {
  background: rgba(80, 40, 120, 0.7);
  border-color: rgba(200, 160, 255, 0.6);
  color: #ddbbff;
}

#bookmark-btn, #theme-toggle {
  padding: 8px 12px;
  border-radius: 24px;
  font: 700 11px/1.4 'Orbitron', sans-serif;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
#bookmark-btn {
  border: 1px solid rgba(255, 160, 0, 0.35);
  background: rgba(60, 30, 0, 0.6);
  color: #ffaa33;
  text-shadow: 0 0 6px rgba(255, 170, 0, 0.4);
}
#bookmark-btn:hover { background: rgba(80, 45, 0, 0.7); border-color: rgba(255, 180, 50, 0.5); }
#theme-toggle {
  border: 1px solid rgba(200, 180, 100, 0.35);
  background: rgba(40, 35, 0, 0.6);
  color: #ddcc66;
}
#theme-toggle:hover { background: rgba(60, 50, 0, 0.7); border-color: rgba(220, 200, 100, 0.5); }
body.light-theme #theme-toggle {
  background: rgba(60, 55, 20, 0.8);
  color: #776622;
  border-color: rgba(100, 90, 30, 0.5);
}

#bookmarks-panel {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  z-index: 25;
  min-width: 200px;
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid rgba(180, 100, 255, 0.4);
  border-radius: 12px;
  background: rgba(10, 5, 25, 0.95);
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
#bookmarks-panel.open { display: block; }
#bookmarks-panel .bookmark-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  color: #ddbbff;
  font: 600 12px 'Orbitron', sans-serif;
  cursor: pointer;
  border-bottom: 1px solid rgba(180, 100, 255, 0.15);
  transition: background 0.15s;
}
#bookmarks-panel .bookmark-item:last-child { border-bottom: none; }
#bookmarks-panel .bookmark-item:hover { background: rgba(100, 60, 150, 0.3); }
#bookmarks-panel .bookmark-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#bookmarks-panel .bookmark-actions {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
  margin-left: 8px;
}
#bookmarks-panel .bookmark-edit {
  padding: 2px 6px;
  border: none;
  background: transparent;
  color: rgba(180,160,255,0.7);
  font-size: 14px;
  cursor: pointer;
  line-height: 1;
}
#bookmarks-panel .bookmark-edit:hover { color: #ddbbff; }
#bookmarks-panel .bookmark-del {
  padding: 2px 6px;
  border: none;
  background: transparent;
  color: rgba(255,100,100,0.8);
  font-size: 16px;
  cursor: pointer;
  line-height: 1;
}
#bookmarks-panel .bookmark-del:hover { color: #ff6666; }
#bookmarks-panel .bookmark-rename-input {
  flex: 1;
  min-width: 0;
  background: rgba(80, 40, 120, 0.4);
  border: 1px solid rgba(200, 160, 255, 0.5);
  border-radius: 6px;
  color: #ddbbff;
  font: 600 12px 'Orbitron', sans-serif;
  padding: 4px 8px;
  outline: none;
}

/* ── Bottom-left group (scale + audio + fly speed) ── */
.bottom-left-group {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
.bottom-left-row {
  display: flex;
  align-items: center;
  gap: 20px;
}

#fly-speed-panel {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid rgba(100, 150, 255, 0.25);
  border-radius: 20px;
  background: rgba(0, 20, 50, 0.6);
  color: #88bbff;
  font: 600 11px/1.4 'Orbitron', sans-serif;
}
#fly-speed-panel span { margin-right: 4px; }
#fly-speed-panel .fly-speed-btn {
  padding: 4px 10px;
  border: 1px solid rgba(100, 150, 255, 0.3);
  border-radius: 12px;
  background: transparent;
  color: #88bbff;
  font: 600 10px 'Orbitron', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
}
#fly-speed-panel .fly-speed-btn:hover { background: rgba(50, 100, 180, 0.3); }
#fly-speed-panel .fly-speed-btn.active {
  background: rgba(80, 130, 220, 0.4);
  border-color: rgba(120, 170, 255, 0.6);
}

#shortcuts-panel {
  position: fixed;
  bottom: 120px;
  left: 24px;
  z-index: 25;
  padding: 16px 24px;
  border: 1px solid rgba(100, 150, 255, 0.3);
  border-radius: 12px;
  background: rgba(5, 10, 25, 0.95);
  color: #aaccff;
  font: 600 12px/1.6 'Orbitron', sans-serif;
}
#shortcuts-panel.hidden { display: none; }
#shortcuts-panel h3 { margin-bottom: 10px; font-size: 14px; color: #88bbff; }
#shortcuts-panel kbd {
  display: inline-block;
  padding: 2px 8px;
  margin-right: 8px;
  background: rgba(80, 120, 180, 0.4);
  border-radius: 4px;
  font-size: 11px;
}

@media (max-width: 768px) {
  .right-sidebar {
    width: 150px;
    gap: 6px;
  }
  #return-btn, #map-btn, #constellation-toggle, #bookmark-btn, #theme-toggle,
  #center-btn, #tour-btn, #time-panel button, #fly-speed-panel .fly-speed-btn {
    min-width: 44px;
    min-height: 44px;
    padding: 10px 12px;
    font-size: 10px;
  }
  .bottom-left-row {
    flex-wrap: wrap;
  }
}

#map-panel {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 30;
  border: 3px solid #ff3333;
  border-radius: 16px;
  background: rgba(5, 5, 16, 0.92);
  box-shadow: 0 0 20px rgba(255, 50, 50, 0.35), 0 0 60px rgba(255, 50, 50, 0.12), inset 0 0 20px rgba(255, 50, 50, 0.05);
  padding: 12px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

#map-panel canvas {
  display: block;
  border-radius: 10px;
  max-width: 80vw;
  max-height: 75vh;
}

#map-zoom-label {
  text-align: center;
  color: #ff8c00;
  font: 700 12px/1.4 'Orbitron', sans-serif;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-shadow: 0 0 6px #ff8c00;
  padding: 6px 0 2px;
  opacity: 0.85;
}

#map-close {
  position: absolute;
  top: 8px;
  right: 12px;
  z-index: 31;
  background: none;
  border: none;
  color: #ff3333;
  font-size: 28px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  text-shadow: 0 0 6px #ff3333;
  transition: color 0.15s, text-shadow 0.15s;
}

#map-close:hover {
  color: #ff6666;
  text-shadow: 0 0 10px #ff6666;
}

#info-panel {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 15;
  display: none;
  text-align: center;
  padding: 16px 32px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 140, 0, 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  max-width: 520px;
}

#info-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  color: rgba(255, 140, 0, 0.6);
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
  transition: color 0.15s;
}
#info-close:hover {
  color: #ff8c00;
}

#info-panel.pixel-fade-out {
  animation: pixelFade 0.5s ease-out forwards;
  image-rendering: pixelated;
}

@keyframes pixelFade {
  0%   { opacity: 1; filter: none; transform: translateX(-50%) scale(1); }
  30%  { opacity: 0.7; filter: brightness(1.3) contrast(1.2); transform: translateX(-50%) scale(0.98); }
  60%  { opacity: 0.3; filter: brightness(1.6) contrast(1.5) blur(1.5px); transform: translateX(-50%) scale(0.94); }
  100% { opacity: 0; filter: brightness(2) contrast(2) blur(4px); transform: translateX(-50%) scale(0.88); }
}

#info-name {
  font: 700 22px/1.3 'Orbitron', sans-serif;
  color: #ff8c00;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 0 0 8px #ff8c00, 0 0 18px rgba(255, 140, 0, 0.45);
  margin-bottom: 8px;
}

#info-facts {
  font: 500 13px/1.7 'Orbitron', sans-serif;
  color: #ff8c00;
  letter-spacing: 0.5px;
  text-shadow: 0 0 4px rgba(255, 140, 0, 0.35);
  opacity: 0.85;
}

/* Search bar */
#search-panel {
  position: fixed;
  top: 24px;
  right: 220px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid rgba(0, 180, 255, 0.3);
  border-radius: 24px;
  background: rgba(0, 20, 50, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #00ccff;
}

#search-panel svg { opacity: 0.6; flex-shrink: 0; }

#search-input {
  background: transparent;
  border: none;
  outline: none;
  color: #00ccff;
  font: 500 12px/1.4 'Orbitron', sans-serif;
  letter-spacing: 0.5px;
  width: 200px;
}

#search-input::placeholder {
  color: rgba(0, 180, 255, 0.35);
  font-size: 11px;
}

#search-results {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  max-height: 260px;
  overflow-y: auto;
  background: rgba(5, 15, 35, 0.95);
  border: 1px solid rgba(0, 180, 255, 0.25);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.search-result-item {
  padding: 8px 14px;
  color: #88ddff;
  font: 500 12px/1.4 'Orbitron', sans-serif;
  cursor: pointer;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(0,180,255,0.08);
  transition: background 0.15s;
}

.search-result-item:hover {
  background: rgba(0, 100, 200, 0.2);
  color: #ffffff;
}

.search-result-item:last-child { border-bottom: none; }

/* Time controls */
#time-panel {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border: 1px solid rgba(180, 140, 255, 0.3);
  border-radius: 24px;
  background: rgba(30, 10, 50, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

#time-panel button {
  background: none;
  border: 1px solid rgba(180, 140, 255, 0.25);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  color: #bb99ff;
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
}

#time-panel button:hover {
  background: rgba(100, 60, 180, 0.3);
  border-color: rgba(200, 160, 255, 0.5);
}

#time-speed {
  color: #ddbbff;
  font: 700 13px/1 'Orbitron', sans-serif;
  letter-spacing: 1px;
  min-width: 36px;
  text-align: center;
  text-shadow: 0 0 6px rgba(180, 140, 255, 0.5);
}

#time-date {
  color: rgba(180, 160, 220, 0.7);
  font: 500 10px/1 'Orbitron', sans-serif;
  letter-spacing: 0.5px;
  margin-left: 6px;
}

/* Scale indicator */
#scale-indicator {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

#scale-bar {
  width: 100px;
  height: 2px;
  background: rgba(255, 255, 255, 0.4);
  border-left: 2px solid rgba(255, 255, 255, 0.6);
  border-right: 2px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.15);
}

#scale-label {
  color: rgba(255, 255, 255, 0.5);
  font: 500 10px/1 'Orbitron', sans-serif;
  letter-spacing: 1px;
  text-shadow: 0 0 4px rgba(255, 255, 255, 0.2);
}

/* Audio toggle */
#audio-btn {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 200, 100, 0.3);
  border-radius: 50%;
  background: rgba(40, 25, 0, 0.6);
  color: #ffcc66;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
  padding: 0;
}

#audio-btn svg {
  filter: drop-shadow(0 0 4px #ffcc66);
}

#audio-btn:hover {
  background: rgba(80, 50, 0, 0.7);
  border-color: rgba(255, 220, 120, 0.5);
}

#audio-btn.muted {
  opacity: 0.4;
}

/* Tour button */
#tour-btn {
  padding: 6px 14px;
  border: 1px solid rgba(255, 80, 160, 0.35);
  border-radius: 24px;
  background: rgba(50, 0, 30, 0.6);
  color: #ff66aa;
  font: 700 11px/1.4 'Orbitron', sans-serif;
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  text-shadow: 0 0 6px rgba(255, 80, 160, 0.4);
  transition: background 0.2s, border-color 0.2s;
}

#tour-btn:hover {
  background: rgba(80, 0, 50, 0.7);
  border-color: rgba(255, 100, 180, 0.55);
}

/* Tour narration box */
#tour-narration {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 25;
  max-width: 480px;
  padding: 24px 32px;
  background: rgba(5, 5, 20, 0.9);
  border: 1px solid rgba(255, 180, 0, 0.3);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #ffcc66;
  font: 500 14px/1.7 'Orbitron', sans-serif;
  text-align: center;
  letter-spacing: 0.5px;
  text-shadow: 0 0 8px rgba(255, 180, 0, 0.3);
  pointer-events: none;
  animation: tourFadeIn 0.8s ease-out;
}

@keyframes tourFadeIn {
  from { opacity: 0; transform: translate(-50%, -45%); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}

#tooltip {
  position: fixed;
  pointer-events: none;
  padding: 6px 14px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.75);
  color: #ff8c00;
  font: 700 15px/1.4 'Orbitron', sans-serif;
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 20;
  transform: translateX(-50%);
  text-shadow: 0 0 6px #ff8c00, 0 0 14px rgba(255, 140, 0, 0.5);
  border: 1px solid rgba(255, 140, 0, 0.25);
}

.wall-label {
  position: fixed;
  pointer-events: none;
  padding: 6px 14px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.75);
  color: #bb77ff;
  font: 700 15px/1.4 'Orbitron', sans-serif;
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
  z-index: 19;
  transform: translateX(-50%);
  text-shadow: 0 0 6px #bb77ff, 0 0 14px rgba(187, 119, 255, 0.5);
  border: 1px solid rgba(187, 119, 255, 0.25);
  transition: opacity 0.3s;
}

#loading {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  background: radial-gradient(ellipse 120% 100% at 50% 50%, #0d0d18 0%, #050508 50%, #000 100%);
  color: #ffdd44;
  font: 700 12px/1.4 'Orbitron', sans-serif;
  letter-spacing: 4px;
  text-transform: uppercase;
  transition: opacity 0.6s ease-out;
  overflow: hidden;
}

#loading.loaded {
  opacity: 0;
  pointer-events: none;
}

.loading-stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(2px 2px at 20px 30px, rgba(255,255,255,0.8), transparent),
    radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.5), transparent),
    radial-gradient(2px 2px at 50px 160px, rgba(255,255,255,0.6), transparent),
    radial-gradient(2px 2px at 90px 40px, rgba(255,255,255,0.4), transparent),
    radial-gradient(2px 2px at 130px 80px, rgba(255,255,255,0.7), transparent),
    radial-gradient(2px 2px at 160px 120px, rgba(255,255,255,0.5), transparent),
    radial-gradient(2px 2px at 200px 50px, rgba(255,255,255,0.3), transparent),
    radial-gradient(2px 2px at 250px 180px, rgba(255,255,255,0.6), transparent),
    radial-gradient(2px 2px at 300px 90px, rgba(255,255,255,0.4), transparent),
    radial-gradient(2px 2px at 350px 140px, rgba(255,255,255,0.5), transparent),
    radial-gradient(2px 2px at 400px 60px, rgba(255,255,255,0.3), transparent),
    radial-gradient(2px 2px at 450px 200px, rgba(255,255,255,0.6), transparent),
    radial-gradient(2px 2px at 500px 100px, rgba(255,255,255,0.4), transparent),
    radial-gradient(2px 2px at 550px 160px, rgba(255,255,255,0.5), transparent);
  background-size: 600px 220px;
  animation: loadingStarsDrift 20s linear infinite;
  opacity: 0.6;
}

@keyframes loadingStarsDrift {
  to { background-position: -600px 0; }
}

.loading-orb {
  position: relative;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loading-ring {
  position: absolute;
  width: 64px;
  height: 64px;
  border: 2px solid transparent;
  border-top-color: #ffdd44;
  border-right-color: rgba(255, 221, 68, 0.3);
  border-radius: 50%;
  animation: loadingRingSpin 1.2s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
}

.loading-ring-2 {
  width: 48px;
  height: 48px;
  border-top-color: #ffaa22;
  border-right-color: rgba(255, 170, 34, 0.2);
  animation-direction: reverse;
  animation-duration: 1.6s;
}

.loading-core {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff8e0, #ffdd44);
  box-shadow: 0 0 20px #ffdd44, 0 0 40px rgba(255, 221, 68, 0.4);
  animation: loadingCorePulse 1.4s ease-in-out infinite;
}

@keyframes loadingRingSpin {
  to { transform: rotate(360deg); }
}

@keyframes loadingCorePulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.8; }
}

.loading-text {
  letter-spacing: 6px;
  text-shadow: 0 0 20px rgba(255, 221, 68, 0.5);
}

.loading-dots::after {
  content: '';
  animation: loadingDots 1.4s steps(4, end) infinite;
}

@keyframes loadingDots {
  0%, 20% { content: ''; }
  40% { content: '.'; }
  60% { content: '..'; }
  80%, 100% { content: '...'; }
}
