/* Grundlegendes Styling */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
}

html, body {
  height: 100%;
  min-height: 100%;
  overflow-y: auto; /* Scrollbar bei Bedarf aktivieren */
}

body {
  background-color: #121212;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center; /* Für Desktop zentrale Ausrichtung */
  padding: 0 1rem; /* Entfernt den oberen Abstand, da wir jetzt zentrieren */
  color: #ffffff;
  position: relative;
}

/* Farbige Overlay-Ebenen */
.color-overlay {
  position: fixed; /* Fixiert, um gesamten Bildschirm abzudecken */
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
  z-index: -2;
}

.youtube-overlay {
  background-color: rgba(153, 0, 0, 0.6);
}

.instagram-overlay {
  background: linear-gradient(45deg, rgba(64, 93, 230, 0.6), rgba(88, 81, 219, 0.6), rgba(131, 58, 180, 0.6), rgba(193, 53, 132, 0.6), rgba(225, 48, 108, 0.6));
  background-size: 300% 300%;
  animation: gradient 15s ease infinite;
}

.tiktok-overlay {
  background: linear-gradient(45deg, rgba(0, 0, 0, 0.6), rgba(37, 244, 238, 0.6));
}

.youtube-gaming-overlay {
  background-color: rgba(102, 0, 0, 0.6);
}

.twitch-overlay {
  background-color: rgba(75, 54, 124, 0.6);
}

.x-overlay {
  background-color: rgba(0, 0, 0, 0.6);
}

.tools-overlay {
  background-color: rgba(128, 128, 128, 0.6);
}

@keyframes gradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.container {
  max-width: 1200px;
  width: 100%;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center; /* Zusätzliche Zentrierung */
  padding-bottom: 4rem; /* Platz für Footer */
}

/* Karten-Container - zentriert im Bildschirm */
.cards-container {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  width: 100%;
  max-width: 100%;
  padding: 1rem;
  z-index: 10;
}

/* Karten-Styling mit flexibler Breite und angepasster Farbe */
.card {
  background-color: #10161f;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  width: 100%;
  max-width: 250px;
  height: auto;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.5s ease;
  cursor: pointer;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Spezielle Hover-Farben für jede Plattform */
.card.youtube-hover {
  background-color: #cc0000;
  border-color: #ff0000;
}

.card.instagram-hover {
  background: linear-gradient(45deg, #405DE6, #5851DB, #833AB4, #C13584, #E1306C);
  background-size: 200% 200%;
  animation: gradient 5s ease infinite;
  border-color: white;
}

.card.tiktok-hover {
  background: linear-gradient(45deg, #000000, #00f2ea);
  background-size: 200% 200%;
  animation: gradient 5s ease infinite;
  border-color: white;
}

.card.twitch-hover {
  background-color: #6441a5;
  border-color: #b9a3e3;
}

.card.youtube-gaming-hover {
  background-color: #880000;
  border-color: #ff0000;
}

.card.x-hover {
  background-color: #000000;
  border-color: #ffffff;
}

.card.tools-hover {
  background-color: #333333;
  border-color: #cccccc;
}

.card:hover {
  transform: scale(1.05);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
  border-width: 2px;
  z-index: 20;
}

.card-icon {
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Grundeinstellung für die Icons */
.social-icon {
  width: 56px;
  height: 56px;
  object-fit: contain;
  transition: filter 0.3s ease; /* Flüssige Übergang für die Farbänderung */
}

/* Icons weiß machen beim Hovern über Karten mit farbigem Hintergrund */
.card.youtube-hover .social-icon,
.card.instagram-hover .social-icon,
.card.twitch-hover .social-icon,
.card.youtube-gaming-hover .social-icon {
  filter: brightness(0) invert(1); /* Macht die Logos weiß, unabhängig von der ursprünglichen Farbe */
}

.card-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: #ffffff;
  text-align: center;
  margin-bottom: 0.5rem;
}

.card-description {
  font-size: 0.95rem;
  color: #b0b0b0;
  text-align: center;
}

/* Coming Soon Popup */
.coming-soon-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.coming-soon-popup.active {
  opacity: 1;
  visibility: visible;
}

.popup-content {
  background-color: #181818; /* Angepasst an Kartenfarbe */
  border-radius: 16px;
  padding: 2rem;
  max-width: 90%;
  width: 400px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: popup-in 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes popup-in {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.popup-content h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: #ffffff;
}

.popup-content p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: #b0b0b0;
}

.close-popup {
  background-color: #333333;
  color: #ffffff;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.close-popup:hover {
  background-color: #444444;
  transform: scale(1.05);
}

/* Sternenhimmel Animation */
.stars {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -3; /* Muss unter dem Overlay liegen */
  opacity: 1; /* Immer sichtbar */
}

.stars::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at bottom, #1B2735 0%, #090A0F 100%);
  z-index: -1;
}

.star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 4px #fff, 0 0 8px #fff;
  animation: twinkle var(--duration, 5s) infinite ease-in-out;
  opacity: var(--opacity, 0.8);
  transform: scale(var(--scale, 1));
}

.shooting-star {
  position: absolute;
  width: 100px;
  height: 2px;
  background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1));
  border-radius: 50%;
  animation: shoot var(--duration, 8s) infinite ease-out;
  animation-delay: var(--delay, 0s);
  transform: rotate(-35deg);
  opacity: 0;
  bottom: var(--bottom, 10%);
  left: var(--left, 10%);
}

