/* =============================================
   BASIS — Schriften, Hintergrund, Grundlayout
   ============================================= */
html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  background: #0f0c2a;
}

body {
  display: block;
  position: relative;
  overflow-x: hidden;
  /* Osmanischer Sternenhimmel über Istanbul */
  background:
    /* Goldener Schimmer oben — Kuppel der Moschee */
    radial-gradient(ellipse at 50% -10%,  rgba(212,175,55,0.22)  0%, transparent 55%),
    /* Morgendliches Türkis am Horizont */
    radial-gradient(ellipse at 100% 60%,  rgba(0,168,160,0.18)   0%, transparent 50%),
    /* Tiefes Violett — Hauch Bosporus-Nacht */
    radial-gradient(ellipse at 0%   40%,  rgba(120,40,140,0.20)   0%, transparent 55%),
    /* Warmes Rot — osmanische Flagge */
    radial-gradient(ellipse at 85%  90%,  rgba(190,30,45,0.16)   0%, transparent 45%),
    /* Tiefblauer Nachthimmel */
    linear-gradient(175deg, #0f0c2a 0%, #1a1550 35%, #0d2a4a 70%, #10192e 100%);
  background-attachment: fixed;
  animation: skyDrift 18s ease-in-out infinite alternate;
}

@keyframes skyDrift {
  0%   { filter: hue-rotate(0deg)   brightness(1);    }
  50%  { filter: hue-rotate(8deg)   brightness(1.06); }
  100% { filter: hue-rotate(-6deg)  brightness(0.97); }
}

/* =============================================
   SKY DECORATION — Sterne & Monde links/rechts
   ============================================= */

.sky-decor {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

/* Basisstil alle Deko-Elemente */
.deco-star, .deco-moon {
  position: absolute;
  pointer-events: none;
  user-select: none;
  line-height: 1;
}

.deco-star {
  color: rgba(255, 245, 180, 0.75);
  animation: starFloat 6s ease-in-out infinite alternate;
}

.deco-moon {
  color: rgba(255, 220, 100, 0.55);
  animation: moonFloat 9s ease-in-out infinite alternate;
  font-style: normal;
}

/* Linke Seite */
.s1  { left: 2%;  top:  8%;  font-size: 0.85rem; animation-delay: 0s;    animation-duration: 7s;  }
.s2  { left: 5%;  top: 22%;  font-size: 0.55rem; animation-delay: 1.2s;  animation-duration: 5s;  opacity: 0.6; }
.s3  { left: 1%;  top: 38%;  font-size: 1rem;    animation-delay: 2.5s;  animation-duration: 8s;  }
.s4  { left: 7%;  top: 55%;  font-size: 0.5rem;  animation-delay: 0.8s;  animation-duration: 6s;  opacity: 0.5; }
.s5  { left: 3%;  top: 70%;  font-size: 1.4rem;  animation-delay: 3s;    animation-duration: 9s;  opacity: 0.3; }
.s6  { left: 9%;  top: 85%;  font-size: 0.7rem;  animation-delay: 1.5s;  animation-duration: 7s;  }
.m1  { left: 1%;  top: 14%;  font-size: 1.6rem;  animation-delay: 0.5s;  animation-duration: 11s; }
.m2  { left: 6%;  top: 62%;  font-size: 1.1rem;  animation-delay: 4s;    animation-duration: 13s; opacity: 0.45; }

/* Rechte Seite */
.s7  { right: 3%;  top: 12%;  font-size: 0.75rem; animation-delay: 1s;    animation-duration: 6s;  }
.s8  { right: 6%;  top: 27%;  font-size: 1rem;    animation-delay: 2s;    animation-duration: 8s;  }
.s9  { right: 2%;  top: 44%;  font-size: 0.5rem;  animation-delay: 0.3s;  animation-duration: 5s;  opacity: 0.55; }
.s10 { right: 8%;  top: 60%;  font-size: 0.85rem; animation-delay: 3.5s;  animation-duration: 7s;  }
.s11 { right: 4%;  top: 75%;  font-size: 1.5rem;  animation-delay: 1.8s;  animation-duration: 9s;  opacity: 0.3; }
.s12 { right: 1%;  top: 88%;  font-size: 0.65rem; animation-delay: 2.8s;  animation-duration: 6s;  }
.m3  { right: 5%;  top: 35%;  font-size: 1.3rem;  animation-delay: 2s;    animation-duration: 12s; opacity: 0.5; }

/* Mitte oben */
.s13 { left: 30%; top: 3%;   font-size: 0.6rem;  animation-delay: 1s;    animation-duration: 7s;  opacity: 0.5; }
.s14 { left: 60%; top: 6%;   font-size: 0.45rem; animation-delay: 2.5s;  animation-duration: 5s;  opacity: 0.4; }

@keyframes starFloat {
  0%   { transform: translateY(0px)   scale(1);    opacity: 0.6; }
  50%  { transform: translateY(-5px)  scale(1.15); opacity: 1;   }
  100% { transform: translateY(2px)   scale(0.9);  opacity: 0.7; }
}

/* =============================================
   RAKETE — CSS Motion Path (Bézierkurve)
   ============================================= */
.flying-rocket {
  position: fixed;
  width: 44px;
  height: 96px;
  top: 0; left: 0;           /* Anker — Motion Path übernimmt die Position */
  offset-path: path('M -60 820 C 80 700, 180 520, 280 340 S 420 140, 520 -60');
  offset-rotate: auto 90deg; /* +90° dreht die Spitze (SVG-Top) in Flugrichtung */
  offset-distance: 0%;
  animation: rocketFly 9s cubic-bezier(0.35, 0, 0.55, 1) infinite;
  animation-delay: 1s;
  opacity: 0;
  z-index: 0;
  pointer-events: none;
  filter: drop-shadow(0 0 8px rgba(255,160,60,0.7)) drop-shadow(0 0 3px rgba(255,220,80,0.45));
}

@keyframes rocketFly {
  0%   { offset-distance: 0%;   opacity: 0;   }
  6%   { opacity: 1;            }
  88%  { opacity: 1;            }
  100% { offset-distance: 100%; opacity: 0;   }
}

/* =============================================
   ASTRONAUT — CSS Motion Path (S-Kurve, schwerelos)
   ============================================= */
.flying-astronaut {
  position: fixed;
  width: 60px;
  height: 78px;
  top: 0; left: 0;
  /* Sanfte S-Kurve von rechts nach links — schwebt durch den Raum */
  offset-path: path('M 520 160 C 420 180, 340 130, 260 200 S 120 320, -60 340');
  offset-rotate: auto 90deg;  /* 90° Korrektur damit er aufrecht schwebt */
  offset-distance: 0%;
  animation: astronautDrift 28s ease-in-out infinite;
  animation-delay: 12s;
  opacity: 0;
  z-index: 0;
  pointer-events: none;
  filter: drop-shadow(0 0 10px rgba(100,180,255,0.5));
}

@keyframes astronautDrift {
  0%   { offset-distance: 0%;   opacity: 0;  }
  7%   { opacity: 1;            }
  90%  { opacity: 1;            }
  100% { offset-distance: 100%; opacity: 0;  }
}

@keyframes moonFloat {
  0%   { transform: translateY(0px)  rotate(-5deg);  opacity: 0.45; }
  50%  { transform: translateY(-8px) rotate(3deg);   opacity: 0.75; }
  100% { transform: translateY(3px)  rotate(-8deg);  opacity: 0.5;  }
}

/* =============================================
   STERNE — CSS-generierter Sternenhimmel
   ============================================= */

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  /* Viele kleine Sterne via box-shadow */
  background:
    radial-gradient(1px 1px at  4%  8%, rgba(255,255,255,0.85) 0%, transparent 100%),
    radial-gradient(1px 1px at 11% 16%, rgba(255,255,220,0.7)  0%, transparent 100%),
    radial-gradient(1px 1px at 18%  3%, rgba(255,255,255,0.9)  0%, transparent 100%),
    radial-gradient(1px 1px at 26% 22%, rgba(255,235,180,0.75) 0%, transparent 100%),
    radial-gradient(1px 1px at 33%  7%, rgba(255,255,255,0.6)  0%, transparent 100%),
    radial-gradient(1px 1px at 41% 14%, rgba(220,235,255,0.8)  0%, transparent 100%),
    radial-gradient(1px 1px at 48%  2%, rgba(255,255,255,0.95) 0%, transparent 100%),
    radial-gradient(1px 1px at 55% 19%, rgba(255,255,220,0.65) 0%, transparent 100%),
    radial-gradient(1px 1px at 63% 10%, rgba(255,255,255,0.7)  0%, transparent 100%),
    radial-gradient(1px 1px at 70%  5%, rgba(255,240,200,0.85) 0%, transparent 100%),
    radial-gradient(1px 1px at 77% 25%, rgba(255,255,255,0.6)  0%, transparent 100%),
    radial-gradient(1px 1px at 84%  1%, rgba(220,220,255,0.9)  0%, transparent 100%),
    radial-gradient(1px 1px at 91% 18%, rgba(255,255,255,0.75) 0%, transparent 100%),
    radial-gradient(1px 1px at 97% 12%, rgba(255,250,220,0.8)  0%, transparent 100%),
    radial-gradient(1.5px 1.5px at  7% 30%, rgba(255,255,255,0.9) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 21% 35%, rgba(255,240,180,0.85) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 38% 28%, rgba(255,255,255,0.7) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 52% 40%, rgba(220,235,255,0.9) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 67% 33%, rgba(255,255,255,0.8) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 80% 38%, rgba(255,245,200,0.85) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 93% 29%, rgba(255,255,255,0.7) 0%, transparent 100%),
    radial-gradient(2px 2px at 14%  50%, rgba(255,255,255,0.5)  0%, transparent 100%),
    radial-gradient(2px 2px at 30%  45%, rgba(255,230,150,0.6)  0%, transparent 100%),
    radial-gradient(2px 2px at 46%  55%, rgba(255,255,255,0.55) 0%, transparent 100%),
    radial-gradient(2px 2px at 61%  48%, rgba(200,220,255,0.65) 0%, transparent 100%),
    radial-gradient(2px 2px at 75%  52%, rgba(255,255,255,0.5)  0%, transparent 100%),
    radial-gradient(2px 2px at 88%  44%, rgba(255,240,180,0.6)  0%, transparent 100%),
    /* Großer Stern / Venus */
    radial-gradient(3px 3px at 72% 8%, rgba(255,245,180,1) 0%, rgba(255,220,100,0.4) 60%, transparent 100%);
  animation: starTwinkle 6s ease-in-out infinite alternate;
}

@keyframes starTwinkle {
  0%   { opacity: 0.7; }
  33%  { opacity: 1;   }
  66%  { opacity: 0.8; }
  100% { opacity: 0.95; }
}

/* Halbmond — oben links */
body::after {
  content: '';
  position: fixed;
  top: 18px;
  left: 22px;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: transparent;
  box-shadow:
    inset 18px -5px 0 0 rgba(255, 230, 120, 0.85),
    0 0 26px 8px rgba(255, 200, 60, 0.22);
  pointer-events: none;
  z-index: 0;
  animation: moonGlow 8s ease-in-out infinite alternate;
}

@keyframes moonGlow {
  0%   { box-shadow: inset 18px -5px 0 0 rgba(255,230,120,0.85), 0 0 26px 8px rgba(255,200,60,0.22); }
  100% { box-shadow: inset 18px -5px 0 0 rgba(255,245,160,0.98), 0 0 40px 14px rgba(255,215,80,0.38); }
}

.container {
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  text-align: left;
  padding: 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
  padding-left: calc(16px + env(safe-area-inset-left));
  padding-right: calc(16px + env(safe-area-inset-right));
  margin: 0;
  border-radius: 0;
  background: transparent;
  position: relative;
  z-index: 1;
}

.dashboard-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
  gap: 12px;
}

