:root {
  /* Himmels-Verlauf als Fallback beim ersten Paint (Nacht) */
  --bg-sky: linear-gradient(180deg, rgb(0, 27, 31) 0%, rgb(0, 27, 31) 100%);
  --bg-ground: #4E2A00;
  --lightgrey: #d9d9d9;
  --text-title: #7A282E;
  --lightblue: #C0F6FF;
  --titel-braun: #FFD09A;
  --font: "Cormorant Garamond", serif;
}

/* Grundlayout */
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg-sky);
  /* <-- nur der Himmel */
  background-attachment: fixed;
  /* ruhiger, „echter“ Himmelseindruck */
  transition: background 400ms linear;
  /* sanfter Übergang der Verläufe */
  color: var(--lightgrey);
}


/* Zurück-Button */
header {
  padding: 30px 0px 0px 30px;
}

.back-button img {
  width: 80px;
  height: 80px;
}

/* Info-Boxen über dem Stadtbild */
.info-container {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 4rem;
  align-items: end;
  /* Alle Boxen am unteren Rand ausrichten */
  text-align: center;
  background-color: transparent;
  padding: 2rem 1rem;
  margin: 120px 10% 0 10%;
}

.info-box h2 {
  font-size: 35px;
  color: var(--text-title);
  padding: 10px 40px;
  background-color: var(--lightgrey);
  margin-bottom: 4px;
  margin-top: 0;
  border-radius: 100px;
}

.info-box p {
  font-size: 30px;
  color: var(--lightblue);
}

