/* ================================
   1. Design-Variablen
================================== */

:root {
  /* Hintergrund / Glas */
  --bg-main: #020617;
  --bg-glass: rgba(15, 23, 42, 0.65);
  --bg-glass-soft: rgba(15, 23, 42, 0.55);

  /* Akzentfarben */
  --accent-blue: #3b82f6;
  --accent-cyan: #22d3ee;
  --accent-teal: #14b8a6;
  --accent-purple: #8b5cf6;
  --accent-green: #22c55e;
  --accent-amber: #fbbf24;
  --accent-pink: #ec4899;

  /* Textfarben */
  --text-main: #e5e7eb;
  --text-muted: #94a3b8;
  --text-strong: #f9fafb;

  /* Ränder / Schatten */
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-pill: 999px;

  --shadow-soft-out: 0 24px 60px rgba(15, 23, 42, 0.75);
  --shadow-soft-inset: inset 0 1px 0 rgba(148, 163, 184, 0.4);

  /* Transitions */
  --transition-fast: 160ms ease-out;
}

/* ================================
   2. Globales Layout
================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Inter", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at 0% 0%, #1f2937 0, transparent 55%),
    radial-gradient(circle at 100% 0%, #0f172a 0, transparent 55%),
    radial-gradient(circle at 0% 100%, #111827 0, transparent 55%),
    radial-gradient(circle at 100% 100%, #1e293b 0, transparent 55%),
    #020617;
  background-attachment: fixed;
  padding: 24px 16px;
}

/* Container – keine weiße Box mehr, nur zentrierter Bereich */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 4px 16px;
  background: transparent;
  border: none;
  box-shadow: none;
}

.mode-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(255, 255, 255, 0.02);
  margin: 6px 0 16px;
}

.mode-label {
  font-weight: 700;
  color: var(--text-strong);
}

.mode-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-main);
}

.mode-switch.nav-mode {
  margin: 0 8px 0 0;
  padding: 6px 10px;
  border-radius: 10px;
}

/* ==========================
   3. Screen Handling / Typo
================================== */

.screen {
  margin-top: 4px;
}

.screen:not(.active) {
  display: none;
}

.hidden {
  display: none !important;
}

h1,
h2,
h3 {
  margin: 0 0 8px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

h1 {
  font-size: 2.1rem;
  color: #e5e7eb;
  text-shadow: 0 18px 45px rgba(15, 23, 42, 0.9);
}

h2 {
  font-size: 1.6rem;
}

h3 {
  font-size: 1.1rem;
}

.screen-subtitle {
  margin: 0 0 18px;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* ==========================
   4. Abschnitts-Layout
================================== */

.section-block {
  margin-top: 18px;
  padding: 14px 2px 6px;
  border-radius: 16px;
}

.section-title {
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(209, 213, 219, 0.95);
  margin-bottom: 6px;
}

.section-subtitle {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(148, 163, 184, 0.9);
  margin: 4px 0 6px;
}

/* ==========================
   5. Deck-Gitter
================================== */

.deck-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

.exam-grid {
  grid-template-columns: repeat(2, minmax(240px, 1fr));
}

@media (max-width: 700px) {
  .exam-grid {
    grid-template-columns: 1fr;
  }
}

/* Basis-Deck: Glass + gradient border via ::before */
.deck {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  padding: 8px 10px;
  cursor: pointer;
  overflow: visible;
  isolation: isolate;

  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0)) padding-box,
    radial-gradient(circle at 0 0, rgba(148, 163, 184, 0.18), transparent 62%) border-box,
    linear-gradient(145deg, rgba(15, 23, 42, 0.97), rgba(15, 23, 42, 0.9)) padding-box;

  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);

  border: 1px solid rgba(148, 163, 184, 0.85);
  box-shadow:
    0 22px 60px rgba(0, 0, 0, 0.68),
    0 2px 0 rgba(255, 255, 255, 0.04);
  transition:
    transform 220ms cubic-bezier(0.23, 0.88, 0.32, 1.15),
    box-shadow var(--transition-fast),
    border-color var(--transition-fast),
    background var(--transition-fast);
}

.deck::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.85),
    rgba(56, 189, 248, 0.6),
    rgba(244, 114, 182, 0.7)
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.28;
  pointer-events: none;
}

.deck::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.08), transparent 42%),
    radial-gradient(circle at 80% 0%, rgba(59, 130, 246, 0.1), transparent 40%);
  opacity: 0.8;
  pointer-events: none;
}

