/* Datei: Spielmodi.css */

.spielmodi {
  background-color: var(--navbar-bg);
  color: #fff;
  padding: 4rem 1rem;
  text-align: center;
  overflow: hidden;
  padding-bottom: 40px;
}

.spielmodi__title {
  font-family: var(--font-primary);
  font-size: 2.5rem;
  color: var(--navbar-accent);
  margin-bottom: 2rem;
}
.spielmodi__subtitle {
  font-family: var(--font-secondary);
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 2rem;
}

.spielmodi__cards {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  perspective: 1500px;
}

.spielmodi__card {
  width: 400px;
  height: 600px;
  position: relative;
  border: 5px solid var(--navbar-accent);
  border-radius: 20px;
}

.spielmodi__inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s ease;
}

.spielmodi__front,
.spielmodi__back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  justify-content: center;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.spielmodi__front {
  background-color: var(--navbar-bg);
  justify-content: center;
}

.spielmodi__back {
  display: flex;
  background-color: #1f1f1f;
  transform: rotateY(180deg);
  padding: 1.5rem 1rem;
  box-sizing: border-box;
  font-family: var(--font-secondary);
  font-size: 0.95rem;
  line-height: 1.4;
  color: #fff;
  flex-direction: column;
  justify-content: flex-start; /* von oben starten */
  align-items: center;
}
.spielmodi__icon {
  width: 350px;
  height: 350px;
}

.spielmodi__flip-btn {
  position: absolute;
  bottom: 50px;
  font-family: var(--font-secondary);
  font-size: 1rem;
  background-color: var(--navbar-accent);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 0.6rem 1.2rem;
  cursor: pointer;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.spielmodi__flip-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 8px var(--navbar-accent);
}

.spielmodi__card.is-flipped .spielmodi__inner {
  transform: rotateY(180deg);
}

/* Rückseiten-Titel */
.spielmodi__back-title {
  font-family: var(--font-primary);
  font-size: 1.75rem;
  color: var(--navbar-accent);
  margin: 1rem 0 0.5rem;
  text-align: center;
}

/* Rückseiten-Textabsätze */
.spielmodi__back-text {
  font-family: var(--font-secondary);
  font-size: 1rem;
  line-height: 1.5;
  text-align: left; /* Absätze linksbündig */
  max-width: 90%;
  margin: 0.75rem 0; /* gleichen Abstand oben/unten */
}

/* Hervorhebung wichtiger Begriffe */
.spielmodi__back-text strong {
  color: var(--navbar-accent);
  font-weight: bold;
}

/* Desktop: alle drei Karten nebeneinander */
@media (min-width: 769px) {
  .spielmodi__cards {
    flex-wrap: nowrap;
  }
  .spielmodi__nav {
    display: none;
  }
}

@media (max-width: 768px) {
  /* Cards-Container als Spalte, damit alles untereinander sitzt */
  .spielmodi__cards {
    display: flex; /* Flex bleibt aktiv */
    align-items: center; /* Karte zentriert */
    overflow: hidden;
    width: 100%;
  }

  /* Verstecken aller nicht-aktiven Karten */
  .spielmodi__card {
    display: none;
  }
  .spielmodi__card.active {
    display: block;
    width: 100%;
    max-width: 400px;
    height: 600px;
    margin: 0;
  }

  /* Nav unter den Karten, komplett neu ausrichten */
  .spielmodi__nav {
    clear: both; /* sicherstellen, dass nichts daneben sitzt */
    display: flex;
    justify-content: center; /* Pfeile nebeneinander zentriert */
    gap: 1rem;
    margin: 1.5rem 0 0; /* Oben Abstand, unten 0 */
    width: 100%;
  }

  .spielmodi__nav-arrow {
    background-color: var(--navbar-accent);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition:
      transform 0.3s ease,
      box-shadow 0.3s ease;
  }
  .spielmodi__nav-arrow:hover {
    transform: scale(1.1);
    box-shadow: 0 0 8px var(--navbar-accent);
  }
}