/* Heading auf dunklem Hintergrund lesbar */
#greeting {
  color: #ffffff;
  text-shadow: 0 2px 12px rgba(0,0,0,0.6);
}

.account-area {
  position: relative;
}

.account-btn {
  border: 1px solid #c6d0e2;
  background: #ffffff;
  color: #000000;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 700;
}

.account-btn:hover,
.account-btn:focus,
.account-btn:active {
  color: #000000;
  background: #f0f5fb;
  outline: none;
}
.account-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: white;
  border: 1px solid #d8e3ef;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.12);
  padding: 8px;
  z-index: 10;
  width: 170px;
}

.account-menu button {
  width: 100%;
  padding: 8px;
  text-align: left;
  border: none;
  background: transparent;
  cursor: pointer;
  color: #000000;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-menu button:hover {
  background: #f0f4fb;
  color: #000000;
}

.logout-bottom {
  margin-top: 20px;
}

/* =============================================
   REVIEW SECTION — "Heute wiederholen"
   ============================================= */

.review-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  background: rgba(225, 242, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1.5px solid rgba(100,180,240,0.5);
  border-radius: 14px;
  margin-bottom: 14px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.28);
}

.review-section-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.review-icon {
  font-size: 1.7rem;
  line-height: 1;
}

.review-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #1a3a5c;
}

.review-subtitle {
  font-size: 0.8rem;
  color: #4a6a8c;
  margin-top: 2px;
}

.review-start-btn {
  background: linear-gradient(135deg, #1a6fa8, #0d9488);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 9px 16px;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.9rem;
  white-space: nowrap;
  flex-shrink: 0;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 3px 10px rgba(26,111,168,0.35);
  animation: pulseBtn 2.5s ease-in-out infinite;
}
.review-start-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 18px rgba(26,111,168,0.45);
  animation: none;
}

