@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&family=Baloo+2:wght@700;800&display=swap');

:root {
  --pink: #F472B6;
  --pink-light: #FBCFE8;
  --pink-dark: #DB2777;
  --purple: #8B5CF6;
  --purple-light: #C4B5FD;
  --blue: #38BDF8;
  --blue-light: #BAE6FD;
  --mint: #2DD4BF;
  --mint-light: #99F6E4;
  --yellow: #FBBF24;
  --orange: #F59E0B;
  --red: #EF4444;
  --green: #34D399;
  --green-dark: #059669;
  --bg: #FDF2F8;
  --bg-card: rgba(255,255,255,0.85);
  --text: #1E293B;
  --text-light: #94A3B8;
  --shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.06);
  --shadow-hover: 0 4px 12px rgba(0,0,0,0.06), 0 12px 32px rgba(0,0,0,0.1);
  --radius: 24px;
  --radius-sm: 14px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Nunito', -apple-system, sans-serif;
  background: var(--bg);
  background-image: radial-gradient(ellipse at 20% 50%, rgba(251,207,232,0.4) 0%, transparent 50%),
                     radial-gradient(ellipse at 80% 20%, rgba(196,181,253,0.3) 0%, transparent 50%),
                     radial-gradient(ellipse at 50% 80%, rgba(186,230,253,0.25) 0%, transparent 50%);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}

.app-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 16px;
  min-height: 100vh;
  min-height: 100dvh;
}

/* LOGIN SCREEN */
.login-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  text-align: center;
  padding: 20px;
  background: linear-gradient(160deg, #FDF2F8 0%, #EDE9FE 40%, #DBEAFE 70%, #F0FDFA 100%);
  background-size: 200% 200%;
  animation: bgShift 20s ease infinite;
}

@keyframes bgShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.login-characters {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}

.login-char {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.login-char-label {
  font-family: 'Baloo 2', 'Nunito', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--purple);
  margin-top: 2px;
}

.login-title {
  font-family: 'Baloo 2', 'Nunito', sans-serif;
  font-size: 2.4rem;
  font-weight: 800;
  background: linear-gradient(90deg, #F472B6, #C084FC, #8B5CF6, #60A5FA, #F472B6);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: logoShimmer 6s ease-in-out infinite;
  margin-bottom: 8px;
  line-height: 1.3;
  filter: drop-shadow(0 2px 8px rgba(139,92,246,0.15));
}

.login-subtitle {
  font-size: 1.05rem;
  color: var(--purple);
  margin-bottom: 30px;
  font-weight: 600;
  opacity: 0.8;
  letter-spacing: 0.3px;
}

.login-box {
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06), 0 0 0 1px rgba(255,255,255,0.6) inset;
  width: 100%;
  max-width: 360px;
}

.login-box h2 {
  font-size: 1.25rem;
  color: var(--purple);
  margin-bottom: 20px;
  font-weight: 800;
}

.input-group {
  margin-bottom: 16px;
  text-align: left;
}

.input-group label {
  display: block;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input-group input {
  width: 100%;
  padding: 13px 16px;
  border: 2px solid #E2E8F0;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
  outline: none;
  background: rgba(255,255,255,0.7);
}

.input-group input:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.15);
  background: white;
}

.login-error {
  color: var(--red);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 12px;
  display: none;
}

.login-error.visible {
  display: block;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  line-height: 1;
}

.btn:active {
  transform: scale(0.96);
}

.btn-primary {
  background: linear-gradient(135deg, #F472B6 0%, #8B5CF6 100%);
  color: white;
  width: 100%;
  font-size: 1.1rem;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(139,92,246,0.25);
}

.btn-primary:hover {
  box-shadow: 0 4px 20px rgba(139,92,246,0.35);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255,255,255,0.8);
  color: var(--purple);
  border: 2px solid var(--purple-light);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  background: var(--purple);
  color: white;
  border-color: var(--purple);
}

.btn-back {
  background: white;
  color: var(--text-light);
  border: 2px solid #E8E8E8;
  padding: 10px 20px;
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.btn-back:hover {
  background: #F5F5F5;
  color: var(--text);
}

.btn-success {
  background: linear-gradient(135deg, var(--green) 0%, var(--mint) 100%);
  color: white;
}

.btn-warning {
  background: linear-gradient(135deg, var(--orange) 0%, var(--yellow) 100%);
  color: white;
}

/* HEADER */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  margin-bottom: 20px;
}

.app-logo {
  font-family: 'Baloo 2', 'Nunito', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  background: linear-gradient(90deg, #F472B6, #C084FC, #8B5CF6, #60A5FA, #F472B6);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: logoShimmer 6s ease-in-out infinite;
  display: flex;
  align-items: center;
  gap: 8px;
  text-shadow: none;
  letter-spacing: 0.3px;
  filter: drop-shadow(0 1px 4px rgba(139,92,246,0.15));
}

@keyframes logoShimmer {
  0% { background-position: 0% 50%; }
  50% { background-position: 150% 50%; }
  100% { background-position: 300% 50%; }
}

.app-logo span {
  font-size: 2.2rem;
  -webkit-text-fill-color: initial;
  animation: logoBookFloat 3s ease-in-out infinite;
  display: inline-block;
}

@keyframes logoBookFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-3px) rotate(-5deg); }
}

.header-actions {
  display: flex;
  gap: 8px;
}

.btn-icon {
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.5);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: var(--transition);
}