.deck:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow:
    0 30px 70px rgba(0, 0, 0, 0.78),
    0 2px 0 rgba(255, 255, 255, 0.06);
  border-color: rgba(191, 219, 254, 0.92);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0)) padding-box,
    radial-gradient(circle at 0 0, rgba(59, 130, 246, 0.25), transparent 62%) border-box,
    linear-gradient(145deg, rgba(15, 23, 42, 0.99), rgba(15, 23, 42, 0.94)) padding-box;
}

.deck-info-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(148, 163, 184, 0.55);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s ease, background 0.2s ease;
  pointer-events: auto;
}

.deck-info-btn:hover,
.deck-info-btn:focus-visible {
  transform: scale(1.06);
  background: rgba(255, 255, 255, 0.14);
  color: var(--text-strong);
}

.deck-info-popover {
  position: absolute;
  top: 12px;
  right: 40px;
  z-index: 5;
  min-width: 240px;
  max-width: 320px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.95);
  color: var(--text-main);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
  font-size: 0.95rem;
  pointer-events: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 120ms ease, transform 120ms ease, visibility 120ms ease;
}

.deck-info-btn:focus + .deck-info-popover,
.deck-info-btn:hover + .deck-info-popover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.deck h3 {
  font-size: 1rem;
  margin-bottom: 4px;
  color: #e5e7eb;
  padding-right: 70px; /* Platz für Badges wie "Gesperrt" */
}

.deck-desc {
  margin: 0 0 10px;
  font-size: 0.85rem;
  color: rgba(148, 163, 184, 0.96);
}

.deck-expiry {
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.deck-stats {
  display: flex;
  gap: 12px;
  font-size: 0.8rem;
  color: rgba(156, 163, 175, 0.95);
  margin-top: auto;
}

.deck.deck-locked .deck-stats {
  display: none;
}

.deck-stats span {
  white-space: nowrap;
}

.deck-stats span b {
  color: rgba(248, 250, 252, 0.95);
}

.deck-actions {
  margin-top: 8px;
}

/* Prüfungs-Decks leicht andere Farbgebung */
.exam-deck::before {
  background: linear-gradient(
    135deg,
    rgba(129, 140, 248, 0.9),
    rgba(59, 130, 246, 0.9),
    rgba(45, 212, 191, 0.9)
  );
}

.exam-deck {
  min-height: 114px;
}

/* ==========================
   6. Buttons
================================== */

button {
  font-family: inherit;
  font-size: 0.88rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(148, 163, 184, 0.8);
  padding: 6px 14px;
  cursor: pointer;
  color: rgba(248, 250, 252, 0.96);
  background: radial-gradient(circle at 0 0, rgba(148, 163, 184, 0.25), transparent 60%)
      border-box,
    linear-gradient(145deg, rgba(15, 23, 42, 0.97), rgba(15, 23, 42, 0.88)) padding-box;
  box-shadow:
    0 14px 30px rgba(15, 23, 42, 0.9),
    var(--shadow-soft-inset);
  border-radius: 999px;
  outline: none;
  transition:
    transform 160ms ease-out,
    box-shadow 160ms ease-out,
    background 160ms ease-out,
    border-color 160ms ease-out;
}

.small-btn {
  padding: 5px 10px;
  font-size: 0.82rem;
}

button:hover {
  transform: translateY(-1px);
  box-shadow:
    0 24px 50px rgba(15, 23, 42, 0.95),
    var(--shadow-soft-inset);
  border-color: rgba(191, 219, 254, 0.9);
}

button:active {
  transform: translateY(0px) scale(0.99);
}

/* Primäre Aktion */
.primary-btn {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.95), rgba(56, 189, 248, 0.9));
  border-color: rgba(191, 219, 254, 0.8);
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.7);
}

.primary-btn:hover {
  background: linear-gradient(135deg, #2563eb, #38bdf8);
}

/* Sekundäre Aktion */
.secondary-btn {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.9));
  color: rgba(226, 232, 240, 0.96);
}

.ghost-btn {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(148, 163, 184, 0.4);
  color: rgba(226, 232, 240, 0.85);
  box-shadow: none;
}

.danger-btn {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.9), rgba(248, 113, 113, 0.9));
  color: #fff;
  border-color: rgba(248, 113, 113, 0.7);
}

.danger-btn:hover {
  background: linear-gradient(135deg, #dc2626, #f87171);
}

/* Navigation */
.nav-btn {
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.88));
  border-color: rgba(148, 163, 184, 0.7);
}

/* Bewertungs-Buttons 
---------------------------------- */

