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

body {
  overflow: hidden;
  background: #000;
  font-family: 'Share Tech Mono', monospace;
  color: #00ff88;
  user-select: none;
  -webkit-user-select: none;
}

#scene-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

#scene-container canvas {
  display: block;
}

#hud {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

.hud-panel {
  pointer-events: auto;
  background: rgba(0, 10, 5, 0.8);
  border: 1px solid rgba(0, 255, 136, 0.3);
  border-radius: 4px;
  padding: 8px 12px;
  font-size: 12px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.panel-header {
  font-size: 11px;
  color: #00ffcc;
  letter-spacing: 2px;
  margin-bottom: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.blink {
  animation: blink 2s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.subtle {
  color: rgba(0, 255, 136, 0.4);
  font-size: 10px;
}

.hud-btn {
  pointer-events: auto;
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid rgba(0, 255, 136, 0.4);
  color: #00ff88;
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  padding: 2px 8px;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.2s;
}

.hud-btn:hover {
  background: rgba(0, 255, 136, 0.25);
  border-color: #00ff88;
  box-shadow: 0 0 8px rgba(0, 255, 136, 0.3);
}

.hud-btn.active {
  background: rgba(0, 255, 136, 0.3);
  border-color: #00ff88;
}

/* Top Left */
#planet-info {
  position: absolute;
  top: 12px;
  left: 12px;
  min-width: 200px;
}

/* Top Right */
#time-controls {
  position: absolute;
  top: 12px;
  right: 12px;
  min-width: 220px;
}

.time-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

#time-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: rgba(0, 255, 136, 0.2);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

#time-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  background: #00ff88;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 6px #00ff88;
}

.speed-btn {
  font-size: 10px;
  padding: 1px 6px;
}

/* Bottom Right: Mini-Map */
#minimap-container {
  position: absolute;
  bottom: 12px;
  right: 12px;
  padding: 4px;
  border-radius: 50%;
  width: 158px;
  height: 158px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#minimap {
  border-radius: 50%;
}

/* Bottom Left: Creature Log */
#creature-log {
  position: absolute;
  bottom: 12px;
  left: 12px;
  width: 280px;
  max-height: 100px;
  overflow: hidden;
}

#creature-messages {
  font-size: 10px;
  line-height: 1.4;
  color: #00cc88;
}

.creature-msg {
  opacity: 0;
  animation: typeIn 0.5s forwards;
  margin-bottom: 2px;
}

@keyframes typeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Center Bottom: Controls */
#controls-hint {
  position: absolute;
  bottom: 50px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: rgba(0, 255, 136, 0.6);
  text-align: center;
  transition: opacity 1s;
  white-space: nowrap;
}

/* Toast */
#toast {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 10, 5, 0.9);
  border: 1px solid #ffaa00;
  color: #ffaa00;
  padding: 12px 24px;
  font-size: 14px;
  letter-spacing: 1px;
  border-radius: 4px;
  pointer-events: none;
  z-index: 100;
  transition: opacity 0.5s;
}

.hidden {
  display: none !important;
}

/* Coin Counter */
#coin-counter {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 14px;
  color: #ffd700;
  border-color: rgba(255, 215, 0, 0.3);
}

/* Bookmarks */
#bookmarks-panel {
  position: absolute;
  top: 60px;
  right: 12px;
  width: 250px;
  max-height: 300px;
  overflow-y: auto;
}

.bookmark-item {
  padding: 4px 0;
  border-bottom: 1px solid rgba(0, 255, 136, 0.1);
  cursor: pointer;
  font-size: 11px;
  transition: color 0.2s;
}

.bookmark-item:hover {
  color: #00ffcc;
}

/* Toolbar */
#toolbar {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: auto;
}

.toolbar-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  padding: 0;
}

/* Info Modal */
#info-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 5, 2, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  pointer-events: auto;
}

.modal-content {
  background: rgba(0, 10, 5, 0.95);
  border: 1px solid rgba(0, 255, 136, 0.4);
  padding: 24px;
  max-width: 500px;
  border-radius: 6px;
  line-height: 1.6;
  font-size: 13px;
}

.modal-content p {
  margin-bottom: 10px;
}

.modal-content strong {
  color: #00ffcc;
}

.modal-content a {
  color: #ffaa00;
  text-decoration: none;
}

.modal-content a:hover {
  text-decoration: underline;
}

/* POI Tooltip */
#poi-tooltip {
  position: absolute;
  pointer-events: none;
  background: rgba(0, 10, 5, 0.9);
  border: 1px solid rgba(0, 255, 136, 0.5);
  border-radius: 6px;
  padding: 12px 16px;
  max-width: 320px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 50;
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.1);
}

.poi-name {
  color: #00ffcc;
  font-size: 13px;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.poi-specs {
  color: #00ccff;
  font-size: 10px;
  margin-bottom: 6px;
}

.poi-desc {
  color: rgba(0, 255, 136, 0.7);
  font-size: 11px;
  font-style: italic;
  line-height: 1.4;
}

/* Floating coin text */
.float-text {
  position: absolute;
  pointer-events: none;
  color: #ffd700;
  font-size: 18px;
  font-family: 'Share Tech Mono', monospace;
  font-weight: bold;
  animation: floatUp 1.5s forwards;
  z-index: 60;
}

@keyframes floatUp {
  0% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-60px); }
}

/* Responsive */
@media (max-width: 768px) {
  #creature-log { display: none; }
  #minimap-container { width: 100px; height: 100px; }
  #minimap { width: 92px; height: 92px; }
  #planet-info { font-size: 10px; min-width: 150px; }
  #time-controls { min-width: 180px; font-size: 10px; }
  #controls-hint { font-size: 9px; bottom: 30px; }
  #toolbar { right: 6px; }
  .toolbar-btn { width: 30px; height: 30px; font-size: 14px; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: rgba(0, 10, 5, 0.5); }
::-webkit-scrollbar-thumb { background: rgba(0, 255, 136, 0.3); border-radius: 2px; }