/* Vokabel-Web — Styles (eigene Datei wegen strenger CSP: kein Inline-CSS nötig).
   Farbwelt wie das Schul-Dashboard. Text ist überall markier- und kopierbar —
   bewusst KEIN user-select:none irgendwo. */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg: #1c1917; --bg2: #292524; --card: #2c2825; --line: rgba(255,255,255,.08);
  --txt: #f5f0ea; --dim: rgba(245,240,234,.55); --accent: #e8956b;
  --ok: #34d399; --bad: #f87171; --hard: #fb923c; --easy: #7dd3fc;
}
body { background: var(--bg); color: var(--txt); font-family: ui-sans-serif, system-ui, "Segoe UI", Roboto, sans-serif; min-height: 100vh; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
h1 { font-size: 22px; font-weight: 700; }
.sub { color: var(--dim); font-size: 13px; margin-top: 4px; }
.hidden { display: none !important; }
button { font: inherit; cursor: pointer; border: none; border-radius: 10px; }
input, textarea { font: inherit; color: var(--txt); background: #221f1c; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%; }
textarea { resize: vertical; }
label.fld { display: block; font-size: 12px; color: var(--dim); margin: 12px 0 4px; }
.btn-primary { background: var(--accent); color: #221408; font-weight: 700; padding: 12px 20px; font-size: 14.5px; }
.btn-primary:hover { filter: brightness(1.1); }
.btn-ghost { background: var(--bg2); color: var(--txt); border: 1px solid var(--line); padding: 11px 16px; font-size: 13.5px; }
.btn-ghost:hover { background: #38322d; }

/* ===== Login / Registrierung ===== */
#authView { max-width: 420px; margin: 8vh auto 0; }
.authcard { background: var(--bg2); border: 1px solid var(--line); border-radius: 18px; padding: 26px; }
.authtabs { display: flex; gap: 8px; margin-bottom: 18px; }
.authtabs button { flex: 1; padding: 10px; background: transparent; color: var(--dim); border: 1px solid var(--line); }
.authtabs button.active { background: var(--accent); color: #221408; font-weight: 700; border-color: transparent; }
.autherr { color: var(--bad); font-size: 13px; margin-top: 10px; min-height: 18px; }
.authhint { color: var(--dim); font-size: 12px; margin-top: 14px; line-height: 1.5; }

/* ===== Kopfzeile / Statistik ===== */
.topbar { display: flex; align-items: center; gap: 10px; }
.topbar .who { color: var(--dim); font-size: 13px; margin-left: auto; }
.stats { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0 22px; }
.stat { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 16px; }
.stat b { font-size: 19px; display: block; }
.stat span { font-size: 11.5px; color: var(--dim); text-transform: uppercase; letter-spacing: .08em; }
.stat.due b { color: var(--accent); }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.mode { color: var(--dim); font-size: 12.5px; display: flex; align-items: center; gap: 8px; }
.mode input, .settingsrow input[type="number"] { width: auto; }
.settingsrow { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; color: var(--dim); font-size: 12.5px; margin-bottom: 18px; }
.settingsrow input[type="number"] { width: 70px; padding: 6px 8px; margin-left: 6px; }

/* ===== Deck-Kacheln ===== */
.decks { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.deck { background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 16px; text-align: left; transition: border-color .15s, transform .15s; display: block; width: 100%; color: var(--txt); }
.deck:hover { border-color: var(--deckcolor, var(--accent)); transform: translateY(-2px); }
.deck .head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.deck .icon { font-size: 22px; }
.deck .title { font-weight: 650; font-size: 15px; }
.deck .desc { color: var(--dim); font-size: 12.5px; line-height: 1.45; min-height: 34px; }
.deck .meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--dim); margin-top: 10px; }
.deck .duebadge { color: var(--accent); font-weight: 700; }
.boxbar { display: flex; height: 5px; border-radius: 3px; overflow: hidden; margin-top: 9px; background: #1f1c1a; }
.boxbar i { display: block; height: 100%; }

/* ===== Lern-Ansicht ===== */
#learnView { max-width: 680px; margin: 0 auto; }
.learn-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; font-size: 13px; color: var(--dim); }
.progressbar { flex: 1; height: 6px; border-radius: 4px; background: var(--bg2); overflow: hidden; }
.progressbar i { display: block; height: 100%; background: var(--accent); transition: width .25s; }
.flashcard { background: var(--card); border: 1px solid var(--line); border-radius: 18px; min-height: 320px; padding: 30px 28px; display: flex; flex-direction: column; justify-content: center; text-align: center; cursor: pointer; position: relative; }
.flashcard .decklabel { position: absolute; top: 14px; left: 0; right: 0; font-size: 11.5px; color: var(--dim); text-transform: uppercase; letter-spacing: .1em; }
.flashcard .qtype { font-size: 12px; color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; }
.flashcard .big { font-size: 21px; font-weight: 700; line-height: 1.4; }
.flashcard .hint { color: var(--dim); font-size: 12.5px; margin-top: 22px; }
.answer { text-align: left; }
.answer .term { font-size: 23px; font-weight: 800; color: var(--accent); text-align: center; margin-bottom: 16px; }
.answer img.cardimg { max-width: 100%; border-radius: 12px; display: block; margin: 0 auto 14px; }
.answer .block { margin: 10px 0; font-size: 14px; line-height: 1.55; }
.answer .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .09em; color: var(--dim); display: block; margin-bottom: 2px; }
.answer .analogie { color: #d9c9a7; font-style: italic; }
.answer .promptbsp { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; background: #221f1c; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; color: #b8e0c6; }
.answer .projekt { color: #9fc2e8; font-size: 13px; }
.grade { display: flex; gap: 8px; margin-top: 16px; }
.grade button { flex: 1; padding: 12px 4px; font-size: 13px; font-weight: 700; background: transparent; border: 1px solid; border-radius: 12px; display: flex; flex-direction: column; gap: 2px; align-items: center; }
.grade small { font-size: 10.5px; font-weight: 400; opacity: .85; }
.g-nochmal { color: var(--bad); border-color: rgba(248,113,113,.5); }
.g-schwer  { color: var(--hard); border-color: rgba(251,146,60,.5); }
.g-gut     { color: var(--ok); border-color: rgba(52,211,153,.5); }
.g-einfach { color: var(--easy); border-color: rgba(125,211,252,.5); }
.grade button:hover { background: rgba(255,255,255,.06); }
.keyhint { text-align: center; color: var(--dim); font-size: 11.5px; margin-top: 12px; }

/* ===== Sitzungs-Ende ===== */
#doneView { text-align: center; padding: 60px 20px; }
#doneView .emoji { font-size: 46px; }
#doneView h2 { margin: 14px 0 6px; }
#doneView p { color: var(--dim); font-size: 14px; margin-bottom: 22px; }

/* ===== Eigene Karten ===== */
#editView, #formView { max-width: 680px; margin: 0 auto; }
.ucard { display: flex; align-items: center; gap: 12px; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin-bottom: 8px; }
.ucard img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; }
.ucard .t { flex: 1; min-width: 0; cursor: pointer; }
.ucard .t b { display: block; font-size: 14px; }
.ucard .t span { display: block; font-size: 12px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ucard button { background: transparent; color: var(--dim); font-size: 16px; padding: 6px; }
.ucard button:hover { color: var(--bad); }
#imgPreview { max-height: 180px; border-radius: 12px; margin-top: 8px; display: block; }
.formbtns { margin-top: 20px; display: flex; gap: 10px; }

footer { text-align: center; color: var(--dim); font-size: 11.5px; margin-top: 48px; }
footer a { color: var(--dim); }

@media (max-width: 560px) {
  .flashcard { min-height: 260px; padding: 24px 16px; }
  .flashcard .big { font-size: 17.5px; }
  .grade button { padding: 12px 2px; font-size: 12px; }
}

/* ===== Admin-Verwaltung ===== */
h2.adminsec { font-size: 14px; color: var(--dim); text-transform: uppercase; letter-spacing: .08em; margin: 26px 0 10px; }
#gcardImgPreview, #gcImgPreview { max-height: 180px; border-radius: 12px; margin-top: 8px; display: block; }
.ucard .hiddenflag { color: var(--hard); font-size: 11px; }
