* {
  box-sizing: border-box;
}

html, body {
  overflow-x: hidden;
}

body {
  font-family: 'Inter', 'Segoe UI', sans-serif;
  text-align: center;
  margin: 0;
  padding-left: 10px;
  padding-right: 10px;
  padding-bottom: 160px;
padding-top: 15px;
transition: background 0.5s;

}

h1 { 
  margin: 0;
  transition: color 0.5s;
}

#gameTitle {
  /* 🔥 War vorher die große blaue "Bubble" mit Haupttitel-Charakter -
     das übernimmt jetzt das neue VocabBoss-Logo (#logo). Diese
     Überschrift bleibt als kleinere Unterzeile bestehen, da sie
     weiterhin per JS live beschrieben wird (siehe game.js/ui.js, z.B.
     bei eigenen Vokabeln) und daher nicht entfernt werden kann. */
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--text-muted-on-header, #6b6b6b);
  margin-top: 4px;
  margin-bottom: 0;

  background: none;
  padding: 0;
  border-radius: 0;
  display: inline-block;
  box-shadow: none;

  animation: none;
}

.night #gameTitle {
  color: #b7c3d6;
}

#gameTitle span {
  display: inline-block;
}

#themeSelector { margin:10px; padding:5px; font-size:16px;}
#status {
  display:flex;
  justify-content:center;
  gap:20px;
  margin:20px;
  align-items: center;
  transition: background 0.5s;
  flex-wrap:wrap;
}

/* --- Boxen zentriert --- */
.box {
display: flex;
justify-content: center;
align-items: center;
text-align: center;
padding:10px 20px;
border-radius:12px;
font-weight:bold;
font-size:18px;
box-shadow:0 4px 8px rgba(0,0,0,0.2);
transition:all 0.5s;
  height: 60px;           /* 🔥 NEU: feste Höhe */
  min-width: 140px;       /* 🔥 optional: gleiche Breite */
  line-height: 1;              /* 🔥 WICHTIG */
}

#themeToggle {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  padding: 8px 12px;
  border-radius: 12px;
  backdrop-filter: blur(10px);
  background: rgba(255,255,255,0.15);

  z-index: 9999;
}
#themeToggle:hover {
  transform: scale(1.05);
}

.night #themeToggle {
  background: rgba(30,30,50,0.6);
  box-shadow: 0 0 15px rgba(0,0,0,0.5);
}

/* Switch */
.switch {
  position: relative;
  width: 60px;
  height: 30px;
}

.switch input {
  display: none;
}

.tile-number {
  position: absolute;
  bottom: 8px;
  right: 10px;
  font-size: 14px;
  opacity: 0.7;
  font-weight: bold;
}

.slider {
  position: absolute;
  cursor: pointer;
  background: linear-gradient(135deg, #ffd54f, #ff9800);
  border-radius: 30px;
  width: 100%;
  height: 100%;
  transition: 0.4s;
  box-shadow: 0 0 10px rgba(255,152,0,0.6);
}
.night .slider {
 box-shadow: none;
  background: linear-gradient(135deg, #3f51b5, #1a237e);
}

.slider::before {
  content: "";
  position: absolute;
  height: 24px;
  width: 24px;
  left: 3px;
  top: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.4s;
}

/* aktiv = Nacht */
.switch input:checked + .slider {
  background: linear-gradient(135deg, #3f51b5, #1a237e);
  box-shadow: 0 0 12px rgba(63,81,181,0.8);
}

.switch input:checked + .slider::before {
  transform: translateX(30px);
}

#wort {
  font-size:32px;
  margin:10px;
  font-weight:bold;
  text-align:center;
min-height: 150px;

  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
}


/* --- Antwortbuttons 2x2, größere Größe, zentriert --- */
#antworten {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2 Spalten */
  gap: 15px;
  max-width: 600px;
  margin: 20px auto;
}

#antworten.article-mode {
  grid-template-columns: repeat(3, 1fr);
}

#checkBtn {
  margin-left: 10px;
  padding: 12px 18px;
  font-size: 18px;
  font-weight: bold;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #4caf50, #2e7d32);
  color: white;
  cursor: pointer;
  box-shadow: 0 6px 15px rgba(76,175,80,0.5);
  transition: all 0.3s ease;
}

/* Hover */
#checkBtn:hover {
  transform: scale(1.08);
  box-shadow: 0 10px 25px rgba(76,175,80,0.8);
}

/* Klick */
#checkBtn:active {
  transform: scale(0.95);
}

#inputAntwort {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}

/* 🎤 SPRECHMODUS */
#speakAntwort {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}

#speakBtn {
  padding: 16px 28px;
  font-size: 20px;
  font-weight: bold;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  color: white;
  background: linear-gradient(135deg, #e53935, #b71c1c);
  box-shadow: 0 6px 15px rgba(229,57,53,0.5);
  transition: all 0.3s ease;
}

#speakBtn:hover {
  transform: scale(1.05);
}

#speakBtn:active {
  transform: scale(0.95);
}

/* Während der Browser zuhört: pulsierender roter Glow als Feedback,
   dass die Aufnahme läuft. */
#speakBtn.listening {
  animation: speakListeningPulse 1s ease-in-out infinite;
}

@keyframes speakListeningPulse {
  0%   { box-shadow: 0 0 0 rgba(229,57,53,0.6); }
  50%  { box-shadow: 0 0 25px rgba(229,57,53,0.9); }
  100% { box-shadow: 0 0 0 rgba(229,57,53,0.6); }
}

#speakStatus {
  min-height: 22px;
  font-size: 16px;
  font-weight: bold;
  opacity: 0.85;
}

#speakFallbackBtn {
  background: none;
  border: none;
  color: inherit;
  opacity: 0.65;
  font-size: 14px;
  cursor: pointer;
  text-decoration: underline;
  padding: 4px;
}

#speakFallbackBtn:hover {
  opacity: 1;
}
#textAntwort::placeholder {
  color: #aaa;
  font-style: italic;
}

#antworten button {
  width: 100%;
  padding: 20px;
  font-size: 22px;
  min-width: 120px;
  border-radius: 12px;
  color: white;
  border: 2px solid #000;
}

/* Nur normale Buttons blau */
#antworten button:not(.btn-der):not(.btn-die):not(.btn-das):not(.btn-special) {
  background: linear-gradient(135deg, #1a237e, #3949ab);
}

#antworten button:not(.btn-der):not(.btn-die):not(.btn-das):not(.btn-special):hover {
  background: #ff9800;
  color: black;
}

.combo-fire {
  animation: firePulse 0.4s ease;
}

.combo-hot {
  background: linear-gradient(135deg, #ff3d00, #ff0000);
  color: white;
  box-shadow: 0 0 20px #ff3d00;
}

.flash {
  animation: flashScreen 0.4s ease;
}

.shake {
  animation: shake 0.3s;
}

#antworten button:hover { transform:scale(1.05); }

#feedback {
  width:100%;
  text-align:center;

  font-size:14px;
  margin:0;
  min-height:18px;
  opacity:0.85;

  white-space:nowrap;
}

#timerBarContainer, 

#progressContainer {
  width: 100%;
  max-width: 550px;
  height: 20px;
  border-radius: 20px;
  margin: 10px auto;
  overflow: visible;
  background: #ccc;
  transition: all 0.5s;
  position: relative;
}

#timerBar, #progressBar { height:100%; width:100%; transition: width 0.1s linear;}

#progressBar {
  height: 100%;
  width: 40%;               /* dein Fortschritt */
  background-color: white;  /* 🔥 weiß */
  transition: width 0.1s linear;
}

#leben { font-size:24px; margin:10px;   display: flex;            /* ✅ NEU */
  align-items: center;      /* ✅ NEU */
  justify-content: center;  /* ✅ NEU */
  height: 60px;             /* ✅ NEU */ }

/* Top 3 Farben */
.gold {
  color: #FFD700;
  font-weight: bold;
}

.silver {
  color: #C0C0C0;
  font-weight: bold;
}

.bronze {
  color: #cd7f32;
  font-weight: bold;
}

/* Dein eigener Score */
.me {
  background: rgba(255,255,255,0.2);
  border-radius: 6px;
  padding: 2px 6px;
}

/* --- NEU: Layout nebeneinander --- */
#gameWrapper {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 0px;
  width: 100%;
}

#gameArea {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 20px;
  width: 100%;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  background: #e0f7fa;
  border-radius: 20px;
  padding: 20px 12px;
  box-sizing: border-box;
}

.night #gameArea {
  background: #1a1a2e;
}

/* ============================================================
   Neue Grid-Struktur (ersetzt die vorherige position:fixed-
   Positionierung von #startHighscores/#startItemBook, die auf
   mittleren Bildschirmbreiten mit dem Hauptinhalt kollidierte).
   Drei Spalten auf breiten Bildschirmen (Lexikon | Hauptinhalt |
   Highscore), bricht auf schmaleren Bildschirmen automatisch auf
   eine Spalte um (siehe responsive.css). ============================================================ */
.page-wrapper {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 clamp(10px, 3vw, 30px);
  box-sizing: border-box;
}

.page-header {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  padding: 28px 20px 8px 20px;
}

.page-header-row {
  /* 🔥 War Flex-Row mit absolut zentriertem <h1> daneben (für die alte,
     große blaue Titel-Bubble neben einem kleinen Eck-Logo gedacht).
     Jetzt trägt das Logo die Marke, #gameTitle ist nur noch eine
     kleine Unterzeile darunter - deshalb einfache zentrierte Spalte. */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 100%;
  min-height: 0;
}

.page-header-row h1 {
  position: static;
  transform: none;
  margin: 0;
  white-space: nowrap;
}

.page-grid {
  display: grid;
  /* 🔙 Wieder 3 Spalten (Mehr-Icons links, Hauptbereich, Highscore/
     Badges rechts) - zurückgesetzt wie vor dem Redesign, siehe Chat-
     Entscheidung "die 5 Icons sollen auf die linke Seite". */
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr) minmax(220px, 280px);
  align-items: stretch;

  /* Eine gemeinsame, große weiße Karte statt drei getrennter Boxen -
     Bereiche werden über Trennlinien (siehe .page-col-left/-right)
     statt eigener Schatten/Hintergründe voneinander abgesetzt. */
  background: #ffffff;
  border-radius: 28px;
  box-shadow:
    0 8px 0 #e0e0e0,
    0 20px 45px rgba(0,0,0,0.15);
  border: 2px solid #f1f1f1;
  overflow: hidden;
}

.page-col {
  min-width: 0; /* verhindert, dass Grid-Spalten Inhalt überlaufen lassen */
  padding: 24px 18px;
}

.page-col-left {
  border-right: 1px solid #eee;
  background: #fafbfc;
}

.page-col-right {
  border-left: 1px solid #eee;
  background: #fafbfc;
}

.page-col-full {
  grid-column: 1 / -1;
  width: 100%;
  padding: 0 18px 18px 18px;
  box-sizing: border-box;
  background: #ffffff;
}

.night .page-col-full {
  background: #1e2430;
}

.page-col-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 32px 28px;
}

/* Phase-5: #startHighscores ist das EINE gemeinsame Highscore-Element für
   Startbildschirm UND Spielansicht (kein separates #highscoresContainer
   mehr). Jetzt eine normale Grid-Spalte statt fixed - kein Überlappen
   mehr, "position:sticky" auf .highscoreBox sorgt weiterhin dafür, dass
   sie beim Scrollen im Blick bleibt. */
#startHighscores {
  width: 100%;
}

#startItemBook {
  width: 100%;
  max-width: 100%;
}

#inventoryContainer {
  position: relative;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.highscoreBox {
  position: sticky;
  top: 20px;

  animation: slideInRight 0.6s ease;

  text-align: left;

  width: 100%;
  max-width: 100%;

  padding: 16px;

  border-radius: 16px;

  background: #ffffff;

  border: 1px solid #e8e8e8;

  box-shadow: 0 3px 10px rgba(0,0,0,0.06);

  margin-top: 0;
  box-sizing: border-box;
}

.night .highscoreBox {
  background: rgba(50,50,100,0.25);
}

/* Achievements-Toggle-Button (neu): Item-Lexikon ist standardmäßig
   eingeklappt, Zustand wird in localStorage gemerkt (siehe game.js). */
#achievementsToggleBtn {
  width: 100%;
  margin-bottom: 10px;
}

/* --- ZENTRIERUNG DES SPIELS --- */
#mainCenter {
  max-width: 900px;     /* 👉 schöne Spielbreite */
  margin: 0 auto;       /* 👉 horizontal zentriert */
  text-align: center;
}

/* --- Artikel-Farben --- */
.btn-der {
  background: #448aff;   /* blau */
  color: white;
}

.btn-die {
  background: #f44336;   /* rot */
  color: white;
}

.btn-das {
  background: #ffeb3b;
  color: black !important;
}