.btn-icon:hover {
  transform: scale(1.08);
  background: white;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* SCREEN TRANSITIONS */
.screen {
  display: none;
  animation: fadeIn 0.3s ease;
}

.screen.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes bounceIn {
  0% { transform: scale(0.3); opacity: 0; }
  50% { transform: scale(1.05); }
  70% { transform: scale(0.9); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes confetti {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(-200px) rotate(720deg); opacity: 0; }
}

@keyframes starBurst {
  0% { transform: scale(0) rotate(0deg); opacity: 1; }
  100% { transform: scale(1.5) rotate(180deg); opacity: 0; }
}

/* WELCOME SCREEN */
.welcome-section {
  text-align: center;
  margin-bottom: 30px;
}

.welcome-title {
  font-family: 'Baloo 2', 'Nunito', sans-serif;
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}

.welcome-text {
  font-size: 1rem;
  color: var(--text-light);
  font-weight: 600;
  letter-spacing: 0.2px;
}

.caricature-container {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 30px;
  margin: 25px 0;
  flex-wrap: wrap;
}

.caricature {
  text-align: center;
}

.caricature svg {
  display: block;
}

.caricature-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--pink-dark);
  margin-top: 4px;
}

/* CARDS */
.card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.card {
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid rgba(255,255,255,0.6);
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(255,255,255,0.8);
}

.card:active {
  transform: scale(0.98);
}

.card-icon {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--text);
}

.highlight-pink {
  color: #e91e90;
}

.card-disabled {
  opacity: 0.45;
  pointer-events: none;
  position: relative;
}

.card-disabled::after {
  content: 'Bald verfügbar';
  position: absolute;
  bottom: 12px;
  right: 14px;
  font-size: 0.7rem;
  color: #999;
  font-weight: 600;
  font-style: italic;
}

.card-desc {
  font-size: 0.85rem;
  color: var(--text-light);
  font-weight: 600;
}

.card.card-english {
  border-color: rgba(186,230,253,0.5);
  background: linear-gradient(135deg, rgba(240,249,255,0.8) 0%, rgba(255,255,255,0.7) 100%);
}

.card.card-english:hover {
  border-color: var(--blue);
}

.card.card-pink {
  border-color: rgba(251,207,232,0.5);
  background: linear-gradient(135deg, rgba(253,242,248,0.8) 0%, rgba(255,255,255,0.7) 100%);
}

.card.card-pink:hover {
  border-color: var(--pink);
}

.card.card-purple {
  border-color: rgba(196,181,253,0.5);
  background: linear-gradient(135deg, rgba(245,243,255,0.8) 0%, rgba(255,255,255,0.7) 100%);
}

.card.card-purple:hover {
  border-color: var(--purple);
}

.card.card-mint {
  border-color: rgba(153,246,228,0.4);
  background: linear-gradient(135deg, rgba(240,253,250,0.8) 0%, rgba(255,255,255,0.7) 100%);
}

.card.card-mint:hover {
  border-color: var(--mint);
}

.card.card-yellow {
  border-color: rgba(251,191,36,0.3);
  background: linear-gradient(135deg, rgba(255,251,235,0.8) 0%, rgba(255,255,255,0.7) 100%);
}

.card.card-yellow:hover {
  border-color: var(--orange);
}

.card.card-teal {
  border-color: rgba(20,184,166,0.3);
  background: linear-gradient(135deg, rgba(204,251,241,0.85) 0%, rgba(255,255,255,0.7) 100%);
}

.card.card-teal:hover {
  border-color: #14b8a6;
}

.card.card-orange {
  border-color: rgba(245,158,11,0.3);
  background: linear-gradient(135deg, rgba(255,237,213,0.85) 0%, rgba(255,255,255,0.7) 100%);
}

.card.card-orange:hover {
  border-color: var(--orange);
}

.card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, #34D399, #059669);
  color: white;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.3px;
  box-shadow: 0 1px 4px rgba(5,150,105,0.2);
}

/* SECTION HEADER */
.section-header {
  margin-bottom: 24px;
}

.section-header h1 {
  font-family: 'Baloo 2', 'Nunito', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}

.section-header p {
  font-size: 0.9rem;
  color: var(--text-light);
  font-weight: 600;
  letter-spacing: 0.2px;
}

/* VOCABULARY TEST */
.test-header {
  text-align: center;
  margin-bottom: 24px;
}

.test-progress {
  background: rgba(226,232,240,0.5);
  border-radius: 20px;
  height: 8px;
  margin-bottom: 12px;
  overflow: hidden;
}

.test-progress-bar {
  height: 100%;
  border-radius: 20px;
  background: linear-gradient(90deg, #F472B6 0%, #8B5CF6 100%);
  transition: width 0.4s ease;
  box-shadow: 0 0 8px rgba(139,92,246,0.3);
}

.test-count {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-light);
}

.test-question-card {
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(12px);
  border-radius: var(--radius);
  padding: 30px 24px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,0.6);
  text-align: center;
  margin-bottom: 20px;
}

.test-question-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.test-question-inner > div:first-child {
  flex: 1;
  text-align: center;
}

.test-word {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--purple);
  margin-bottom: 6px;
}

.test-instruction {
  font-size: 0.9rem;
  color: var(--text-light);
  font-weight: 600;
}

.speak-btn {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--purple);
  background: linear-gradient(135deg, #f0e6ff 0%, #e0d0ff 100%);
  cursor: pointer;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.25);
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.speak-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.4);
  background: linear-gradient(135deg, #e0d0ff 0%, #d0b8ff 100%);
}
.speak-btn:active {
  transform: scale(0.95);
}

/* Listen-first button for pronunciation test */
.btn-listen-first {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 20px;
  border: 3px solid var(--purple);
  background: linear-gradient(135deg, #f0e6ff 0%, #fff 100%);
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--purple);
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 3px 12px rgba(139,92,246,0.25);
}
.btn-listen-first:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 18px rgba(139,92,246,0.35);
}

/* Microphone button for pronunciation test */
.btn-mic {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 32px;
  border-radius: 24px;
  border: 3px solid #14b8a6;
  background: linear-gradient(135deg, #ccfbf1 0%, #f0fdfa 100%);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  box-shadow: 0 3px 12px rgba(20,184,166,0.25);
}
.btn-mic:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 20px rgba(20,184,166,0.4);
}
.btn-mic:active {
  transform: scale(0.97);
}
.btn-mic .mic-icon {
  font-size: 2.2rem;
}
.btn-mic .mic-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #0d9488;
}
.btn-mic.mic-active {
  border-color: #EF4444;
  background: linear-gradient(135deg, #FEE2E2 0%, #FFF 100%);
  animation: mic-pulse 1s ease-in-out infinite;
}
@keyframes mic-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.4); }
  50% { box-shadow: 0 0 0 12px rgba(239,68,68,0); }
}
.mic-status {
  margin-top: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  min-height: 1.4em;
}

