*, *::before, *::after {
  box-sizing: border-box;
  }

body {
  font-family: 'Inter', sans-serif;
  background: #eeeeee;
  padding: 20px;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}


  .vokabelkarte {
    background: #ffffff;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid #ddd;
    width: 100%;
    box-sizing: border-box;
  }

  .zeile {
    font-size: 1.1em;
    margin: 6px 0;
    display: flex;
    align-items: center;
    line-height: 1.4;
  }

  .flagge-de {
    width: 18px;
    height: 14px;
    background: linear-gradient(to bottom, black 33%, #DD0000 33% 66%, #FFCC00 66%);
    margin-right: 8px;
    border-radius: 2px;
  }

  .flagge-es {
  width: 18px;
  height: 14px;
  background: linear-gradient(
    to right,
    #008C45 33%,
    #ffffff 33% 66%,
    #CD212A 66%
  );
  margin-right: 8px;
  border-radius: 2px;
}

.flagge-pt {
  width: 18px;
  height: 14px;
  background: linear-gradient(
    to right,
    #006600 40%,   /* grün links */
    #FF0000 40%    /* rot rechts */
  );
}

.flagge-fr {
  width: 18px;
  height: 14px;
  background: linear-gradient(
    to right,
    #0055A4 33.33%,   /* blau links */
    #FFFFFF 33.33% 66.66%,   /* weiß Mitte */
    #EF4135 66.66%   /* rot rechts */
  );
}


  .zeile strong {
    margin-left: 4px;
  }

  details {
    margin-top: 8px;
  }

  summary {
    list-style: none;
    display: flex;
    justify-content: flex-end;
    cursor: pointer;
    padding-top: 8px;
  }

  summary::after {
    content: '\25BC';
    font-size: 0.8em;
    margin-left: 6px;
    transition: transform 0.2s ease;
  }

  summary:hover::after {
    color: #666;
  }

details[open] {
  background-color: #e6e4e4; /* hellgrau */
  border-radius: 12px;
  padding: 8px;
}


  p {
    margin: 6px 0 0;
    font-size: 0.95em;
    color: #555;
    font-style: italic;
  }

  #back-arrow {
  position: fixed;       /* <-- bleibt sichtbar beim Scrollen */
  top: 20px;
  left: 20px;
  font-size: 2rem;       /* <-- größer */
  color: #b56a6a;
  cursor: pointer;
  z-index: 1000;         /* <-- liegt über anderem Inhalt */
  border-radius: 8px;
  padding: 8px 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  transition: background 0.2s ease, transform 0.2s ease;
}

#back-arrow:hover {
  transform: scale(1.1);
}

.buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 20px;
}

.buttons a:not(.shuffle-button) {
  flex: 1;
  text-decoration: none;
  padding: 12px 20px;
  margin-top: 10px;
  width: 300px;
  max-width: 90%;
  border-radius: 15px;
  color: #292929;
  background-color: transparent;
  font-size: 1em;
  text-align: center;
  border: 1px solid #ffb2b2;
  transition: background-color 0.3s ease, transform 0.3s ease;
  align-items: center;
}

.buttons a:not(.shuffle-button):hover {
  background-color: #ffd8d8c0;
  transform: translateY(-3px);
}


.buttons .shuffle-button {
  flex: 1;
  text-decoration: none;
  padding: 12px 20px;
  margin-top: 10px;
  width: 300px;
  max-width: 90%;
  border-radius: 15px;
  color: #1d3a1d;
  background-color: transparent;
  font-size: 1em;
  text-align: center;
  border: 1px solid #a1d8a1;
  transition: background-color 0.3s ease, transform 0.3s ease;
  display: inline-block;
}

.buttons .shuffle-button:hover {
  background-color: #d8f5d8;
  transform: translateY(-3px);
}

.spacer {
  height: 24px; /* kannst du bei Bedarf anpassen */
}