.btn-special {
  background: #9e9e9e;   /* grau */
  color: white;
}

#footer {
  position: relative;
  bottom: -140px;
  left: 0;
  width: 100%;
  text-align: center;
  font-size: 14px;
  color: #888; /* dunkler */
  opacity: 0.8;
}

/* 🔥 ALLE Link-Zustände gleich */
#footer a,
#footer a:visited,
#footer a:hover,
#footer a:active {
  color: inherit;           /* übernimmt Farbe vom Footer */
  text-decoration: none;
}

/* optional Hover-Effekt */
#footer a:hover {
  text-decoration: underline;
}

/* 👉 JETZT AUSSERHALB */
.box span {
  margin-left: 8px;
}

.box {
  gap: 8px;
}

.start-box h2 {
  font-size: 18px;     /* 🔥 kleiner */
  font-weight: 600;
  margin: 6px 0 4px 0; /* 🔥 weniger Abstand */
  opacity: 0.8;        /* ✨ dezenter */
}

#startScreen input,
#startScreen select {
  width: 100%;
  max-width: 400px;
  box-sizing: border-box;
}

#startScreen input,
#startScreen select {
  font-size: 20px;
  padding: 10px 15px;
  border-radius: 10px;
  margin-top: 8px;
}

#startScreen button:not(.swap-btn):not(.ui-lang-btn):not(#startCustomBtn):not(#excelBtn) {
  margin-top: 5px;
  font-size: 24px;
  padding: 15px 30px;
  border-radius: 12px;
  cursor: pointer;
  border: none;
  transition: 0.3s;
}

#startScreen {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#textAntwort {
  width: 320px;
  max-width: 80%;  padding: 12px 16px;
  font-size: 18px;
  border-radius: 12px;
  border: 2px solid #ccc;
  outline: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Fokus-Effekt */
#textAntwort:focus {
  border-color: #4caf50;
  box-shadow: 0 0 12px rgba(76,175,80,0.5);
  transform: scale(1.03);
}

/* --- Highscore einzelne Boxen --- */
.highscore-item {
  padding: 8px 10px;
  margin: 8px 0;
  border-radius: 12px;
  text-align: center;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(6px);
  transition: 0.3s;
  border: 2px solid black;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.highscore-item:hover {
  transform: scale(1.05);
}

.highscore-item.gold {
  background: linear-gradient(135deg, #f5c542, #e0a800, #c99700);
  color: #000;
  box-shadow:
    0 0 8px rgba(255,200,0,0.5),
    0 0 15px rgba(255,200,0,0.25),
    inset 0 2px 6px rgba(255,255,255,0.5);
  border: 2px solid #e6c200;
  transform: scale(1.08);
}

.highscore-item.silver {
  background: linear-gradient(135deg, #e0e0e0, #bdbdbd, #9e9e9e);
  color: #000;
  box-shadow:
    0 0 12px rgba(200,200,200,0.8),
    0 0 25px rgba(200,200,200,0.4),
    inset 0 2px 6px rgba(255,255,255,0.7);
  border: 2px solid #ffffff;
  transform: scale(1.05);
}

.highscore-item.bronze {
  background: linear-gradient(135deg, #d19a66, #c27b48, #a65e2e);
  color: #fff;
filter: saturate(1.2);
  box-shadow:
    0 0 12px rgba(210,140,80,0.8),
    0 0 25px rgba(210,140,80,0.4),
    inset 0 2px 6px rgba(255,255,255,0.5);
  border: 2px solid #e0b08a;
  transform: scale(1.03);
}

.highscore-item {
  text-align: center;   /* 👈 zentriert Text */
}
.highscore-item strong {
  display: block;
  margin-top: 5px;
  font-size: 18px;
}

.highscore-item.new-score {
  border: 3px solid #00ff88;
  box-shadow: 0 0 20px #00ff88;
  background: linear-gradient(135deg, #00ff88, #00c853);
  color: black;
}

.highscore-item.me {
  border: 2px solid #00e5ff;
  box-shadow: 0 0 15px #00e5ff;
  font-weight: bold;     /* 🔥 fett */
  font-style: italic;    /* 🔥 kursiv */
}

/* --- Highscore Zeile korrekt ausrichten --- */
.highscore-row {
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: center;
}

.highscore-name {
  text-align: left;
}
.highscore-item {
  text-align: left;
}
.highscore-points {
  text-align: center;
  width: 100%;
  font-weight: bold;
  margin-top: 6px;
}
.highscore-name {
  white-space: nowrap;
}
#pauseBtn {
  position: relative;
  z-index: 9500; /* Bugfix: war 100 (unter dem Overlay mit 9000, Kommentar sagte fälschlich "höher"), jetzt korrekt zwischen Overlay (9000) und echten Popups (10000) */
  height: 60px;
  min-width: 60px;
  font-size: 20px;
  padding: 8px 14px;
  border-radius: 12px;
  cursor: pointer;
  background: #2196f3;
  color: white;
  border: none;
  transition: 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

#overlay {
  pointer-events: auto;
  display: none;
}


#startBtn {
  background: linear-gradient(135deg, #4caf50, #2e7d32);
  color: white;
  font-size: 26px;
  font-weight: bold;
  padding: 16px 20px;
  box-shadow: 0 6px 20px rgba(76,175,80,0.6);
  transform: scale(1.05);
  transition: all 0.3s;
  animation: startPulse 2s infinite;
}

#startBtn:hover {
  transform: scale(1.12);
  box-shadow: 0 10px 30px rgba(76,175,80,0.9);
}

.start-box h2 {
  display: none;
}
/* 🔒 Lehrer-Modus komplett ausblenden */
/* 🔒 Lehrer-Modus gezielt ausblenden */

.locked {
  opacity: 0.5;
  filter: grayscale(80%);
  pointer-events: none;
}

.locked-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0,0,0,0.5);
  color: white;
  font-size: 20px;
  font-weight: bold;
  border-radius: 16px;
}

#startDefaultBtn {
  background: #2196f3; /* 🔵 Blau */
  color: white;
  font-size: 22px;
  font-weight: bold;
  padding: 16px;
  border-radius: 16px;
  border: none;
  cursor: pointer;

  /* 💎 Duolingo-Style Schatten */
  box-shadow:
    0 6px 0 #1565c0,
    0 10px 25px rgba(0,0,0,0.25);

  transition: all 0.2s ease;
  width: 100%;
  max-width: 320px;
  margin: 20px auto 0 auto;
  display: block;
  text-align: center;
}

#startDefaultBtn:hover {
  transform: translateY(-2px);
}

#startDefaultBtn:active {
  transform: translateY(2px);
  box-shadow:
    0 2px 0 #1565c0,
    0 5px 15px rgba(0,0,0,0.2);
}

#startDefaultBtn:hover {
  transform: translateY(-2px);
}

#startDefaultBtn:active {
  transform: translateY(2px);
  box-shadow:
    0 2px 0 #3fa800,
    0 5px 15px rgba(0,0,0,0.2);
}

.highscore-title {
  font-size: 20px;
  font-weight: 500;
  color: #fff;
  background: #1e88e5;
  padding: 8px 14px;
  border-radius: 999px;
  display: block;
  width: fit-content;
  max-width: 100%;
  white-space: nowrap;
  margin: 0 auto 10px auto;
  font-family: 'Inter', 'Segoe UI', sans-serif;
  box-sizing: border-box;
  text-align: center;
}

/* Nur bei Gruppen-Highscores aktiv (siehe fitHighscoreTitle() in
   highscores.js) - erlaubt mehrzeiligen Umbruch, falls der Titel selbst
   bei kleinster Schrift noch zu breit wäre. Volle Kapsel-Form (999px)
   sieht bei zwei Zeilen seltsam aus, daher hier ein normales, weiterhin
   abgerundetes Rechteck. */
.highscore-title-wrap {
  border-radius: 16px;
  width: 100%;
}

@keyframes glowTitle {
  0% {
    text-shadow:
      0 0 5px rgba(255,152,0,0.4),
      0 0 10px rgba(255,152,0,0.2);
  }
  50% {
    text-shadow:
      0 0 20px rgba(255,152,0,0.9),
      0 0 35px rgba(255,152,0,0.6);
  }
  100% {
    text-shadow:
      0 0 5px rgba(255,152,0,0.4),
      0 0 10px rgba(255,152,0,0.2);
  }
}

.highscore-entry {
  margin: 4px 0;         /* 👉 Abstand zwischen Einträgen */
  padding: 2px 0;
}


/* --- Popups --- */
#top10Popup {
display:none;
position:fixed;
top:40%;
left:50%;
transform:translate(-50%,-50%);
background:#ffeb3b;
color:#000;
padding:20px;
border-radius:15px;
font-size:24px;
font-weight:bold;
box-shadow:0 0 20px rgba(0,0,0,0.5);
z-index:10000;
text-align:center;
}


#timeOverPopup {
  display:none;
  position:fixed;
  top:50%;
  left:50%;
  transform:translate(-50%,-50%);
  padding:18px 24px;          /* 🔽 weniger Innenabstand */
  border-radius:16px;
  font-size:20px;             /* 🔽 kleiner */
  line-height:1.3;            /* 🔽 enger */
  max-width: 420px;           /* 🔥 begrenzt Breite */
  width: 90%;
  /* 🆕 Fix (Chat-Wunsch): bei vielen Fehlern (jeder mit eigenem
     Eingabefeld) wurde das Popup höher als der Bildschirm - ohne
     max-height/overflow wuchs es einfach über den Rand hinaus, weder
     der Schließen-Button oben noch die Buttons unten waren erreichbar.
     Jetzt scrollt der Inhalt innerhalb des Popups statt drüber
     hinauszuwachsen. */
  max-height: 85vh;
  overflow-y: auto;
  box-shadow:0 0 25px rgba(0,0,0,0.6);
  z-index:10000;
  text-align:center;
}

/* ❌ Fehler = rot */
.popup-error {
  background: #ff4444;
  color: #fff;
}

/* 🏁 Ende = gelb */
.popup-end {
  background: linear-gradient(135deg, #ffd54f, #ff9800);
  color: #000;
}
#overlay { position:fixed; top:0; left:0; transform:none; width:100%; height:100%; background:rgba(0,0,0,0.5); z-index:9000; }

.correct-answer-highlight {
color:#00ff00;
font-weight:bold;
font-size:32px;
}
.error-icon {
  width: 70px;
  height: 70px;
  background: white;
  color: red;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 40px;
  margin: 0 auto 10px auto;
  box-shadow: 0 0 15px rgba(0,0,0,0.4);
}

.highscore-subtitle {
  text-align: center;
  font-size: 16px;
  margin-bottom: 10px;
  opacity: 0.8;
}

.score-box {
  background: linear-gradient(135deg, #ffd54f, #ff9800);
  color: #000;
  height: 70px;          /* 🔥 größer */
  min-width: 140px;
  font-size: 26px;       /* 🔥 größer */
  font-weight: bold;
  box-shadow: 0 0 20px rgba(255,152,0,0.8);
  transform: scale(1.1); /* 🔥 leicht größer als Buttons */
}

.score-box #punkte {
  font-size: 32px;
  font-weight: bold;
  transition: transform 0.2s ease;

}
.start-box {
  position: relative;   /* 🔥 wichtig für absolute Positionierung */
  display: flex;
  flex-direction: column;
  gap: 0px;
  width: 100%;
  max-width: 640px;
  box-sizing: border-box;
}

.start-box label {
  display: grid;
  grid-template-columns: 180px 1fr; /* links Text, rechts Feld */
  align-items: center;
  gap: 15px;
  font-size: 18px;
  font-weight: 600;
  text-align: left;
}

.start-box input,
.start-box select {
  width: 100%;
  box-sizing: border-box;   /* 🔥 DAS IST DER FIX */
  padding: 12px 14px;
  font-size: 18px;
  border-radius: 14px;
  border: 2px solid #e0e0e0;
  background: #f9f9f9;
  transition: all 0.2s ease;
}

.start-box input:focus,
.start-box select:focus {
  border-color: #2196f3;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(33,150,243,0.2);
}

.start-box button {
  margin-top: 10px;
}

/* ============================================================
   Neue Startbildschirm-Komponenten (Redesign, siehe Chat-Verlauf):
   Menüsprache-Ecke, Schnellstart-Karte, einklappbare Optionen/
   Lehrer-Modus-Abschnitte, kompakter Highscore-Streifen, "Mehr"-
   Icon-Reihe. Farben aus dem neuen VocabBoss-Logo abgeleitet
   (Orange/Gelb #F5A623/#F5C542 als Primärfarbe, Blau #3B9CE8 als
   Sekundärfarbe). ============================================================ */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.ui-lang-corner {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  width: 100%;
  max-width: 640px;
  margin: 0 auto 8px auto;
}

/* Labels innerhalb der neuen Karten stapeln sich (Text über Feld)
   statt der festen 180px/1fr-Aufteilung, die für die alte, lange
   Formular-Liste gedacht war - kompakter in den schmaleren Karten. */
.quickstart-card label,
.collapsible-body label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  margin-bottom: 4px;
}