/* Pronunciation test example sentence */
.pron-example {
  margin: 12px 0;
  padding: 10px 16px;
  font-size: 0.95rem;
  color: #4B5563;
  font-style: italic;
  text-align: center;
  background: rgba(255,255,255,0.6);
  border-radius: 8px;
  border-left: 3px solid #14b8a6;
}

/* Pronunciation speak area */
#pronSpeakArea .vocab-feedback {
  margin: 16px 0;
}

/* Mic permission hint dialog */
.mic-hint-dialog {
  background: #fff;
  border-radius: 20px;
  padding: 2rem 1.5rem;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: bounceIn 0.4s ease-out;
}
.mic-hint-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}
.mic-hint-title {
  font-family: 'Baloo 2', cursive;
  font-size: 1.4rem;
  color: #1e293b;
  margin-bottom: 0.5rem;
}
.mic-hint-text {
  font-size: 0.95rem;
  color: #475569;
  margin-bottom: 1rem;
  line-height: 1.5;
}
.mic-hint-steps {
  text-align: left;
  background: #f0fdfa;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
}
.mic-hint-step {
  font-size: 0.9rem;
  color: #1e293b;
  padding: 6px 0;
  line-height: 1.4;
  border-bottom: 1px solid #e2e8f0;
}
.mic-hint-step:last-child {
  border-bottom: none;
}
.mic-hint-note {
  font-size: 0.9rem;
  color: #14b8a6;
  font-weight: 700;
  margin-bottom: 1rem;
}
.mic-hint-buttons {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Audio equalizer visualization */
.equalizer {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
  height: 56px;
  margin-top: 14px;
  padding: 0 20px;
}
.eq-bar {
  width: 8px;
  height: 6px;
  border-radius: 4px;
  background: #14b8a6;
  transition: height 0.15s ease-out, background 0.15s;
}

/* Listening state: gentle wave */
.eq-listening .eq-bar {
  animation: eq-listen 1.4s ease-in-out infinite;
}
.eq-listening .eq-bar:nth-child(1) { animation-delay: 0s; }
.eq-listening .eq-bar:nth-child(2) { animation-delay: 0.12s; }
.eq-listening .eq-bar:nth-child(3) { animation-delay: 0.24s; }
.eq-listening .eq-bar:nth-child(4) { animation-delay: 0.36s; }
.eq-listening .eq-bar:nth-child(5) { animation-delay: 0.48s; }
.eq-listening .eq-bar:nth-child(6) { animation-delay: 0.36s; }
.eq-listening .eq-bar:nth-child(7) { animation-delay: 0.24s; }
.eq-listening .eq-bar:nth-child(8) { animation-delay: 0.12s; }
.eq-listening .eq-bar:nth-child(9) { animation-delay: 0s; }

@keyframes eq-listen {
  0%, 100% { height: 6px; background: #99e0d6; }
  50% { height: 16px; background: #14b8a6; }
}

/* Speaking state: each bar has its own unique animation for natural look */
.eq-speaking .eq-bar:nth-child(1) { animation: eq-s1 0.31s ease-in-out infinite alternate; }
.eq-speaking .eq-bar:nth-child(2) { animation: eq-s2 0.27s ease-in-out infinite alternate; }
.eq-speaking .eq-bar:nth-child(3) { animation: eq-s3 0.38s ease-in-out infinite alternate; }
.eq-speaking .eq-bar:nth-child(4) { animation: eq-s4 0.24s ease-in-out infinite alternate; }
.eq-speaking .eq-bar:nth-child(5) { animation: eq-s5 0.42s ease-in-out infinite alternate; }
.eq-speaking .eq-bar:nth-child(6) { animation: eq-s6 0.29s ease-in-out infinite alternate; }
.eq-speaking .eq-bar:nth-child(7) { animation: eq-s7 0.35s ease-in-out infinite alternate; }
.eq-speaking .eq-bar:nth-child(8) { animation: eq-s8 0.26s ease-in-out infinite alternate; }
.eq-speaking .eq-bar:nth-child(9) { animation: eq-s9 0.33s ease-in-out infinite alternate; }

@keyframes eq-s1 { 0% { height: 8px; } 100% { height: 32px; background: #0d9488; } }
@keyframes eq-s2 { 0% { height: 6px; } 100% { height: 44px; background: #0f766e; } }
@keyframes eq-s3 { 0% { height: 10px; } 100% { height: 28px; background: #14b8a6; } }
@keyframes eq-s4 { 0% { height: 5px; } 100% { height: 48px; background: #0d9488; } }
@keyframes eq-s5 { 0% { height: 12px; } 100% { height: 36px; background: #0f766e; } }
@keyframes eq-s6 { 0% { height: 7px; } 100% { height: 42px; background: #14b8a6; } }
@keyframes eq-s7 { 0% { height: 9px; } 100% { height: 30px; background: #0d9488; } }
@keyframes eq-s8 { 0% { height: 6px; } 100% { height: 46px; background: #0f766e; } }
@keyframes eq-s9 { 0% { height: 11px; } 100% { height: 34px; background: #14b8a6; } }

/* Speak button inside feedback (inline, smaller) */
.vocab-feedback {
  text-align: center;
  margin: 12px 0;
}

.vocab-feedback .speak-btn,
.feedback-box .speak-btn,
.correct-answer .speak-btn {
  display: inline-flex;
  width: 32px;
  height: 32px;
  font-size: 1rem;
  vertical-align: middle;
  margin-left: 6px;
}

.test-options {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.test-option {
  background: rgba(255,255,255,0.7);
  border: 2px solid rgba(226,232,240,0.6);
  border-radius: var(--radius-sm);
  padding: 16px;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  color: var(--text);
}

.test-option:hover {
  border-color: var(--purple-light);
  background: rgba(245,243,255,0.8);
  transform: translateY(-1px);
}

.test-option.selected {
  border-color: var(--purple);
  background: #F0E6F6;
  color: var(--purple);
}

.test-option.correct {
  border-color: var(--green);
  background: #E8F8F0;
  color: var(--green-dark);
  animation: pulse 0.5s ease;
}

.test-option.wrong {
  border-color: var(--red);
  background: #FDEDEC;
  color: var(--red);
}

.test-option.show-correct {
  border-color: var(--green);
  background: #E8F8F0;
  color: var(--green-dark);
  border-style: dashed;
}

.test-input-area {
  margin-bottom: 16px;
}

.test-input {
  width: 100%;
  padding: 16px;
  border: 2px solid rgba(226,232,240,0.6);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1.15rem;
  font-weight: 700;
  text-align: center;
  outline: none;
  transition: var(--transition);
  background: rgba(255,255,255,0.7);
}

.test-input:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.12);
  background: white;
}

.test-input.correct {
  border-color: var(--green);
  background: #E8F8F0;
}

.test-input.wrong {
  border-color: var(--red);
  background: #FDEDEC;
}

.feedback-box {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 16px;
  display: none;
  animation: fadeIn 0.3s ease;
}

.feedback-box.visible {
  display: block;
}

.feedback-box.correct {
  background: #E8F8F0;
  color: var(--green-dark);
  border: 2px solid var(--green);
}

.feedback-box.wrong {
  background: #FDEDEC;
  color: var(--red);
  border: 2px solid var(--red);
}

.feedback-box .correct-answer {
  display: block;
  margin-top: 6px;
  font-size: 1rem;
  color: var(--green-dark);
}

.test-submit-btn {
  width: 100%;
  padding: 16px;
  font-size: 1.1rem;
}

/* EXERCISE SCREEN */
.exercise-card {
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(12px);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,0.5);
  margin-bottom: 16px;
}

.exercise-title {
  margin-bottom: 12px;
}

.exercise-back-btn,
.screen-back-btn {
  display: inline-block;
  margin-bottom: 16px;
  padding: 8px 16px;
  background: rgba(255,255,255,0.7);
  border: 1.5px solid rgba(147,51,234,0.3);
  border-radius: 20px;
  color: var(--purple);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 0.2s;
}

.exercise-back-btn:hover,
.screen-back-btn:hover {
  background: rgba(147,51,234,0.1);
}

.exercise-reminder {
  background: linear-gradient(135deg, rgba(255,251,235,0.8) 0%, rgba(253,242,248,0.8) 100%);
  border: 1.5px solid rgba(251,191,36,0.4);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
  font-size: 0.95rem;
  line-height: 1.6;
  backdrop-filter: blur(8px);
}

.exercise-reminder strong {
  color: var(--purple);
}

.exercise-sentence {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.5;
  color: var(--text);
}

.exercise-sentence .blank {
  display: inline-block;
  min-width: 80px;
  border-bottom: 3px solid var(--purple);
  margin: 0 4px;
}

.choice-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.choice-btn {
  padding: 10px 20px;
  border: 2px solid rgba(226,232,240,0.6);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.7);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.choice-btn:hover {
  border-color: var(--purple-light);
  background: rgba(245,243,255,0.8);
  transform: translateY(-1px);
}

.choice-btn.selected {
  border-color: var(--purple);
  background: #F0E6F6;
  color: var(--purple);
}

.choice-btn.correct {
  border-color: var(--green);
  background: #E8F8F0;
  color: var(--green-dark);
}

.choice-btn.wrong {
  border-color: var(--red);
  background: #FDEDEC;
  color: var(--red);
}

/* INTRO SCREEN */
.intro-section {
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(12px);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,0.5);
  margin-bottom: 20px;
}

.intro-section h2 {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--purple);
  margin-bottom: 12px;
}

.intro-section p {
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 14px;
  color: var(--text);
}

.intro-example {
  background: rgba(245,243,255,0.6);
  border-left: 3px solid var(--purple);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 12px 16px;
  margin-bottom: 10px;
}

.intro-example .en {
  font-weight: 800;
  color: var(--purple);
  font-size: 1.05rem;
}

.intro-example .de {
  color: var(--text-light);
  font-weight: 600;
  font-size: 0.9rem;
}

.intro-rule {
  background: linear-gradient(135deg, rgba(251,207,232,0.5) 0%, rgba(196,181,253,0.5) 100%);
  border-radius: var(--radius-sm);
  padding: 16px;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--purple);
  text-align: center;
  margin-top: 14px;
  border: 1px solid rgba(196,181,253,0.3);
}

/* RESULTS SCREEN */
.results-card {
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(16px);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,0.6);
  text-align: center;
  margin-bottom: 20px;
}

.results-percent {
  font-size: 4rem;
  font-weight: 900;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #F472B6 0%, #8B5CF6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.results-message {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  line-height: 1.4;
}

.results-stats {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-bottom: 20px;
}

.results-stat {
  text-align: center;
}

.results-stat-number {
  font-size: 2rem;
  font-weight: 900;
}

.results-stat-number.correct-num { color: var(--green); }
.results-stat-number.wrong-num { color: var(--red); }

.results-stat-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
}

.results-actions {
  display: flex;
  gap: 10px;
  flex-direction: column;
}

/* PROGRESS SCREEN */
.progress-card {
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(12px);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,0.5);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.progress-date {
  font-size: 0.8rem;
  color: var(--text-light);
  font-weight: 700;
  min-width: 70px;
}

.progress-info {
  flex: 1;
}

.progress-title {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}

.progress-bar-bg {
  background: #E8E8E8;
  border-radius: 10px;
  height: 8px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 0.5s ease;
}

.progress-percent {
  font-size: 1rem;
  font-weight: 900;
  min-width: 50px;
  text-align: right;
}

.progress-bar-fill.high { background: var(--green); }
.progress-bar-fill.medium { background: var(--orange); }
.progress-bar-fill.low { background: var(--red); }

.no-progress {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-light);
  font-weight: 600;
}

/* CONFETTI */
.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1000;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  animation: confettiFall 3s ease-in infinite;
}

@keyframes confettiFall {
  0% { transform: translateY(-100px) rotate(0deg); opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* STAR ANIMATION */
.star-burst {
  position: fixed;
  font-size: 2rem;
  animation: starBurst 1s ease forwards;
  pointer-events: none;
  z-index: 999;
}

/* SPELLING FEEDBACK */
.spelling-feedback {
  margin-top: 6px;
  font-size: 0.85rem;
  font-weight: 600;
}

.spelling-correct-char {
  color: var(--green-dark);
}

.spelling-wrong-char {
  color: var(--red);
  text-decoration: underline;
  font-weight: 800;
}

/* TRANSLATE INPUT */
.translate-input {
  width: 100%;
  padding: 14px;
  border: 2px solid rgba(226,232,240,0.6);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  outline: none;
  transition: var(--transition);
  background: rgba(255,255,255,0.7);
}

.translate-input:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.12);
  background: white;
}

.translate-input.correct {
  border-color: var(--green);
  background: #E8F8F0;
}

.translate-input.wrong {
  border-color: var(--red);
  background: #FDEDEC;
}

/* PDF BUTTON */
.btn-pdf {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255,255,255,0.6);
  border: 1.5px solid rgba(226,232,240,0.5);
  border-radius: 10px;
  width: 34px;
  height: 34px;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  padding: 0;
  z-index: 2;
  backdrop-filter: blur(8px);
}

.btn-pdf:hover {
  background: white;
  border-color: var(--purple);
  transform: scale(1.08);
  box-shadow: 0 2px 8px rgba(139,92,246,0.15);
}

.test-type-card, .exercise-list-card {
  position: relative;
}

/* CARICATURE ANIMATIONS */
.eye-open {
  animation: eyeOpen 4s ease-in-out infinite;
}

.eye-closed {
  animation: eyeClosed 4s ease-in-out infinite;
}

.eye-open-delay {
  animation: eyeOpen 3.5s ease-in-out infinite;
  animation-delay: -1.2s;
}

.eye-closed-delay {
  animation: eyeClosed 3.5s ease-in-out infinite;
  animation-delay: -1.2s;
}

@keyframes eyeOpen {
  0%, 90%, 100% { opacity: 1; }
  95% { opacity: 0; }
}

@keyframes eyeClosed {
  0%, 90%, 100% { opacity: 0; }
  95% { opacity: 1; }
}

.caricature-animate {
  animation: gentleFloat 3s ease-in-out infinite;
}

.caricature-animate:nth-child(2) {
  animation-delay: -1.5s;
}

.caricature-animate:nth-child(3) {
  animation-delay: -0.8s;
}


@keyframes gentleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.hand-wave {
  animation: handWave 1.2s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: bottom center;
}

@keyframes handWave {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(12deg); }
  75% { transform: rotate(-12deg); }
}

.hand-wave-big {
  animation: handWaveBig 0.6s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: bottom center;
}

@keyframes handWaveBig {
  0%, 100% { transform: rotate(-15deg); }
  50% { transform: rotate(15deg); }
}

/* HORSE ANIMATIONS */
/* Holly dance animation (login) */
.holly-dance .holly-dance-body {
  animation: hollyDanceBounce 0.8s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: bottom center;
}

@keyframes hollyDanceBounce {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-6px) rotate(-3deg); }
  75% { transform: translateY(-6px) rotate(3deg); }
}

.holly-dance .holly-left-arm {
  animation: armDanceLeft 0.8s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: right bottom;
}

.holly-dance .holly-right-arm {
  animation: armDanceRight 0.8s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: left bottom;
}

@keyframes armDanceLeft {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-25deg); }
}

@keyframes armDanceRight {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(25deg); }
}

.holly-dance .holly-left-leg {
  animation: legDanceLeft 0.8s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center top;
}

.holly-dance .holly-right-leg {
  animation: legDanceRight 0.8s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center top;
}

@keyframes legDanceLeft {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(6deg); }
}

@keyframes legDanceRight {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-6deg); }
}

.holly-dance .music-note-1 {
  animation: noteFloat1 2s ease-in-out infinite;
  fill: #9B59B6;
}

.holly-dance .music-note-2 {
  animation: noteFloat2 2.5s ease-in-out infinite;
  fill: #FF69B4;
}

.holly-dance .music-note-3 {
  animation: noteFloat1 1.8s ease-in-out infinite 0.5s;
  fill: #5DADE2;
}

@keyframes noteFloat1 {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  50% { transform: translateY(-12px); opacity: 1; }
}

@keyframes noteFloat2 {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  50% { transform: translateY(-15px); opacity: 1; }
}

/* TOUCH FRIENDLY */
* {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* RESPONSIVE */
@media (max-width: 500px) {
  .app-container { padding: 12px; }
  .login-title { font-size: 1.4rem; }
  .welcome-title { font-size: 1.3rem; }
  .test-word { font-size: 1.5rem; }
  .results-percent { font-size: 3rem; }
  .caricature svg { max-width: 130px; height: auto; }
  .caricature-container { gap: 15px; }
  .login-characters { gap: 2px; }
  .login-char svg { width: 90px; height: auto; }
  .login-char-label { font-size: 0.7rem; }
}

/* iPad / Tablet */
@media (min-width: 768px) {
  .app-container {
    padding: 24px 32px;
    max-width: 900px;
  }
  .card-grid {
    grid-template-columns: 1fr 1fr;
  }
  .test-options {
    grid-template-columns: 1fr 1fr;
  }
  .results-actions {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
  .results-actions .btn {
    width: auto;
    min-width: 220px;
  }
  .login-box {
    max-width: 440px;
    padding: 40px;
  }
  .login-title {
    font-size: 2.2rem;
  }
  .caricature-container {
    gap: 40px;
  }
  .caricature svg {
    max-width: 200px;
    height: auto;
  }
  .welcome-title {
    font-size: 1.8rem;
  }
  .section-header h1 {
    font-size: 1.8rem;
  }
  .choice-buttons {
    gap: 12px;
  }
  .choice-btn {
    padding: 14px 24px;
    font-size: 1.05rem;
  }
  .test-question-card {
    padding: 40px 32px;
  }
  .test-word {
    font-size: 2.2rem;
  }
  .admin-stats-summary {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Large tablets / iPad Pro */
@media (min-width: 1024px) {
  .app-container {
    max-width: 960px;
  }
  .card-grid {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
}

/* Safe areas for notched iPhones */
@supports (padding: env(safe-area-inset-bottom)) {
  .app-container {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
    padding-bottom: env(safe-area-inset-bottom);
  }
  .login-screen {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
  .app-footer {
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }
}

/* SCROLLBAR */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--pink-light); border-radius: 3px; }

/* TOPIC LOCKED */
.card.locked {
  opacity: 0.5;
  cursor: not-allowed;
}

.card.locked:hover {
  transform: none;
  box-shadow: var(--shadow);
}

.lock-icon {
  font-size: 1.5rem;
  position: absolute;
  top: 12px;
  right: 12px;
}

/* EXERCISE QUESTION NUMBER */
.q-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--purple);
  color: white;
  font-size: 0.8rem;
  font-weight: 800;
  margin-right: 8px;
  flex-shrink: 0;
}

.exercise-question {
  display: flex;
  align-items: flex-start;
  margin-bottom: 6px;
}

/* ANSWER REVEAL */
.answer-reveal {
  font-size: 0.9rem;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 8px;
  margin-top: 6px;
  display: none;
}

.answer-reveal.visible {
  display: block;
  animation: fadeIn 0.3s ease;
}

.answer-reveal.is-correct {
  background: #E8F8F0;
  color: var(--green-dark);
}

.answer-reveal.is-wrong {
  background: #FDEDEC;
  color: var(--red);
}

/* EXERCISE LIST */
.exercise-list-card {
  cursor: pointer;
}

.exercise-list-card .card-progress {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.exercise-list-card .mini-bar {
  flex: 1;
  height: 6px;
  background: #E8E8E8;
  border-radius: 3px;
  overflow: hidden;
}

.exercise-list-card .mini-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--green);
}

.exercise-list-card .mini-percent {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-light);
}

/* Logout button */
.btn-logout {
  background: none;
  border: none;
  color: var(--text-light);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  padding: 8px;
}

.btn-logout:hover {
  color: var(--red);
}

/* Vocab test type cards */
.test-type-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
}

.test-type-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.test-type-info { flex: 1; }

.test-type-title {
  font-size: 1rem;
  font-weight: 800;
}

.test-type-desc {
  font-size: 0.8rem;
  color: var(--text-light);
  font-weight: 600;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--purple);
  text-decoration: none;
  cursor: pointer;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb .sep {
  color: var(--pink-light);
}

/* Footer */
.app-footer {
  text-align: center;
  padding: 20px 0;
  margin-top: 32px;
  font-size: 0.7rem;
  color: rgba(148,163,184,0.6);
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* Admin Stats Table */
.admin-stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  margin-top: 16px;
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,0.5);
}