@keyframes twinkle {
  0%, 100% { opacity: var(--opacity); transform: scale(var(--scale)); }
  50% { opacity: var(--opacity-half, 0.4); transform: scale(var(--scale-half, 0.5)); }
}

@keyframes shoot {
  0% { 
    transform: translateX(0) translateY(0) rotate(var(--angle, -35deg));
    opacity: 0;
  }
  5% {
    opacity: 1;
  }
  20% { 
    transform: translateX(var(--x, 300px)) translateY(var(--y, -300px)) rotate(var(--angle, -35deg));
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}

/* Bouncing Cubes */
.cube-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1s ease;
}

body.cubes-active .cube-container {
  opacity: 1;
}

.cube {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
  transform: rotate(45deg);
}

.bounce-effect {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  transform: scale(0.1);
  opacity: 0.7;
  transition: all 0.3s ease-out;
  pointer-events: none;
}

/* Footer - Desktop-Version fixed, Mobile-Version relativ */
.footer {
  width: 100%;
  text-align: center;
  padding: 1rem;
  color: #777;
  font-size: 0.9rem;
  z-index: 10;
  background-color: transparent;
  position: fixed; /* Standard: Fixed für Desktop */
  bottom: 0;
  left: 0;
}

.footer a {
  color: #999;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer a:hover {
  color: #fff;
  text-decoration: underline;
}

/* Media Queries für responsive Design */

/* Tablets */
@media screen and (max-width: 768px) {
  .card-icon {
    margin-bottom: 1rem;
  }
  
  .social-icon {
    width: 48px;
    height: 48px;
  }
  
  .card-title {
    font-size: 1.2rem;
  }
  
  .card-description {
    font-size: 0.9rem;
  }
  
  .cards-container {
    gap: 1.5rem;
  }
  
  .card {
    min-height: 220px;
  }
  
  .popup-content {
    padding: 1.5rem;
  }
  
  .popup-content h2 {
    font-size: 1.5rem;
  }
  
  .popup-content p {
    font-size: 1rem;
  }
}

/* Mobilgeräte */
@media screen and (max-width: 480px) {
  body {
    padding: 3rem 0.5rem 1rem 0.5rem; /* Oberer Abstand nur für Mobile */
    justify-content: flex-start; /* Auf Mobilgeräten oben beginnen */
  }
  
  .cards-container {
    gap: 1rem;
    flex-direction: column;
    align-items: center;
  }
  
  .card {
    max-width: 100%;
    width: 90%;
    min-height: 200px;
    padding: 1.2rem;
  }
  
  .card:hover {
    transform: scale(1.03);
  }
  
  .social-icon {
    width: 40px;
    height: 40px;
  }
  
  .card-title {
    font-size: 1.1rem;
  }
  
  .popup-content {
    width: 90%;
    padding: 1.2rem;
  }
  
  .popup-content h2 {
    font-size: 1.4rem;
  }
  
  .popup-content p {
    font-size: 0.9rem;
  }
  
  .close-popup {
    padding: 0.7rem 1.2rem;
    font-size: 0.9rem;
  }
  
  /* Footer für Mobilgeräte */
  .footer {
    position: relative; /* Ändern zu relative für Mobilgeräte */
    margin-top: 2rem;
  }
}

/* Kleine Mobilgeräte */
@media screen and (max-width: 320px) {
  .card {
    padding: 1rem;
    min-height: 180px;
  }
  
  .social-icon {
    width: 36px;
    height: 36px;
  }
  
  .footer {
    padding: 0.8rem;
    font-size: 0.8rem;
  }
}