.quickstart-card label select,
.quickstart-card label input,
.collapsible-body label select,
.collapsible-body label input {
  /* 🔥 Zur Sicherheit explizit gesetzt (nicht nur margin-top), damit
     Zeit/Kategorie/Klasse-Auswahlfelder garantiert bündig
     untereinander/unter ihrem Label stehen, unabhängig vom Inhalt
     der jeweiligen <option>. */
  display: block;
  width: 100%;
  margin-top: 4px;
  margin-left: 0;
}

/* 🔥 Bugfix: .doubleTimeOption (Checkbox + Text) ist KEIN "Text über
   Feld"-Label wie die anderen (Zeit/Kategorie/Klasse) - die generische
   Block-Regel oben stapelte Checkbox und Text übereinander, UND
   ".start-box input" (für Text-/Select-Felder gedacht) blähte die
   Checkbox selbst mit width:100%+Padding zu einem großen leeren
   Kästchen auf. Eigene Zeilen-Regel statt der generischen Label-
   Stapelung, für ALLE Bildschirmgrößen (vorher gab es diese Regel nur
   in responsive.css für Mobile). */
.collapsible-body label.doubleTimeOption {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.collapsible-body label.doubleTimeOption input {
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  flex: none;
}

.quickstart-card {
  width: 100%;
  max-width: 640px;
  box-sizing: border-box;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 20px;
  padding: 22px;
  margin: 0 auto 14px auto;
  box-shadow: 0 6px 20px rgba(0,0,0,0.06);
  text-align: left;
}

.night .quickstart-card {
  background: rgba(40,40,70,0.4);
  border-color: rgba(255,255,255,0.08);
}

.quickstart-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9a9a9a;
  margin-bottom: 12px;
}

.start-cta {
  width: 100%;
  margin-top: 14px !important;
  font-size: 20px;
  font-weight: 800;
  padding: 16px;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  color: #4a2e00;
  background: linear-gradient(135deg, #ffd76a, #f5a623);
  box-shadow:
    0 6px 0 #c97e0f,
    0 12px 25px rgba(245,166,35,0.4);
  transition: all 0.2s ease;
}

.start-cta:hover {
  transform: scale(1.03);
}

.start-cta:active {
  transform: scale(0.97);
}

.collapsible-section {
  width: 100%;
  max-width: 640px;
  margin: 0 auto 12px auto;
  border: 1px solid #eee;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}

.night .collapsible-section {
  background: rgba(40,40,70,0.4);
  border-color: rgba(255,255,255,0.08);
}

.collapsible-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 14px 18px;
  font-size: 16px;
  font-weight: 700;
  text-align: left;
  color: inherit;
  box-shadow: none !important;
  border-radius: 0 !important;
  margin: 0 !important;
}

.collapsible-toggle:hover {
  background: rgba(0,0,0,0.03);
  transform: none !important;
}

.night .collapsible-toggle:hover {
  background: rgba(255,255,255,0.05);
}

.collapsible-chevron {
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  transition: transform 0.2s ease;
  flex: none;
}

.collapsible-toggle.open .collapsible-chevron {
  transform: rotate(180deg);
}

.collapsible-body {
  padding: 4px 18px 18px 18px;
  text-align: left;
}

.collapsible-body label {
  margin-top: 12px;
}

.collapsible-body label:first-child {
  margin-top: 0;
}

/* 📎 "Mehr"-Icon-Reihe: ersetzt die frühere vertikale Button-Liste. */
.more-row {
  display: grid;
  /* 🔙 War 4 Spalten für die breite Hauptkarte gedacht - in der
     schmalen linken Seitenspalte (siehe Chat-Entscheidung) reicht der
     Platz dafür nicht, deshalb 1 Spalte (untereinander gestapelt). */
  grid-template-columns: 1fr;
  gap: 8px;
  width: 100%;
  margin: 0 0 8px 0;
}

.more-row-secondary {
  grid-template-columns: 1fr;
}

.more-btn,
.more-btn-wide {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  min-height: 0;
  font-size: 13px;
  line-height: 1.2;
  padding: 12px 14px;
  margin-top: 0 !important;
}

.more-btn {
  font-size: 20px;
}

.more-btn span {
  font-size: 13px;
  font-weight: 600;
}

/* 🔥 Bugfix: der Battle-Button-Text steckt (anders als z.B. "Avatar")
   in einem eigenen <span> (für die Übersetzungs-Logik, siehe
   #battleOpenBtnLabel in ui.js) - dadurch griff die spezifischere
   Regel ".more-btn span" (13px) statt der 18px, die alle anderen
   Sidebar-Buttons über .popupBtn bekommen. Hier explizit wieder
   angeglichen. */
#battleOpenBtnLabel {
  font-size: 18px;
}

.more-btn-wide {
  font-size: 13px;
  flex-direction: row;
  gap: 6px;
}

#startScreen {
  margin-top: 20px;
}

#backBtn {
  /* 🔥 Bugfix: backBtn (🏠) lag unter dem Pause-Overlay (z-index 9000)
     und war während der Pause dadurch unklickbar - genau wie
     #pauseBtn das schon vorher gefixt bekommen hat (siehe Kommentar
     dort), hier dieselbe Lösung.
     🔥 Verschärft: einfaches z-index:9500 reichte in der Praxis nicht
     zuverlässig aus (Nutzer-Report: Button blieb während der Pause
     trotzdem unklickbar, obwohl isoliert getestet korrekt). Jetzt mit
     !important auf z-index UND explizit pointer-events:auto
     !important, falls ein Elternelement das beim Pausieren
     unerwartet vererbt. */
  position: relative;
  z-index: 9999 !important;
  pointer-events: auto !important;
  background: linear-gradient(135deg, #4caf50, #2e7d32);
  color: white;
  font-size: 26px;              /* 🔥 größer */
  font-weight: bold;
  padding: 16px 20px;           /* 🔥 größer */
  border-radius: 12px;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(76,175,80,0.6);
  transform: scale(1.05);       /* 🔥 wie Start */
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 70px;              /* 🔥 wichtig */
  height: 60px;                 /* 🔥 überschreibt .box Höhe */
}

#backBtn:hover {
  transform: scale(1.12);
  box-shadow: 0 10px 30px rgba(76,175,80,0.9);
}

#backBtn:active {
  transform: scale(0.95);
}

.popupBtnRow {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

.popupBtn {
  background: linear-gradient(135deg, #4caf50, #2e7d32);
  color: white;
  font-size: 18px;
  font-weight: bold;
  padding: 12px 18px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(76,175,80,0.6);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  margin-top: -3px;
}

.popupBtn:hover {
  transform: scale(1.08);
  box-shadow: 0 10px 30px rgba(76,175,80,0.9);
}

.popupBtn:active {
  transform: scale(0.95);
}

/* 🔄 Optional: anderer Look für "Nochmal" */
.replayBtn {
  background: linear-gradient(135deg, #2196f3, #1565c0) !important;
  color: white;

  box-shadow: 0 6px 20px rgba(33,150,243,0.6);

  border: none;
}

.replayBtn:hover {
  transform: scale(1.1);
  box-shadow: 0 10px 30px rgba(33,150,243,0.9);
}

/* Farbige Buttons */
.green { background:#4caf50; color:#fff;}
.yellow { background:#ffeb3b; color:#000;}
.red { background:#f44336; color:#fff;}
.correct-answer { color: #00ff00; font-weight:bold; }

.deutsches-wort {
  font-size: 42px;          /* deutlich größer */
  font-weight: 900;         /* extra fett */
  background: linear-gradient(135deg, #4caf50, #2e7d32);
  color: white;
  padding: 16px 24px;
  border-radius: 16px;
  display: inline-block;
  margin-top: 20px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.3);
  letter-spacing: 1px;
  animation: popAnswer 0.3s ease;
}

#fortschrittText {
  transition: all 0.3s ease;
}

/* Farben je nach Fortschritt */
.progress-low {
  background: #4caf50;   /* grün */
  color: white;
}

.progress-mid {
  background: #ff9800;   /* orange */
  color: white;
}

.progress-high {
  background: #f44336;   /* rot */
  color: white;
}

.pop {
  animation: pop 0.3s ease;
}

#logo {
  width: clamp(160px, 26vw, 340px);
  max-width: 60vw;
  height: auto;

  /* 🔥 War vorher subtiles Ecken-Logo mit Hover-Effekt (als Link zu
     mistudia.com) - trägt jetzt die gesamte Marke, deshalb größer und
     nicht mehr transparent/interaktiv gestylt. */
  opacity: 1;
}

.night #logo {
filter: brightness(1.2);
} 

#footerLogo {
  width: 100px;
  max-width: 30vw;
  height: auto;
  margin-bottom: 6px;
}

#jubelElefant {
  display: none;
  position: fixed;
  left: 900px;
  top: 180px;
  width: 200px;
  z-index: 10000;
}

@keyframes blink {
  0%, 90%, 100% { transform: scaleY(1); }
  95% { transform: scaleY(0.1); }
}

#inputWrapper {
  position: relative;

  flex: 1;
  width: 100%;

  max-width: none;   /* 🔥 wichtig */
  margin: 0;
}

#highlightLayer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 60%;
  white-space: pre-wrap;
  word-wrap: break-word;
  color: transparent;
  pointer-events: none;
  font-size: 16px;
  padding: 10px;
}

#highlightLayer {
  border-radius: 16px;
  padding: 14px;
}

#highlightLayer .error-line {
  background: rgba(255, 0, 0, 0.3);
  display: block;
}

#customVocabInput {
  position: relative;
  width: 100%;
  height: 220px;
  font-size: 16px;
  padding: 14px;
  border-radius: 16px;
  border: 2px solid #ffca28;
  background: linear-gradient(135deg, #fff9c4, #ffe082);
  color: #333;
  box-shadow:
    inset 0 2px 6px rgba(0,0,0,0.1),
    0 8px 20px rgba(0,0,0,0.15);
  z-index: 2;
  transition: all 0.25s ease;
}

#inputLang1:focus,
#inputLang2:focus {
  border-color: #ff9800;
  box-shadow:
    0 0 0 3px rgba(255,152,0,0.3),
    0 10px 25px rgba(255,152,0,0.4);
  transform: translateY(-2px);
}

.button-group {
  display: flex;
  justify-content: center;
  align-items: stretch;
  flex-direction: row;
  flex-wrap: wrap;

  gap: 18px;
  margin-top: 18px;

  width: 100%;
}

.popupBtn:hover {
  transform: scale(1.1);
  box-shadow: 0 10px 30px rgba(76,175,80,0.9);
}

.popupBtn:active {
  transform: scale(0.95);
}

.button-group button,
.button-group label {

  width: 100%;
  max-width: 280px;
  min-height: 90px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  /* 🔥 Bugfix: bei gesperrtem Custom-Vokabeln-Button ("... 🔒" am Ende,
     siehe translations.js startCustomLocked) war der Text länger als
     beim Excel-Button und brach auf 3 statt 2 Zeilen um, wodurch die
     Buttons trotz align-items:stretch unterschiedlich hoch aussahen
     (min-height wurde vom längeren Text überschritten). Etwas
     kleinere Schrift + engerer Zeilenabstand, damit beide Texte
     zuverlässig in 2 Zeilen passen. */
  font-size: 18px;
  line-height: 1.25;
  padding: 12px;
  border-radius: 14px;
  box-sizing: border-box;
}

#ankiButtons {
  display: flex;
  justify-content: center;
  gap: 15px;
}

#ankiButtons button {
  padding: 18px;
  font-size: 32px;
  border-radius: 16px;
  min-width: 90px;
  min-height: 70px;
  border: 3px solid #000;
  cursor: pointer;
  transition: 0.3s;

  box-shadow: none;
}

#ankiButtons button:hover {
  transform: scale(1.15);
  box-shadow: none;
}

#ankiButtons button:nth-child(1) { 
  background:#f44336; /* 💀 rot */
  color:white; 
}

#ankiButtons button:nth-child(2) { 
  background:#4caf50; /* 🔥 grün */
  color:white; 
}

.input-row {
  display: flex;
  justify-content: center;
  align-items: flex-start;

  gap: 20px;

  width: 100%;
  max-width: 900px;

  margin: 0 auto;
}

.button-group button:hover {
  box-shadow: 0 0 25px rgba(76,175,80,0.9);
  transform: scale(1.1) rotate(-1deg);
  transition: all 0.3s ease;
}

#hintContainer {
  display: none;
  justify-content: center;
  margin-top: -25px;
margin-bottom: 20px;

}

