/* PROVOID Fortbildungs-Oberfläche
   Farben und Schriften zentral in :root, damit sie leicht an die Marke angepasst werden können. */
@font-face { font-family: "Bebas Neue"; src: url("/fonts/BebasNeue-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Arimo"; src: url("/fonts/Arimo.ttf") format("truetype"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Syne"; src: url("/fonts/Syne.ttf") format("truetype"); font-weight: 400 800; font-display: swap; }

:root {
  --night: #0A1128;        /* Nachtblau, Seitenhintergrund */
  --night-2: #111B3A;      /* Flächen */
  --night-3: #1A2750;      /* aktive Flächen, Rahmen */
  --line: rgba(255, 255, 255, 0.12);
  --text: #F2F4FA;
  --muted: #A4AECB;
  --accent: #9FD8F0;       /* Akzent: bei Bedarf an Markenfarbe anpassen */
  --accent-ink: #0A1128;
  --danger: #FFB4A8;
  --display: "Bebas Neue", "Arial Narrow", sans-serif;
  --body: "Arimo", Arial, sans-serif;
  --brand: "Syne", "Arimo", sans-serif;
  --width: 820px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--night); color: var(--text);
  font-family: var(--body); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wordmark { font-family: var(--brand); font-weight: 800; font-size: 28px; letter-spacing: 0.04em; }
.wordmark.small { font-size: 20px; }
.eyebrow { font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); margin: 0 0 18px; }
h1 { font-family: var(--display); font-weight: 400; font-size: clamp(52px, 9vw, 84px); line-height: 0.95; letter-spacing: 0.01em; margin: 0 0 24px; }
h2 { font-family: var(--display); font-weight: 400; font-size: 34px; letter-spacing: 0.02em; margin: 0; }
.lede { color: var(--muted); font-size: 19px; max-width: 34ch; margin: 0 0 36px; }
.fineprint { color: var(--muted); font-size: 13px; line-height: 1.5; margin: 28px 0 0; max-width: 52ch; }
.fineprint.center { margin: 12px auto 0; text-align: center; }
.error { color: var(--danger); margin: 16px 0 0; }

button { font: inherit; cursor: pointer; }
.btn-primary {
  background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 999px;
  padding: 14px 28px; font-weight: 700; letter-spacing: 0.02em; white-space: nowrap;
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-primary:disabled { opacity: 0.45; cursor: default; filter: none; }
.btn-ghost {
  background: transparent; color: var(--muted); border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 16px; font-size: 14px;
}
.btn-ghost:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.3); }

/* ---------- Anmeldung ---------- */
.login { min-height: 100%; display: flex; align-items: center; padding: 48px 28px; }
.login-inner { width: 100%; max-width: 620px; margin: 0 auto; }
.login .wordmark { margin-bottom: 72px; }
#login-form { display: flex; gap: 12px; flex-wrap: wrap; }
#code {
  flex: 1 1 260px; background: var(--night-2); color: var(--text); border: 1px solid var(--line);
  border-radius: 999px; padding: 14px 24px; font: inherit; font-size: 18px; letter-spacing: 0.08em; text-transform: uppercase;
}
#code::placeholder { color: #6C7799; letter-spacing: 0.04em; text-transform: none; }

/* ---------- Arbeitsfläche ---------- */
.app { min-height: 100%; display: flex; flex-direction: column; }
.top {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 22px 32px; border-bottom: 1px solid var(--line);
}
.top-left { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; }
.top-title { color: var(--muted); font-size: 14px; letter-spacing: 0.12em; text-transform: uppercase; }
.top-right { display: flex; align-items: center; gap: 16px; }
.quota { color: var(--muted); font-size: 14px; }
.quota b { color: var(--text); font-weight: 700; }

