* {
  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 {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: white;
  margin-top: 10px;
  margin-bottom: 8px;

  /* 🫧 Bubble */
  background: linear-gradient(135deg, #2196f3, #1565c0);
  padding: 14px 28px;
  border-radius: 999px;
  display: inline-block;
  /* 💎 Tiefe */
  box-shadow:
    0 6px 0 #0d47a1,
    0 10px 25px rgba(0,0,0,0.25);

  /* 🪄 Animation beim Laden */
  animation: titlePop 0.8s ease;
}

#gameTitle span {
  display: inline-block;
  transform: translateY(0);
  transition: 0.2s;
}

#gameTitle:hover span {
  transform: translateY(-3px);
}

#gameTitle:hover {
  transform: scale(1.05);
  transition: 0.2s;
}

#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:20px;
  font-weight:bold;
  text-align:center;

  display: block;   /* 👉 KEIN flex mehr */
}
/* --- 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;
}
#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 {
  font-size:14px;
  margin: 0;
  height:18px;
  opacity: 0.85;
}

#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;
  margin-top: -20px;
position: relative; 
}

#gameArea {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 20px;
  width: min(900px, 95vw);
}

#highscoresContainer {
  position: fixed;   /* 👈 statt absolute */
  right: 20px;
  top: 120px;         /* 👈 frei einstellbar */
  z-index: 999;
}
#inventoryContainer {
  position: fixed;
  left: 20px;   /* links statt rechts */
  top: 220px;
  z-index: 999;
}

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

  animation: slideInRight 0.6s ease;

  text-align: left;

  max-width: 240px;
  max-width: 92vw;

  padding: 18px;

  border-radius: 18px;

  backdrop-filter: blur(12px);

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

  border: 1px solid rgba(255,255,255,0.3);

  box-shadow:
    0 8px 25px rgba(0,0,0,0.3);

  margin-top: 0;
}

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

/* --- 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: fixed;
  bottom: 10px;
  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 {
  font-size: 20px;
  padding: 10px 15px;
  border-radius: 10px;
  margin-top: 8px;
 width: 100%;
  max-width: 400px;
}

#startScreen button {
  margin-top: 5px;
  font-size: 24px;
  padding: 15px 30px;
  border-radius: 12px;
  cursor: pointer;
  border: none;
  transition: 0.3s;
}

#startScreen button:hover {
  transform: scale(1.05);
}
#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: 10px 12px;
  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;
}

.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: 100; /* höher als Overlay */
  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: 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;
  position: absolute;
  margin: 20px auto 0 auto;

  top: 90px;     /* 🔼 höher / tiefer anpassen */
  right: 110px;   /* 👉 Abstand vom rechten Rand */
  width: 220px;  /* optional: feste Breite */
  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: inline-block;
  margin: 0 auto 10px auto;
  font-family: 'Inter', 'Segoe UI', sans-serif;
}

@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%;
  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 { 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: min(1000px, 95vw);
  max-width: 100%;

  margin: -20px auto 0 auto;  /* zieht sie nach oben */

  /* 🎨 Duolingo Card */
  background: #ffffff;
  border-radius: 24px;
  padding: 14px 24px;

  /* 💎 Schatten wie App */
  box-shadow:
    0 8px 0 #e0e0e0,
    0 15px 35px rgba(0,0,0,0.15);
  border: 2px solid #f1f1f1;
}

.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;
}

#startScreen {
  margin-top: 20px;
}

#backBtn {
  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: 15px;
}

.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 {
  position: fixed;
  top: 10px;
  left: 10px;

  width: clamp(120px, 22vw, 360px);

  max-width: 45vw;
  height: auto;

  z-index: 1000;
  opacity: 0.9;
  transition: all 0.3s;
}

#logo:hover {
transform: scale(1.05);
opacity: 1;
}
.night #logo {
filter: brightness(1.2);
} 

#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: center;
  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: 280px;
  min-height: 90px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  font-size: 22px;
  padding: 12px;
  border-radius: 14px;
}

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

#ankiButtons button {
  padding: 16px 20px;
  font-size: 22px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: 0.3s;
}

#ankiButtons button {
  padding: 18px;
  font-size: 32px;       /* 🔥 große Emojis */
  border-radius: 16px;
  min-width: 90px;
  min-height: 70px;
}

#ankiButtons button:hover {
  transform: scale(1.15);
  box-shadow: 0 0 20px rgba(0,0,0,0.4);
}

#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: 30px;
}

#hintBtn {
  padding: 18px 24px;
  font-size: 22px;
  border-radius: 16px;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, #ffd54f, #ff9800);
  color: #000;
  box-shadow: 0 8px 25px rgba(255,152,0,0.6);
  transition: all 0.3s;
  min-width: 220px;
}

#hintBtn:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 35px rgba(255,152,0,0.9);
}

.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;

  font-size: 24px;
  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;
}

#startItemBook {
  position: fixed;
  left: 20px;
  top: 220px;
  max-width: 240px;
  z-index: 999;
  animation: slideInRight 0.6s ease;
}

.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: transparent;    /* 🔥 KEIN grauer Block mehr */
  backdrop-filter: none;      /* 🔥 Schatten weg */
}

#dualInput {
  display: flex;
  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 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  column-gap: 20px;  /* 👉 horizontal */
  row-gap: 40px;     /* 👉 vertikal */
padding:18px 12px;
  justify-content: center;
  /* 🔥 NEU */
  grid-auto-rows: 110px;   /* 👉 feste Höhe für alle */
}

.button-row {
  display: flex;
  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;
}

.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;
  gap:10px;
  justify-content:center;
}

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

.locked-btn:hover {
  transform: none !important;
  box-shadow: none !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);
}

#authBox {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap; /* optional für mobile */
  margin: 0 auto 8px auto;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  padding: 10px 15px;
  border-radius: 12px;
  width: fit-content;
}

#authBox input {
  width: 140px;
  padding: 4px;
  font-size: 12px;
}

#authBox button {
  font-size: 12px;
  padding: 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 {
  font-size: 18px;        /* 🔥 kleiner */
  opacity: 0.8;
  margin-right: 10px;
}

/* --- Wort-Highlight sauber zentriert --- */
.wort-box {
  background: linear-gradient(135deg, #ff9800, #ff5722);
  color: white;
  padding: 15px 25px;
  border-radius: 15px;
  font-size: 36px;   /* 👉 kleiner */
    padding: 12px 16px;
  font-weight: bold;
  box-shadow: 0 6px 15px rgba(0,0,0,0.25);
  display: block;            /* 👉 GANZE ZEILE */
  width: fit-content;        /* 👉 Größe nur so groß wie Inhalt */
  margin: 0 auto 20px auto;  /* 👉 perfekt zentriert */
  letter-spacing: 1px;
}

.wort-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

#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);
}

.stats-filter-active {
  background: linear-gradient(135deg, #4caf50, #2e7d32) !important;
  color: white !important;

  box-shadow: 0 0 15px rgba(76,175,80,0.8);
  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;
}

#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;   /* 🔥 EXTREM wichtig */
  height: 100%;
  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: 38px;
  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;
}

.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{
  padding:10px 16px;
  border-radius:14px;
  background:#2d2d2d;
  color:white;
  font-weight:700;
  opacity:0.35;
  transition:all 0.25s ease;
  border:2px solid transparent;
}

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

#doubleTimeToggle{
  margin-left:75px;
  transform: scale(1.6);
  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);
}