#hintBtn {
  padding: 18px 24px;
  font-size: 22px;
  border-radius: 16px;
  cursor: pointer;
  background: linear-gradient(135deg, #ffd54f, #ff9800);
  color: #000;

  box-shadow: none;

  transition: all 0.3s;
  min-width: 220px;
  margin-top: 10px;
}

#hintBtn:hover {
  transform: scale(1.1);
  box-shadow: none;
}

.fehler-trenner {
  height: 2px;
  background: linear-gradient(to right, transparent, #444, transparent);
  margin: 8px 0;
}

.button-group button {
  margin-top: 0;
  background: #4caf50;
  color: white;
  transition: all 0.3s ease; /* 🔥 DAS FEHLT */
}

#saveCustomBtn {
  background: #2196f3;   /* 🔵 blau */
  color: white;
}

#useDefaultBtn {
  background: #ffeb3b;   /* 🟡 gelb */
  color: black;
}
/* 🌙 INPUT im Nachtmodus */
.night #textAntwort,


.night #inputLang1,
.night #inputLang2 {
  background: linear-gradient(135deg, #2a2a40, #1e1e2f);
  color: #fff;
  border: 2px solid #3f51b5;

  box-shadow:
    inset 0 2px 6px rgba(0,0,0,0.5),
    0 8px 20px rgba(0,0,0,0.4);
}

/* Placeholder auch hell */
.night #textAntwort::placeholder,
.night #customVocabInput::placeholder {
  color: #bbbbbb;
}

/* Fokus im Dark Mode */
.night #textAntwort:focus,
.night #customVocabInput:focus {
  border-color: #448aff;
  box-shadow: 0 0 12px rgba(68,138,255,0.7);
}

/* Gemeinsame große Start-Buttons */
#startCustomBtn,
#excelBtn {
  width: 280px;
  min-height: 90px;

  display: flex;
  justify-content: center;
  align-items: center;

  text-align: center;

  /* 🔥 Bugfix: bei gesperrtem Zustand ("... 🔒" am Ende, siehe
     startCustomLocked/excel in translations.js) war der Custom-
     Vokabeln-Text länger und brach auf 3 statt 2 Zeilen um - dadurch
     wurden die Buttons trotz gleichem min-height unterschiedlich hoch.
     Etwas kleinere Schrift, damit beide Texte zuverlässig in 2 Zeilen
     passen und die Buttons wieder gleich hoch sind. */
  font-size: 16px;
  line-height: 1.25;
  font-weight: bold;
  font-family: 'Inter', 'Segoe UI', sans-serif;

  border-radius: 16px;

  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

/* Custom-Vokabeln */
#startCustomBtn {
  background: linear-gradient(135deg, #fff176, #ffd54f);
  color: #000;

  box-shadow:
    0 6px 0 #f9a825,
    0 10px 25px rgba(255,193,7,0.4);
}

#startCustomBtn:hover {
  transform: scale(1.05);

  box-shadow:
    0 8px 0 #f9a825,
    0 14px 30px rgba(255,193,7,0.8);
}

/* Excel */
#excelBtn {
  background: linear-gradient(135deg, #4caf50, #2e7d32);
  color: white;

  box-shadow:
    0 6px 0 #1b5e20,
    0 10px 25px rgba(76,175,80,0.4);
}

#excelBtn:hover {
  transform: scale(1.05);

  box-shadow:
    0 8px 0 #1b5e20,
    0 14px 30px rgba(76,175,80,0.8);
}

#inputLang1,
#inputLang2 {
  background: linear-gradient(135deg, #fff176, #ffd54f);
  color: #000;
  border: 2px solid #ffb300;
}

#inventory {
  background: rgba(255,255,255,0.2);
  border-radius: 12px;
  padding: 10px;
  min-width: 120px;
  font-size: 16px;
}

#itemBook {
  background: rgba(255,255,255,0.2);
  border-radius: 12px;
  padding: 10px;
  min-width: 140px;
  font-size: 14px;
  margin-top: 10px;
}

.item-entry {
  padding: 6px;
  border-bottom: 1px solid #ccc;
}

.item-locked {
  opacity: 0.4;
}

#inventory, #itemBook {
  min-width: 150px;
}

.pinyin {
  font-size: 18px;
  color: #555;
  margin-top: 5px;
}

.hsk {
  font-size: 14px;
  opacity: 0.7;
}

.new-score {
  border: 3px solid #00ff88;
  box-shadow: 0 0 20px #00ff88;
  animation: glowPulse 1.2s infinite;
}

.highscore-item.new-score.me {
  font-weight: bold;
  font-style: italic;
}
#statsPanel {
  display: block;
  text-align: center;
  max-width: 1200px;
  width: 90%;
  margin: 30px auto;
  padding: 10px;              /* 🔥 weniger Padding */
  border-radius: 20px;
  background: #ffffff;        /* Bugfix: transparent ließ den türkisen Seitenhintergrund durchscheinen, wenn das Panel leer sichtbar war */
  backdrop-filter: none;      /* 🔥 Schatten weg */
}

.night #statsPanel {
  background: #1e2430;
}

#dualInput {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
}

#dualInput textarea {
  width: 100%;
  height: 160px;
}

#dualInput textarea {
  border-radius: 16px;
  padding: 14px;
  box-shadow:
    inset 0 2px 6px rgba(0,0,0,0.1),
    0 8px 20px rgba(0,0,0,0.15);
}

#statsGrid,
#boxGrid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  column-gap: 20px;  /* 👉 horizontal */
  row-gap: 24px;     /* 👉 vertikal */
padding:18px 12px;
  justify-content: center;
  align-items: stretch;
  grid-auto-rows: minmax(110px, auto);   /* 👉 Mindesthöhe, wächst bei Bedarf statt abzuschneiden */
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 25px;
  margin-top: 10px;
  width: 100%;        /* 🔥 GANZE BREITE */
  flex-basis: 100%;   /* 🔥 neue Zeile erzwingen */
}

#pauseBtn,
#backBtn {
  flex-basis: auto;
  margin: 0; /* 🔥 GANZ WICHTIG */
}

/* 🔤 Pinyin Toggle größer */
#pinyinToggle label {
  font-size: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

#togglePinyinInline,
#toggleRomajiInline,
#toggleFuriganaInline {
  transform: scale(1.6);
  cursor: pointer;
  accent-color: #ff9800;
}

#togglePinyin {
  width: 22px;
  height: 22px;
  transform: scale(1.8); /* 🔥 größer */
}

#scoreInline {
  height: 60px;
  min-width: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  padding: 0 12px;
  margin: 0 10px;  /* 🔥 zusätzlicher Abstand nur für Score */

}
#scoreInline span:first-child {
  margin-right: 6px;
}

.score-pop {
  animation: scorePop 0.3s ease;
}

.floating-score {
  position: absolute;
  font-size: 22px;
  font-weight: bold;
  color: #ff9800;
  pointer-events: none;
  z-index: 9999;

  animation: floatUp 1s ease-out forwards;
}

.item-entry {
  text-align: center;   /* 👉 alles mittig */
}

.input-error {
  box-shadow: 0 0 15px rgba(255,0,0,0.8);
}

.correct {
  background: #4caf50 !important;
  color: #fff !important;
}

.wrong {
  background: #f44336 !important;
  color: #fff !important;
}

#gameTitle::before {
  content: "🎯";
  margin-right: 10px;
}

.stats-rank {
  position: absolute;
  bottom: 8px;
  right: 10px;
  font-size: 14px;
  opacity: 0.7;
  font-weight: bold;
}

.stats-word {
  font-weight: bold;
  font-size: 18px;
  line-height: 1.2;

  word-break: break-word;
}

.stats-meta {
  font-size: 13px;
  opacity: 0.8;
  margin-top: 6px;
}

.stats-percent {
  font-size: 13px;   /* 🔥 größer */
  font-weight: bold; /* 🔥 stärker sichtbar */
  opacity: 0.9;
  margin-top: 4px;
}

.perfect {
  border: 3px solid gold;
  box-shadow: 
    0 0 10px gold,
    0 0 20px rgba(255, 215, 0, 0.6);
}

#premiumPopup {
  display: none;
  position: fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  background: rgba(0,0,0,0.7);
  z-index: 20000;

  justify-content:center;
  align-items:center;
}

#bonusRoundPopup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.75);
  z-index: 20000;

  justify-content: center;
  align-items: center;
}

.sidebar-box {
  display: block;
  width: 100%;
  margin-top: 16px;
}

.sidebar-box .box {
  width: 100%;
  box-sizing: border-box;
}

.bonus-round-card {
  position: relative;
  width: min(1400px, 98vw);
  background: #fff;
  border-radius: 20px;
  padding: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  box-sizing: border-box;
}

#closeBonusRoundBtn {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: #f44336;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  z-index: 1;
}

#bonusRoundFrame {
  width: 100%;
  height: min(950px, 94vh);
  border: none;
  border-radius: 12px;
  display: block;
}

.premium-card {
  background: linear-gradient(135deg, #ffffff, #e3f2fd);
  color:#000;
  padding:30px;
  border-radius:20px;
  max-width:400px;
  width:90%;
  text-align:center;
  box-shadow: 0 15px 40px rgba(0,0,0,0.4);
}

.subtitle {
  opacity:0.8;
  margin-bottom:20px;
}

.premium-features {
  text-align:left;
  margin:20px 0;
  font-size:18px;
}

.price {
  font-size:24px;
  font-weight:bold;
  margin:15px 0;
  color:#ff9800;
}

.premium-buttons {
  display:flex;
  flex-wrap: wrap;
  gap:10px;
  justify-content:center;
}

.premium-buttons button {
  min-height: 48px;
  flex: 1 1 140px;
}

.locked-btn {
  background: linear-gradient(135deg, #bbb, #888) !important;
  color: #fff !important;
  cursor: pointer;
  box-shadow: none !important;
  opacity: 0.8;
}

.locked-btn:hover {
  transform: none !important;
  box-shadow: none !important;
}

.locked-input {
  background: linear-gradient(135deg, #ddd, #bbb) !important;
  color: #666 !important;
  cursor: pointer !important;
  opacity: 0.75;
}

.locked-input::placeholder {
  color: #777 !important;
}

.highscore-rank {
  font-size: 14px;
  opacity: 0.7;
  font-weight: bold;
}

.highscore-name {
  font-size: 18px;
  font-weight: 600;
}

.highscore-points {
  font-size: 20px;
  font-weight: bold;
  margin-top: 6px;
  background: linear-gradient(135deg, #ffd54f, #ff9800);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.highscore-item.gold {
  box-shadow: 0 0 20px rgba(255,215,0,0.8);
}

.highscore-item.silver {
  box-shadow: 0 0 20px rgba(192,192,192,0.8);
}

.highscore-item.bronze {
  box-shadow: 0 0 20px rgba(205,127,50,0.8);
}

/* 🔥 Moderneres Login/Registrieren-Zeile: Pill-Form statt eckiger
   Browser-Default-Optik, klare Primär-/Sekundär-Unterscheidung
   zwischen "Anmelden" (gefüllt, Marken-Blau) und "Registrieren"
   (Outline). Ersetzt die vorherige Glas-/Blur-Optik, die auf dem
   ohnehin weißen Hintergrund kaum sichtbar war. */
#authBox {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 auto 8px auto;
  background: #f8f9fb;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid #e8e8ec;
  width: fit-content;
}

.night #authBox {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
}

#authBox input {
  width: 150px;
  padding: 9px 16px;
  font-size: 14px;
  border: 1px solid #e0e0e6;
  border-radius: 999px;
  background: #fff;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#authBox input:focus {
  outline: none;
  border-color: #3B9CE8;
  box-shadow: 0 0 0 3px rgba(59,156,232,0.15);
}

.night #authBox input {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
  color: #fff;
}

#authBox button {
  font-size: 14px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  margin-top: 0 !important;
}

#authBox button:hover {
  transform: translateY(-1px);
}

#authBox button:active {
  transform: translateY(0);
}

/* Registrieren: Outline/sekundär */
#registerBtn {
  background: #fff;
  color: #3B9CE8;
  border: 1.5px solid #3B9CE8 !important;
}

#registerBtn:hover {
  background: rgba(59,156,232,0.08);
}

/* Anmelden: gefüllt/primär */
#loginBtn {
  background: linear-gradient(135deg, #4aa8ee, #3B9CE8);
  color: #fff;
  box-shadow: 0 3px 10px rgba(59,156,232,0.35);
}

#loginBtn:hover {
  box-shadow: 0 5px 14px rgba(59,156,232,0.45);
}

/* Logout: dezent/neutral, kein Alarm-Rot nötig für eine reine
   Abmelde-Aktion */
#logoutBtn {
  background: #f1f2f5;
  color: #555;
}

#logoutBtn:hover {
  background: #e6e7eb;
}

.night #logoutBtn {
  background: rgba(255,255,255,0.1);
  color: #eee;
}

