
.banner-forecast {
  font-size: clamp(3rem, 10vw, 5rem);
  background: linear-gradient(90deg, #dddddd, #5f5e60);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 1.5rem rgba(220, 233, 237, 0.3);
  word-wrap: break-word;
  margin: 8rem 0 4rem 0;
}
@media (max-width: 380px) {
  .banner-forecast {
    font-size: clamp(2rem, 10vw, 3.5rem);
    margin: 6rem 0 1.5rem 0;
  }
}
@media (min-width: 381px) and (max-width: 768px) {
  .banner-forecast {
    font-size: clamp(3rem, 10vw, 5rem);
    margin: 6rem 0 2rem 0;
  }
}
@media (orientation: landscape) and (max-height: 800px) {
  .banner-forecast {
    font-size: clamp(2.5rem, 10vw, 4rem);
    margin: 4rem 0 3rem 0;
  }
}



.forecast-wrapper {
  display: flex;
  position: relative;
  flex-direction: column;
  width: 100%;
  gap: 2rem;
  justify-content: center;
}

form#forecastForm {
  padding: 2rem 2rem 3rem 2rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 0.1rem solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  color: rgba(249, 249, 249, 0.7);
  max-width: 32rem;
  margin: 2rem auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
@media (max-width: 768px) {
  form#forecastForm {
    width: 70vw;
    max-width: 70vw;
  }
}

form#forecastForm label {
  display: block;
  background: linear-gradient(90deg, #dddddd, #5f5e60);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: clamp(0.8rem, 0.9rem, 1.1rem);
  text-shadow: 0 0 1.5rem rgba(220, 233, 237, 0.3);
  text-align: left;
  margin-bottom: 0.5rem;
}

form#forecastForm input[type="text"],
form#forecastForm select {
  font-family: "SyneMono";
  font-size: clamp(1rem, 10vw, 1.1rem);
  background: rgba(255, 255, 255, 0.05);
  border: 0.1rem solid rgba(255, 255, 255, 0.1);
  color: rgba(249, 249, 249, 0.7);
  border-radius: 0.5rem;
  width: 100%;
  padding: 0.6rem;
  box-sizing: border-box;
  transition: border 0.2s;
}
@media (hover: hover) {
  form#forecastForm input:hover,
  form#forecastForm select:hover {
    background: rgba(255, 255, 255, 0.07);
    border: 0.1rem solid rgba(255, 255, 255, 0.2);
  }
}

form#forecastForm input:focus,
form#forecastForm select:focus {
  border-color: #5b6cdc;
  outline: none;
}

form#forecastForm button {
  font-family: "SyneMono";
  font-size: clamp(1rem, 1.1rem, 1.2rem);
  background: linear-gradient(90deg, #dddddd, #7617d6);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 1.5rem rgba(220, 233, 237, 0.3);
  border: 0.08rem solid rgb(146, 145, 145);
  padding: 0.8rem;
  margin-top: 0.5rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out, transform 0.3s ease;
}
@media (hover: hover) {
  form#forecastForm button:hover {
    background: linear-gradient(90deg, #dddddd, #190131);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 1.5rem rgba(220, 233, 237, 0.3);
  }
}

form#forecastForm button:active {
  background: linear-gradient(90deg, #dddddd, #8a2ce8);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 1.5rem rgba(220, 233, 237, 0.3);
  transform: scale(0.97);
  transition: none;
}

.forecast-label {
  font-size: clamp(1.25rem, 1.5rem, 1.75rem);
  color: rgba(249, 249, 249, 0.7);
  padding-bottom: 0.5rem;
  margin: 0 auto;
}

.forecast-group {
  display: flex;
  flex-direction: column;
}

.forecast-input {
  position: relative;
  font-family: "audiowide";
  padding: 1.25rem 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 0.1rem solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  font-size: clamp(1.55rem, 1.65rem, 1.95rem);
  color: rgba(249, 249, 249, 0.7);
  text-align: center;
  outline: none !important;
}
@media (max-width: 768px) {
  .forecast-input {
    width: 75%;
    padding: 1rem;
    font-size: clamp(1.25rem, 1.45rem, 1.65rem);
  }
}
@media (hover: hover) {
  .forecast-input:hover {
    background: rgba(255, 255, 255, 0.07);
    border: 0.1rem solid rgba(255, 255, 255, 0.2);
  }
}