.grading-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.grade-btn {
  flex: 1 1 100px;
  min-width: 0;
  color: #fff;
  border: none;
}

/* Farbcode für Wiederholungsbewertungen */
.grade-btn {
  color: #fff;
  border: none;
}

.grade-btn.again {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.95), rgba(248, 113, 113, 0.9));
}

.grade-btn.hard {
  background: linear-gradient(135deg, rgba(202, 138, 4, 0.95), rgba(251, 191, 36, 0.9));
}

.grade-btn.good {
  background: linear-gradient(135deg, rgba(21, 128, 61, 0.95), rgba(34, 197, 94, 0.9));
}

.grade-btn.easy {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.95), rgba(59, 130, 246, 0.9));
}

.exam-summary {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.85);
  color: var(--text-main);
}

.exam-summary h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.exam-summary-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.exam-summary.hidden {
  display: none;
}

.exam-summary + .no-cards-message {
  margin-top: 8px;
}

/* ==========================
   7. Review-Screen
================================== */

.top-nav {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 16px;
}

.top-nav .nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-btn.active {
  border-color: rgba(59, 130, 246, 0.7);
  box-shadow: 0 12px 28px rgba(59, 130, 246, 0.35);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.85), rgba(56, 189, 248, 0.75));
}

#subStackPanel {
  scroll-margin-top: 12px;
}

.advanced-hint {
  margin: 12px 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px dashed rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.55);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.substack-panel {
  margin-top: 12px;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.55);
}

.substack-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.substack-title-wrap h3 {
  margin: 0 0 4px;
}

.substack-label {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.substack-card {
  padding: 12px 14px;
  border-color: rgba(94, 234, 212, 0.6);
}

.substack-card h3 {
  color: #e0f2fe;
}

.substack-card .deck-desc {
  color: rgba(148, 163, 184, 0.9);
}

.substack-grid {
  margin-top: 6px;
}

.subdeck-card,
.substack-card {
  min-height: 114px;
}

#reviewDeckTitle {
  margin: 0 0 12px;
  font-size: 1.4rem;
}

/* Glas-Card für die aktuelle Frage */
#review-card-container {
  background: var(--bg-glass);
  border-radius: 24px;
  padding: 16px 16px 14px;
  box-shadow:
    0 22px 50px rgba(15, 23, 42, 0.9),
    inset 0 1px 0 rgba(148, 163, 184, 0.35);
  border: 1px solid rgba(148, 163, 184, 0.6);
  min-height: 230px;
}

/* Frage */
.card-question {
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text-strong);
  margin-bottom: 8px;
}

/* Antwortbereich */
.card-answer {
  margin-top: 6px;
  font-size: 0.95rem;
  color: rgba(226, 232, 240, 0.98);
}

/* Antwort-Liste bei MC */
.answer-options {
  list-style: none;
  padding-left: 0;
  margin: 8px 0 0;
}

.answer-options li {
  padding: 6px 10px;
  border-radius: 10px;
  margin-bottom: 4px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.4);
  font-size: 0.9rem;
}

.answer-options li.correct-answer {
  border-color: rgba(34, 197, 94, 0.9);
  background: linear-gradient(
    135deg,
    rgba(22, 163, 74, 0.85),
    rgba(34, 197, 94, 0.9)
  );
}

/* Neue Fragetypen: MC, KPRIM, Cloze, Offen */
.mc-card,
.kprim-card,
.cloze-card,
.open-card {
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.88));
  border: 1px solid rgba(148, 163, 184, 0.55);
  border-radius: 16px;
  padding: 10px 12px;
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(148, 163, 184, 0.35);
}

.mc-card.is-correct,
.kprim-card.is-correct,
.cloze-card.is-correct,
.image-match.is-correct {
  border-color: rgba(34, 197, 94, 0.9);
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.18), rgba(22, 163, 74, 0.12));
  box-shadow:
    0 18px 38px rgba(22, 163, 74, 0.28),
    inset 0 1px 0 rgba(34, 197, 94, 0.35);
}

.mc-card.is-wrong,
.kprim-card.is-wrong,
.cloze-card.is-wrong,
.image-match.is-wrong,
.open-card.is-wrong {
  border-color: rgba(248, 113, 113, 0.95);
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.22), rgba(127, 29, 29, 0.16));
  box-shadow:
    0 18px 38px rgba(248, 113, 113, 0.26),
    inset 0 1px 0 rgba(248, 113, 113, 0.35);
}

.open-card.is-correct {
  border-color: rgba(34, 197, 94, 0.9);
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.18), rgba(22, 163, 74, 0.12));
  box-shadow:
    0 18px 38px rgba(22, 163, 74, 0.28),
    inset 0 1px 0 rgba(34, 197, 94, 0.35);
}