#userInfo {
  font-size: 14px;
  font-weight: 600;
  padding: 0 4px;
}

#excelBtn {
 display: flex;              /* 🔥 wichtig */
  justify-content: center;    /* horizontal zentriert */
  align-items: center;        /* vertikal zentriert */
  text-align: center;
}

#excelBtn {
  background: linear-gradient(135deg, #4caf50, #2e7d32);
  color: white;

  box-shadow:
    0 6px 0 #1b5e20,
    0 10px 25px rgba(76,175,80,0.4);

  cursor: pointer;
}

#excelBtn:hover {
  transform: scale(1.05);
}

.highscore-item.gold {
  animation: shine 2s infinite;
}

button {
  touch-action: manipulation;
}

.level-inline,
.learn-star{
  font-size: 18px;
  line-height: 1;

  display: inline-flex;
  align-items: center;
}

.wort-box {

  background: linear-gradient(135deg, #ff9800, #ff5722);
  color: white;

  padding: 12px 16px;

  border-radius: 15px;

  font-size: 32px;
  font-weight: bold;

  box-shadow: 0 6px 15px rgba(0,0,0,0.25);

  display: inline-flex;   /* 🔥 WICHTIG */
  align-items: center;
  justify-content: center;

  width: auto;            /* 🔥 statt fit-content */
  max-width: 95vw;

  margin: 0 auto 20px auto;

  letter-spacing: 1px;

  max-width: 95vw;
  white-space: normal;
gap: 10px;
}

/* Lernmodus: kompletter Box-Hintergrund wird blau statt orange, wenn
   die Antwort aufgedeckt ist (siehe hintBtn.onclick in game.js, das
   diese Zusatzklasse an .wort-box vergibt). */
.wort-box.antwort-box {
  background: linear-gradient(135deg, #2196f3, #1565c0);
}

.wort-row{

  display:flex;

  align-items:center;

  justify-content:center;

  gap:10px;

  flex-wrap: wrap;
}

.learn-answer{
  white-space: normal;
  overflow-wrap: break-word;
  text-align: center;
  font-size:38px;
  font-weight:900;
}

#timerWrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

#timerText {
  font-size: 18px;
  font-weight: bold;
  min-width: 40px;
}

#timerBarContainer {
  width: 300px;   /* 👈 wichtig */
  height: 20px;
  background: #ccc;
  border-radius: 10px;
  overflow: hidden;
}

#timeOverPopup p {
  margin: 6px 0;
}

#timeOverPopup br {
  line-height: 0.8;
}

.stats-train-btn {
  background: linear-gradient(135deg, #2196f3, #1565c0);
  color: white;
  font-size: 18px;
  font-weight: bold;
  padding: 10px 16px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  box-shadow:
    0 6px 0 #0d47a1,
    0 10px 25px rgba(0,0,0,0.25);
  transition: all 0.2s ease;
}

.stats-train-btn:hover {
  transform: translateY(-2px);
}

.stats-train-btn:active {
  transform: translateY(2px);

  box-shadow:
    0 2px 0 #0d47a1,
    0 5px 15px rgba(0,0,0,0.2);
}

/* 🎨 Farb-Filter (Statistik-Panel) - große, gut antippbare Karten
   statt winziger nativer Checkboxen. */
.color-filter-box {
  margin-top: 20px;
  padding: 18px;
  background: rgba(255,255,255,0.55);
  border-radius: 18px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.color-filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.color-filter-title {
  font-weight: bold;
  font-size: 16px;
  margin: 0;
}

.color-filter-quick-actions {
  display: flex;
  gap: 6px;
}

.color-filter-quick-btn {
  background: none;
  border: 1px solid #999;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: bold;
  color: #555;
  cursor: pointer;
  transition: all 0.15s ease;
}

.color-filter-quick-btn:hover {
  background: #eee;
}

.color-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

/* 🆕 Chat-Wunsch: auf dem Desktop sollen alle 5 Karten (Ungeübt/
   Schwach/Mäßig/Okay/Prios) in einer Reihe stehen statt 4+1 umzu-
   brechen - auto-fit oben reicht dafür bei typischer Panel-Breite
   nicht ganz aus. Handy bleibt beim automatischen Umbruch (auto-fit),
   da dort für 5 Spalten schlicht nicht genug Platz ist. */
@media (min-width: 768px) {
  .color-filter-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.color-filter-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  min-height: 64px;
  border-radius: 16px;
  border: 2px solid #ddd;
  background: #f5f5f5;
  cursor: pointer;
  user-select: none;
  transition: all 0.18s ease;
}

.color-filter-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

.color-filter-card:active {
  transform: translateY(0);
}

.cf-swatch {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px rgba(0,0,0,0.08);
}

.cf-swatch-gray   { background: #bdbdbd; }
.cf-swatch-red    { background: #f44336; }
.cf-swatch-orange { background: #ff9800; }
.cf-swatch-yellow { background: #fbc02d; }
.cf-swatch-green  { background: #4caf50; }

.cf-swatch-pinned {
  background: #fff3cd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
}

.cf-label {
  font-size: 13px;
  font-weight: bold;
  color: #555;
  text-align: center;
}

.cf-check {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #4caf50;
  color: white;
  font-size: 12px;
  line-height: 18px;
  text-align: center;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.18s ease;
}

.color-filter-card.cf-checked {
  border-color: #4caf50;
  background: #f1f8f1;
  box-shadow: 0 3px 8px rgba(76,175,80,0.25);
}

.color-filter-card.cf-checked .cf-label {
  color: #1b1b1b;
}

.color-filter-card.cf-checked .cf-check {
  opacity: 1;
  transform: scale(1);
}

.color-filter-train-btn {
  width: 100%;
  font-size: 17px;
}

.stats-filter-btn.stats-filter-active {

  background:
    linear-gradient(135deg,#4caf50,#2e7d32) !important;

  color:white !important;

  border:none;

  box-shadow:
    0 6px 18px rgba(76,175,80,0.5);

  transform: scale(1.05);
}

.tooltip-wrapper {
  position: relative;
  display: inline-block;
}

.tooltip-text {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  white-space: nowrap;
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
  transition: 0.3s;
  z-index: 9999;
}

.tooltip-wrapper:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

.tooltip-below {
  bottom: auto !important;
  top: 120% !important;
}

/* ============================================================
   🆕 Lern-Kalender-Popup (Hover über Streak/"Gelernte Tage
   insgesamt", siehe buildDailyCalendarHTML() in ui.js) - breitere
   Tooltip-Variante der bestehenden .tooltip-text-Mechanik (gleiches
   Hover-Verhalten, nur größer, da hier mehr als eine Zeile Text + ein
   Kachel-Raster reinpassen muss).
   ============================================================ */
.calendar-tooltip {
  width: 380px;
  max-width: 85vw;
  white-space: normal;
  text-align: left;
  font-size: 14px;
  line-height: 1.4;
  padding: 16px;
  /* 🔥 Bugfix: die geerbte .tooltip-text-Zentrierung (left:50% +
     translateX(-50%)) ließ das breite Popup in der schmalen linken
     Spalte links aus dem Bildschirm laufen - hier stattdessen linksbündig
     an der Badge-Kante verankert, wächst nach rechts in den sichtbaren
     Bereich. */
  left: 0;
  transform: none;
}

.calendar-grid {
  display: grid;
  /* 🔥 War 7 Spalten (4 Reihen à 5 + 1 Rest), jetzt 5 Spalten (glatt
     4 volle Reihen bei 20 Tagen) mit größeren Kacheln. */
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.calendar-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  border-radius: 10px;
  background: rgba(255,255,255,0.08);
  padding: 4px;
}

.calendar-tile-date {
  font-size: 12px;
  opacity: 0.75;
  white-space: nowrap;
}

.calendar-tile-count {
  font-size: 15px;
  font-weight: 700;
  margin-top: 3px;
}

.calendar-tile-reached {
  background: linear-gradient(135deg, #2e7d32, #1b5e20);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.15);
}

.calendar-tile-reached .calendar-tile-date,
.calendar-tile-reached .calendar-tile-count {
  opacity: 1;
  color: #fff;
}

/* ============================================================
   🆕 Top-500-Kursfortschrittsbalken (siehe updateCourseProgressUI()
   in ui.js) - EIN durchgehender Balken (globaler Gesamtprozentsatz),
   nur mit Markierungen bei 100/200/300/400/500 - keine unabhängig
   berechneten Einzelsegmente.
   ============================================================ */
.course-progress-daterow {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  opacity: 0.75;
  margin-bottom: 6px;
}

.course-progress-bar {
  width: 100%;
  padding-bottom: 22px; /* Platz für die Marker-Labels unterhalb */
}

.course-progress-track {
  position: relative;
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: #e0e0e0;
  overflow: visible;
}

.night .course-progress-track {
  background: rgba(255,255,255,0.12);
}

.course-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(135deg, #66bb6a, #2e7d32);
  transition: width 0.4s ease;
}

.course-tick {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
  background: rgba(255,255,255,0.7);
}

.course-tick:last-child {
  background: transparent; /* am rechten Rand (500) keine sichtbare Trennlinie nötig */
}

.course-tick-label {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: 600;
  opacity: 0.55;
  white-space: nowrap;
}

.course-tick-reached .course-tick-label {
  opacity: 1;
  color: #2e7d32;
}

.night .course-tick-reached .course-tick-label {
  color: #81c784;
}

#progressElefant {
  position: absolute;
  top: -30px;        /* 🔥 etwas höher setzen */
  left: 0%;
  width: 80px;       /* 🔥 doppelt so groß */
  transform: translateX(-50%);
  transition: left 0.3s ease;
  pointer-events: none;
}

#progressSteps {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  display: flex;        /* 🔥 NEU */
  height: 100%;         /* 🔥 NEU */
  overflow: hidden;   /* 🔥 GANZ WICHTIG */
}

.progress-segment {

  flex: 1 1 0;
  min-width: 0;

  height: 100%;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 18px;
  line-height: 1;

  background: rgba(255,255,255,0.3);

  transition: background 0.3s;

  border-right: 1px solid rgba(255,255,255,0.4);
}

.progress-segment:last-child {
  border-right: none;
}

/* Farben */
.progress-segment.correct {
  background: #4caf50;
}

.progress-segment.wrong {
  background: #f44336;
}

.progress-segment.timeout {
  background: #ffeb3b;
}

.progress-step.correct {
  background: #4caf50;
}

.progress-step.wrong {
  background: #f44336;
}

.progress-step.timeout {
  background: #ffeb3b;
}

.learn-answer {
  color: white;
  Font-size: inherit;
  font-weight: 900;
}

ruby {
  font-size: 36px;
}

rt {
  font-size: 14px;
  color: #555;
}

#footer a {
  color: #888;
  text-decoration: none;
  margin: 0 5px;
  text-decoration: underline;
}

.box-card{

  background: linear-gradient(135deg,#ffffff,#f3f7ff);
  border-radius: 22px;
  padding: 18px;
  min-height: 220px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  box-shadow:
    0 8px 25px rgba(0,0,0,0.15);
  transition: all 0.25s ease;
  position: relative;
  overflow:hidden;
}

.box-card:hover{
  transform: translateY(-5px) scale(1.03);

  box-shadow:
    0 16px 40px rgba(0,0,0,0.25);
}

.night .box-card{
  background: linear-gradient(135deg,#2a2a40,#1e1e2f);
  color:white;
}

.box-stars{
  font-size: 28px;
  margin-bottom: 10px;
}

.box-count{
  font-size:18px;
  font-weight:bold;
}

.box-preview{
  margin-top:12px;
  font-size:15px;
  line-height:1.4;
  opacity:0.85;
  min-height:50px;
}

/* 🆕 Vokabel-Suchfeld (Chat-Wunsch): gemeinsamer Stil für die Suche in
   der Lernboxen-Übersicht (pro Box) UND in der Statistik (ganzes
   Raster) - siehe filterBoxWordList()/filterStatsGrid() in ui.js. */
.box-word-filter {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid #ddd;
  font-size: 15px;
}

/* 🆕 "Alle anzeigen" pro Lernbox (Chat-Wunsch): aufklappbare Vollliste
   aller Wörter dieser Box, mit eigenem Suchfeld obendrüber. */
.box-word-list {
  margin-top: 12px;
  text-align: left;
}

.box-word-list-items {
  margin-top: 10px;
  max-height: 260px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.box-word-list-row {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0,0,0,0.04);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 14px;
}

.night .box-word-list-row {
  background: rgba(255,255,255,0.08);
}

.box-word-list-arrow {
  opacity: 0.6;
}

.box-word-list-empty {
  font-size: 14px;
  opacity: 0.7;
  text-align: center;
  margin: 10px 0;
}

.box-progress{
  width:100%;
  height:14px;
  background:#ddd;
  border-radius:999px;
  overflow:hidden;
  margin-top:16px;
}

.box-progress-fill{
  height:100%;
  background:
    linear-gradient(90deg,#4caf50,#8bc34a);
  border-radius:999px;
  transition: width 0.4s ease;
}

.box-percent{
  margin-top:8px;
  font-size:14px;
  font-weight:bold;
}

select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#verbFormIndicator{
  display:flex;
  justify-content:center;
  gap:12px;
  margin-top:14px;
  margin-bottom:10px;
}

.verbFormBox{
  flex:1;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:12px;
  border-radius:14px;
  background:#2d2d2d;
  color:white;
  font-weight:700;
  font-size:18px;
  opacity:0.35;
  transition:all 0.25s ease;
  border:2px solid transparent;
  min-width:0;
  line-height:1.2;
}

.verbFormBox.active{
  opacity:1;
  background:#ff9800;
  transform:scale(1.08);
  box-shadow:0 0 18px rgba(255,152,0,0.6);
}

#doubleTimeToggle{
  /* 🔥 Bugfix: "#startScreen input, #startScreen select" (ID+Typ-
     Selektor, siehe weiter oben in dieser Datei) ist spezifischer als
     jede reine Klassen-Regel und blähte die Checkbox trotz der neuen
     .doubleTimeOption-Flex-Regel auf width:100%/max-width:400px auf -
     dadurch landete der Text weit rechts außerhalb des sichtbaren
     Bereichs. Hier gezielt mit !important zurückgesetzt. */
  width: 22px !important;
  height: 22px !important;
  max-width: none !important;
  margin: 0 !important;
  /* 🔥 Bugfix: transform:scale(1.6) vergrößerte die Checkbox zwar
     optisch, aber der Browser richtet den restlichen Flex-Inhalt
     (.doubleTimeOption, align-items:center) nach der UNSKALIERTEN
     Layout-Box aus - dadurch wirkte die Checkbox ein paar Pixel
     höher/tiefer versetzt als der Text daneben. Feste Breite/Höhe
     statt Skalierung behebt das zuverlässig. */
  flex: none;
  cursor:pointer;
  outline:none;
  box-shadow:none;
}


/* ======================================
   REACTION BAR
====================================== */

#reactionBar {
  display: flex;
  justify-content: center;
  align-items: center;

  gap: 14px;
  flex-wrap: wrap;

  margin-top: 24px;
}

#reactionBar button {
  width: 72px;
  height: 72px;

  border-radius: 18px;
  border: none;

  font-size: 34px;
  line-height: 1;

  cursor: pointer;

  display: flex;
  justify-content: center;
  align-items: center;

  background: linear-gradient(135deg, #ffffff, #e3f2fd);

  box-shadow:
    0 6px 0 #cfd8dc,
    0 10px 25px rgba(0,0,0,0.18);

  transition: all 0.18s ease;
}

#reactionBar button:hover {
  transform: translateY(-3px) scale(1.08);
}

#reactionBar button:active {
  transform: translateY(2px) scale(0.96);

  box-shadow:
    0 2px 0 #cfd8dc,
    0 5px 12px rgba(0,0,0,0.2);
}

/* 🌙 Darkmode */
.night #reactionBar button {
  background: linear-gradient(135deg, #2a2a40, #1e1e2f);
}

.stats-filter-btn {

  appearance: none;
  -webkit-appearance: none;

  background: linear-gradient(135deg,#ffffff,#f1f1f1);

  border: none;

  border-radius: 14px;

  padding: 12px 18px;

  font-size: 18px;
  font-weight: 600;

  cursor: pointer;

  transition: all 0.2s ease;

  box-shadow:
    0 4px 12px rgba(0,0,0,0.18);

  margin: 4px;
}

.stats-filter-btn:hover {
  transform: translateY(-1px);
}

#boxPanel {
  display: block;
  text-align: center;
  max-width: 1200px;
  width: 90%;
  margin: 30px auto;
  padding: 10px;
  border-radius: 20px;
  background: #ffffff;
}

.night #boxPanel {
  background: #1e2430;
}

#statsPanel select,
#boxPanel select {

  background: linear-gradient(135deg,#ffffff,#f3f7ff);

  border: 2px solid rgba(0,0,0,0.08);

  border-radius: 16px;

  padding: 12px 16px;

  font-size: 20px;
  font-weight: 700;

  color: #222;

  box-shadow:
    0 6px 18px rgba(0,0,0,0.15);

  cursor: pointer;

  transition: all 0.25s ease;

  min-width: 180px;
}

/* Hover */
#statsPanel select:hover,
#boxPanel select:hover {

  transform: translateY(-1px);

  box-shadow:
    0 10px 25px rgba(0,0,0,0.2);
}

/* Fokus */
#statsPanel select:focus,
#boxPanel select:focus {

  outline: none;

  border-color: #4caf50;
}

/* 🌙 Darkmode */
.night #statsPanel select,
.night #boxPanel select {

  background:
    linear-gradient(135deg,#2a2a40,#1e1e2f);

  color:white;

  border: 2px solid rgba(255,255,255,0.08);
}

.endOkBtn {
    font-size: 16px;
    padding: 6px 12px;
    min-width: 60px;
    height: 36px;

    border-radius: 8px;
    border: none;

    background: #fffff;
    cursor: pointer;
}

.endOkBtn:hover {
    transform: scale(1.05);
}

.verbFormBox {
  transition: all 0.3s ease;
  opacity: 0.4;
}

.active-inf {
  background: #22c55e;
  color: white;
  opacity: 1;
  box-shadow: 0 0 20px #22c55e;
}

.active-past {
  background: #eab308;
  color: black;
  opacity: 1;
  box-shadow: 0 0 20px #eab308;
}

.active-part {
  background: #ef4444;
  color: white;
  opacity: 1;
  box-shadow: 0 0 20px #ef4444;
}

#verbFormIndicator{
  display:flex;
  gap:10px;
  width:100%;
  max-width:500px;
  margin:20px auto;
}

