/* ================================================================
   SchergenPass – Styles
   Gleiche Farbwelt wie Startseite, Planner und CIDR.
   ================================================================ */

: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;
  --accent-2:      #b98cff;
  --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, h3 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
code { font-family: var(--mono); font-size: .93em; }

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
   ---------------------------------------------------------------- */
.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:disabled { opacity: .4; cursor: not-allowed; }
.btn--primary {
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  border-color: transparent;
  color: #0b1020;
  font-weight: 650;
}
.btn--primary:hover:not(:disabled) { filter: brightness(1.06); }
.btn--ghost { background: transparent; }
.btn--sm    { padding: .35rem .7rem; font-size: .84rem; }

/* ----------------------------------------------------------------
   Kopfzeile und Gerüst
   ---------------------------------------------------------------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  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: .75rem; }
.topbar__note  {
  color: var(--text-dim);
  font-size: .8rem;
  padding: .3rem .7rem;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
}

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

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem clamp(1rem, 2vw, 1.3rem) 1.2rem;
}
.card--out { box-shadow: var(--shadow); }
.card__head  { display: flex; align-items: center; gap: .7rem; margin-bottom: .9rem; }
.card__title { font-size: 1.05rem; }

.sub {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-dim);
  margin-bottom: .55rem;
}
.hint { color: var(--text-dim); font-size: .82rem; margin: .7rem 0 0; }
.hint em { font-style: normal; color: var(--text); }
.dim { color: var(--text-dim); }

/* ----------------------------------------------------------------
   Ausgabe
   ---------------------------------------------------------------- */
.out {
  display: block;
  width: 100%;
  font-family: var(--mono);
  font-size: clamp(1.05rem, 2.6vw, 1.5rem);
  line-height: 1.45;
  letter-spacing: .01em;
  padding: 1rem 1.1rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, .32);
  overflow-wrap: anywhere;
  cursor: copy;
  min-height: 4.2rem;
  transition: border-color .15s;
  -webkit-user-select: all;
  user-select: all;
}
.out:hover { border-color: rgba(122, 162, 255, .45); }

/* Stärkebalken: fünf Segmente, gefüllt bis zur erreichten Stufe. */
.meter { display: flex; gap: 5px; margin: .8rem 0 .55rem; }
.meter__seg {
  height: 5px;
  flex: 1;
  border-radius: 3px;
  background: rgba(255, 255, 255, .09);
  transition: background .2s;
}
.meter__seg[data-on="1"][data-step="0"] { background: var(--off); }
.meter__seg[data-on="1"][data-step="1"] { background: var(--warn); }
.meter__seg[data-on="1"][data-step="2"] { background: #9fdc6b; }
.meter__seg[data-on="1"][data-step="3"] { background: var(--ok); }
.meter__seg[data-on="1"][data-step="4"] { background: var(--accent); }

.out__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem 1rem;
  font-size: .84rem;
  align-items: baseline;
}
.strength { font-weight: 650; }
.strength[data-step="0"] { color: var(--off); }
.strength[data-step="1"] { color: var(--warn); }
.strength[data-step="2"] { color: #9fdc6b; }
.strength[data-step="3"] { color: var(--ok); }
.strength[data-step="4"] { color: var(--accent); }

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

.err {
  background: rgba(255, 84, 104, .13);
  border: 1px solid rgba(255, 84, 104, .35);
  color: #ffc3ca;
  border-radius: 10px;
  padding: .55rem .75rem;
  font-size: .87rem;
  margin: .9rem 0 0;
}
.err[hidden] { display: none; }

/* ----------------------------------------------------------------
   Reiter und Einstellungen
   ---------------------------------------------------------------- */
.tabs {
  display: inline-flex;
  gap: .25rem;
  padding: .25rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, .25);
  margin-bottom: 1.1rem;
}
.tab {
  border: 0;
  background: transparent;
  color: var(--text-dim);
  font: inherit;
  font-weight: 600;
  padding: .35rem 1.1rem;
  border-radius: 9px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.tab:hover { color: var(--text); }
.tab.is-active { background: var(--surface-2); color: var(--text); }

.pane[hidden] { display: none; }

.slider { display: flex; align-items: center; gap: .8rem; margin-bottom: .9rem; }
.slider label {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-dim);
  min-width: 5.5rem;
}
.slider input[type="range"] { flex: 1; accent-color: var(--accent); min-width: 0; }
.slider output {
  font-family: var(--mono);
  font-weight: 650;
  color: var(--accent);
  min-width: 2.5ch;
  text-align: right;
}
.slider input[type="number"] {
  width: 4.6rem;
  padding: .4rem .5rem;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, .28);
  color: var(--accent);
  font: inherit;
  font-family: var(--mono);
  font-weight: 650;
  text-align: center;
}
.slider input[type="number"]:focus,
.field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(122, 162, 255, .18);
}

.checks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: .3rem .9rem;
  margin-top: 1rem;
}
.radios { display: grid; gap: .3rem; }

.check {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  padding: .35rem .1rem;
  cursor: pointer;
  font-size: .92rem;
  border-radius: 8px;
}
.check:hover { color: #fff; }
.check input { accent-color: var(--accent); margin-top: .25rem; flex: none; }
.check em { font-style: normal; color: var(--text-dim); font-size: .88em; }
.check--wide { margin-top: .5rem; }

.shared {
  margin-top: 1.3rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line-soft);
}

.charset {
  font-family: var(--mono);
  font-size: .84rem;
  color: var(--accent);
  background: rgba(0, 0, 0, .28);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: .5rem .7rem;
  margin: .5rem 0 0;
  overflow-wrap: anywhere;
}

/* ----------------------------------------------------------------
   Mehrere auf einmal
   ---------------------------------------------------------------- */
.tool-row { display: flex; align-items: flex-end; gap: .6rem; flex-wrap: wrap; }
.tool-out { margin-top: .9rem; }
.tool-out:empty { margin-top: 0; }

.field { display: block; }
.field > span {
  display: block;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-dim);
  margin-bottom: .35rem;
}
.field--inline input {
  width: 6rem;
  padding: .5rem .7rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, .28);
  color: var(--text);
  font: inherit;
  font-family: var(--mono);
}

.bulk {
  margin: 0 0 .8rem;
  padding: 0 0 0 2.4rem;
  display: grid;
  gap: 2px;
  max-height: 340px;
  overflow: auto;
}
.bulk li { color: var(--text-dim); font-size: .8rem; }
.bulk__item {
  font: inherit;
  font-family: var(--mono);
  font-size: .92rem;
  color: var(--text);
  background: none;
  border: 0;
  border-radius: 6px;
  padding: .15rem .35rem;
  text-align: left;
  cursor: copy;
  width: 100%;
  overflow-wrap: anywhere;
  transition: background .12s, color .12s;
}
.bulk__item:hover { background: var(--surface-2); color: var(--accent); }
.bulk__item:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.note { color: var(--text-dim); font-size: .84rem; margin: 0 0 .6rem; }
.note--warn { color: #ffc3ca; }

/* ----------------------------------------------------------------
   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);
}
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }
.toast.is-error { border-color: rgba(255, 84, 104, .5); color: #ffc3ca; }

@media (max-width: 640px) {
  .topbar__note { display: none; }
  .out__actions .hint { display: none; }
  .slider label { min-width: 4.2rem; font-size: .72rem; }
}

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