@keyframes pulseBtn {
  0%, 100% { box-shadow: 0 3px 10px rgba(26,111,168,0.35); }
  50%       { box-shadow: 0 3px 20px rgba(26,111,168,0.65); }
}

/* =============================================
   QUIZ TYPE LABEL — zeigt Übungstyp
   ============================================= */

.quiz-type-label {
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #6a7480;
  margin-bottom: 5px;
}

/* =============================================
   MICRO-FEEDBACK — kurze Rückmeldung pro Frage
   ============================================= */

.micro-feedback {
  margin-top: 8px;
  padding: 7px 14px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.92rem;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  display: inline-block;
}

.micro-feedback-show {
  opacity: 1;
  transform: translateY(0);
}

.micro-feedback-hide {
  opacity: 0;
  transform: translateY(-5px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.micro-correct { background: #d4f5e2; color: #1a5c39; }
.micro-wrong   { background: #fde8e8; color: #9b1c1c; }

/* =============================================
   STREAK — Tages-Streak mit Flamme
   ============================================= */

.streak-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  padding: 12px 16px;
  background: rgba(255, 248, 235, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1.5px solid rgba(255,210,100,0.6);
  border-radius: 14px;
  position: relative;
  box-shadow: 0 4px 18px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,200,60,0.15);
  transition: box-shadow 0.2s;
}
.streak-bar:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.35), 0 0 12px rgba(255,200,60,0.2);
}

.streak-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

/* Level 0 — noch keine Streak */
.streak-level-0 .streak-flame { filter: grayscale(1); opacity: 0.45; }
.streak-level-0 .streak-count  { color: #aaa; }

/* Level 1 — 1–2 Tage */
.streak-level-1 .streak-count  { color: #e55b00; }

/* Level 2 — 3–6 Tage */
.streak-level-2 .streak-flame  { filter: saturate(1.6); }
.streak-level-2 .streak-count  { color: #d44e00; }

/* Level 3 — 7–13 Tage */
.streak-level-3 .streak-flame  {
  filter: saturate(2) brightness(1.1)
          drop-shadow(0 0 5px rgba(255,140,0,0.7));
}
.streak-level-3 .streak-count  { color: #c93800; }

/* Level 4 — 14–29 Tage */
.streak-level-4 .streak-flame  {
  filter: saturate(2.4) brightness(1.15)
          drop-shadow(0 0 10px rgba(255,80,0,0.85));
}
.streak-level-4 .streak-count  { color: #b82e00; }

/* Level 5 — 30+ Tage: legendär */
.streak-level-5 .streak-flame  {
  filter: saturate(3) brightness(1.25)
          drop-shadow(0 0 14px rgba(255,50,0,1));
}
.streak-level-5 .streak-count  { color: #9a1c00; }

.streak-flame {
  font-size: 2rem;
  display: inline-block;
  animation: flameFlicker 2.4s ease-in-out infinite;
  transform-origin: bottom center;
  line-height: 1;
}

@keyframes flameFlicker {
  0%   { transform: scaleY(1)    rotate(-2deg); }
  30%  { transform: scaleY(1.07) rotate(1.5deg); }
  60%  { transform: scaleY(0.97) rotate(-1deg); }
  80%  { transform: scaleY(1.04) rotate(2deg); }
  100% { transform: scaleY(1)    rotate(-2deg); }
}

.streak-count {
  font-size: 1.9rem;
  font-weight: 900;
  line-height: 1;
  min-width: 28px;
}

.streak-days-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #c06000;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  align-self: flex-end;
  padding-bottom: 3px;
}

.streak-info {
  flex: 1;
  min-width: 0;
}

.streak-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #c06000;
  margin-bottom: 1px;
}

.streak-message {
  font-size: 0.85rem;
  color: #7d5a00;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.streak-today {
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
  padding: 4px 9px;
  border-radius: 20px;
}

.streak-today-done {
  background: #d4f5e2;
  color: #1a5c39;
}

.streak-today-pending {
  background: #fde8e8;
  color: #9b1c1c;
}

/* Level-Up-Animation wenn Streak steigt */
@keyframes streakLevelUp {
  0%   { transform: scale(1)    rotate(0deg); }
  20%  { transform: scale(1.5)  rotate(-8deg); }
  50%  { transform: scale(1.35) rotate(6deg); }
  75%  { transform: scale(1.15) rotate(-3deg); }
  100% { transform: scale(1)    rotate(0deg); }
}

.streak-flame-levelup {
  animation: streakLevelUp 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

@media(min-width: 768px) {
  .container {
    max-width: 1100px;
    margin: 0 auto;
  }
}

* {
  box-sizing: border-box;
}

/* Auth-Box — schwebt vor dem Sternenhimmel */
#auth-section {
  max-width: 400px;
  margin: 60px auto 0;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 22px;
  padding: 32px 28px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(212,175,55,0.2) inset;
  border: 1px solid rgba(212,175,55,0.15);
}

#auth-title {
  color: #1a1550;
  margin-top: 0;
}

input {
  width: 100%;
  padding: 12px;
  margin: 10px 0;
  font-size: 1rem;
}

button {
  width: 100%;
  padding: 12px;
  font-size: 1.1rem;
  margin-top: 10px;
  cursor: pointer;
  border: none;
  border-radius: 8px;
  background: #2e8b57;
  color: white;
}

.turkish-greeting {
  font-size: 1.75rem;
  margin-top: 0;
  margin-bottom: 18px;
  background: linear-gradient(90deg, #e55b00, #2e8b57, #1a6fa8);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
  animation: gradientText 4s linear infinite;
}

@keyframes gradientText {
  0%   { background-position: 0% center; }
  100% { background-position: 200% center; }
}

.lessons {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 18px;
}

.category-card {
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.93);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35), 0 1px 0 rgba(255,255,255,0.15) inset;
  text-align: left;
  cursor: pointer;
  transition: transform 0.22s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.22s ease;
  border-top: 4px solid var(--cat-color, #2e8b57);
  position: relative;
  overflow: hidden;
}

.category-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0) 60%, rgba(255,255,255,0.5) 100%);
  pointer-events: none;
}

.category-card:not(.category-locked):hover {
  transform: translateY(-6px) scale(1.015);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
}

.category-card:not(.category-locked):active {
  transform: scale(0.97);
}

.category-icon-badge {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.55rem;
  flex-shrink: 0;
  line-height: 1;
}

.category-title {
  margin: 0 0 4px;
  font-size: 1.1rem;
  color: #1a2530;
  font-weight: 700;
}

.lesson-item {
  margin-bottom: 10px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #e4e8f2;
  background: #fafbff;
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.18s ease, border-color 0.18s;
}

.lesson-item:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 14px rgba(46,139,87,0.15);
  border-color: #2e8b57;
}

.resume-area {
  margin: 12px 0 16px;
}

#resume-btn {
  width: 100%;
  padding: 10px;
  border: 1px solid #c6d0e2;
  border-radius: 8px;
  background: #ffffff;
  color: #000;
  cursor: pointer;
  font-weight: 700;
}