.admin-stats-table th {
  background: linear-gradient(135deg, #8B5CF6, #7C3AED);
  color: white;
  padding: 12px 8px;
  text-align: left;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.3px;
}

.admin-stats-table td {
  padding: 10px 8px;
  border-bottom: 1px solid rgba(139,92,246,0.08);
}

.admin-stats-table tr:last-child td {
  border-bottom: none;
}

.admin-stats-table tr:nth-child(even) {
  background: rgba(245,243,255,0.4);
}

.admin-stats-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.admin-stat-card {
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  padding: 18px 16px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,0.5);
}

.admin-stat-card .stat-value {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--purple);
}

.admin-stat-card .stat-label {
  font-size: 0.72rem;
  color: var(--text-light);
  margin-top: 4px;
  letter-spacing: 0.3px;
}

.btn-danger {
  background: linear-gradient(135deg, #EF4444, #DC2626);
  color: white;
  border: none;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  width: 100%;
  margin-top: 24px;
  box-shadow: 0 2px 8px rgba(239,68,68,0.25);
  transition: var(--transition);
}

.btn-danger:hover {
  box-shadow: 0 4px 16px rgba(239,68,68,0.3);
  transform: translateY(-1px);
}

.btn-danger:active {
  transform: scale(0.97);
}

/* Admin tabs */
.admin-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1.5rem;
  border-bottom: 3px solid #e2e8f0;
}
.admin-tab {
  flex: 1;
  padding: 12px 16px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -3px;
  font-family: 'Baloo 2', cursive;
  font-size: 1rem;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.2s;
}
.admin-tab.active {
  color: var(--purple);
  border-bottom-color: var(--purple);
}
.admin-tab:hover:not(.active) {
  color: #64748b;
}

