/* ================================================================
   SchergenMAC – Styles
   Gleiche Farbwelt wie die übrigen Werkzeuge.
   ================================================================ */

:root {
  --bg:            #0e1016;
  --surface:       rgba(255, 255, 255, .045);
  --surface-2:     rgba(255, 255, 255, .075);
  --line:          rgba(255, 255, 255, .10);
  --line-soft:     rgba(255, 255, 255, .06);
  --text:          #e8ebf2;
  --text-dim:      #98a1b5;
  --accent:        #7aa2ff;
  --accent-strong: #5b86ff;
  --ok:            #2fd68b;
  --warn:          #ffc861;
  --off:           #ff5468;
  --radius:        16px;
  --shadow:        0 18px 45px rgba(0, 0, 0, .45);
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
          "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  line-height: 1.5;
}

h1, h2 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
code { font-family: var(--mono); font-size: .92em; }
.mono { font-family: var(--mono); }

kbd {
  font: inherit;
  font-size: .78em;
  font-weight: 600;
  padding: .1em .4em;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text-dim);
}

.aurora {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(1100px 700px at 12% -10%, #26304a 0%, transparent 60%),
    radial-gradient(900px 600px at 100% 0%, #2a2140 0%, transparent 55%);
}

/* ----------------------------------------------------------------
   Buttons, Kopfzeile, Gerüst
   ---------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4em;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: 10px;
  padding: .5rem .9rem;
  font: inherit;
  font-weight: 550;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .08s;
}
.btn:hover  { background: var(--surface-2); border-color: rgba(255,255,255,.18); }
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  border-color: transparent;
  color: #0b1020;
  font-weight: 650;
}
.btn--primary:hover { filter: brightness(1.06); }
.btn--ghost { background: transparent; }
.btn--sm    { padding: .35rem .7rem; font-size: .84rem; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: .85rem clamp(1rem, 3vw, 2rem);
  border-bottom: 1px solid var(--line-soft);
  background: rgba(14, 16, 22, .72);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 30;
}
.topbar__brand { display: flex; align-items: center; gap: .6rem; font-weight: 650; }
.topbar__logo  { font-size: 1.25rem; }
.topbar__right { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.topbar__note  {
  color: var(--text-dim);
  font-size: .8rem;
  padding: .3rem .7rem;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
}

.shell {
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(1.2rem, 3vw, 2rem) clamp(1rem, 3vw, 2rem) 3rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem clamp(1rem, 2vw, 1.3rem) 1.2rem;
  margin-bottom: clamp(.9rem, 2vw, 1.2rem);
}
.card--input { box-shadow: var(--shadow); }
.card__head  { display: flex; align-items: baseline; gap: .7rem; flex-wrap: wrap; margin-bottom: .8rem; }
.card__title { font-size: 1.05rem; }
.card__aside { font-size: .82rem; margin-left: auto; }
.card__head .btn { margin-left: auto; }

.hint { color: var(--text-dim); font-size: .82rem; margin: .8rem 0 0; }
.note { color: var(--text-dim); font-size: .87rem; margin: 0 0 .9rem; }
.dim  { color: var(--text-dim); }

/* ----------------------------------------------------------------
   Eingabe
   ---------------------------------------------------------------- */
textarea {
  width: 100%;
  min-height: 130px;
  resize: vertical;
  padding: .8rem .9rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, .3);
  color: var(--text);
  font: inherit;
  font-family: var(--mono);
  font-size: .92rem;
  line-height: 1.7;
}
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(122, 162, 255, .18);
}
textarea::placeholder { color: var(--text-dim); }

.actions { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-top: .9rem; }
.actions .hint { margin: 0 0 0 auto; }