#resume-btn:hover {
  background: #f3f6fc;
}

.resume-area p {
  margin: 6px 0 0;
  color: #4a5568;
  font-size: 0.95rem;
}

.back-btn {
  display: inline-block;
  margin-bottom: 14px;
  padding: 8px 12px;
  background: #000000;
  color: #ffffff;
  border: 1px solid #000000;
  border-radius: 8px;
  cursor: pointer;
}

.back-btn:hover {
  background: #000000;
  color: #ffffff;
}

.lesson-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.lesson-progress-bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: #e1e5ea;
  overflow: hidden;
}

.lesson-progress-fill {
  height: 100%;
  background: #4caf50;
  border-radius: inherit;
}

.lesson-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
  font-weight: 600;
  color: #2f4f4f;
}

.overall-progress {
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(230, 245, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background-size: 300% 300%;
  border: 1.5px solid rgba(150,200,255,0.5);
  box-shadow: 0 4px 18px rgba(0,0,0,0.28);
}

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

.progress-bar-bg {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: #e1e5ea;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #2e8b57, #52c97a, #38bdf8);
  background-size: 200% auto;
  border-radius: inherit;
  transition: width 0.7s cubic-bezier(0.34,1.56,0.64,1);
  animation: progressShimmer 2.5s linear infinite;
}

@keyframes progressShimmer {
  0%   { background-position: 0% center; }
  100% { background-position: 200% center; }
}

.hidden {
  display: none;
}

/* =============================================
   CATEGORY CARDS — LOCKED STATE
   ============================================= */

.category-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 4px;
}

.category-locked {
  opacity: 0.55;
  cursor: not-allowed;
  background: #f0f0f4;
}

.category-locked .progress-bar-fill {
  background: #aab0bc;
}

.lock-hint {
  font-size: 0.78rem;
  color: #8a9ab0;
  white-space: nowrap;
  padding-top: 2px;
}

.lesson-count-row {
  font-size: 0.88rem;
  color: #6a7480;
  margin: 4px 0 10px;
}