#cookie-banner {
  position: fixed;
  top: 50%; /* Zentriert vertikal */
  left: 50%; /* Zentriert horizontal */
  transform: translate(-50%, -50%);
  width: 75%;
  max-width: 500px;
  min-width: 250px;
  background-color: #f1f1f1; /* Dezente graue Hintergrundfarbe */
  color: #333333; /* Dunkelgraue Textfarbe */
  border: 1px solid #dcdcdc; /* Heller Grauton für den Rand */
  border-radius: 15px;
  padding: 20px;
  text-align: center;
  font-size: 1em;
  font-weight: normal; /* Weniger auffälliger Text */
  z-index: 1001;
  display: none; /* Banner wird erst durch JavaScript eingeblendet */
}

#cookie-banner p {
  margin: 0;
  padding-bottom: 10px;
}

#cookie-banner a {
  color: #cecece;
  text-decoration: underline;
}

.cookie-buttons {
  display: inline-flex;
  justify-content: center;
  gap: 10px;
}
#cookie-banner button {
  background-color: #cecece; /* Dezentes Grau für Standard-Buttons */
  color: #ffffff; /* Weißer Text */
  border: none;
  padding: 8px 16px;
  margin: 5px;
  cursor: pointer;
  border-radius: 5px; /* Korrektur: Hinzufügen des 'border' Präfix */
  font-size: 0.9em;
}

#cookie-banner button:hover {
  background-color: #bdbdbd; /* Etwas dunkleres Grau bei Hover */
}

#cookie-banner button#accept-cookies {
  background-color: #4caf50; /* Grüne Farbe für den Akzeptieren-Button */
}

#cookie-banner button#accept-cookies:hover {
  background-color: #45a049; /* Dunkleres Grün bei Hover */
}

#cookie-banner button#decline-cookies {
  background-color: #cecece; /* Dezentes Grau für den Ablehnen-Button */
}

#cookie-banner button#decline-cookies:hover {
  background-color: #bdbdbd; /* Etwas dunkleres Grau bei Hover */
}

  /* 📱 Smartphone-Optimierung */
  @media (max-width: 480px) {
    body {
      padding: 12px;
    }

    .zeile {
      font-size: 1.2em;
    }

    p {
      font-size: 1em;
    }

    .flagge-de,
    .flagge-es {
      width: 16px;
      height: 12px;
    }
  }

  /* 📱 iPad / Tablets */
  @media (min-width: 481px) and (max-width: 1024px) {
    body {
      padding: 18px;
    }

    .zeile {
      font-size: 1.15em;
    }

    p {
      font-size: 0.98em;
    }
  }

@media (prefers-color-scheme: dark) {
  body {
    background: #1e1e2f; /* Dunkelblau/Dunkelgrau-Mix */
    color: #e0e0e0;
  }

  .vokabelkarte {
    background: #2a2a3d;
    border: 1px solid #3a3a4d;
  }

  .zeile {
    color: #f5f5f5;
  }

  .flagge-de,
  .flagge-es {
    box-shadow: 0 0 2px rgba(255, 255, 255, 0.2);
  }

  details[open] {
    background-color: #33334a; /* Abgesetzter Dunkelton */
    border-color: #4a4a66;
  }

  p {
    color: #bbbbbb;
  }

  #back-arrow {
    color: #b3c7ff;
    background: #2a2a3d;
  }

  #back-arrow:hover {
    background: #3a3a4d;
  }

  .buttons a:not(.shuffle-button) {
    color: #e0e0e0;
    border-color: #6686ff;
  }

  .buttons a:not(.shuffle-button):hover {
    background-color: rgba(102, 134, 255, 0.15);
  }

  .buttons .shuffle-button {
    color: #c3f0c3;
    border-color: #5aa15a;
  }

  .buttons .shuffle-button:hover {
    background-color: rgba(90, 161, 90, 0.15);
  }

  #cookie-banner {
    background-color: #2e2e44;
    color: #dddddd;
    border-color: #444466;
  }

  #cookie-banner a {
    color: #99bbff;
  }

  #cookie-banner button {
    background-color: #444466;
  }

  #cookie-banner button:hover {
    background-color: #555577;
  }

  #cookie-banner button#accept-cookies {
    background-color: #3fa93f;
  }

  #cookie-banner button#accept-cookies:hover {
    background-color: #2f892f;
  }

  #cookie-banner button#decline-cookies {
    background-color: #555577;
  }

  #cookie-banner button#decline-cookies:hover {
    background-color: #666688;
  }
}
