/* Grund & Hintergrund */
body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: white;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(-45deg, #6c63ff, #8ab4f8, #9b59b6, #2ecc71);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
  z-index: 0;
  opacity: 0.5;
}

@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Overlay-Inhalte */
.content {
  position: relative;
  z-index: 1;
}

/* Header */
header {
  text-align: center;
  padding: 20px;
  background: rgba(0,0,0,0.6);
  border-bottom: 2px solid #6c63ff;
}

header h1 {
  margin: 0;
  font-size: 28px;
  text-shadow: 1px 1px 5px #000;
}

nav a {
  color: #8ab4f8;
  text-decoration: none;
  margin: 0 10px;
  transition: color 0.3s;
}
nav a:hover { color: #ffffff; text-decoration: underline; }

/* Flex-Container */
.container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
  padding: 20px;
  max-width: 1400px;
  margin: auto;
  flex-wrap: wrap;
}

/* Stream & Chat Cards */
.stream, .chat {
  background: rgba(0, 0, 0, 0.8);
  border-radius: 15px;
  box-shadow: 0 0 30px rgba(114, 9, 183, 0.6);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stream:hover, .chat:hover {
  transform: scale(1.02);
  box-shadow: 0 0 40px rgba(114, 9, 183, 0.9);
}

/* Stream größer */
.stream { flex: 2; }
.stream iframe {
  width: 100%;
  aspect-ratio: 16/9;
  border: none;
  display: block;
}

/* Chat kleiner */
.chat { flex: 1; }
.chat iframe {
  width: 100%;
  aspect-ratio: 16/9;
  border: none;
  display: block;
}

/* Footer */
footer {
  text-align: center;
  padding: 15px;
  background: rgba(0,0,0,0.6);
  margin-top: 20px;
  border-top: 2px solid #6c63ff;
  font-size: 14px;
}

.footer-nav a {
  color: #8ab4f8;
  text-decoration: none;
  margin: 0 10px;
  transition: color 0.3s;
}

.footer-nav a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.footer-nav span {
  color: #666;
  margin: 0 5px;
}

/* ✅ Responsive Anpassungen */
@media (max-width: 1024px) {
  .stream iframe, .chat iframe { aspect-ratio: 16/9; }
}

@media (max-width: 768px) {
  .container { flex-direction: column; }
  .stream, .chat { flex: 1; width: 100%; }
  header h1 { font-size: 22px; }
  nav a { display: inline-block; margin: 5px; }
}

@media (max-width: 480px) {
  header h1 { font-size: 18px; }
  nav a { font-size: 14px; }
}

/* Theme Toggle Button */
#theme-toggle {
  position: absolute;
  top: 20px;
  right: 20px;
  padding: 8px 12px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  background: rgba(0,0,0,0.6);
  color: white;
  font-size: 16px;
  transition: all 0.3s;
}
#theme-toggle:hover { background: rgba(114,9,183,0.8); }

/* Twitch Stats Box */
.twitch-stats {
  margin-top: 10px;
  background: rgba(0,0,0,0.7);
  padding: 10px;
  border-radius: 10px;
  font-size: 14px;
  text-align: center;
}

/* Social Buttons */
.social-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}
.social {
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: white;
  font-weight: bold;
  transition: all 0.3s;
}
.social.discord { background: #7289da; }
.social.youtube { background: #ff0000; }
.social.twitter { background: #1da1f2; }
.social:hover {
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(255,255,255,0.6);
}

/* Dark/Light Mode */
body.light {
  color: #000;
}
body.light header, body.light footer {
  background: rgba(255,255,255,0.8);
  color: #000;
}
body.light .stream, body.light .chat {
  background: rgba(255,255,255,0.8);
  color: #000;
}
body.light .social:hover {
  box-shadow: 0 0 15px rgba(0,0,0,0.6);
}
