:root {
  --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);
  background-attachment: fixed;
  transition: background 400ms linear;
  color: var(--lightgrey);
  overflow-x: hidden;
}


/* 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;
  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;
  left: 50%;
  top: 30%;
  transform: translate(-50%, -50%);
  width: 550px;
  height: 550px;
  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;
  pointer-events: none;
}

/* Der drehbare Kreis */
.dial {
  width: 100%;
  height: 100%;
  object-fit: contain;
  will-change: transform;
  cursor: grab;
  transition: transform 0.02s linear;
  pointer-events: auto;
  z-index: 15;
  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);
  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: 160px;
  pointer-events: none;
  transform: translateY(200px);
  overflow-x: hidden;

}


/* Einzelnes TukTuk */ 
.tuktuk { 
  position: absolute; 
  width: 120px; 
  height: auto; 
  animation-timing-function: linear; 
  animation-iteration-count: infinite; 
  animation-direction: alternate;
  will-change: left, transform; 
  z-index: 30; 
}

/* Layer-spezifische Positions / z-index - KEIN transform hier! */
.tuktuk.layer-1 {
  bottom: 0px; 
  z-index: 25;
}

.tuktuk.layer-2 {
  bottom: 75px; 
  z-index: 26;
}

.tuktuk.layer-3 {
  bottom: 40px; 
  z-index: 27;
}

.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-container {
  position: relative;
  width: 100%;
  height: 500px; 
}

/* Canvas füllt nur noch den Container */
.chart canvas {
  width: 100% !important;
  height: 100% !important;
}



/* ===== RESPONSIVE BREAKPOINTS ===== */
/* ===== RESPONSIVE BREAKPOINTS ===== */
/* ===== RESPONSIVE BREAKPOINTS ===== */

@media (max-width: 1024px) {

  /* Header */
  header {
    padding: 20px 0px 0px 20px;
  }

  .back-button img {
    width: 60px;
    height: 60px;
  }

  /* Info Container */
  .info-container {
    margin: 80px 5% 0 5%;
    gap: 2rem;
    padding: 1.5rem 1rem;
  }

  .info-box h2 {
    font-size: 28px;
    padding: 8px 30px;
  }

  .info-box p {
    font-size: 24px;
  }

  /* Zeit-Box */
  .time-box h1 {
    font-size: 60px;
    margin-top: -250px;
  }

  /* Dial */
  .dial-wrap {
    width: 450px;
    height: 450px;
    top: 35%;
  }

  /* City Image */
  .city-image img {
    max-width: 600px;
  }

  /* TukTuk */
  .tuktuk {
    width: 140px;
  }

  .tuktuk.small {
    width: 100px;
  }

  .tuktuk-track {
    height: 170px;
  }

  .tuktuk.layer-1 {
    bottom: 0px;
  }

  .tuktuk.layer-2 {
    bottom: 65px;
  }

  .tuktuk.layer-3 {
    bottom: 35px;
  }

  /* City Info */
  .city-info {
    padding: 250px 8% 40px 8%;
  }

  .city-info h1 {
    font-size: 30px;
  }

  .record-item h3 {
    font-size: 22px;
  }

  /* Chart */
  .chart {
      padding-left: 8%;
      padding-right: 8%;
    }

    .chart-container {
      height: 500px;
    }

  .chart h1 {
    font-size: 30px;
  }
}

@media (max-width: 768px) {

  /* Info Container - zu 2 Spalten */
  .info-container {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 1.5rem;
    margin: 60px 5% 0 5%;
  }

  /* Zeit-Box über beide Spalten */
  .time-box {
    grid-column: 1 / -1;
    order: -1;
  }

  .time-box h1 {
    font-size: 70px;
    margin-top: -100px;
    padding-bottom: 10px;
  }

  .info-box h2 {
    font-size: 24px;
    padding: 6px 20px;
  }

  .info-box p {
    font-size: 20px;
  }

  /* Dial */
  .dial-wrap {
    width: 320px;
    height: 320px;
    top: 40%;
  }

  /* City Image */
  .city-image {
    margin-bottom: -80px;
  }

  .city-image img {
    max-width: 500px;
  }

  /* TukTuk */
  .tuktuk-track {
    height: 120px;
    transform: translateY(150px);
  }

  .tuktuk {
    width: 90px;
  }

  .tuktuk.small {
    width: 90px;
  }

  .tuktuk.layer-1 {
    bottom: 0px;
  }

  .tuktuk.layer-2 {
    bottom: 50px;
  }

  .tuktuk.layer-3 {
    bottom: 25px;
  }

  /* City Info */
  .city-info {
    padding: 200px 5% 30px 5%;
  }

  .city-info-content {
    gap: 30px;
  }

  .city-info h1 {
    font-size: 28px;
  }

  .city-info p {
    font-size: 16px;
  }

  /* Chart */
  .chart {
    padding-left: 5%;
    padding-right: 5%;
  }
  .chart-container {
    height: 500px;
  }
}



@media (max-width: 600px) {

  /* Header */
  header {
    padding: 15px 0px 0px 15px;
  }

  .back-button img {
    width: 50px;
    height: 50px;
  }

  /* Info Container - einspaltiges Layout */
  .info-container {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 40px 4% 0 4%;
    padding: 1rem;
  }

  .time-box {
    order: -1;
  }

  .time-box h1 {
    font-size: 70px;
    margin-top: -60px;
  }

  .time-box p {
    font-size: 20px;
  }

 .info-box {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .info-box h2 {
    font-size: 20px;
    padding: 5px 15px;
    width: 60%;
    display: block;
    margin: 0 auto;
  }

  .info-box p {
    font-size: 18px;
  }


  .weather-info img {
    width: 30px;
    height: 30px;
  }

  /* Dial */
  .dial-wrap {
    width: 240px;
    height: 240px;
    top: 40%;          
  }

  .marker {
    top: 15px;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 8px solid var(--lightblue);
  }

  /* City Image */
  .city-image {
    margin-bottom: -60px;
  }

  .city-image img {
    max-width: 350px;
  }

  /* TukTuk */
  .tuktuk-track {
    height: 100px;
    transform: translateY(70px);
  }

  .tuktuk {
    width: 80px;
  }

  .tuktuk.small {
    width: 60px;
  }

  .tuktuk.layer-1 {
    bottom: 0px;
  }

  .tuktuk.layer-2 {
    bottom: 35px;
  }

  .tuktuk.layer-3 {
    bottom: 15px;
  }

  /* City Info */
  .city-info {
    padding: 150px 5% 25px 5%;
  }

  .city-info-content {
    flex-direction: column;
    gap: 20px;
  }

  .city-info h1 {
    font-size: 24px;
    margin-bottom: 1rem;
  }

  .city-info p {
    font-size: 14px;
  }

  /* Record Pills */
  .record-item {
    padding: 0.8rem 1.5rem;
    margin-bottom: 15px;
  }

  .record-item h3 {
    font-size: 18px;
  }

  .record-item p {
    font-size: 12px;
  }

  /* Description */
  .description {
    font-size: 16px;
    line-height: 1.4;
  }

  /* Chart */
 .chart {
    padding: 1.5rem 5%;
    margin-top: -20px;
  }

  .chart h1 {
    font-size: 22px;
    margin-bottom: 1rem;
  }

  .chart-container {
    height: 400px;
  }
}

/* Touch-optimierte Interaktionen */
@media (hover: none) and (pointer: coarse) {
  .dial {
    cursor: default;
  }

  .dial:active {
    cursor: default;
  }

  /* Größere Touch-Targets */
  .back-button {
    padding: 10px;
  }
}