.open-card.is-wrong {
  border-color: rgba(248, 113, 113, 0.95);
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.22), rgba(127, 29, 29, 0.16));
  box-shadow:
    0 18px 38px rgba(248, 113, 113, 0.26),
    inset 0 1px 0 rgba(248, 113, 113, 0.35);
}

.mc-question,
.kprim-question,
.open-question,
.cloze-sentence {
  font-size: 1.05rem;
  margin-bottom: 10px;
  color: var(--text-strong);
  line-height: 1.5;
}

.mc-image {
  margin: 8px 0 10px;
}

.mc-image img,
.image-match-figure img {
  cursor: zoom-in;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 16px;
}

.image-lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.mc-option-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mc-option-row {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(255, 255, 255, 0.02);
  box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.2);
  cursor: pointer;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
}

.mc-option-row:hover {
  transform: translateY(-1px);
  border-color: rgba(148, 163, 184, 0.7);
}

.mc-radio {
  accent-color: var(--accent-cyan);
  width: 18px;
  height: 18px;
}

.mc-option-letter {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--text-strong);
}

.mc-option-text {
  color: var(--text-main);
  font-size: 0.95rem;
}

.mc-option-row.is-selected {
  border-color: rgba(59, 130, 246, 0.8);
  box-shadow:
    0 10px 24px rgba(59, 130, 246, 0.35),
    inset 0 0 0 1px rgba(59, 130, 246, 0.45);
}

.mc-option-row.is-correct {
  border-color: rgba(34, 197, 94, 0.9);
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.25), rgba(34, 197, 94, 0.18));
}

.mc-option-row.is-wrong {
  border-color: rgba(248, 113, 113, 0.9);
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.2), rgba(127, 29, 29, 0.18));
}

.kprim-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kprim-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(255, 255, 255, 0.02);
  box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.2);
}

.kprim-letter {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--text-strong);
}

.kprim-text {
  color: var(--text-main);
  font-size: 0.95rem;
}

.kprim-controls {
  display: flex;
  gap: 8px;
}

.kprim-toggle {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  cursor: pointer;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
}

.kprim-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(148, 163, 184, 0.7);
}

.kprim-toggle.kprim-true {
  color: #16a34a;
}

.kprim-toggle.kprim-false {
  color: #ef4444;
}

.choice-true .kprim-toggle.kprim-true {
  border-color: rgba(34, 197, 94, 0.95);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.22), rgba(22, 163, 74, 0.2));
  color: #0b1224;
}

.choice-false .kprim-toggle.kprim-false {
  border-color: rgba(239, 68, 68, 0.95);
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.22), rgba(127, 29, 29, 0.18));
  color: #0b1224;
}

.kprim-row.kprim-correct {
  border-color: rgba(34, 197, 94, 0.9);
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.25), rgba(34, 197, 94, 0.18));
}

.kprim-row.kprim-wrong {
  border-color: rgba(248, 113, 113, 0.9);
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.2), rgba(127, 29, 29, 0.18));
}

.kprim-row.kprim-missing {
  border-style: dashed;
  border-color: rgba(148, 163, 184, 0.6);
}

.cloze-card {
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.88));
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 14px;
  padding: 10px 12px;
}

.cloze-sentence {
  font-size: 1rem;
  line-height: 1.5;
}

.cloze-select {
  font-size: 0.95rem;
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.55);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-strong);
}

.gap-correct {
  border-color: rgba(34, 197, 94, 0.9) !important;
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.22), rgba(34, 197, 94, 0.18));
}

.gap-wrong {
  border-color: rgba(248, 113, 113, 0.9) !important;
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.2), rgba(127, 29, 29, 0.18));
}

.open-question {
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.open-input-wrap {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
}

.open-hint {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.open-input {
  flex: 1;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  font-size: 1rem;
}

.open-clear {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-strong);
  cursor: pointer;
}

.open-image {
  margin: 8px 0;
}

.answer-summary {
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-strong);
}

.answer-detail,
.answer-extra {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.answer-correct {
  color: #22c55e;
}

.answer-wrong {
  color: #f87171;
}

.answer-list {
  list-style: none;
  padding-left: 0;
  margin: 6px 0 0;
}

.answer-list li {
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.02);
  margin-bottom: 4px;
}

.report-box {
  margin: 12px 0;
  display: flex;
  justify-content: flex-end;
}

.inline-report {
  margin: 0;
  justify-content: flex-start;
}