/* Booster Admin */
.booster-topic-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 1rem;
}
.booster-topic-tab {
  flex: 1;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 2px solid #e2e8f0;
  background: #fff;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s;
}
.booster-topic-tab.active {
  border-color: var(--purple);
  background: linear-gradient(135deg, #f3e8ff, #ede9fe);
  color: var(--purple);
}
.booster-add-form {
  background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1rem;
  border: 2px solid #bbf7d0;
}
.booster-add-form h3 {
  margin: 0 0 0.75rem 0;
  font-size: 1rem;
  color: #16a34a;
}
.booster-add-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.booster-add-row .field {
  flex: 1;
}
.booster-add-row .field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: #475569;
  margin-bottom: 4px;
}
.booster-add-row .field input {
  width: 100%;
  padding: 8px 12px;
  border: 2px solid #d1d5db;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  box-sizing: border-box;
}
.booster-add-row .field input:focus {
  border-color: var(--purple);
  outline: none;
}
.booster-add-btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: #fff;
  font-weight: 800;
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}
.booster-add-btn:hover {
  transform: scale(1.03);
  box-shadow: 0 2px 8px rgba(22,163,74,0.3);
}
.booster-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.booster-table th {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  color: #fff;
  padding: 10px 12px;
  text-align: left;
  font-size: 0.85rem;
  font-weight: 700;
}
.booster-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.9rem;
  vertical-align: middle;
}
.booster-table tr:nth-child(even) {
  background: #f8fafc;
}
.booster-table tr:hover {
  background: #f0f0ff;
}
.booster-source {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
}
.booster-source.test {
  background: #fef3c7;
  color: #b45309;
}
.booster-source.manual {
  background: #dbeafe;
  color: #1d4ed8;
}
.booster-actions {
  white-space: nowrap;
}
.booster-edit-btn,
.booster-delete-btn,
.booster-save-btn,
.booster-cancel-btn {
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  transition: all 0.2s;
}
.booster-edit-btn:hover {
  background: #ede9fe;
  transform: scale(1.1);
}
.booster-delete-btn:hover {
  background: #fee2e2;
  transform: scale(1.1);
}
.booster-save-btn:hover {
  background: #dcfce7;
  transform: scale(1.1);
}
.booster-cancel-btn:hover {
  background: #f1f5f9;
  transform: scale(1.1);
}
.booster-inline-input {
  width: 100%;
  padding: 5px 8px;
  border: 2px solid var(--purple);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  box-sizing: border-box;
  background: #faf5ff;
}
.booster-inline-input:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124,58,237,0.15);
}
.booster-empty {
  text-align: center;
  padding: 2rem;
  color: #94a3b8;
  font-size: 1rem;
}
.booster-count {
  font-size: 0.85rem;
  color: #64748b;
  margin-bottom: 0.5rem;
}
.booster-clear-btn {
  margin-top: 1rem;
  padding: 8px 16px;
  border-radius: 8px;
  border: 2px solid #ef4444;
  background: #fff;
  color: #ef4444;
  font-weight: 700;
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}
.booster-clear-btn:hover {
  background: #fef2f2;
}