#bonusHeart{
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%, -50%);
  font-size:32px;
  z-index:20;
  cursor:pointer;
  user-select:none;

  animation:pulseHeart 1s infinite;
}

@keyframes pulseHeart{
  0%{
    transform:translate(-50%, -50%) scale(1);
  }

  50%{
    transform:translate(-50%, -50%) scale(1.2);
  }

  100%{
    transform:translate(-50%, -50%) scale(1);
  }
}

#bonusFruit{
  position:absolute;
right:-35px;
  top:50%;
transform:translateY(-50%) scaleX(-1);
  font-size:48px;
  z-index:20;

  animation:fruitPulse 1s infinite;
}

@keyframes fruitPulse{

  0%{
    transform:translateY(-50%) scaleX(-1) scale(1);
  }

  50%{
    transform:translateY(-50%) scaleX(-1) scale(1.15);
  }

  100%{
    transform:translateY(-50%) scaleX(-1) scale(1);
  }
}

.game-over-title {

  font-family: 'Press Start 2P', cursive;

  font-size: 54px;

  line-height: 0.95;

  text-align: center;

  letter-spacing: 1px;

  font-weight: bold;

  background: linear-gradient(
    to bottom,
    #fff56b 0%,
    #ffe600 35%,
    #ff9800 70%,
    #ff2d00 100%
  );

  background-clip: text;
  -webkit-background-clip: text;

  -webkit-text-fill-color: transparent;

  /* 🔥 dünne schwarze Outline */
  text-shadow:
     1px 0 #000,
    -1px 0 #000,
     0 1px #000,
     0 -1px #000;

  margin-bottom: 20px;
}

.language-row {
  display: grid;
  grid-template-columns: 1fr 55px 1fr;
  gap: 10px;
  align-items: center;

  width: 100%;
  max-width: 400px;
  margin: 8px auto;
}

.language-row select {
  width: 100%;
  margin: 0;

  background: linear-gradient(135deg,#ffffff,#f3f7ff);
  border: 2px solid rgba(0,0,0,0.08);
  border-radius: 16px;

  padding: 12px 16px;

  font-size: 20px;
  font-weight: 700;

  box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

.swap-btn {
  width: 55px;
  height: 50px;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 0;
  margin: 0;

  font-size: 24px;
  line-height: 1;

  border-radius: 12px;
  border: none;              /* neu */

}

/* Swap-Button zwischen den Eigene-Vokabeln-Eingabefeldern: kein
   Hintergrund, echtes Quadrat statt der Standard-Swap-Btn-Maße. */
#swapCustomVocabBtn {
  width: 50px;
  height: 50px;
  background: none;
  box-shadow: none;
}

#wortContainer{
  display:flex;
  flex-wrap: wrap;
  justify-content:center;
  align-items:center;
  gap:12px;
}

/* 🏆 Prüfungsmodus: Fertigkeit-Badge über der Frage */
#examSkillBadge{
  flex-basis: 100%;
  display: none;
  text-align: center;
  font-size: 15px;
  font-weight: bold;
  background: linear-gradient(135deg, #ffb300, #ff8f00);
  color: #fff;
  padding: 5px 16px;
  border-radius: 999px;
  margin: 0 auto 4px;
  width: fit-content;
  box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}

.exam-listening-placeholder{
  font-size: 22px;
  opacity: 0.8;
  letter-spacing: 0.5px;
}

#repeatVoiceBtn{
  font-size:26px;
  cursor:pointer;
  border:none;
  background:none;
  padding:0;
  align-self: center;
  margin-top: -16px;

}

#repeatVoiceBtn:hover{
  transform:scale(1.15);
}

/* 📌 Merkliste-Button */
#pinVocabBtn{
  font-size:24px;
  cursor:pointer;
  border:none;
  background:none;
  padding:0;
  align-self: center;
  margin-top: -16px;
  opacity: 0.45;
  filter: grayscale(1);
  transition: opacity 0.15s ease, filter 0.15s ease, transform 0.15s ease;
}

#pinVocabBtn:hover{
  transform:scale(1.15);
  opacity: 0.7;
}

#pinVocabBtn.pinned{
  opacity: 1;
  filter: none;
}



/* Weltkarte: Zoom-Steuerung */
.worldmap-zoom-controls {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
}

.worldmap-zoom-controls button {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: #1976d2;
  color: #fff;
  font-size: 26px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

.worldmap-zoom-controls button:hover {
  background: #1565c0;
}

#worldMapContainer {
  overflow: hidden;
  border-radius: 12px;
  background: #eaf6ff;
  touch-action: none; /* verhindert Seiten-Scrollen beim Ziehen/Pinch-Zoom auf der Karte */
  cursor: grab;
}

.worldmap-logo {
  max-width: 150px;
  height: auto;
  display: block;
}

.worldmap-favicon-link {
  display: none;
}

#worldMapContainer.dragging {
  cursor: grabbing;
}

#worldMapContainer svg {
  display: block;
}

#worldMapContainer svg path {
  cursor: pointer;
}

/* Menüsprache: Flaggen-Buttons statt Dropdown */
.ui-lang-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 8px 0;
}

.ui-lang-btn {
  background: #1976d2;
  border: 3px solid transparent;
  border-radius: 10px;
  padding: 8px 16px;
  width: auto;
  height: auto;
  font-size: 46px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.18);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s, background 0.2s;
}

.ui-lang-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.25);
}

.ui-lang-btn.active {
  border-color: #ffd54f !important;
  background: #1565c0 !important;
  box-shadow: 0 0 0 5px #ffd54f, 0 4px 10px rgba(0,0,0,0.18) !important;
}

/* 🔥 In der neuen Ecken-Position (.ui-lang-corner) deutlich kleiner
   als die alte, prominente Flaggen-Reihe - Menüsprache ist eine
   einmalige Einstellung, braucht keinen großen Platz mehr. */
.ui-lang-corner .ui-lang-buttons {
  margin: 0;
  gap: 6px;
}

.ui-lang-corner .ui-lang-btn {
  padding: 4px 8px;
  font-size: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

/* ============================================================
   🎓 ZERTIFIKATE
   ============================================================ */

#certificatesPanel {
  max-width: 700px;
  margin: 20px auto;
  text-align: center;
}

.certificate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.certificate-mini {
  background: #fdf6e3;
  border: 3px solid #0f6e56;
  border-radius: 12px;
  padding: 16px 10px;
  cursor: pointer;
  transition: transform 0.2s;
}

.certificate-mini:hover {
  transform: scale(1.05);
}

.certificate-mini-seal {
  font-size: 32px;
  margin-bottom: 6px;
}

.certificate-mini-lang {
  font-weight: bold;
  color: #173404;
  margin: 0;
}

/* Vollbild-Overlay beim Freischalten / Ansehen eines Zertifikats */
.certificate-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 10500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 20px;
  overflow-y: auto;
}

.certificate-unlock-banner {
  color: #fff;
  font-size: 22px;
  font-weight: bold;
  text-align: center;
  margin: 0;
}