.review-header-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  margin: 8px 0;
  gap: 8px;
}

.review-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.review-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.review-header-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 6px 0 10px;
}

.review-header-inline h2 {
  margin: 0;
}

.review-content-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

#review-card-container {
  flex: 1 1 0;
}

.review-side-actions {
  flex: 0 0 210px;
  max-width: 210px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}

.inline-report {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: flex-start;
  width: 100%;
}

.review-actions-dropdown {
  position: relative;
  width: 100%;
}

.ellipsis-btn {
  width: 100%;
  font-size: 1.2rem;
  padding: 8px 10px;
}

.actions-menu {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.actions-menu.hidden {
  display: none;
}

.review-side-actions button {
  width: 100%;
  padding: 8px 12px;
  letter-spacing: 0;
  align-self: stretch;
}

@media (max-width: 820px) {
  .review-content-row {
    flex-direction: column;
  }
  .review-side-actions {
    flex: none;
    max-width: none;
    width: 100%;
  }
}

.review-counters {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 0.95rem;
  color: var(--text-main);
}

.review-counters strong {
  color: var(--text-strong);
}

.counter-new strong {
  color: #38bdf8;
}

.counter-due strong {
  color: #facc15;
}

.review-actions {
  display: none;
}

.report-form {
  margin-top: 8px;
  width: 100%;
  max-width: 420px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.02);
  box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.12);
}

.report-group {
  margin-bottom: 8px;
}

.report-label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-strong);
}

.report-options {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--text-main);
}

.report-options label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.report-detail {
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
}

.report-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.report-status {
  margin-top: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.report-status.success {
  color: #22c55e;
}

.report-status.error {
  color: #f87171;
}

.kprim-browse {
  list-style: none;
  padding-left: 0;
  margin: 6px 0 0;
}

.kprim-browse li {
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.02);
  margin-bottom: 4px;
}

.browse-cloze-sentence {
  font-weight: 700;
  margin-bottom: 6px;
}

/* Bild-Zuordnung (Drag & Drop) */
.image-match {
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(148, 163, 184, 0.65);
  border-radius: 18px;
  padding: 10px 12px 12px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6);
}

.image-match-prompt {
  margin: 0 0 10px;
  color: var(--text-strong);
  font-size: 1rem;
}

.image-match-figure {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 14px;
  padding: 8px;
  box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.25);
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 12px;
}

.image-match-figure img {
  max-width: 100%;
  max-height: 200px;
  width: auto;
  height: auto;
  border-radius: 10px;
  display: block;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.5));
}

.image-match-labels {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.image-match-row {
  display: grid;
  grid-template-columns: 1fr auto minmax(90px, 180px);
  align-items: center;
  column-gap: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  padding: 8px 8px;
  box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.14);
}

.image-match-label {
  flex: 1;
  color: var(--text-main);
  font-size: 0.95rem;
}

.image-match-slot,
.image-match-num-slot {
  width: auto;
  min-width: 80px;
  max-width: 150px;
  min-height: 34px;
  padding: 6px 6px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid rgba(148, 163, 184, 0.35);
  background: rgba(148, 163, 184, 0.08);
  color: var(--text-strong);
  font-weight: 600;
}

.image-match-slot {
  border-style: solid;
  border-color: rgba(148, 163, 184, 0.5);
}

.image-match-num-slot {
  flex: 0 0 94px;
}

.image-match-slot.is-correct {
  border-color: rgba(34, 197, 94, 0.95);
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.22), rgba(22, 163, 74, 0.12));
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.35);
}

.image-match-slot.is-wrong {
  border-color: rgba(248, 113, 113, 0.95);
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.24), rgba(127, 29, 29, 0.16));
  box-shadow: inset 0 0 0 1px rgba(248, 113, 113, 0.35);
}

.image-match-slot.is-selected,
.image-match-num-slot.is-selected {
  border-color: rgba(59, 130, 246, 0.8);
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.45);
}

.image-match-pool {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(148, 163, 184, 0.06);
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(94px, 1fr);
  gap: 10px;
  overflow-x: auto;
}

.image-match-num-slot {
  border: 1px solid rgba(148, 163, 184, 0.35);
  flex: 0 0 94px;
}

.image-match-pill {
  width: 100%;
  height: 100%;
  min-height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.28), rgba(15, 23, 42, 0.22));
  border: 1px solid rgba(148, 163, 184, 0.55);
  color: var(--text-strong);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.3;
  white-space: normal;
  cursor: grab;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.image-match-pill:active {
  cursor: grabbing;
}

