/* ============================================================
   wishlist.css — terminal, aber mit Stil
   ============================================================ */

:root {
  --bg:        #07090d;
  --bg-glow:   #0d1a1f;
  --panel:     #0e1218;
  --panel-2:   #131923;
  --line:      #1e2733;
  --line-2:    #2a3544;
  --text:      #d3dae3;
  --muted:     #7a8696;
  --dim:       #4b5563;
  --green:     #4ade80;
  --cyan:      #22d3ee;
  --yellow:    #facc15;
  --orange:    #fb923c;
  --red:       #f87171;
  --violet:    #a78bfa;
  --pink:      #f472b6;
  --accent:    var(--green);
  --sel:       rgba(74, 222, 128, .18);
  --shadow:    0 30px 80px -20px rgba(0,0,0,.7), 0 0 0 1px var(--line);
  --radius:    14px;
  --mono: ui-monospace, "JetBrains Mono", "Cascadia Code", "SF Mono", "Fira Code", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg:      #eef1f5;
  --bg-glow: #e2f3ec;
  --panel:   #ffffff;
  --panel-2: #f6f8fa;
  --line:    #dde3ea;
  --line-2:  #c9d2dc;
  --text:    #1f2937;
  --muted:   #5b6675;
  --dim:     #9aa4b1;
  --green:   #15803d;
  --cyan:    #0e7490;
  --yellow:  #a16207;
  --orange:  #c2410c;
  --red:     #b91c1c;
  --violet:  #6d28d9;
  --pink:    #be185d;
  --sel:     rgba(21, 128, 61, .14);
  --shadow:  0 20px 60px -25px rgba(15,23,42,.35), 0 0 0 1px var(--line);
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
::selection { background: var(--sel); }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font: 14px/1.6 var(--mono);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, var(--bg-glow), transparent 60%),
    radial-gradient(900px 500px at 110% 10%, color-mix(in srgb, var(--violet) 10%, transparent), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button { font: inherit; color: inherit; }

.wrap { max-width: 980px; margin: 0 auto; padding: 28px 16px 64px; }

/* ---------- Top bar ---------------------------------------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 18px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.brand .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px var(--green); animation: pulse 2.4s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line-2);
  color: var(--muted); font-size: 12.5px; cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.chip:hover { color: var(--text); border-color: var(--accent); }
.chip[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--panel)); }
.chip svg { width: 15px; height: 15px; }

/* ---------- Terminal window -------------------------------- */
.term {
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.term-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 14px;
  background: var(--panel-2);
  border-bottom: 1px solid var(--line);
  font-size: 12px; color: var(--muted);
}
.lights { display: flex; gap: 7px; margin-right: 6px; }
.lights i { width: 12px; height: 12px; border-radius: 50%; display: block; }
.lights i:nth-child(1) { background: #ff5f57; }
.lights i:nth-child(2) { background: #febc2e; }
.lights i:nth-child(3) { background: #28c840; }
.term-title { flex: 1; text-align: center; margin-right: 52px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.term-body { padding: 18px 20px 22px; }

.line { white-space: pre-wrap; word-break: break-word; }
.prompt-user { color: var(--green); }
.prompt-path { color: var(--cyan); }
.c-muted { color: var(--muted); }
.c-dim { color: var(--dim); }
.c-ok { color: var(--green); }
.c-warn { color: var(--yellow); }
.c-err { color: var(--red); }
.c-cyan { color: var(--cyan); }
.c-violet { color: var(--violet); }

.cursor::after {
  content: ""; display: inline-block; width: .6em; height: 1.1em;
  background: var(--accent); vertical-align: -0.18em; margin-left: 2px;
  animation: blink 1.05s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* Boot */
.boot { min-height: 0; }
.boot .line { animation: fadein .12s ease-out both; }
@keyframes fadein { from { opacity: 0; transform: translateY(2px); } }
.skip { float: right; font-size: 11.5px; color: var(--dim); cursor: pointer; background: none; border: 0; }
.skip:hover { color: var(--text); }

/* ASCII banner */
.banner {
  margin: 4px 0 14px; color: var(--accent); font-size: 11px; line-height: 1.15;
  text-shadow: 0 0 18px color-mix(in srgb, var(--accent) 45%, transparent);
  overflow-x: auto;
}
.intro { color: var(--muted); margin: 0 0 18px; max-width: 70ch; }
.intro b { color: var(--text); font-weight: 600; }

/* Legend */
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--muted); margin: 10px 0 18px; }
.legend span { white-space: nowrap; }

/* Shield banner */
.shield {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 14px; margin: 0 0 16px;
  border: 1px dashed color-mix(in srgb, var(--violet) 60%, transparent);
  border-radius: 10px; color: var(--violet); font-size: 12.5px;
  background: color-mix(in srgb, var(--violet) 7%, transparent);
}
.shield .chip { margin-left: auto; }
.shield > span > svg { width: 16px; height: 16px; display: block; }

/* ---------- Wish cards ------------------------------------- */
.wishes { display: grid; gap: 12px; }
.wish {
  position: relative;
  display: grid; grid-template-columns: auto 1fr; gap: 0 16px;
  padding: 16px 18px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--lvl, var(--line-2));
  border-radius: 10px;
  transition: border-color .2s, transform .2s, box-shadow .2s;
  animation: fadein .25s ease-out both;
}
.wish:hover { border-color: var(--line-2); border-left-color: var(--lvl); transform: translateY(-1px); box-shadow: 0 10px 30px -18px rgba(0,0,0,.6); }
.wish[data-level="CRITICAL"] { --lvl: var(--red); }
.wish[data-level="WARN"]     { --lvl: var(--orange); }
.wish[data-level="INFO"]     { --lvl: var(--cyan); }
.wish[data-level="DEBUG"]    { --lvl: var(--dim); }

.wish-img {
  width: 76px; height: 76px; border-radius: 8px; object-fit: cover;
  background: var(--panel); border: 1px solid var(--line); grid-row: span 2;
}
.wish.noimg { grid-template-columns: 1fr; }

.wish-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.wish-id { color: var(--dim); font-size: 12px; }
.lvl { font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--lvl); }
.wish-title { font-size: 15.5px; font-weight: 600; color: var(--text); margin: 0; flex: 1 1 260px; }
.price { color: var(--yellow); font-size: 12.5px; letter-spacing: .05em; }
.price .off { color: var(--dim); }

.wish-desc { color: var(--muted); margin: 6px 0 0; white-space: pre-line; }

.wish-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.status {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; padding: 3px 9px; border-radius: 6px;
  border: 1px solid currentColor; white-space: nowrap;
}
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.s200 { color: var(--green); }
.s202 { color: var(--yellow); }
.s206 { color: var(--cyan); }
.s410 { color: var(--dim); }
.s451 { color: var(--violet); }
.joined { font-size: 12px; color: var(--muted); }
.spacer { flex: 1; }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--panel);
  color: var(--text); font-size: 12.5px; line-height: 1.2;
  transition: border-color .15s, background .15s, color .15s;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #04130a; font-weight: 600; }
.btn.primary:hover { filter: brightness(1.1); color: #04130a; }
:root[data-theme="light"] .btn.primary { color: #fff; }
.btn.ghost { background: transparent; }
.btn.danger:hover { border-color: var(--red); color: var(--red); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn svg { width: 14px; height: 14px; }

.wish.gone { opacity: .55; }
.wish.gone .wish-title { text-decoration: line-through; text-decoration-color: var(--dim); }
.mine { font-size: 12px; color: var(--green); }

.empty { color: var(--muted); padding: 24px 0; }

/* ---------- Command line ----------------------------------- */
.cli { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 14px; }
.cli-log { max-height: 220px; overflow-y: auto; margin-bottom: 6px; font-size: 13px; }
.cli-row { display: flex; align-items: center; gap: 8px; }
.cli-row label { white-space: nowrap; }
.cli-input {
  flex: 1; min-width: 0; background: transparent; border: 0; outline: 0;
  color: var(--text); font: inherit; caret-color: var(--accent); padding: 4px 0;
}
.cli-hint { font-size: 11.5px; color: var(--dim); margin-top: 6px; }

/* ---------- Dialog ----------------------------------------- */
dialog {
  width: min(480px, calc(100vw - 32px));
  padding: 0; border: 0; border-radius: var(--radius);
  background: var(--panel); color: var(--text); box-shadow: var(--shadow);
}
dialog::backdrop { background: rgba(3, 6, 10, .66); backdrop-filter: blur(4px); }
.dlg-body { padding: 20px; }
.dlg-body h3 { margin: 0 0 4px; font-size: 16px; }
.dlg-body p { color: var(--muted); margin: 0 0 14px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: 12px; color: var(--muted); }
.input, select.input, textarea.input {
  width: 100%; padding: 10px 12px; border-radius: 8px;
  background: var(--panel-2); border: 1px solid var(--line-2);
  color: var(--text); font: inherit; outline: none;
}
textarea.input { min-height: 80px; resize: vertical; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--sel); }
.dlg-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.msg { font-size: 12.5px; margin: -4px 0 12px; min-height: 1em; }

/* ---------- Toast ------------------------------------------ */
.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%) translateY(20px);
  background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 10px;
  padding: 10px 16px; font-size: 13px; box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: all .25s; z-index: 50; max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translateX(-50%); }

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

/* ---------- Matrix canvas ---------------------------------- */
#matrix { position: fixed; inset: 0; z-index: 40; pointer-events: none; opacity: 0; transition: opacity .6s; }
#matrix.on { opacity: .85; }

/* ============================================================
   Normalo-Modus: freundlich, klar, keine Nerd-Deko
   ============================================================ */
body.normal { font-family: var(--sans); font-size: 16px; }
body.normal .nerd { display: none !important; }
body.normal .term-bar { display: none; }
body.normal .term-body { padding: 26px 24px; }
body.normal .wish-title { font-size: 17px; }
body.normal .wish-id, body.normal .lvl-code { display: none; }
body.normal .status { font-family: var(--sans); font-size: 13px; }
body.normal .btn { font-family: var(--sans); font-size: 14px; padding: 9px 14px; }
body.normal .chip, body.normal .input { font-family: var(--sans); }
body.normal .intro { font-size: 16px; }
body:not(.normal) .plain { display: none !important; }
.plain-title { font-size: 26px; margin: 0 0 6px; font-weight: 700; letter-spacing: -.01em; }

/* ---------- Responsive ------------------------------------- */
@media (max-width: 640px) {
  .wrap { padding: 16px 12px 48px; }
  .term-body { padding: 14px 14px 18px; }
  .wish { padding: 14px; grid-template-columns: 1fr; }
  .wish-img { width: 100%; height: 150px; grid-row: auto; margin-bottom: 10px; }
  .banner { font-size: 7.5px; }
  .term-title { margin-right: 0; }
  .wish-foot .btn { flex: 1 1 auto; justify-content: center; }
  .spacer { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Admin ------------------------------------------ */
.admin-grid { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .admin-grid { grid-template-columns: 360px minmax(0, 1fr); align-items: start; } }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.check { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; margin-bottom: 14px; cursor: pointer; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }
.claims { margin-top: 10px; border-top: 1px dashed var(--line-2); padding-top: 8px; font-size: 12.5px; }
.claim { display: flex; align-items: center; gap: 10px; padding: 3px 0; flex-wrap: wrap; }
.claim .when { color: var(--dim); }
.claim .x { margin-left: auto; padding: 2px 8px; font-size: 11.5px; }
.sticky { position: sticky; top: 16px; }
.eye-on { color: var(--violet) !important; border-color: var(--violet) !important; }
.section-title { font-size: 12px; color: var(--muted); margin: 0 0 12px; text-transform: uppercase; letter-spacing: .08em; }
