:root {
  --panel-bg: rgba(18, 26, 32, 0.88);
  --text: #f2f5f7;
  --accent: #ffb000;
}

html, body {
  height: 100%;
  margin: 0;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
}

#map {
  position: fixed;
  inset: 0;
}

.controls {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10;
  background: var(--panel-bg);
  color: var(--text);
  border-radius: 10px;
  padding: 10px;
  width: min(340px, calc(100vw - 24px));
  box-sizing: border-box;
}

.controls h1 {
  margin: 0 0 8px;
  font-size: 20px;
}

label, #timeValue {
  display: block;
  margin-top: 6px;
  font-size: 14px;
}

input[type="date"], input[type="text"], select, button {
  width: 100%;
  box-sizing: border-box;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #334;
}

input[type="range"] {
  width: 100%;
}

.toggleRow {
  margin-top: 10px;
}

#sunOverlay {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 9;
  color: #ffd84d;
  text-align: center;
  pointer-events: none;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
}

.sun-x {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  font-size: 34px;
  line-height: 1;
  font-weight: 700;
}
#sunAzimuthLabel {
  position: absolute;
  left: 14px;
  top: 14px;
  font-size: 20px;
  font-weight: 700;
  color: #ffec99;
  background: rgba(0, 0, 0, 0.25);
  padding: 3px 8px;
  border-radius: 999px;
}
#sunRayWrap {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  transform-origin: center;
}
#sunRay {
  position: absolute;
  left: 0;
  top: -1px;
  width: min(36vw, 260px);
  height: 2px;
  transform-origin: 0 50%;
  background: linear-gradient(90deg, rgba(255, 216, 77, 0.95) 0%, rgba(255, 216, 77, 0.75) 55%, rgba(255, 216, 77, 0.2) 100%);
  box-shadow: 0 0 6px rgba(255, 216, 77, 0.6);
}
#sunDot {
  position: absolute;
  left: min(36vw, 260px);
  top: 0;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  margin-top: -5px;
  border-radius: 50%;
  background: #ffe27f;
  box-shadow: 0 0 10px rgba(255, 216, 77, 0.9), 0 0 20px rgba(255, 216, 77, 0.5);
}
.hidden { display: none; }

.train-marker {
  width: 48px;
  height: 48px;
  background-size: cover;
  border-radius: 50%;
  border: 2px solid #fff;
}

.admin-body {
  background: #0e1419;
  color: var(--text);
}

.admin-wrap {
  max-width: 700px;
  margin: 0 auto;
  padding: 16px;
}

.admin-form {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

button {
  background: var(--accent);
  border: none;
  font-weight: 700;
}

@media (max-width: 768px) {
  .controls {
    top: auto;
    bottom: 8px;
    left: 8px;
    right: 8px;
    width: auto;
  }
}