/* Dialog / Chat UI */
.card-blue {
  background: linear-gradient(135deg, rgba(99,102,241,0.12), rgba(79,70,229,0.08));
  border: 2px solid rgba(99,102,241,0.25);
}
.beta-badge {
  display: inline-block;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: #fff;
  font-size: 0.55em;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 8px;
  vertical-align: middle;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-left: 4px;
  line-height: 1.4;
}

/* ====== MEDIATION ====== */
.card-mediation {
  background: linear-gradient(135deg, rgba(20,184,166,0.10), rgba(13,148,136,0.06));
  border: 2px solid rgba(20,184,166,0.25);
  cursor: pointer;
}
.mediation-story-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  margin-bottom: 10px;
  background: rgba(255,255,255,0.55);
  border-radius: 14px;
  border: 2px solid rgba(148,163,184,0.15);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.mediation-story-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.mediation-story-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #14b8a6, #0d9488);
  color: #fff;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}
.mediation-story-info {
  flex: 1;
}
.mediation-story-title {
  font-family: 'Baloo 2', cursive;
  font-weight: 700;
  font-size: 1.05rem;
  color: #1e293b;
}
.mediation-story-meta {
  font-size: 0.8rem;
  color: #64748b;
}
.mediation-story-arrow {
  font-size: 1.5rem;
  color: #94a3b8;
  font-weight: 700;
}
.mediation-reader {
  max-width: 700px;
  margin: 0 auto;
}
.mediation-reader-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.mediation-reader-header h2 {
  font-family: 'Baloo 2', cursive;
  font-size: 1.4rem;
  color: #1e293b;
  margin: 0;
}
.btn-speak-mediation {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 8px 18px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}
.btn-speak-mediation:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(139,92,246,0.3);
}
.mediation-text {
  background: rgba(255,255,255,0.7);
  border: 2px solid rgba(148,163,184,0.2);
  border-radius: 16px;
  padding: 20px 24px;
  font-size: 1.1rem;
  line-height: 1.8;
  color: #1e293b;
  margin-bottom: 16px;
}
.mediation-btn-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.mediation-speed-group {
  display: flex;
  align-items: center;
  gap: 0;
}
.mediation-speed-group .btn-speak-mediation {
  border-radius: 0;
}
.mediation-speed-group .btn-speed:first-child {
  border-radius: 12px 0 0 12px;
}
.mediation-speed-group .btn-speed:last-child {
  border-radius: 0 12px 12px 0;
}
.btn-speed {
  background: linear-gradient(135deg, #a78bfa, #8b5cf6);
  color: #fff;
  border: none;
  padding: 8px 12px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-speed:hover {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}
.mediation-speed-label {
  text-align: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #7c3aed;
  min-height: 1.2em;
  margin-bottom: 10px;
  opacity: 0;
  transition: opacity 0.3s;
}
.mediation-translate-area {
  text-align: center;
  margin-bottom: 12px;
}
.btn-mediation-translate {
  background: rgba(107,114,128,0.12);
  border: 2px solid rgba(107,114,128,0.25);
  border-radius: 14px;
  padding: 10px 22px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #4b5563;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.btn-mediation-translate:hover {
  background: rgba(107,114,128,0.22);
  transform: translateY(-1px);
}
.mediation-translation {
  background: linear-gradient(135deg, rgba(254,243,199,0.7), rgba(253,230,138,0.5));
  border: 2px solid rgba(251,191,36,0.3);
  border-radius: 16px;
  padding: 20px 24px;
  font-size: 1.05rem;
  line-height: 1.8;
  color: #78350f;
  margin-bottom: 20px;
  font-style: italic;
}
.mediation-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
}
.dialog-chat {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 1rem 0;
  max-height: 65vh;
  overflow-y: auto;
  scroll-behavior: smooth;
}
.dialog-bubble {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 0.95rem;
  line-height: 1.5;
  animation: bubbleIn 0.3s ease-out;
}
@keyframes bubbleIn {
  from { opacity: 0; transform: translateY(10px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.dialog-bubble.shop {
  align-self: flex-start;
  background: linear-gradient(135deg, #ede9fe, #e0e7ff);
  border: 2px solid #c7d2fe;
  border-bottom-left-radius: 4px;
  color: #1e1b4b;
}
.dialog-bubble.shop .bubble-label {
  font-size: 0.75rem;
  font-weight: 800;
  color: #6366f1;
  margin-bottom: 4px;
}
.dialog-bubble.user {
  align-self: flex-end;
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  border: 2px solid #6ee7b7;
  border-bottom-right-radius: 4px;
  color: #064e3b;
}
.dialog-bubble.user .bubble-label {
  font-size: 0.75rem;
  font-weight: 800;
  color: #059669;
  margin-bottom: 4px;
}
.dialog-bubble.correction {
  align-self: flex-start;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 2px solid #fbbf24;
  border-bottom-left-radius: 4px;
  color: #78350f;
  font-size: 0.88rem;
}
.dialog-bubble.correction .bubble-label {
  font-size: 0.75rem;
  font-weight: 800;
  color: #b45309;
  margin-bottom: 4px;
}
.dialog-bubble.improvement {
  align-self: flex-end;
  background: linear-gradient(135deg, #ede9fe, #ddd6fe);
  border: 2px solid #a78bfa;
  border-bottom-right-radius: 4px;
  color: #4c1d95;
  font-size: 0.85rem;
  max-width: 88%;
}
.dialog-bubble.improvement .bubble-label {
  font-size: 0.75rem;
  font-weight: 800;
  color: #6d28d9;
  margin-bottom: 4px;
}
.dialog-bubble.system {
  align-self: center;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 0.85rem;
  text-align: center;
  max-width: 95%;
  border-radius: 10px;
}
.dialog-bubble .de-hint-btn {
  margin-top: 6px;
  background: rgba(107, 114, 128, 0.12);
  border: 1px solid rgba(107, 114, 128, 0.25);
  border-radius: 12px;
  padding: 3px 10px;
  font-size: 0.75rem;
  color: #6b7280;
  cursor: pointer;
  transition: background 0.2s;
}
.dialog-bubble .de-hint-btn:hover {
  background: rgba(107, 114, 128, 0.22);
}
.dialog-bubble .de-hint {
  margin-top: 6px;
  font-size: 0.8rem;
  color: #6b7280;
  font-style: italic;
}
.dialog-input-area {
  text-align: center;
  padding: 0.75rem 0;
  min-height: 60px;
}
.dialog-mic-status {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.dialog-eq {
  margin: 8px auto;
}
.dialog-typing {
  display: inline-flex;
  gap: 4px;
  padding: 4px 0;
}
.dialog-typing span {
  width: 8px;
  height: 8px;
  background: #6366f1;
  border-radius: 50%;
  animation: typingDot 1.2s ease-in-out infinite;
}
.dialog-typing span:nth-child(2) { animation-delay: 0.2s; }
.dialog-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingDot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}
.dialog-select-card {
  background: linear-gradient(135deg, rgba(99,102,241,0.1), rgba(79,70,229,0.06));
  border: 2px solid rgba(99,102,241,0.2);
  border-radius: var(--radius);
  padding: 1.2rem;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 0.75rem;
}
.dialog-select-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99,102,241,0.15);
  border-color: #6366f1;
}
.dialog-select-card .dialog-card-title {
  font-family: 'Baloo 2', cursive;
  font-size: 1.1rem;
  color: #4338ca;
  margin-bottom: 4px;
}
.dialog-select-card .dialog-card-desc {
  font-size: 0.85rem;
  color: #64748b;
}
.dialog-done-card {
  text-align: center;
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 2px solid #86efac;
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  margin-top: 1rem;
}

/* Correction / Lernkontrolle */
.btn-correction {
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: white;
  border: none;
  padding: 16px 28px;
  border-radius: var(--radius-sm);
  font-size: 1.05rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  width: 100%;
  animation: pulse 2s infinite;
  box-shadow: 0 2px 8px rgba(245,158,11,0.3);
}

.btn-correction:active {
  transform: scale(0.97);
}

/* Papa reaction in results */
.results-papa {
  text-align: center;
  margin-bottom: 12px;
  animation: bounceIn 0.6s ease;
}

/* Back button */
.btn-back {
  background: none;
  border: 2px solid var(--purple-light);
  color: var(--purple);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 8px;
  font-family: 'Nunito', sans-serif;
}

.btn-back:active {
  background: var(--purple-light);
  color: white;
}

.correction-badge {
  display: inline-block;
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: white;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: 0.3px;
  box-shadow: 0 1px 4px rgba(245,158,11,0.25);
}

/* FOOTER DOG */
@keyframes dogWalk {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

@keyframes dogTailWag {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-25deg); }
}

@keyframes dogLegFwd {
  0%, 100% { transform: rotate(15deg); }
  50% { transform: rotate(-15deg); }
}

@keyframes dogLegBack {
  0%, 100% { transform: rotate(-15deg); }
  50% { transform: rotate(15deg); }
}

@keyframes dogZzzFloat {
  0% { transform: translateY(0); opacity: 0.3; }
  50% { transform: translateY(-10px); opacity: 1; }
  100% { transform: translateY(0); opacity: 0.3; }
}

@keyframes dogHeadBob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(2px) rotate(3deg); }
}