.certificate-card {
  position: relative;
  background: #ffffff;
  border: 12px solid #0f2a5c;
  border-radius: 4px;
  padding: 40px 40px 26px 220px;
  max-width: 900px;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  overflow: hidden;
}

.certificate-border {
  position: absolute;
  inset: 8px;
  border: 2px solid #c9a227;
  border-radius: 2px;
  pointer-events: none;
}

/* Blasse Deko-Symbole im Hintergrund (angelehnt an die Vorlage) */
.certificate-bg-icons {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.cbg {
  position: absolute;
  color: #0f2a5c;
  opacity: 0.08;
  font-size: 40px;
}

.cbg1 { top: 60px; left: 40%; }
.cbg2 { top: 120px; right: 18%; font-size: 30px; }
.cbg3 { bottom: 140px; right: 8%; font-size: 46px; }
.cbg4 { top: 260px; right: 6%; }

/* Medaille oben links: Sterne + Kreis + zwei Bänder */
.certificate-medal {
  position: absolute;
  top: 16px;
  left: 24px;
  width: 90px;
  text-align: center;
}

.certificate-medal-stars {
  color: #8a6d10;
  font-size: 14px;
  font-weight: bold;
  margin: 0 0 2px;
}

.certificate-medal-circle {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: #0f2a5c;
  border: 6px solid #c9a227;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  box-sizing: border-box;
  margin: 0 auto;
}

.certificate-medal-ribbons {
  display: flex;
  justify-content: center;
  margin-top: -2px;
}

.certificate-ribbon {
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 40px solid #0f2a5c;
}

.certificate-ribbon-left {
  transform: rotate(8deg) translateX(4px);
}

.certificate-ribbon-right {
  transform: rotate(-8deg) translateX(-4px);
}

/* Logo oben rechts */
.certificate-logo {
  position: absolute;
  top: 24px;
  right: 30px;
  text-align: right;
}

.certificate-logo-word {
  font-size: 22px;
  font-weight: bold;
  margin: 0;
  color: #0f2a5c;
}

.certificate-logo-mi {
  color: #e0821e;
}

.certificate-logo-tagline {
  font-size: 12px;
  font-style: italic;
  color: #8a8a8a;
  margin: 2px 0 0;
}

/* Maskottchen unten links: Elefant mit Doktorhut auf Bücherstapel,
   ragt bewusst leicht in den Rahmen hinein (wie in der Vorlage). */
.certificate-mascot {
  position: absolute;
  left: -10px;
  bottom: -10px;
  width: 200px;
  z-index: 1;
}

.certificate-books {
  position: absolute;
  bottom: 34px;
  left: 30px;
  width: 140px;
}

.certificate-book {
  border-radius: 6px;
  height: 26px;
}

.certificate-book-bottom {
  background: #e0821e;
  width: 140px;
}

.certificate-book-top {
  background: #1a56db;
  width: 115px;
  margin: -4px auto 0;
}

.certificate-elephant {
  position: relative;
  width: 190px;
  display: block;
  margin: 0 auto;
}

.certificate-content {
  position: relative;
  z-index: 2;
}

.certificate-stars-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 34px 0 8px;
}

.certificate-hr {
  width: 100px;
  height: 1px;
  background: #c9a227;
}

.certificate-stars {
  font-size: 20px;
  letter-spacing: 4px;
}

.certificate-title {
  font-size: 40px;
  font-family: Georgia, serif;
  letter-spacing: 3px;
  margin: 4px 0 14px;
  color: #0f2a5c;
}

.certificate-line {
  font-size: 15px;
  color: #5f5e5a;
  line-height: 1.7;
  margin: 0 0 6px;
}

.certificate-name {
  font-family: 'Dancing Script', cursive;
  font-size: 44px;
  font-weight: 700;
  color: #1a56db;
  margin: 4px 0 10px;
}

.certificate-lang {
  font-weight: bold;
  color: #0f2a5c;
  font-size: 18px;
}

.certificate-stats {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 22px 0 20px;
  flex-wrap: wrap;
}

.certificate-stat {
  border-radius: 12px;
  border: 2px solid;
  padding: 12px 18px;
  min-width: 110px;
}

.certificate-stat-icon {
  font-size: 24px;
}

.certificate-stat-value {
  font-size: 20px;
  font-weight: bold;
  margin: 4px 0 2px;
}

.certificate-stat-label {
  font-size: 11px;
  margin: 0;
  opacity: 0.85;
}

.certificate-stat-green {
  background: #e1f5ee;
  border-color: #1d9e75;
  color: #085041;
}

.certificate-stat-amber {
  background: #faeeda;
  border-color: #ba7517;
  color: #633806;
}

.certificate-stat-purple {
  background: #eeedfe;
  border-color: #7f77dd;
  color: #3c3489;
}

.certificate-badge {
  display: inline-block;
  background: #0f2a5c;
  border: 2px solid #c9a227;
  color: #c9a227;
  font-weight: bold;
  font-size: 15px;
  letter-spacing: 1px;
  padding: 10px 26px;
  border-radius: 999px;
  margin: 4px 0 26px;
}

.certificate-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-top: 1px solid #c9a227;
  padding-top: 14px;
  gap: 10px;
  position: relative;
  z-index: 2;
}

.certificate-footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.certificate-qr {
  width: 56px;
  height: 56px;
  border-radius: 4px;
}

.certificate-footer-center {
  text-align: center;
}

.certificate-footer-right {
  text-align: right;
}

.certificate-label {
  font-size: 11px;
  color: #8a6d10;
  margin: 0;
}

.certificate-value {
  font-size: 13px;
  color: #0f2a5c;
  margin: 0;
  font-weight: bold;
}

.certificate-mono {
  font-family: monospace;
}

.certificate-signature {
  font-family: 'Dancing Script', cursive;
  font-size: 22px;
  color: #1a56db;
  border-bottom: 1px solid #ccc;
  padding-bottom: 4px;
  margin-bottom: 2px !important;
}

.certificate-actions {
  display: flex;
  gap: 12px;
}

.certificate-actions button {
  padding: 12px 20px;
  border-radius: 10px;
  border: none;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
}

.certificate-actions button:disabled {
  opacity: 0.6;
  cursor: default;
}

#certificateDownloadBtn {
  background: #0f2a5c;
  color: #fff;
}

#certificateCloseBtn {
  background: #eee;
  color: #333;
}

/* ============================================================
   🐶 HUNDE-POKEDEX
   ============================================================ */

#dogdexPanel {
  max-width: 900px;
  margin: 20px auto;
  text-align: center;
}

.dogdex-progress {
  font-weight: bold;
  font-size: 15px;
  opacity: 0.8;
}

.dogdex-lang-select {
  margin: 10px 0 16px;
}

.dogdex-lang-select select {
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 15px;
}

.dogdex-compare-toggle {
  margin-bottom: 10px;
}

.dogdex-close-btn {
  display: block;
  margin: 24px auto 10px;
  padding: 14px 32px;
  font-size: 17px;
  font-weight: bold;
  color: #fff;
  background: linear-gradient(135deg, #5c6b73, #37474f);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.dogdex-close-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.3);
}

.dogdex-compare-hint {
  font-size: 14px;
  opacity: 0.75;
  margin: 0 0 10px;
}

.dogdex-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin: 16px 0;
}

.dogdex-grid-item {
  cursor: default;
  height: 300px;
}

/* 🔍 Suchfeld */
.dogdex-search {
  display: block;
  width: 100%;
  max-width: 320px;
  margin: 0 auto 14px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 2px solid #ccc;
  font-size: 15px;
  box-sizing: border-box;
}

.dogdex-search:focus {
  outline: none;
  border-color: #1976d2;
}

/* 🖼️ Fertige Karten-Bilder (1:1 geliefert) - kein eigenes Layout mehr,
   nur ein sauberer Rahmen + Klick-Feedback. */
.dog-card-ready {
  height: 100%;
  border-radius: 14px;
  overflow: hidden;
  cursor: zoom-in;
  box-shadow: 0 10px 24px rgba(0,0,0,0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.dogdex-grid-item:hover .dog-card-ready {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(0,0,0,0.35);
}

.dog-card-ready img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #0f2a5c;
  display: block;
}

.dog-card-selected .dog-card-ready,
.dog-card-selected .dog-card-fallback {
  box-shadow: 0 0 0 4px #ffd54f;
}

.dog-card {
  background: #ede6d6;
  color: #26231d;
  border: 1px solid rgba(180,137,79,0.35);
  border-radius: 14px;
  padding: 10px;
  height: 100%;
  box-sizing: border-box;
  box-shadow: 0 10px 24px rgba(0,0,0,0.3);
  transition: box-shadow 0.15s ease;
}

.dog-card-locked {
  background: #eaeaea;
  border-color: #ccc;
  opacity: 0.75;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Fallback-Karte (noch kein fertiges Bild geliefert): alles auf einen
   Blick, kein Umdrehen mehr. */
.dog-card-fallback {
  cursor: zoom-in;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.dog-card-fallback-photo {
  position: relative;
  width: 100%;
  height: 100px;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  flex-shrink: 0;
}

.dog-card-fallback-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dog-card-number {
  position: absolute;
  top: 6px;
  left: 7px;
  font-size: 11px;
  font-weight: bold;
  font-family: monospace;
  color: #fff;
  background: rgba(0,0,0,0.45);
  padding: 1px 6px;
  border-radius: 999px;
  z-index: 4;
}

.dog-card-number-locked {
  position: static;
  display: inline-block;
  margin-bottom: 8px;
  color: #666;
  background: rgba(0,0,0,0.08);
}

.dog-card-flag-badge {
  position: absolute;
  top: 6px;
  right: 7px;
  font-size: 18px;
  line-height: 1;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.5));
  z-index: 4;
}

.dog-card-photo {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f0f0;
}

.dog-card-pawplaceholder {
  font-size: 40px;
  opacity: 0.5;
}

.dog-card-silhouette {
  font-size: 44px;
  color: #999;
  filter: grayscale(1);
}

.dog-card-name {
  font-weight: bold;
  font-size: 13px;
  margin: 2px 0;
  text-align: center;
}

.dog-card-char {
  font-size: 10px;
  font-style: italic;
  opacity: 0.7;
  margin: 0 0 4px;
  text-align: center;
}

.dog-card-stats {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dog-card-meta {
  font-size: 9px;
  opacity: 0.7;
  margin: 6px 0 4px;
  text-align: center;
}

.dog-card-wiki-link {
  display: block;
  text-align: center;
  font-size: 10px;
  color: #1a56db;
  text-decoration: none;
}

.dog-card-wiki-link:hover {
  text-decoration: underline;
}

.dog-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.dog-stat-label {
  font-size: 9px;
  opacity: 0.75;
  flex: 1;
}

.dog-stat-badge {
  font-size: 10px;
  font-weight: bold;
  color: #fff;
  padding: 1px 6px;
  border-radius: 999px;
  min-width: 18px;
  text-align: center;
  flex-shrink: 0;
}

/* 🔍 Foto-Lightbox (Klick auf eine Karte zum Vergrößern) - war beim
   letzten CSS-Umbau versehentlich verloren gegangen, deshalb passierte
   beim Klick sichtbar nichts. */
.dog-photo-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  z-index: 11000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  cursor: zoom-out;
}

.dog-photo-lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  cursor: default;
}

.dog-photo-lightbox-close {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}

.dog-photo-lightbox-close:hover {
  background: rgba(255,255,255,0.3);
}

/* ‹ › Vor/Zurück-Buttons - auf dem Handy zusätzlich per Wischgeste
   bedienbar (siehe showDogPhotoLightbox() in dogdex.js), hier nur die
   sichtbaren Klick-Buttons (v.a. für PC/Maus gedacht). */
.dog-photo-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dog-photo-lightbox-nav:hover {
  background: rgba(255,255,255,0.3);
}

.dog-photo-lightbox-prev {
  left: 16px;
}

.dog-photo-lightbox-next {
  right: 16px;
}

@media (max-width: 640px) {
  .dog-photo-lightbox-nav {
    width: 44px;
    height: 44px;
    font-size: 26px;
  }
}

/* Popup beim Freischalten einer neuen Karte */
.dogdex-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 10500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 20px;
  /* 🔥 Bugfix (Chat-Wunsch): ohne overflow lief eine zu große Karte
     (z.B. nach der Vergrößerung unten) einfach über den Bildschirmrand
     hinaus und war unerreichbar abgeschnitten - jetzt scrollbar als
     Sicherheitsnetz, zusätzlich zur eigentlichen Größenbegrenzung der
     Karte selbst (siehe .dog-card-ready/img unten). */
  overflow-y: auto;
}

.dogdex-overlay .dog-card-ready {
  max-width: 320px;
  max-height: 75vh;
  width: 100%;
  height: auto;
  display: flex;
  justify-content: center;
}