.samples { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-top: .9rem; }
.samples__label { font-size: .78rem; color: var(--text-dim); margin-right: .2rem; }
.chip-btn {
  font: inherit;
  font-size: .78rem;
  color: var(--text-dim);
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: .22rem .65rem;
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.chip-btn:hover { color: var(--accent); border-color: rgba(122,162,255,.4); }

.status {
  margin: .9rem 0 0;
  padding: .55rem .8rem;
  border-radius: 10px;
  border: 1px solid var(--line-soft);
  background: var(--surface-2);
  color: var(--text-dim);
  font-size: .88rem;
}
.status--ok  { border-color: rgba(47,214,139,.4); background: rgba(47,214,139,.10); color: #8ae9bf; }
.status--bad { border-color: rgba(255,84,104,.4); background: rgba(255,84,104,.10); color: #ffc3ca; }
.status .dim { color: inherit; opacity: .75; }

/* ----------------------------------------------------------------
   Ergebnis
   ---------------------------------------------------------------- */
.result__head { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; margin-bottom: .9rem; }
.result__mac  { font-family: var(--mono); font-size: 1.25rem; letter-spacing: .02em; }

.pill {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  font-weight: 700;
  padding: .15rem .55rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text-dim);
  white-space: nowrap;
}
.pill--warn { color: #ffdca0; border-color: rgba(255,200,97,.4); background: rgba(255,200,97,.12); }
.pill--info { color: #b9ccff; border-color: rgba(122,162,255,.4); background: rgba(122,162,255,.12); }

.facts {
  display: grid;
  grid-template-columns: minmax(120px, 180px) minmax(0, 1fr);
  gap: 1px;
  margin: 0;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  overflow: hidden;
}
.facts__key, .facts__val {
  background: rgba(14, 16, 22, .55);
  margin: 0;
  padding: .45rem .8rem;
  display: flex;
  align-items: center;
  min-width: 0;
}
.facts__key { color: var(--text-dim); font-size: .84rem; }
.facts > .facts__key:nth-of-type(odd),
.facts > .facts__val:nth-of-type(odd) { background: rgba(255, 255, 255, .015); }

.val {
  font: inherit;
  font-family: var(--mono);
  font-size: .9rem;
  color: var(--text);
  background: none;
  border: 0;
  padding: 0;
  text-align: left;
  overflow-wrap: anywhere;
}
button.val { cursor: copy; transition: color .12s; }
button.val:hover { color: var(--accent); }

.inline-note {
  font-size: .84rem;
  border-radius: 10px;
  padding: .5rem .75rem;
  margin: 0 0 .9rem;
  border: 1px solid var(--line-soft);
  background: var(--surface-2);
  color: var(--text-dim);
}
.inline-note--info { border-color: rgba(122,162,255,.3); background: rgba(122,162,255,.08); color: #b9ccff; }
.inline-note--warn { border-color: rgba(255,200,97,.3); background: rgba(255,200,97,.08); color: #ffdca0; }
.inline-note--bad  { border-color: rgba(255,84,104,.35); background: rgba(255,84,104,.10); color: #ffc3ca; }
.result .inline-note { margin-top: .9rem; margin-bottom: 0; }

/* ----------------------------------------------------------------
   Tabelle
   ---------------------------------------------------------------- */
.table {
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  overflow: hidden;
}
.table__row {
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr) 11rem;
  gap: .8rem;
  padding: .4rem .8rem;
  border-bottom: 1px solid var(--line-soft);
  font-size: .86rem;
  align-items: baseline;
}
.table__row:last-child { border-bottom: 0; }
.table__row:nth-child(odd) { background: rgba(255,255,255,.015); }
.table__row--head {
  background: rgba(0, 0, 0, .25);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-dim);
}
.table__row--head:nth-child(odd) { background: rgba(0, 0, 0, .25); }
.table__row span { overflow-wrap: anywhere; }

.table__mac {
  font: inherit;
  font-family: var(--mono);
  font-size: .88rem;
  color: var(--text);
  background: none;
  border: 0;
  padding: 0;
  text-align: left;
  cursor: pointer;
  border-bottom: 1px dotted rgba(255,255,255,.25);
  justify-self: start;
}
.table__mac:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ----------------------------------------------------------------
   Fußzeile und Meldung
   ---------------------------------------------------------------- */
.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem;
  color: var(--text-dim);
  font-size: .8rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line-soft);
  text-align: center;
}
.foot__sep { opacity: .5; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translate(-50%, 140%);
  background: #1c2130;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .6rem 1rem;
  font-size: .87rem;
  box-shadow: var(--shadow);
  transition: transform .25s ease, opacity .25s;
  opacity: 0;
  z-index: 60;
  max-width: min(90vw, 460px);
  overflow-wrap: anywhere;
}
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }
.toast.is-error { border-color: rgba(255, 84, 104, .5); color: #ffc3ca; }

@media (max-width: 700px) {
  .facts { grid-template-columns: 1fr; }
  .facts__key { padding-bottom: 0; background: transparent; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; }
  .facts > .facts__key:nth-of-type(odd) { background: transparent; }
  .table__row { grid-template-columns: 1fr; gap: .1rem; }
  .table__row--head { display: none; }
  .topbar__note, .actions .hint, .card__aside { display: none; }
}

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