.forecast-input:focus {
  background: rgba(255, 255, 255, 0.07);
  border: 0.1rem solid rgba(255, 255, 255, 0.2);
  outline: none !important;
}

.forecast-list {
  position: absolute;
  top: 110%;
  left: 0;
  right: 0;
  align-items: flex-start;
  justify-content: center;
  align-self: center;
  align-content: center;
  background: rgba(37, 43, 102);
  border-radius: 1rem;
  border: none;
  list-style: none;
  outline: none;
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-y: auto;
  z-index: 10;
}
@media (max-width: 768px) {
  .forecast-list {
    top: -100%;
    width: 100%;
    background: rgba(15, 33, 53);
  }
}

.forecast-list li {
  color: rgba(235, 235, 235, 0.8);
  font-size: clamp(0.9rem, 1rem, 1.1rem);
  padding: 0.5rem 0.75rem;
  cursor: pointer;
}
@media (max-width: 768px) {
  .forecast-list li {
    font-size: clamp(0.8rem, 0.9rem, 1rem);
  }
}
@media (hover: hover) {
  .forecast-list li:hover {
    color: rgba(235, 235, 235, 0.9);
    background-color: rgba(255, 255, 255, 0.05);
  }
}
.forecast-list li:active {
  background-color: rgba(18, 72, 164, 0.6);
}



#forecastOverlay {
  position: fixed;
  height: 100vh;
  width: 100%;
  opacity: 0;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  pointer-events: auto;
  z-index: 10998;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  transition: opacity 0.5s ease;
}

#forecastOverlay.visible {
  display: flex;
  opacity: 1;
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  background-attachment: fixed;
}
@media (max-width: 768px), (orientation: portrait) {
  #forecastOverlay.visible {
    background-attachment: scroll;
  }
}

#forecastOverlay .forecastWrapper {
  width: 100%;
  height: 100%;
  border-radius: 0.25rem;
  overflow-y: auto;
}

#scroll-forecast {
  display: flex;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
}

.forecast-grid {
  display: flex;
  gap: 2rem;
  z-index: 10999;
  justify-content: space-around;
  margin: 0 auto;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scroll-behavior: auto;
  padding: 0;
}

.forecast-columns {
  flex: 0 0 clamp(22rem, 30vw, 28rem);
  text-shadow: 0.2rem 0.5rem 0.5rem 0.2rem rgba(20, 20, 20, 0.6);
  font-size: 2.25rem;
  font-family: "audiowide";
  border-radius: 1rem;
  margin-bottom: 1rem;
  text-align: center;
  align-items: stretch;
}
@media (hover: none), (max-width: 1199px) {
  .forecast-grid {
    gap: 1rem;
  }
  .forecast-columns {
    flex: 0 0 100%;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    width: 100%;
    margin-right: 0.5rem;
    box-sizing: border-box;
  }
}

.forecast-columns canvas {
  display: block;
  width: 100% !important;
  max-width: 100%;
  height: auto !important;
  min-width: 0;
  flex-shrink: 1; 
}
@supports (-webkit-tap-highlight-color: transparent) {
  .forecast-columns canvas {
    max-width: 98vw;
  }
}