/* Badges on lesson items */
.badge {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
  vertical-align: middle;
}
.badge-done { background: #2e8b57; color: white; }
.badge-available { background: #3b82f6; color: white; }

.fill-done { background: #2e8b57; }

/* =============================================
   LESSON DETAIL VIEW
   ============================================= */

.lesson-detail-view {
  padding-bottom: 30px;
}

.lesson-header-box {
  background: linear-gradient(135deg, #2e8b57, #3aaa6e);
  border-radius: 14px;
  padding: 18px 16px;
  margin: 14px 0;
  color: white;
}

.lesson-detail-title {
  margin: 0 0 8px;
  font-size: 1.2rem;
  color: white;
}

.lesson-lernziel {
  margin: 0;
  font-size: 0.93rem;
  opacity: 0.92;
  line-height: 1.4;
}

.lesson-section {
  background: white;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.07);
}

.section-title {
  margin: 0 0 12px;
  font-size: 1rem;
  color: #2f4f4f;
  font-weight: 700;
}

/* =============================================
   VOCAB TABLE
   ============================================= */

.vocab-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
}

.vocab-table thead th {
  text-align: left;
  padding: 6px 6px;
  background: #f0f5fb;
  color: #4a5568;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.vocab-table tbody tr {
  border-bottom: 1px solid #edf0f5;
}
.vocab-table tbody tr:last-child { border-bottom: none; }

.vocab-tr {
  padding: 10px 6px;
  font-weight: 700;
  color: #2e8b57;
  white-space: nowrap;
}

.vocab-de { padding: 10px 6px; color: #2f4f4f; }
.vocab-extra { padding: 10px 6px; color: #8a9ab0; font-size: 0.82rem; font-style: italic; }

/* =============================================
   AUDIO BUTTONS
   ============================================= */

.speak-btn-inline {
  background: #e6f7ee;
  border: 1.5px solid #2e8b57;
  color: #2e8b57;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.82rem;
  padding: 2px 6px;
  width: auto;
  margin: 0 4px 0 0;
  vertical-align: middle;
  transition: background 0.12s;
}
.speak-btn-inline:hover { background: #c3e8d4; }

.speak-btn-small {
  background: #e6f7ee;
  border: 1.5px solid #2e8b57;
  border-radius: 7px;
  cursor: pointer;
  font-size: 0.82rem;
  padding: 3px 8px;
  width: auto;
  margin: 0;
  color: #2e8b57;
  font-weight: 600;
  line-height: 1.4;
  transition: background 0.12s, transform 0.1s;
}
.speak-btn-small:hover  { background: #c3e8d4; }
.speak-btn-small:active { transform: scale(0.94); }

.speak-btn-dialog {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0 0 0 4px;
  width: auto;
  margin: 0;
  vertical-align: middle;
  opacity: 0.6;
}
.speak-btn-dialog:hover { opacity: 1; }

/* =============================================
   SATZBAUSTEINE, BEISPIELE, NACHSPRECH
   ============================================= */

.saatzbausteine-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.saatzbausteine-list li { color: #2f4f4f; line-height: 1.5; font-size: 0.93rem; }

.erklaerung-box { background: #fffbec; border-left: 4px solid #f0c040; }

.beispiele-list { display: flex; flex-direction: column; gap: 10px; }

.beispiel-item {
  padding: 10px 12px;
  background: #f8fbff;
  border-radius: 8px;
  border-left: 3px solid #2e8b57;
}

.beispiel-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3px;
}

.beispiel-tr { font-weight: 700; color: #2e8b57; font-size: 0.98rem; }
.beispiel-de { color: #6a7480; font-size: 0.88rem; }

.nachsprech-section { background: #f0f8f4; }

.nachsprech-words { display: flex; flex-wrap: wrap; gap: 8px; }

.nachsprech-word {
  background: #2e8b57;
  color: white;
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  width: auto;
  margin: 0;
}
.nachsprech-word:hover { background: #256b44; }

.hoer-section { background: #f5f0ff; border-left: 4px solid #8b5cf6; }

/* =============================================
   MINI DIALOG
   ============================================= */

.mini-dialog { display: flex; flex-direction: column; gap: 10px; }

.dialog-line { display: flex; flex-direction: column; max-width: 85%; }
.dialog-left { align-self: flex-start; }
.dialog-right { align-self: flex-end; align-items: flex-end; }

.dialog-sprecher {
  font-size: 0.75rem;
  color: #8a9ab0;
  font-weight: 600;
  margin-bottom: 3px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dialog-bubble { background: #f0f5fb; border-radius: 12px; padding: 10px 14px; }
.dialog-right .dialog-bubble { background: #e8f5ee; }

.dialog-tr { font-weight: 600; color: #2f4f4f; margin-bottom: 3px; display: flex; align-items: center; gap: 4px; }
.dialog-de { color: #8a9ab0; font-size: 0.86rem; }

.anwendung-section { background: #fff5f0; border-left: 4px solid #f97316; }
.zusammenfassung-section { background: #f0f8f4; border-left: 4px solid #2e8b57; }

/* =============================================
   QUIZ
   ============================================= */

.quiz-section { background: #fafbff; border: 2px solid #e8ecf8; }

.quiz-progress-label {
  font-size: 0.85rem;
  color: #6a7480;
  margin: 0 0 16px;
  font-weight: 600;
}

.quiz-question {
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid #edf0f5;
}
.quiz-question:last-of-type { border-bottom: none; margin-bottom: 0; }

.quiz-word-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.quiz-tr-word {
  font-size: 1.4rem;
  font-weight: 700;
  color: #2e8b57;
}

.quiz-prompt {
  margin: 0 0 10px;
  color: #4a5568;
  font-size: 0.88rem;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quiz-btn {
  width: 100%;
  padding: 11px 14px;
  border: 2px solid #d8e3ef;
  border-radius: 10px;
  background: white;
  color: #2f4f4f;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  margin: 0;
  transition: border-color 0.15s, background 0.15s, transform 0.12s;
}
.quiz-btn:hover:not(:disabled) {
  border-color: #2e8b57;
  background: #f0f8f4;
  transform: translateX(3px);
}
.quiz-btn:active:not(:disabled) { transform: scale(0.98); }
.quiz-btn:disabled { cursor: not-allowed; }

.quiz-correct { background: #d4f5e2 !important; border-color: #2e8b57 !important; color: #1a5c39 !important; }
.quiz-wrong   { background: #fde8e8 !important; border-color: #e53e3e !important; color: #9b1c1c !important; }

.quiz-result {
  margin-top: 16px;
  padding: 14px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1rem;
  text-align: center;
}
.quiz-result-perfect { background: #d4f5e2; color: #1a5c39; }
.quiz-result-good    { background: #fff3cd; color: #7d5a00; }

/* =============================================
   SATZBAU — Satz-Reihenfolge (Drag & Click)
   ============================================= */

.satzbau-area {
  min-height: 52px;
  border: 2px dashed #c6d0e2;
  border-radius: 10px;
  padding: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  transition: background 0.15s, border-color 0.15s;
  margin: 6px 0;
}

.satzbau-answer {
  background: #f9fbff;
  border-color: #b0c4e8;
}

.satzbau-bank {
  background: #fff;
  border-style: solid;
  border-color: #dde4f0;
}

.satzbau-area.drag-over-zone {
  background: #eaf6ee;
  border-color: #2e8b57;
}

.satzbau-placeholder {
  color: #aab0bc;
  font-size: 0.85rem;
  font-style: italic;
  padding: 4px 6px;
  pointer-events: none;
}

.satzbau-hint {
  font-size: 0.8rem;
  color: #6a7480;
  margin: 2px 0 6px;
}

.word-chip {
  background: #fff;
  border: 2px solid #c6d0e2;
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: background 0.1s, border-color 0.12s, transform 0.1s, opacity 0.15s;
  touch-action: manipulation;
  white-space: nowrap;
}

.word-chip:hover { background: #f0f4fb; border-color: #2e8b57; }
.word-chip.dragging { opacity: 0.45; transform: scale(1.07); }
.word-chip.drag-over-chip { border-color: #2e8b57; background: #eaf6ee; }

/* correct/wrong re-use existing quiz classes — no need to repeat */

/* =============================================
   HÖRVERSTÄNDNIS — Audio hören + Deutsch tippen
   ============================================= */

.hoer-play-area {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0 8px;
  flex-wrap: wrap;
}

.hoer-play-btn {
  background: #2e8b57;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 20px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  flex-shrink: 0;
}
.hoer-play-btn:hover  { background: #256b44; }
.hoer-play-btn:active { transform: scale(0.97); }

.hoer-play-hint {
  color: #6a7480;
  font-size: 0.85rem;
}

.hoer-input {
  width: 100%;
  padding: 11px 14px;
  font-size: 1rem;
  border: 2px solid #c6d0e2;
  border-radius: 10px;
  margin: 4px 0 8px;
  transition: border-color 0.15s, background 0.15s;
}
.hoer-input:focus          { outline: none; border-color: #2e8b57; }
.hoer-input.hoer-correct   { border-color: #2e8b57 !important; background: #f0faf5; }
.hoer-input.hoer-wrong     { border-color: #e53e3e !important; background: #fff5f5; }
.hoer-input:disabled       { cursor: not-allowed; }

/* =============================================
   QUIZ CHECK-BUTTON (shared by Satzbau + Hör)
   ============================================= */

.quiz-check-btn {
  padding: 9px 22px;
  background: #2e8b57;
  color: #fff;
  border: none;
  border-radius: 9px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s;
  margin-top: 4px;
}
.quiz-check-btn:hover     { background: #256b44; }
.quiz-check-btn:disabled  { background: #9db8a8; cursor: not-allowed; }

/* =============================================
   ACTION BUTTONS
   ============================================= */

.complete-btn {
  width: 100%;
  padding: 14px;
  font-size: 1rem;
  margin-top: 14px;
  cursor: pointer;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #2e8b57, #38bdf8);
  background-size: 200% auto;
  color: white;
  font-weight: 700;
  transition: transform 0.15s, box-shadow 0.15s, background-position 0.3s;
  box-shadow: 0 4px 16px rgba(46,139,87,0.4);
  letter-spacing: 0.3px;
}
.complete-btn:hover {
  transform: scale(1.02);
  background-position: right center;
  box-shadow: 0 6px 24px rgba(46,139,87,0.5);
}
.complete-btn:active { transform: scale(0.98); }

.next-lesson-btn {
  width: 100%;
  padding: 14px;
  font-size: 1rem;
  margin-top: 10px;
  cursor: pointer;
  border: 2px solid #2e8b57;
  border-radius: 10px;
  background: white;
  color: #2e8b57;
  font-weight: 700;
}
.next-lesson-btn:hover { background: #f0f8f4; }

/* =============================================
   GRADE POPUP — Duolingo-style Bewertungs-Popup
   ============================================= */

.grade-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  animation: gradeOverlayIn 0.2s ease;
}

@keyframes gradeOverlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.grade-popup {
  background: linear-gradient(160deg, #fff 70%, #f0fff8 100%);
  border-radius: 24px;
  padding: 2.2rem 2.4rem;
  text-align: center;
  max-width: 320px;
  width: 90%;
  box-shadow: 0 24px 64px rgba(46,139,87,0.22), 0 4px 20px rgba(0,0,0,0.15);
  animation: gradePopIn 0.42s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 1.5px solid rgba(46,139,87,0.15);
}

@keyframes gradePopIn {
  0%   { transform: scale(0.4); opacity: 0; }
  55%  { transform: scale(1.13); opacity: 1; }
  100% { transform: scale(1);   opacity: 1; }
}

.grade-popup-emoji {
  font-size: 3.2rem;
  display: block;
  line-height: 1;
  margin-bottom: 0.6rem;
  animation: gradeEmojiBounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s both;
}

@keyframes gradeEmojiBounce {
  0%   { transform: scale(0.6) rotate(-10deg); }
  60%  { transform: scale(1.25) rotate(6deg); }
  100% { transform: scale(1)   rotate(0deg); }
}

.grade-popup-text {
  font-size: 2rem;
  font-weight: 900;
  margin: 0 0 0.3rem;
  color: #1a2530;
  letter-spacing: -0.5px;
}

.grade-popup-score {
  font-size: 0.9rem;
  color: #6a7480;
  margin: 0 0 0.5rem;
}

.grade-popup-note {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 1.5rem;
  padding: 6px 18px;
  border-radius: 20px;
  display: inline-block;
}

.note-1   { background: #d4f5e2; color: #1a5c39; }
.note-2   { background: #d4ecff; color: #1a4a7c; }
.note-3   { background: #fff3cd; color: #7d5a00; }
.note-4   { background: #ffe5b0; color: #7d4500; }
.note-fail{ background: #fde8e8; color: #9b1c1c; }

.grade-popup-btn {
  width: 100%;
  padding: 13px;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: filter 0.15s;
}
.grade-popup-btn:hover { filter: brightness(1.06); }

.grade-btn-pass {
  background: #2e8b57;
  color: #fff;
}

.grade-btn-fail {
  background: #ff9800;
  color: #fff;
}

/* =============================================
   COMING SOON
   ============================================= */

.coming-soon-box {
  background: #f8fbff;
  border: 2px dashed #c6d0e2;
  border-radius: 14px;
  padding: 30px 20px;
  text-align: center;
  color: #6a7480;
  margin-top: 14px;
}

/* =============================================
   TOAST
   ============================================= */

.toast {
  position: fixed;
  bottom: -80px;
  left: 50%;
  transform: translateX(-50%);
  background: #2f4f4f;
  color: white;
  padding: 12px 22px;
  border-radius: 24px;
  font-size: 0.93rem;
  font-weight: 600;
  z-index: 1000;
  max-width: 90vw;
  text-align: center;
  transition: bottom 0.3s ease;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.toast-show {
  bottom: 24px;
}

/* =============================================
   LESSON DETAIL VIEW
   ============================================= */

.lesson-detail-view {
  padding-bottom: 30px;
}

.lesson-header-box {
  background: linear-gradient(135deg, #2e8b57, #3aaa6e);
  border-radius: 14px;
  padding: 18px 16px;
  margin: 14px 0;
  color: white;
}

.lesson-detail-title {
  margin: 0 0 8px;
  font-size: 1.25rem;
  color: white;
}

.lesson-lernziel {
  margin: 0;
  font-size: 0.95rem;
  opacity: 0.92;
  line-height: 1.4;
}

.lesson-section {
  background: white;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.07);
}

.section-title {
  margin: 0 0 12px;
  font-size: 1rem;
  color: #2f4f4f;
  font-weight: 700;
}

/* Vocab table */
.vocab-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.vocab-table thead th {
  text-align: left;
  padding: 6px 8px;
  background: #f0f5fb;
  color: #4a5568;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.vocab-table tbody tr {
  border-bottom: 1px solid #edf0f5;
}

.vocab-table tbody tr:last-child {
  border-bottom: none;
}

.vocab-tr {
  padding: 10px 8px;
  font-weight: 700;
  color: #2e8b57;
  font-size: 1rem;
}

.vocab-de {
  padding: 10px 8px;
  color: #2f4f4f;
}

.vocab-extra {
  padding: 10px 8px;
  color: #8a9ab0;
  font-size: 0.85rem;
  font-style: italic;
}

/* Satzbausteine */
.saatzbausteine-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.saatzbausteine-list li {
  color: #2f4f4f;
  line-height: 1.5;
  font-size: 0.95rem;
}

/* Erklärung */
.erklaerung-box {
  background: #fffbec;
  border-left: 4px solid #f0c040;
}

/* Beispiele */
.beispiele-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.beispiel-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  background: #f8fbff;
  border-radius: 8px;
  border-left: 3px solid #2e8b57;
}

.beispiel-tr {
  font-weight: 700;
  color: #2e8b57;
  font-size: 1rem;
}

.beispiel-de {
  color: #6a7480;
  font-size: 0.9rem;
}

/* Nachsprechen */
.nachsprech-section {
  background: #f0f8f4;
}

.hoer-hint {
  color: #6a7480;
  font-size: 0.88rem;
  margin: 0 0 12px;
}

.nachsprech-words {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nachsprech-word {
  background: #2e8b57;
  color: white;
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: default;
}

/* Hör-Übung */
.hoer-section {
  background: #f5f0ff;
  border-left: 4px solid #8b5cf6;
}

/* Mini-Dialog */
.mini-dialog {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dialog-line {
  display: flex;
  flex-direction: column;
  max-width: 85%;
}

.dialog-left {
  align-self: flex-start;
}

.dialog-right {
  align-self: flex-end;
  align-items: flex-end;
}

.dialog-sprecher {
  font-size: 0.78rem;
  color: #8a9ab0;
  font-weight: 600;
  margin-bottom: 3px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dialog-bubble {
  background: #f0f5fb;
  border-radius: 12px;
  padding: 10px 14px;
}

.dialog-right .dialog-bubble {
  background: #e8f5ee;
}

.dialog-tr {
  font-weight: 600;
  color: #2f4f4f;
  margin-bottom: 3px;
}

.dialog-de {
  color: #8a9ab0;
  font-size: 0.88rem;
}

/* Anwendung */
.anwendung-section {
  background: #fff5f0;
  border-left: 4px solid #f97316;
}

/* Zusammenfassung */
.zusammenfassung-section {
  background: #f0f8f4;
  border-left: 4px solid #2e8b57;
}

/* Complete button */
.complete-btn {
  width: 100%;
  padding: 14px;
  font-size: 1.05rem;
  margin-top: 4px;
  cursor: pointer;
  border: none;
  border-radius: 10px;
  background: #2e8b57;
  color: white;
  font-weight: 700;
}

.complete-btn:hover {
  background: #256b44;
}

/* Coming soon */
.coming-soon-box {
  background: #f8fbff;
  border: 2px dashed #c6d0e2;
  border-radius: 14px;
  padding: 30px 20px;
  text-align: center;
  color: #6a7480;
  margin-top: 14px;
}

/* Content badge on lesson items */
.content-badge {
  background: #2e8b57;
  color: white;
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: 10px;
  font-weight: 600;
  vertical-align: middle;
}

/* =============================================
   MOTTO BANNER
   ============================================= */

.motto-banner {
  margin-bottom: 14px;
  padding: 11px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(100,80,180,0.75), rgba(180,60,120,0.65));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #ffe8c0;
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.35), 0 0 0 1px rgba(212,175,55,0.25) inset;
  border: 1px solid rgba(212,175,55,0.2);
  animation: mottoFadeIn 0.6s ease;
  line-height: 1.4;
}

@keyframes mottoFadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.motto-banner::before {
  content: '✨';
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* =============================================
   CONFETTI
   ============================================= */
.confetti-piece {
  position: fixed;
  top: -12px;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  pointer-events: none;
  z-index: 9999;
  animation: confettiFall var(--duration, 2.4s) ease-in forwards;
}

@keyframes confettiFall {
  0%   { transform: translate(0, 0) rotate(0deg); opacity: 1; }
  80%  { opacity: 0.9; }
  100% { transform: translate(var(--drift, 0px), 110vh) rotate(var(--rot, 540deg)); opacity: 0; }
}

/* =============================================
   DASHBOARD SCHNELLNAVIGATION
   ============================================= */

.dash-nav {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.dash-nav-btn {
  flex: 1;
  padding: 11px 10px;
  border: none;
  border-radius: 12px;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.22);
  box-shadow: 0 3px 12px rgba(0,0,0,0.25);
  transition: background 0.15s, transform 0.12s;
  width: auto;
  margin: 0;
}
.dash-nav-btn:hover  { background: rgba(255,255,255,0.28); transform: translateY(-2px); }
.dash-nav-btn:active { transform: scale(0.97); }
.dash-nav-fc { background: rgba(212,175,55,0.22); border-color: rgba(212,175,55,0.35); }
.dash-nav-fc:hover { background: rgba(212,175,55,0.35); }

/* =============================================
   MEINE WÖRTER
   ============================================= */

.mw-header { margin-bottom: 14px; }
.mw-title  { color: #fff; margin: 6px 0 2px; font-size: 1.3rem; text-shadow: 0 2px 8px rgba(0,0,0,0.5); }
.mw-sub    { color: rgba(255,255,255,0.75); font-size: 0.85rem; margin: 0 0 14px; }

.mw-controls {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.mw-sel {
  flex: 1;
  min-width: 120px;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.9);
  font-size: 0.85rem;
  font-weight: 600;
  color: #1a2530;
}
.mw-fc-btn {
  padding: 9px 14px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #c9a227, #e8c04a);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  width: auto;
  margin: 0;
  box-shadow: 0 3px 10px rgba(0,0,0,0.25);
  transition: filter 0.15s, transform 0.12s;
}
.mw-fc-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }

.mw-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 80px;
}
.mw-empty {
  color: rgba(255,255,255,0.7);
  text-align: center;
  padding: 40px 20px;
  font-size: 0.95rem;
}

.mw-card {
  background: rgba(255,255,255,0.93);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 14px;
  padding: 13px 15px;
  box-shadow: 0 3px 14px rgba(0,0,0,0.3);
  border-left: 4px solid #2e8b57;
  transition: transform 0.15s;
}
.mw-card:active { transform: scale(0.98); }
.mw-card-hard  { border-left-color: #e53e3e; }
.mw-card-due   { border-left-color: #f97316; }

.mw-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3px;
}
.mw-tr   { font-size: 1.1rem; font-weight: 800; color: #1a2530; }
.mw-de   { color: #4a5568; font-size: 0.93rem; margin-bottom: 3px; }
.mw-ex   { color: #8a9ab0; font-size: 0.8rem; font-style: italic; margin-bottom: 4px; }
.mw-meta {
  display: flex;
  gap: 10px;
  font-size: 0.75rem;
  color: #6a7480;
  font-weight: 600;
  flex-wrap: wrap;
}
.mw-cat-tag {
  margin-left: auto;
  background: #f0f4fb;
  padding: 1px 7px;
  border-radius: 8px;
  font-size: 0.72rem;
}

.mw-badges { display: flex; gap: 4px; }
.mwb {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 8px;
}
.mwb-hard { background: #fde8e8; color: #9b1c1c; }
.mwb-due  { background: #fff3cd; color: #7d4e00; }
.mwb-lvl  { background: #e8f0fe; color: #1a4a9c; }

/* =============================================
   KARTEIKARTENMODUS
   ============================================= */

.fc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.fc-counter {
  color: rgba(255,255,255,0.8);
  font-weight: 700;
  font-size: 0.9rem;
}
.fc-prog-bg {
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: rgba(255,255,255,0.15);
  margin-bottom: 24px;
  overflow: hidden;
}
.fc-prog-fill {
  height: 100%;
  background: linear-gradient(90deg, #c9a227, #52c97a);
  border-radius: inherit;
  transition: width 0.4s ease;
}

/* 3D Flip-Szene */
.fc-scene {
  perspective: 1000px;
  width: 100%;
  min-height: 240px;
  cursor: pointer;
  margin-bottom: 20px;
}
.fc-card {
  width: 100%;
  min-height: 240px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(0.4, 0.2, 0.2, 1);
  border-radius: 22px;
}
.fc-card.fc-flipped { transform: rotateY(180deg); }

.fc-face {
  position: absolute;
  inset: 0;
  border-radius: 22px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 24px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.fc-front {
  background: linear-gradient(145deg, rgba(255,255,255,0.97), rgba(230,240,255,0.95));
  border: 1px solid rgba(212,175,55,0.2);
}
.fc-back {
  background: linear-gradient(145deg, rgba(20,60,40,0.95), rgba(10,40,60,0.95));
  transform: rotateY(180deg);
  border: 1px solid rgba(82,201,122,0.3);
}

.fc-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 14px;
  opacity: 0.55;
}
.fc-front .fc-label { color: #4a5568; }
.fc-back  .fc-label { color: rgba(255,255,255,0.6); }

.fc-word {
  font-size: 2rem;
  font-weight: 900;
  text-align: center;
  line-height: 1.2;
  color: #1a2530;
}
.fc-word-de { color: #52c97a; font-size: 1.7rem; }

.fc-flip-hint {
  font-size: 0.75rem;
  color: #8a9ab0;
  margin-top: 18px;
}
.fc-example {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.65);
  font-style: italic;
  text-align: center;
  margin-top: 10px;
  line-height: 1.4;
}
.fc-back-cat {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.4);
  margin-top: 14px;
}
.fc-hard-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: #fde8e8;
  color: #9b1c1c;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
}

/* Antwort-Buttons */
.fc-btns {
  display: flex;
  gap: 10px;
  transition: opacity 0.3s, transform 0.3s;
}
.fc-btns-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}
.fc-btn {
  flex: 1;
  padding: 14px 8px;
  border: none;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  text-align: center;
  line-height: 1.5;
  width: auto;
  margin: 0;
  transition: transform 0.12s, filter 0.12s;
  box-shadow: 0 4px 14px rgba(0,0,0,0.3);
}
.fc-btn:active { transform: scale(0.95); }
.fc-btn-wrong   { background: #e53e3e; color: #fff; }
.fc-btn-hard    { background: #f97316; color: #fff; }
.fc-btn-correct { background: #2e8b57; color: #fff; }
.fc-btn:hover   { filter: brightness(1.1); }

/* =============================================
   MOBILE / iPHONE OPTIMIERUNGEN
   ============================================= */

/* Verhindert ungewolltes Zoomen beim Antippen von Inputs auf iOS */
input, select, textarea {
  font-size: 16px !important;
}

/* Buttons sollen sich auf Touch nicht seltsam verhalten */
button {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* Verhindert dass Text beim langen Drücken markiert wird */
.quiz-btn, .word-chip, .nachsprech-word, .category-card, .lesson-item {
  -webkit-user-select: none;
  user-select: none;
}

/* Scrolling flüssiger auf iOS */
body, .container {
  -webkit-overflow-scrolling: touch;
}

/* Kleine Bildschirme: Schrift etwas kompakter */
@media (max-width: 390px) {
  .grade-popup-text { font-size: 1.6rem; }
  .streak-count     { font-size: 1.6rem; }
  .turkish-greeting { font-size: 1.45rem; }
}

/* Toast nicht hinter Home-Indicator auf iPhone */
.toast {
  bottom: calc(-80px - env(safe-area-inset-bottom));
}
.toast-show {
  bottom: calc(24px + env(safe-area-inset-bottom));
}

/* =============================================
   CATEGORY FINAL TEST
   ============================================= */

/* ── Header ── */
.ct-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.ct-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.ct-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #d4af37;
}
.ct-category {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.65);
  background: rgba(255,255,255,0.1);
  padding: 2px 10px;
  border-radius: 20px;
}

/* ── Progress ── */
.ct-progress-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.ct-progress-bg {
  flex: 1;
  height: 8px;
  background: rgba(255,255,255,0.12);
  border-radius: 4px;
  overflow: hidden;
}
.ct-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #d4af37, #f0d060);
  border-radius: 4px;
  transition: width 0.3s ease;
}
.ct-counter {
  font-size: 0.82rem;
  font-weight: 700;
  color: rgba(255,255,255,0.7);
  white-space: nowrap;
}

/* ── Question Box ── */
.ct-question-box {
  background: rgba(255,255,255,0.95);
  border-radius: 16px;
  padding: 22px 18px 18px;
  margin-bottom: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}
.ct-type-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #6a7480;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ct-hard-badge {
  background: #ff5722;
  color: white;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
}
.ct-question-word {
  font-size: 1.55rem;
  font-weight: 800;
  color: #1a2535;
  margin-bottom: 18px;
  line-height: 1.2;
}
.ct-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ct-option-btn {
  width: 100%;
  padding: 13px 16px;
  border: 2px solid #e0e7ef;
  border-radius: 12px;
  background: #f8faff;
  color: #1a2535;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s, border-color 0.12s, transform 0.1s;
}
.ct-option-btn:active { transform: scale(0.98); }
.ct-option-btn:hover:not(:disabled) {
  background: #eef3ff;
  border-color: #a0b4d0;
}
.ct-opt-correct {
  background: #e6f9f0 !important;
  border-color: #2ecc71 !important;
  color: #1a7a44 !important;
}
.ct-opt-wrong {
  background: #ffeaea !important;
  border-color: #e74c3c !important;
  color: #c0392b !important;
}

/* ── Feedback ── */
.ct-feedback {
  min-height: 28px;
  font-size: 0.95rem;
  font-weight: 700;
  text-align: center;
  border-radius: 8px;
  padding: 4px 0;
}
.ct-fb-correct { color: #2ecc71; }
.ct-fb-wrong   { color: #e74c3c; }

/* ── Result Box ── */
.ct-result-box {
  background: rgba(255,255,255,0.97);
  border-radius: 20px;
  padding: 32px 22px 26px;
  text-align: center;
  box-shadow: 0 6px 28px rgba(0,0,0,0.3);
  margin-top: 10px;
}
.ct-result-emoji { font-size: 3.2rem; margin-bottom: 10px; }
.ct-result-grade {
  font-size: 1.35rem;
  font-weight: 800;
  color: #1a2535;
  margin-bottom: 6px;
}
.ct-result-score {
  font-size: 1rem;
  color: #5a6472;
  margin-bottom: 10px;
}
.ct-result-note {
  display: inline-block;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
}
.ct-note-pass { background: #e6f9f0; color: #1a7a44; }
.ct-note-fail { background: #ffeaea; color: #c0392b; }
.ct-result-complete {
  background: linear-gradient(135deg, #d4af37 0%, #f0d060 100%);
  color: #2a1a00;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 18px;
}
.ct-result-btn {
  display: block;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 10px;
  transition: opacity 0.15s, transform 0.1s;
}
.ct-result-btn:active { transform: scale(0.97); }
.ct-btn-primary { background: linear-gradient(135deg, #d4af37, #e8c840); color: #2a1a00; }
.ct-btn-retry   { background: linear-gradient(135deg, #3a7bd5, #4a8be5); color: white; }
.ct-btn-back    { background: rgba(0,0,0,0.08); color: #5a6472; }

/* ── Final Test Wrap (in lesson list) ── */
.ct-final-wrap {
  margin-top: 20px;
}

/* Complete banner */
.ct-complete-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, rgba(212,175,55,0.25), rgba(240,208,96,0.15));
  border: 2px solid rgba(212,175,55,0.5);
  border-radius: 14px;
  padding: 16px;
}
.ct-complete-icon { font-size: 2rem; flex-shrink: 0; }
.ct-complete-title {
  font-size: 1rem;
  font-weight: 800;
  color: #d4af37;
}
.ct-complete-sub {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.65);
  margin-top: 2px;
}

/* Test available */
.ct-test-available {
  background: rgba(255,255,255,0.12);
  border: 2px solid rgba(212,175,55,0.4);
  border-radius: 14px;
  padding: 16px;
}
.ct-test-info {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
.ct-test-icon { font-size: 1.8rem; flex-shrink: 0; }
.ct-test-title {
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 3px;
}
.ct-test-sub {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
}
.ct-start-btn {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, #d4af37, #e8c840);
  color: #2a1a00;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}
.ct-start-btn:active { transform: scale(0.97); }

/* Test locked */
.ct-test-locked {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.06);
  border: 1.5px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 14px 16px;
}
.ct-test-lock-icon { font-size: 1.3rem; }
.ct-test-locked-text {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.55);
  font-weight: 600;
}

/* ── Category card states ── */
.category-complete {
  border: 2px solid rgba(212,175,55,0.5) !important;
}
.cat-complete-badge {
  display: inline-block;
  background: linear-gradient(135deg, #d4af37, #f0d060);
  color: #2a1a00;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 20px;
  margin-top: 3px;
}
.cat-test-pending-badge {
  display: inline-block;
  background: rgba(212,175,55,0.2);
  color: #d4af37;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  margin-top: 3px;
  border: 1px solid rgba(212,175,55,0.35);
}
.fill-complete {
  background: linear-gradient(90deg, #d4af37, #f0d060) !important;
}