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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #050012;
  font-family: 'Georgia', 'Times New Roman', serif;
}

canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  cursor: crosshair;
  touch-action: none;
}

/* ── HUD Time ─────────────────────────────────────────────── */
#hud-time {
  position: fixed;
  top: 28px;
  left: 32px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  pointer-events: none;
  z-index: 10;
}

#world-time {
  font-size: 22px;
  letter-spacing: 0.12em;
  color: rgba(220, 210, 190, 0.85);
  text-shadow: 0 0 12px rgba(180, 160, 120, 0.5);
  font-weight: normal;
}

#world-phase {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(180, 160, 130, 0.6);
}

#world-season {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(150, 140, 120, 0.45);
  margin-top: 2px;
}

/* ── Region Hover ─────────────────────────────────────────── */
#hud-region {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(200, 190, 170, 0.55);
  pointer-events: none;
  z-index: 10;
  transition: opacity 0.6s ease;
  text-shadow: 0 0 8px rgba(120, 100, 80, 0.4);
}

/* ── History Feed ─────────────────────────────────────────── */
#history-feed {
  position: fixed;
  bottom: 28px;
  right: 32px;
  width: 320px;
  pointer-events: none;
  z-index: 10;
}

#history-entries {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-end;
}

.history-entry {
  font-size: 11px;
  line-height: 1.7;
  color: rgba(200, 188, 168, 0.55);
  text-align: right;
  max-width: 300px;
  animation: fadeInEntry 1.2s ease forwards;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}

.history-entry .entry-header {
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(160, 145, 120, 0.4);
  margin-bottom: 4px;
}

.history-entry .entry-text {
  font-style: italic;
}

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

/* ── Time Controls ────────────────────────────────────────── */
#time-controls {
  position: fixed;
  bottom: 28px;
  left: 32px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  z-index: 20;
  pointer-events: all;
}

#tod-label {
  font-size: 13px;
  letter-spacing: 0.18em;
  color: rgba(210, 200, 180, 0.65);
  text-shadow: 0 0 8px rgba(140, 120, 80, 0.5);
  font-family: 'Georgia', serif;
}

#time-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 220px;
  height: 2px;
  background: rgba(180, 160, 120, 0.25);
  border-radius: 1px;
  outline: none;
  cursor: pointer;
}

#time-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(210, 195, 160, 0.80);
  box-shadow: 0 0 6px rgba(180, 160, 100, 0.5);
  cursor: pointer;
}

#time-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(210, 195, 160, 0.80);
  border: none;
  cursor: pointer;
}

/* ── Ley line toggle ──────────────────────────────────────── */
#ley-toggle-label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(180, 165, 135, 0.55);
  font-family: 'Georgia', serif;
  margin-top: 2px;
}

#ley-toggle {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 10px;
  border: 1px solid rgba(180, 160, 120, 0.45);
  border-radius: 2px;
  background: transparent;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}

#ley-toggle:checked {
  background: rgba(112, 144, 255, 0.55);
  border-color: rgba(112, 144, 255, 0.7);
}

/* ── Keyboard hint ────────────────────────────────────────── */
#key-hint {
  position: fixed;
  bottom: 28px;
  right: 32px;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(160, 150, 130, 0.35);
  pointer-events: none;
  z-index: 10;
  font-family: 'Georgia', serif;
}