.image-match-pill.is-selected {
  outline: 2px solid rgba(59, 130, 246, 0.65);
  box-shadow:
    0 12px 32px rgba(59, 130, 246, 0.25),
    0 0 0 3px rgba(59, 130, 246, 0.25);
}

.image-match-correct {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.image-match-solution-inline {
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: normal;
}

.image-match-row.row-correct {
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.22), rgba(22, 163, 74, 0.12));
  border-color: rgba(34, 197, 94, 0.6);
}

.image-match-row.row-wrong {
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.22), rgba(127, 29, 29, 0.16));
  border-color: rgba(248, 113, 113, 0.6);
}

.image-match.all-correct {
  border-color: rgba(34, 197, 94, 0.9);
  box-shadow:
    0 24px 60px rgba(22, 163, 74, 0.28),
    0 0 0 1px rgba(34, 197, 94, 0.35);
}

.image-match.has-wrong {
  border-color: rgba(248, 113, 113, 0.9);
  box-shadow:
    0 24px 60px rgba(248, 113, 113, 0.26),
    0 0 0 1px rgba(248, 113, 113, 0.35);
}

/* =========================
   Light Theme Overrides
========================= */
.theme-light {
  --bg-main: #f8f5ef;
  --bg-glass: #fdfaf3;
  --bg-glass-soft: #f7f3ec;
  --text-main: #000000;
  --text-muted: #111111;
  --text-strong: #000000;
}

body.theme-light {
  background: #f8f5ef !important;
  background-image: none !important;
  color: var(--text-main);
}

.theme-light h1 {
  color: #000000;
  text-shadow: none;
}

.theme-light .deck {
  background: #fdfaf3;
  border: 2px solid #000000;
  box-shadow: none;
}

.theme-light .deck::before,
.theme-light .deck::after {
  opacity: 0;
}

.theme-light .deck.exam-deck {
  background: #fdfaf3;
  border: 2px solid #000000;
  box-shadow: none;
}

.theme-light .deck.deck-locked {
  filter: none;
  opacity: 0.9;
  border-color: #fca5a5;
}

.theme-light .deck.deck-locked::after {
  color: #dc2626;
}

.theme-light .deck h3 {
  color: #000000;
}

.theme-light .deck-desc {
  color: #111111;
}

.theme-light button {
  background: #fdfaf3;
  color: #000000;
  border-color: #000000;
  box-shadow: none;
}

.theme-light button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
  border-color: #000000;
}

.theme-light .primary-btn {
  background: #fdfaf3;
  color: #000000;
  border-color: #000000;
  box-shadow: none;
}

.theme-light .secondary-btn,
.theme-light .nav-btn {
  background: #ffffff;
  color: #000000;
  border-color: #000000;
}

.theme-light #review-card-container,
.theme-light .flashcard,
.theme-light .image-match {
  background: #fdfaf3;
  border: 2px solid #000000;
  box-shadow: none;
}

.theme-light .mc-card,
.theme-light .kprim-card,
.theme-light .cloze-card,
.theme-light .open-card {
  background: #fdfaf3;
  border: 2px solid #000000;
  box-shadow: none;
}

.theme-light .mc-card.is-correct,
.theme-light .kprim-card.is-correct,
.theme-light .cloze-card.is-correct,
.theme-light .image-match.is-correct,
.theme-light .open-card.is-correct {
  background: #e7f8ed;
  border-color: #34d399;
  box-shadow: none;
}

.theme-light .mc-card.is-wrong,
.theme-light .kprim-card.is-wrong,
.theme-light .cloze-card.is-wrong,
.theme-light .image-match.is-wrong,
.theme-light .open-card.is-wrong {
  background: #fee2e2;
  border-color: #f87171;
  box-shadow: none;
}

.theme-light .open-card.is-correct {
  background: #e7f8ed;
  border-color: #34d399;
}

.theme-light .open-card.is-wrong {
  background: #fee2e2;
  border-color: #f87171;
}

.theme-light .mc-option-row,
.theme-light .kprim-row,
.theme-light .answer-list li,
.theme-light .kprim-browse li {
  background: #ffffff;
  border-color: #000000;
  box-shadow: none;
}

.theme-light .mc-option-row.is-correct,
.theme-light .kprim-row.kprim-correct {
  background: #e7f8ed;
  border-color: #34d399;
}

.theme-light .mc-option-row.is-wrong,
.theme-light .kprim-row.kprim-wrong {
  background: #fee2e2;
  border-color: #f87171;
}