.forecast-columns h3 {
  display: flex;
  margin-top: clamp(5rem, 6rem, 8rem);
  background: linear-gradient(90deg, #ebebeb, #9c9c9c);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 1.5rem rgba(220, 233, 237, 0.3);
  font-size: clamp(2rem, 3rem, 4rem);
  flex-wrap: wrap;
  align-items: center;
  text-align: center;
  justify-content: center;
}
@media (max-width: 768px) {
  .forecast-columns h3 {
    margin-top: 4.5rem;
    font-size: clamp(2rem, 2.5rem, 3rem);
  }
}

.trennstrich {
  border-top: 0.1rem solid rgba(242, 242, 242, 0.5);
  margin: auto;
  width: 60%;
}

.output p {
  margin: 1rem 0;
  text-shadow: 0 0.05rem 0.05rem rgba(200, 200, 200, 0.7);
}

.output p:last-of-type {
  margin-bottom: 5rem;
}
@media (max-width: 768px) {
  .output p {
    font-size: clamp(1.75rem, 2rem, 2.25rem);
  }
  .output p:last-of-type {
    margin-bottom: 3rem;
  }
}



.weather-timeline {
  display: flex;
  width: 94%;
  max-width: 100%;
  justify-content: center;
  text-align: center;
  margin: 2rem auto 0 auto;
  gap: 0.5rem;
  flex-wrap: wrap;
}
@media (max-width: 768px) {
  .weather-timeline {
    margin-top: 1rem;
  }
}



.weather-tooltip {
  position: fixed;
  background: rgba(37, 43, 102);
  color: rgba(248, 248, 248, 0.9);
  padding: 0.5rem;
  border-radius: 0.1rem;
  font-size: 0.9rem;
  pointer-events: none;
  white-space: nowrap;
  z-index: 11002;
  opacity: 0;
  transition: opacity 0.15s ease;
}



.weather-symbol {
  display: flex;
  flex: 0 1 auto;
  color: rgba(248, 248, 248, 0.8);
  letter-spacing: -1px;
  flex-direction: column;
  align-items: center;
  font-size: 0.8rem;
  max-width: 5rem;
  margin: 0.25rem 0;
  text-align: center;
  word-wrap: break-word;
  bottom: 0;
}
@media (max-width: 768px) {
  .weather-symbol {
    margin: 0.2rem 0;
  }
}

.weather-symbol img {
  height: clamp(2.5rem, 3rem, 3.5rem);
  width: 100%;
  object-fit: contain;
}
@media (max-width: 768px) {
  .weather-symbol img {
    height: clamp(2.5rem, 2.75rem, 3rem);
  }
}

.temp-very-cold {
  color: #40a4e3;
}
.temp-cold {
  color: #2699e0;
}
.temp-cool {
  color: #1393e3;
}
.temp-moderate {
  color: #dbd393;
}
.temp-mild {
  color: #d27326;
}
.temp-warm {
  color: #cf3131;
}
.temp-very-warm {
  color: #a31c10;
}
.temp-hot {
  color: #a8163f;
}
.temp-very-hot {
  color: #9a184e;
}



.current-weather-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.8rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-family: "Audiowide";
  color: rgba(249, 249, 249, 0.7);
  font-size: clamp(1.2rem, 1.35rem, 1.5rem);
  z-index: 11999;
}
@media (max-width: 768px) {
  .current-weather-badge {
    top: 0.5rem;
    left: 0.1rem;
    font-size: clamp(1rem, 1.2rem, 1.3rem);
  }
}

.current-weather-badge .live-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #ff3b3b;
  box-shadow: 0 0 0.5rem rgba(255, 60, 60, 0.8);
  animation: pulse 1.4s infinite ease-in-out;
}
@keyframes pulse {
  0% { 
    transform: scale(1); 
    opacity: 1; 
  }
  50% { 
    transform: scale(1.6); 
    opacity: 0.5; 
  }
  100% { 
    transform: scale(1); 
    opacity: 1; 
  }
}

.current-weather-badge img {
  width: 1.6rem;
  height: 1.6rem;
  opacity: 0.8;
  transform: scale(1.25);
}



#closeForecast {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  padding: 0.5rem 0.8rem;
  font-size: 1.2rem;
  font-family: "Audiowide";
  color: rgba(249, 249, 249, 0.7);
  background: rgba(225, 54, 54, 0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 0 1.2rem 0 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
  z-index: 12000;
  transition: background 0.25s ease, transform 0.15s ease;
}
@media (max-width: 768px) {
  #closeForecast {
    top: 0.4rem;
    right: 0.4rem;
  }
}
#closeForecast:hover {
  background: rgba(225, 54, 54, 0.6);
  color: rgba(249, 249, 249, 0.9);
}
#closeForecast:active {
  transform: scale(0.92);
}