.weather-info {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

/* Zeit-Box */
.time-box h1 {
  text-align: center;
  color: var(--lightblue);
  font-size: 80px;
  margin-top: -320px;
}

.time-box p {
  text-align: center;
  color: var(--lightblue);
  font-size: 15px;
  margin-top: -50px;
}

/* ===== Stadtbild ===== */
.city-image {
  position: relative;
  text-align: center;
  justify-content: center;
  margin-bottom: -120px;
}

/* ===== Runder Tag/Nacht-Slider (zentriert hinter dem Bild) ===== */
.dial-wrap {
  position: absolute;
  /* Absolut positioniert innerhalb von .city-image */
  left: 50%;
  /* Horizontal zentriert */
  top: 30%;
  /* Vertikal zentriert */
  transform: translate(-50%, -50%);
  /* Zentriert den Kreis perfekt */
  width: 550px;
  /* Feste Breite statt 40% */
  height: 550px;
  /* Feste Höhe statt 40% */
  display: flex;
  justify-content: center;
  align-items: center;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  outline: none;
}

/* Das Stadtbild selbst */
.city-image img {
  width: 100%;
  max-width: 700px;
  height: auto;
  position: relative;
  z-index: 10;
  /* Über dem Kreis */
  pointer-events: none;
  /* Verhindert, dass das Bild Mausereignisse abfängt */
}

/* Der drehbare Kreis */
.dial {
  width: 100%;
  height: 100%;
  object-fit: contain;
  will-change: transform;
  cursor: grab;
  transition: transform 0.02s linear;
  pointer-events: auto;
  /* Ermöglicht Interaktionen */
  z-index: 15;
  /* Über dem Stadtbild */
  margin-top: 20px;
}

.dial:active {
  cursor: grabbing;
}

/* Optionaler Marker oben */
.marker {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 12px solid var(--lightblue);
  /* Verwende eine definierte Farbe */
  filter: drop-shadow(0 1px 0 #0001);
  z-index: 6;
}

/* Tastaturfokus */
.dial-wrap:focus-visible {
  outline: 3px solid var(--lightblue);
  outline-offset: 6px;
}

/* TukTuk-Container unter dem Bild */
.tuktuk-track {
  position: relative;
  width: 100%;
  height: 200px;
  /* Mehr Abstand zum Stadtbild */
  pointer-events: none;
  margin-top: -180px;
}

/* Einzelnes TukTuk */
.tuktuk {
  position: absolute;
  width: 160px;
  height: auto;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-direction: alternate; /* wichtig! fährt hin & zurück */
  will-change: left, transform;
  z-index: 30;
}

/* Layer-spezifische Positions / z-index - KEIN transform hier! */
.tuktuk.layer-1 {
  bottom: -200px;
  z-index: 25;
}

.tuktuk.layer-2 {
  bottom: -80px;
  z-index: 26;
  /* kein transform hier — vermeidet Konflikte mit den Keyframes */
}

.tuktuk.layer-3 {
  bottom: -120px;
  z-index: 27;
  /* kein transform hier */
}

/* Kleinere TukTuks */
.tuktuk.small {
  width: 120px;
}

/* TukTuk fährt von links nach rechts, dreht um und fährt zurück */
@keyframes tuktuk-bounce {
  0% { 
    left: -100px; 
    transform: translateZ(0) scaleX(-1) scale(1); 
  }
  50% { 
    left: calc(100% - 60px); 
    transform: translateZ(0) scaleX(-1) scale(1); 
  }
  50.001% { 
    left: calc(100% - 60px); 
    transform: translateZ(0) scaleX(1) scale(1); 
  }
  100% { 
    left: -100px; 
    transform: translateZ(0) scaleX(1) scale(1); 
  }
}

/* Layer 2 - mit Scale 0.95 */
@keyframes tuktuk-bounce-layer2 {
  0% { 
    left: -100px; 
    transform: translateZ(0) scaleX(-1) scale(0.95); 
  }
  50% { 
    left: calc(100% - 60px); 
    transform: translateZ(0) scaleX(-1) scale(0.95); 
  }
  50.001% { 
    left: calc(100% - 60px); 
    transform: translateZ(0) scaleX(1) scale(0.95); 
  }
  100% { 
    left: -100px; 
    transform: translateZ(0) scaleX(1) scale(0.95); 
  }
}

/* Layer 3 - mit Scale 0.9 */
@keyframes tuktuk-bounce-layer3 {
  0% { 
    left: -100px; 
    transform: translateZ(0) scaleX(-1) scale(0.9); 
  }
  50% { 
    left: calc(100% - 60px); 
    transform: translateZ(0) scaleX(-1) scale(0.9); 
  }
  50.001% { 
    left: calc(100% - 60px); 
    transform: translateZ(0) scaleX(1) scale(0.9); 
  }
  100% { 
    left: -100px; 
    transform: translateZ(0) scaleX(1) scale(0.9); 
  }
}

/* Stadtinfos */
.city-info {
  background-color: var(--bg-ground);
  text-align: left;
  padding: 300px 15% 50px 15%;
  margin-top: -80px;

}

.city-info-content {
  display: flex;
  gap: 50px;
}

.city-info h1 {
  color: var(--titel-braun);
  margin-bottom: 1.5rem;
  font-size: 35px;

}

.city-info p {
  color: var(--lightgrey);
  font-size: 18px;
  margin: 0;
}

/* Record-Pills untereinander */
.record-list {
  display: block;
  min-width: fit-content;
  align-items: center;
}

.record-item {
  background: var(--titel-braun);
  color: black;
  padding: 1rem 2rem;
  margin-bottom: 20px;
  border-radius: 100px;
  text-align: center;
}

.record-item h3 {
  margin: 0;
  font-size: 25px;
}

.record-item p {
  margin: 4px 0 0;
  font-size: 14px;
  color: black;
}

.red {
  color: rgb(192, 19, 19);
}

/* Beschreibung */
.description {
  line-height: 1.5;
  font-size: 15px;
}

/* Chart von chart.js */
.chart {
  background-color: var(--bg-ground);
  padding: 2rem 1rem;
  text-align: left;
  margin-top: -40px;
  padding-left: 10%;
  padding-right: 10%;
}

.chart h1 {
  color: var(--titel-braun);
  margin-bottom: 1.5rem;
  font-size: 35px;
}

/* Responsive */
@media (max-width: 600px) {
  .info-container {
    flex-direction: column;
    gap: 1rem;
  }
}