.modes { width: 100%; max-width: var(--width); margin: 0 auto; padding: 40px 28px 0; }
.mode-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.mode {
  text-align: left; background: var(--night-2); color: var(--text); border: 1px solid var(--line);
  border-radius: 20px; padding: 22px 24px 20px; transition: border-color .15s, background .15s;
}
.mode:hover { border-color: rgba(255, 255, 255, 0.3); }
.mode[aria-selected="true"] { background: var(--night-3); border-color: var(--accent); }
.mode-name { display: block; font-family: var(--display); font-size: 32px; letter-spacing: 0.03em; line-height: 1; margin-bottom: 8px; }
.mode[aria-selected="true"] .mode-name { color: var(--accent); }
.mode-tagline { display: block; color: var(--muted); font-size: 15px; }
.mode-meta { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 20px; }
.mode-hint { color: var(--muted); font-size: 15px; margin: 0; flex: 1 1 320px; }
.mode-actions { display: flex; gap: 10px; }

.chat { flex: 1; width: 100%; max-width: var(--width); margin: 0 auto; padding: 36px 28px 28px; display: flex; flex-direction: column; gap: 22px; }
.empty { color: var(--muted); text-align: center; margin: auto 0; padding: 40px 0; }
.empty strong { display: block; font-family: var(--display); font-weight: 400; font-size: 40px; letter-spacing: 0.03em; color: var(--text); margin-bottom: 8px; }
.msg { max-width: 86%; padding: 16px 22px; border-radius: 20px; overflow-wrap: anywhere; }
.msg.user { align-self: flex-end; background: var(--night-3); border-bottom-right-radius: 6px; white-space: pre-wrap; }
.msg.assistant { align-self: flex-start; background: var(--night-2); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg.assistant p { margin: 0 0 12px; }
.msg.assistant p:last-child, .msg.assistant ul:last-child, .msg.assistant ol:last-child { margin-bottom: 0; }
.msg.assistant ul, .msg.assistant ol { margin: 0 0 12px; padding-left: 22px; }
.msg.assistant li { margin-bottom: 4px; }
.msg.assistant code { background: rgba(255, 255, 255, 0.08); padding: 1px 6px; border-radius: 5px; font-size: 0.92em; }
.msg.assistant pre { background: rgba(0, 0, 0, 0.3); padding: 14px 16px; border-radius: 12px; overflow-x: auto; font-size: 14px; margin: 0 0 12px; }
.msg.assistant pre code { background: none; padding: 0; }
.msg.error { align-self: center; color: var(--danger); background: transparent; border: 1px solid rgba(255, 180, 168, 0.35); font-size: 15px; }
.typing::after { content: "▍"; color: var(--accent); animation: blink 1s steps(2) infinite; margin-left: 2px; }
@keyframes blink { 50% { opacity: 0; } }

.composer-wrap { position: sticky; bottom: 0; background: linear-gradient(to top, var(--night) 78%, transparent); padding: 24px 28px 22px; }
.composer { max-width: var(--width); margin: 0 auto; display: flex; gap: 12px; align-items: flex-end; }
#input {
  flex: 1; resize: none; max-height: 220px; background: var(--night-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 24px; padding: 14px 22px; font: inherit; line-height: 1.5;
}
#input::placeholder { color: #6C7799; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#input:focus, #code:focus { outline: none; border-color: var(--accent); }

/* ---------- Prompt-Ansicht ---------- */
.dialog { background: var(--night-2); color: var(--text); border: 1px solid var(--line); border-radius: 24px; padding: 32px; width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 48px); }
.dialog::backdrop { background: rgba(4, 8, 22, 0.75); }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 12px; }
.dialog-lede { color: var(--muted); font-size: 15px; margin: 0 0 20px; }
#prompt-text { white-space: pre-wrap; font-family: var(--body); font-size: 15px; line-height: 1.6; background: var(--night); border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; margin: 0 0 24px; max-height: 46vh; overflow-y: auto; }

@media (max-width: 560px) {
  body { font-size: 16px; }
  .top { padding: 16px 18px; }
  .top-title { display: none; }
  .modes { padding: 20px 18px 0; }
  .mode-list { grid-template-columns: 1fr 1fr; gap: 10px; }
  .mode { padding: 14px 16px 12px; border-radius: 16px; }
  .mode-name { font-size: 23px; margin-bottom: 0; }
  .mode-tagline { display: none; }
  .chat { padding: 24px 18px; }
  .composer-wrap { padding: 16px 18px; }
  .msg { max-width: 94%; }
  .login .wordmark { margin-bottom: 48px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