.dogdex-overlay .dog-card-ready img {
  max-width: 100%;
  /* 🔥 Bugfix (Chat-Wunsch): die Karte wurde beim Freischalten am
     unteren Rand abgeschnitten (HUNTING-Banner/Copyright fehlten) -
     die Breiten-Vergrößerung (320px -> 440px) machte das Bild bei
     seinem Seitenverhältnis höher, als der Bildschirm oft hergibt.
     max-height zusätzlich zu max-width begrenzt jetzt BEIDE Achsen -
     der Browser skaliert proportional auf die jeweils knappere
     Grenze, die Karte passt dadurch immer komplett in den sichtbaren
     Bereich statt unten rauszulaufen. */
  max-height: 75vh;
  width: auto;
  height: auto;
  background: none;
}

.dogdex-overlay .dog-card-fallback {
  max-width: 300px;
  width: 100%;
  max-height: 75vh;
}

/* 🆕 Chat-Wunsch: Karte im "Neue Karte freigeschaltet"-Popup größer
   darstellen - auf dem Desktop mehr Platz, Handy bleibt kompakter.
   Muss NACH den Basis-Regeln oben stehen, sonst würde die spätere
   Basis-Regel (gleiche Spezifität) diese Media-Query per
   Quellreihenfolge wieder überschreiben. */
@media (min-width: 768px) {
  .dogdex-overlay .dog-card-ready {
    max-width: 440px;
  }

  .dogdex-overlay .dog-card-fallback {
    max-width: 420px;
  }
}

.dogdex-unlock-banner {
  color: #fff;
  font-size: 22px;
  font-weight: bold;
  text-align: center;
  margin: 0;
}

#dogdexPopupCloseBtn {
  padding: 12px 24px;
  border-radius: 10px;
  border: none;
  background: #0f2a5c;
  color: #fff;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
}

/* Vergleichsmodus */
.dogdex-compare-box {
  max-width: 460px;
  margin: 16px auto;
  background: rgba(255,255,255,0.6);
  border-radius: 14px;
  padding: 16px;
}

.dogdex-compare-header {
  display: flex;
  justify-content: space-between;
  font-weight: bold;
  margin-bottom: 10px;
}

.dogdex-compare-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.dogdex-compare-val {
  font-weight: bold;
  width: 30px;
}

.dogdex-compare-win {
  color: #2e7d32;
  font-size: 18px;
}

.dogdex-compare-label {
  font-size: 13px;
  opacity: 0.75;
}

/* ============================================================
   ⚔️ BATTLE-MODUS (siehe battle.js) - Overlay-Panel mit 6 Screens,
   dieselbe Grund-Mechanik wie #premiumPopup (fixed, zentriert,
   hohes z-index).
   ============================================================ */
.battle-panel {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  z-index: 10500;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.battle-card {
  position: relative;
  background: #fff;
  border-radius: 20px;
  padding: 32px 28px;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  text-align: center;
}

.night .battle-card {
  background: #1e1e1e;
  color: #eee;
}

.battle-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: inherit;
  opacity: 0.6;
}

.battle-close-btn:hover {
  opacity: 1;
}

.battle-screen {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.battle-primary-btn {
  background: linear-gradient(135deg, #4aa8ee, #3B9CE8);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 14px 24px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  width: 100%;
  box-shadow: 0 6px 16px rgba(59,156,232,0.4);
  transition: transform 0.15s ease;
}

.battle-primary-btn:hover {
  transform: translateY(-1px);
}

.battle-divider {
  display: flex;
  align-items: center;
  width: 100%;
  color: #888;
  font-size: 13px;
}

.battle-divider::before,
.battle-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #ddd;
}

.battle-divider span {
  padding: 0 10px;
}

.battle-join-row {
  display: flex;
  gap: 8px;
  width: 100%;
}

/* 🆕 Kategorie-Auswahl im Battle-Setup (Chat-Wunsch: Top 500 vs.
   Reisevokabeln) - Select im selben Look wie battle-join-row input. */
.battle-category-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: #444;
}

.battle-category-select {
  flex: 1;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid #ddd;
  font-size: 15px;
  background: #fff;
}

.battle-join-row input {
  flex: 1;
  padding: 12px 14px;
  border-radius: 999px;
  border: 1px solid #ddd;
  font-size: 15px;
  text-align: center;
  text-transform: uppercase;
  min-width: 0;
}

.battle-join-row .battle-primary-btn {
  width: auto;
  white-space: nowrap;
  flex: none;
}

.battle-code-display {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: 6px;
  background: #f5f5f5;
  border-radius: 14px;
  padding: 16px 24px;
  color: #3B9CE8;
}

.night .battle-code-display {
  background: rgba(255,255,255,0.08);
}

.battle-countdown-number {
  font-size: 96px;
  font-weight: 900;
  color: #3B9CE8;
  animation: battleCountdownPulse 1s ease infinite;
}

@keyframes battleCountdownPulse {
  0% { transform: scale(0.8); opacity: 0.6; }
  50% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(0.8); opacity: 0.6; }
}

.battle-question-screen {
  width: 100%;
}

.battle-live-row {
  display: flex;
  width: 100%;
  gap: 12px;
}

.battle-live-player {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 700;
}

/* 🆕 Eigener Name deutlich hervorgehoben (Chat-Wunsch), damit auf
   einen Blick klar ist, welche Seite "man selbst" ist - passend zur
   blauen Fortschrittsbalken-Farbe (.battle-progress-own). */
.battle-live-player-own #battleYouLabel {
  background: linear-gradient(135deg, #42a5f5, #1e88e5);
  color: #fff;
  padding: 3px 12px;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(30,136,229,0.4);
}

.battle-progress-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: #eee;
  overflow: hidden;
}

.night .battle-progress-track {
  background: rgba(255,255,255,0.12);
}

.battle-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  transition: width 0.3s ease;
}

.battle-progress-own {
  background: linear-gradient(135deg, #42a5f5, #1e88e5);
}

.battle-progress-opponent {
  background: linear-gradient(135deg, #ffca28, #ffa000);
}

.battle-progress-text {
  font-size: 13px;
  opacity: 0.7;
}

.battle-question-word {
  font-size: 30px;
  font-weight: 800;
  margin: 8px 0;
}

.battle-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
}

.battle-option-btn {
  padding: 16px 10px;
  border-radius: 14px;
  border: 2px solid #ddd;
  background: #fafafa;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.night .battle-option-btn {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.2);
  color: #eee;
}

.battle-option-btn:hover {
  border-color: #3B9CE8;
  background: rgba(59,156,232,0.08);
}

/* 🆕 Sichtbares Richtig/Falsch-Feedback (siehe selectBattleAnswer() in
   battle.js) - die richtige Antwort wird IMMER grün markiert, die
   eigene falsche Wahl zusätzlich rot, alle anderen Buttons dimmen
   dabei ab. */
.battle-option-btn:disabled {
  cursor: default;
  opacity: 0.5;
}

.battle-option-correct {
  background: rgba(76,175,80,0.18) !important;
  border-color: #4caf50 !important;
  color: #2e7d32 !important;
  opacity: 1 !important;
}

.night .battle-option-correct {
  color: #a5d6a7 !important;
}

.battle-option-wrong {
  background: rgba(229,57,53,0.18) !important;
  border-color: #e53935 !important;
  color: #c62828 !important;
  opacity: 1 !important;
}

.night .battle-option-wrong {
  color: #ef9a9a !important;
}

.battle-result-won {
  color: #2e7d32;
}

.battle-result-lost {
  color: #c62828;
}

/* ============================================================
   🆕 Battle-Modus größer auf Desktop (Chat-Wunsch) - Karte selbst
   sowie Frage/Optionen/Code deutlich größer, ab typischer
   Desktop-Breite. Mobile bleibt bei der bisherigen (kompakteren)
   Größe.
   ============================================================ */
@media (min-width: 768px) {

  .battle-card {
    max-width: 640px;
    padding: 44px 40px;
  }

  .battle-setup-screen, .battle-screen {
    gap: 18px;
  }

  .battle-code-display {
    font-size: 52px;
    letter-spacing: 8px;
    padding: 20px 32px;
  }

  .battle-countdown-number {
    font-size: 130px;
  }

  .battle-question-word {
    font-size: 42px;
    margin: 14px 0;
  }

  .battle-live-player {
    font-size: 16px;
  }

  .battle-progress-track {
    height: 13px;
  }

  .battle-progress-text {
    font-size: 15px;
  }

  .battle-options-grid {
    gap: 14px;
  }

  .battle-option-btn {
    padding: 22px 14px;
    font-size: 19px;
    border-radius: 16px;
  }

  .battle-primary-btn {
    padding: 17px 28px;
    font-size: 18px;
  }

  .battle-join-row input {
    padding: 14px 16px;
    font-size: 17px;
  }

  #battleSetupTitle,
  #battleWaitingTitle,
  #battleFinishedWaitingTitle,
  #battleResultsTitle {
    font-size: 26px;
  }

  #battleSetupSubtitle,
  #battleWaitingSubtitle {
    font-size: 16px;
  }

  #battleResultsScore {
    font-size: 18px;
  }
}

/* ============================================================
   🆕 Schwert-Intro-Animation beim Öffnen des Battle-Modus (Chat-
   Wunsch) - zwei Schwerter fliegen von links/rechts ein und treffen
   sich in der Mitte. Gesteuert per .battle-intro-play-Klasse (siehe
   playBattleIntroAnimation() in battle.js).
   ============================================================ */
.battle-intro-animation {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  pointer-events: none;
  z-index: 10600;
}

/* 🔥 Fix: statt zwei einzeln gedrehter 🗡️-Dolche (deren Ausrichtung je
   nach Emoji-Schriftart des Betriebssystems - Apple vs. Noto etc. -
   unterschiedlich aussieht) wird hier das ECHTE ⚔️-Emoji aus dem Titel
   genommen und per overflow:hidden in eine linke/rechte Hälfte
   geschnitten. Fügen sich die Hälften am Ende zusammen, ergibt das
   IMMER exakt dasselbe Bild wie das ⚔️ im Titel, unabhängig davon,
   welche Emoji-Schriftart der Browser gerade verwendet. */
.battle-intro-sword {
  position: absolute;
  top: 50%;
  width: 32px;
  height: 64px;
  margin-top: -32px;
  overflow: hidden;
  opacity: 0;
}

.battle-intro-sword-glyph {
  position: absolute;
  top: 0;
  left: 0;
  font-size: 64px;
  line-height: 1;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.5));
}

.battle-intro-sword-left {
  left: calc(50% - 32px);
  transform: translateX(-150vw);
}

.battle-intro-sword-right {
  left: 50%;
  transform: translateX(150vw);
}

.battle-intro-sword-right .battle-intro-sword-glyph {
  left: -32px;
}

.battle-intro-flash {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, #ffe082 30%, rgba(255,224,130,0) 70%);
  opacity: 0;
  transform: scale(0);
}

.battle-intro-play .battle-intro-sword-left {
  animation: battleSwordFlyLeft 1s ease-out forwards;
}

.battle-intro-play .battle-intro-sword-right {
  animation: battleSwordFlyRight 1s ease-out forwards;
}

.battle-intro-play .battle-intro-flash {
  animation: battleSwordFlash 1s ease-out forwards;
}

@keyframes battleSwordFlyLeft {
  0%   { transform: translateX(-150vw); opacity: 0; }
  8%   { opacity: 1; }
  42%  { transform: translateX(-14px); opacity: 1; }
  48%  { transform: translateX(4px); }
  55%  { transform: translateX(-6px); }
  62%  { transform: translateX(0); }
  88%  { transform: translateX(0); opacity: 1; }
  100% { transform: translateX(0); opacity: 0; }
}

@keyframes battleSwordFlyRight {
  0%   { transform: translateX(150vw); opacity: 0; }
  8%   { opacity: 1; }
  42%  { transform: translateX(14px); opacity: 1; }
  48%  { transform: translateX(-4px); }
  55%  { transform: translateX(6px); }
  62%  { transform: translateX(0); }
  88%  { transform: translateX(0); opacity: 1; }
  100% { transform: translateX(0); opacity: 0; }
}

@keyframes battleSwordFlash {
  0%, 40%  { opacity: 0; transform: scale(0); }
  45%      { opacity: 1; transform: scale(9); }
  60%      { opacity: 0.6; transform: scale(13); }
  75%      { opacity: 0; transform: scale(16); }
  100%     { opacity: 0; transform: scale(16); }
}

@media (min-width: 768px) {
  .battle-intro-sword {
    width: 48px;
    height: 96px;
    margin-top: -48px;
  }

  .battle-intro-sword-glyph {
    font-size: 96px;
  }

  .battle-intro-sword-left {
    left: calc(50% - 48px);
  }

  .battle-intro-sword-right .battle-intro-sword-glyph {
    left: -48px;
  }
}
