/* ========== GRUNDLAYOUT & SCHRIFT ========== */
body {
  font-family: 'Fredoka', sans-serif;
  margin: 0;
  padding: 0;
  background: linear-gradient(-45deg, #1a1a1a, #2a2a2a, #3a3a3a, #1a1a1a);
  background-size: 400% 400%;
  animation: dreamyBackground 20s ease infinite;
  color: #e0e0e0;
  transition: background 1s ease;
  overflow-x: hidden;
}

/* Animation für Standard-Hintergrund */
@keyframes dreamyBackground {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.container {
  max-width: 960px;
  margin: auto;
  padding: 2rem;
  animation: fadeIn 1.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========== HEADER ========== */
header {
  text-align: center;
  padding: 1rem;
  background-color: #2d4a3a;
  border-radius: 12px;
  color: #ffffff;
  margin-bottom: 2rem;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.6);
}

/* ========== KARTEN ========== */
.card {
  background: #242424;
  border-radius: 16px;
  box-shadow: 0 0 12px rgba(102, 187, 106, 0.2);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
  transition: transform 0.3s ease;
  animation: floatCard 6s ease-in-out infinite;
  color: #e0e0e0;
}

@keyframes floatCard {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-4px); }
}

.card:hover {
  transform: scale(1.025) rotate(0.3deg);
}

/* ========== BUTTONS ========== */
button,
a.steam-button,
a.discord-button,
button.yt-button {
  background-color: #66bb6a;
  border: none;
  padding: 0.8rem 1.2rem;
  border-radius: 10px;
  color: white;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  margin: 0.5rem;
  transition: 0.3s ease;
  animation: pulseBtn 3s infinite;
}

@keyframes pulseBtn {
  0%, 100% { box-shadow: 0 0 0px transparent; }
  50% { box-shadow: 0 0 12px limegreen; }
}

button:hover,
a.steam-button:hover,
a.discord-button:hover,
button.yt-button:hover {
  background-color: #558b2f;
  transform: scale(1.03) rotate(-1deg);
}

/* ========== POPUPS ========== */
#popup-overlay,
#wetter-popup,
#video-popup,
#weather-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.9);
  justify-content: center;
  align-items: center;
  z-index: 9999;
  animation: fadePopup 0.4s ease forwards;
}

@keyframes fadePopup {
  from { opacity: 0; }
  to { opacity: 1; }
}

#popup-overlay img,
#wetter-popup img {
  max-width: 90%;
  max-height: 90%;
  border: 6px solid white;
  border-radius: 12px;
  box-shadow: 0 0 20px limegreen;
}

/* ========== WETTERBOX ========== */
.weather-box {
  background: #1a1a1a;
  color: #e0e0e0;
  padding: 2rem;
  max-width: 95%;
  max-height: 85%;
  overflow: auto;
  border-radius: 16px;
  box-shadow: 0 0 20px limegreen;
  font-family: 'Fredoka', sans-serif;
  line-height: 1.6;
  animation: flipBox 0.6s ease;
}

@keyframes flipBox {
  from { transform: rotateY(90deg); opacity: 0; }
  to { transform: rotateY(0); opacity: 1; }
}

/* ========== VIDEO ========== */
.video-container {
  background: #121212;
  padding: 1rem;
  border-radius: 12px;
  box-shadow: 0 0 15px rgba(0, 255, 0, 0.3);
}

iframe {
  width: 100%;
  max-width: 800px;
  height: 450px;
  border: none;
}

/* ========== FOOTER ========== */
.footer-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

/* ========== WETTERKLASSEN ========== */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: transparent;
  transition: background 1s ease;
}

/* ☀️ Sonne */
body.sunny::before {
  background: rgba(255, 235, 59, 0.08);
}

/* 🌧 Regen */
body.rain::before {
  background: rgba(100, 130, 150, 0.08);
}

/* ❄️ Schnee */
body.snow::before {
  background: rgba(255, 255, 255, 0.08);
}

/* ☁️ Bewölkt */
body.cloudy::before {
  background: rgba(170, 180, 190, 0.08);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  header h1 {
    font-size: 2rem;
  }

  .card {
    padding: 1rem;
  }

  .weather-box {
    padding: 1rem;
    font-size: 0.95rem;
  }

  iframe {
    height: 300px;
  }

  button,
  a.steam-button,
  a.discord-button,
  button.yt-button {
    width: 90%;
    margin: 0.3rem auto;
    font-size: 0.95rem;
  }

  .footer-buttons {
    flex-direction: column;
    align-items: center;
  }
}