.theme-light .cloze-select,
.theme-light .open-input,
.theme-light .open-clear {
  background: #ffffff;
  border-color: #000000;
  color: #000000;
}

.theme-light .gap-correct {
  background: #e7f8ed;
  border-color: #34d399 !important;
}

.theme-light .gap-wrong {
  background: #fee2e2;
  border-color: #f87171 !important;
}

.theme-light .image-match-figure {
  background: #fdfaf3;
  border: 1px solid #000000;
  box-shadow: none;
}

.theme-light .image-match-row {
  background: #fdfaf3;
  border-color: #000000;
}

.theme-light .image-match-slot,
.theme-light .image-match-num-slot {
  background: #ffffff;
  border-color: #000000;
  color: #000000;
}

.theme-light .image-match-row.row-correct {
  background: #e7f8ed;
  border-color: #34d399;
}

.theme-light .image-match-row.row-wrong {
  background: #fee2e2;
  border-color: #f87171;
}

.theme-light .image-match.all-correct {
  border-color: #34d399;
  box-shadow: none;
}

.theme-light .image-match.has-wrong {
  border-color: #f87171;
  box-shadow: none;
}

.theme-light .modal {
  background: #fdfaf3;
  border: 1px solid #000000;
  box-shadow: none;
}

.theme-light .modal-tabs {
  background: #fdfaf3;
  border-color: #000000;
}

.theme-light .auth-tab.active {
  color: #000000;
}

.theme-light .modal-label input {
  background: #fdfaf3;
  border: 1px solid #000000;
  color: #000000;
}

.theme-light .modal-label input:focus {
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45);
}

.theme-light .user-info {
  color: #000000;
}

.theme-light .answer-options li {
  background: #fdfaf3;
  border-color: #000000;
  color: #000000;
}

.theme-light .answer-options li.correct-answer {
  background: #e7f8ed;
  border-color: #34d399;
}

.theme-light .browse-image-match img {
  filter: none;
}

.theme-light .top-nav,
.theme-light .section-block,
.theme-light .section-title,
.theme-light .section-subtitle,
.theme-light .screen-subtitle {
  color: #000000;
}

.theme-light .card-question,
.theme-light .card-answer,
.theme-light .flashcard-question,
.theme-light .flashcard-answer {
  color: #000000;
}

.image-match-solution {
  list-style: none;
  padding-left: 0;
  margin: 8px 0 0;
  display: grid;
  gap: 6px;
}

.image-match-solution li {
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.4);
  font-size: 0.9rem;
}

.browse-image-match img {
  max-width: 180px;
  border-radius: 10px;
  margin-bottom: 8px;
  display: block;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.35));
}

@media (max-width: 768px) {
  .image-match-figure img {
    max-height: 200px;
  }

  .image-match-slot,
  .image-match-num-slot {
    width: auto;
    min-width: 80px;
  }

  .image-match-num-slot {
    flex: 0 0 80px;
  }

  .image-match-pool {
    grid-auto-columns: minmax(80px, 1fr);
    gap: 8px;
  }
}

/* Hinweis: Alle Karten erledigt */
.no-cards-message {
  margin-top: 18px;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Debug-Info unter den Buttons */
.debug-info {
  font-family: "SF Mono", ui-monospace, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
}

/* ==========================
   8. Browse-Ansicht
================================== */

#browseDeckTitle {
  margin-bottom: 16px;
}

#browseCardsList {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Flashcards in der Browse-Ansicht */
.flashcard {
  background: var(--bg-glass);
  border-radius: 18px;
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  box-shadow: var(--shadow-soft-out);
}

.flashcard-question {
  font-size: 0.95rem;
  margin-bottom: 6px;
  color: var(--text-strong);
}

.flashcard-answer {
  font-size: 0.9rem;
  color: var(--text-main);
}

/* ==========================
   9. Responsives Design
================================== */

@media (max-width: 768px) {
  body {
    padding: 18px 10px;
  }

  .container {
    padding-inline: 0;
  }

  h1 {
    font-size: 1.6rem;
  }

  .top-nav {
    flex-direction: column;
    align-items: stretch;
  }

  #review-card-container {
    padding: 16px 14px;
    min-height: 200px;
  }
}

/* =========================
   Auth & gesperrte Decks
========================= */

.user-info {
  font-size: 0.8rem;
  color: rgba(226, 232, 240, 0.9);
  margin-right: 8px;
  white-space: nowrap;
}

.deck.deck-locked {
  opacity: 0.82;
  cursor: default;
  filter: grayscale(0.2);
}

.deck.deck-locked::after {
  content: "Gesperrt";
  position: absolute;
  inset: auto;
  top: auto;
  right: auto;
  left: 12px;
  bottom: 10px;
  width: auto;
  height: auto;
  transform: none;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fb923c;
  background: transparent;
  padding: 0;
  border: none;
  box-shadow: none;
  pointer-events: none;
}

/* Auth-Modal: Tabs & Formulare */
.auth-tabs {
  display: flex;
  gap: 8px;
  padding: 6px;
  margin: 12px 0 10px;
  background: rgba(15, 23, 42, 0.85);
  border-radius: var(--radius-pill);
  border: 1px solid rgba(51, 65, 85, 0.85);
  box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.2);
}

.auth-tab {
  flex: 1;
  border: none;
  border-radius: var(--radius-pill);
  padding: 8px 10px;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition:
    background var(--transition-fast),
    color var(--transition-fast),
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

.auth-tab:hover {
  color: var(--text-main);
  transform: translateY(-1px);
}

.auth-tab.active {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  color: #0f172a;
  font-weight: 700;
  box-shadow: 0 14px 35px rgba(59, 130, 246, 0.35);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}

.auth-form label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.auth-form input {
  background: rgba(15, 23, 42, 0.94);
  border-radius: 12px;
  border: 1px solid rgba(51, 65, 85, 0.95);
  padding: 10px 12px;
  color: var(--text-strong);
  font-size: 0.94rem;
  box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.22);
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
}

.auth-form input::placeholder {
  color: rgba(148, 163, 184, 0.82);
}

.auth-form input:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow:
    0 0 0 1px rgba(59, 130, 246, 0.32),
    0 16px 40px rgba(15, 23, 42, 0.65);
}

.code-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.code-input-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-helper {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.form-error {
  margin: 0;
  font-size: 0.85rem;
  color: #fca5a5;
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.3);
  padding: 8px 10px;
  border-radius: 10px;
}

.form-success {
  margin: 0;
  font-size: 0.85rem;
  color: var(--accent-green);
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.35);
  padding: 8px 10px;
  border-radius: 10px;
}

@media (max-width: 640px) {
  .code-row {
    flex-direction: column;
    align-items: stretch;
  }
}
/* ==========================
   9. Modale (Login / Kauf)
================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.modal {
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.95), #020617);
  border-radius: 20px;
  padding: 20px 22px 18px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 25px 80px rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.4);
}

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

.modal-subtitle {
  margin: 4px 0 0;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.icon-btn {
  background: transparent;
  border-radius: 999px;
  border: none;
  color: var(--text-muted);
  font-size: 1.3rem;
  line-height: 1;
  padding: 2px 6px;
  cursor: pointer;
}

.icon-btn:hover {
  background: rgba(15, 23, 42, 0.85);
  color: #e5e7eb;
}

/* Tabs oben im Modal */
.modal-tabs {
  display: flex;
  gap: 6px;
  padding: 4px;
  margin-bottom: 10px;
  background: rgba(15, 23, 42, 0.8);
  border-radius: 999px;
  border: 1px solid rgba(51, 65, 85, 0.85);
}

.modal-tab {
  flex: 1;
  border: none;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.modal-tab.active {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  color: #0f172a;
  font-weight: 600;
}

/* Formular */
.modal-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}

.modal-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.modal-label input {
  background: rgba(15, 23, 42, 0.9);
  border-radius: 11px;
  border: 1px solid rgba(51, 65, 85, 0.9);
  padding: 7px 10px;
  color: #e5e7eb;
  font-size: 0.9rem;
}

.modal-label input::placeholder {
  color: rgba(148, 163, 184, 0.8);
}

.modal-label input:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.3);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 6px;
}

.modal-helper-text {
  margin-top: 4px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.modal-helper-text.small {
  font-size: 0.72rem;
}

.modal-error {
  margin: 2px 0 0;
  font-size: 0.78rem;
  color: #f97373;
}

.modal-success {
  margin: 2px 0 0;
  font-size: 0.78rem;
  color: var(--accent-green);
}

.modal-inline {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-body {
  margin-top: 4px;
}

.purchase-deck-title {
  margin: 0 0 4px;
  font-size: 1rem;
  color: #e5e7eb;
}

.modal-price {
  margin: 0 0 8px;
  font-size: 0.9rem;
}

.modal-list {
  margin: 0 0 10px;
  padding-left: 16px;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.modal-list li {
  margin-bottom: 4px;
}

/* Overlay verstecken über .hidden */
.modal-overlay.hidden {
  display: none !important;
}
