/*
 * Stil der Konverter-Webseite
 * © 2026 Erik Schauer, do1ffe@darc.de
 */
:root {
  color-scheme: light;
  --hintergrund: #f5f7f9;
  --flaeche: #ffffff;
  --text: #172026;
  --gedaempft: #62707c;
  --linie: #d7dee4;
  --akzent: #0f766e;
  --akzent-dunkel: #115e59;
  --warnung: #b91c1c;
  --ok: #157347;
  --schatten: 0 16px 45px rgba(23, 32, 38, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  grid-template-rows: 1fr auto;
  background:
    linear-gradient(180deg, rgba(15, 118, 110, 0.08), rgba(245, 247, 249, 0) 320px),
    var(--hintergrund);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

.arbeitsflaeche {
  width: min(1120px, calc(100% - 32px));
  margin: 36px auto;
  display: grid;
  gap: 22px;
}

.kopfbereich {
  display: grid;
  grid-template-columns: minmax(240px, 360px) 1fr;
  gap: 28px;
  align-items: center;
}

.marke {
  margin: 0 0 8px;
  color: var(--akzent-dunkel);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(2rem, 4vw, 4.2rem);
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.untertitel {
  color: var(--gedaempft);
  margin-bottom: 0;
  font-size: 1.08rem;
}

.geraete-grafik {
  min-height: 190px;
  border: 1px solid var(--linie);
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.15), rgba(230, 182, 74, 0.12)),
    #eef4f2;
  display: grid;
  grid-template-columns: 1fr 100px 1fr;
  align-items: center;
  justify-items: center;
  padding: 20px;
}

.funkgeraet {
  width: 84px;
  height: 132px;
  position: relative;
  border: 3px solid #172026;
  border-radius: 8px;
  background: #2b3942;
  box-shadow: inset 0 0 0 8px #40515d;
}

.funkgeraet::before {
  content: "";
  position: absolute;
  width: 12px;
  height: 48px;
  left: 16px;
  top: -48px;
  border-radius: 6px 6px 0 0;
  background: #172026;
}

.funkgeraet span {
  position: absolute;
  left: 15px;
  right: 15px;
  top: 20px;
  height: 32px;
  border-radius: 4px;
  background: #b6d5cd;
  border: 2px solid #172026;
}

.funkgeraet i {
  position: absolute;
  width: 42px;
  height: 42px;
  left: 18px;
  bottom: 18px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #172026 0 6px, transparent 7px),
    repeating-conic-gradient(#d8dee2 0 10deg, #82919a 10deg 20deg);
  border: 2px solid #172026;
}

.funkgeraet-rechts {
  background: #264e55;
  box-shadow: inset 0 0 0 8px #2f6870;
}

.pfeilspur {
  display: flex;
  gap: 8px;
}

.pfeilspur b {
  width: 18px;
  height: 18px;
  border-top: 4px solid var(--akzent);
  border-right: 4px solid var(--akzent);
  transform: rotate(45deg);
}

.konverter,
.ergebnis {
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: 8px;
  box-shadow: var(--schatten);
}

.konverter {
  display: grid;
  grid-template-columns: minmax(260px, 1.3fr) minmax(240px, 0.9fr);
  gap: 18px;
  padding: 22px;
}

.datei-feld {
  min-height: 158px;
  border: 2px dashed #9eb0ba;
  border-radius: 8px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  text-align: center;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}

.datei-feld.zieht {
  border-color: var(--akzent);
  background: rgba(15, 118, 110, 0.08);
}

.datei-feld input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
}

.datei-symbol {
  width: 46px;
  height: 56px;
  border: 3px solid var(--akzent);
  border-radius: 6px;
  position: relative;
}

.datei-symbol::before {
  content: "";
  position: absolute;
  right: -3px;
  top: -3px;
  width: 18px;
  height: 18px;
  border-left: 3px solid var(--akzent);
  border-bottom: 3px solid var(--akzent);
  background: var(--flaeche);
}

.datei-feld span:not(.datei-symbol) {
  font-weight: 700;
}

.datei-feld small,
.status {
  color: var(--gedaempft);
}

.optionen {
  display: grid;
  gap: 14px;
  align-content: start;
}

.optionen label {
  display: grid;
  gap: 6px;
  font-weight: 700;
}

.optionen input {
  width: 100%;
  border: 1px solid var(--linie);
  border-radius: 6px;
  padding: 11px 12px;
  color: var(--text);
  background: #fbfcfd;
}

.aktionen {
  grid-column: 1 / -1;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

button {
  min-width: 140px;
  border: 0;
  border-radius: 6px;
  padding: 11px 16px;
  color: #ffffff;
  background: var(--akzent);
  cursor: pointer;
  font-weight: 700;
}

button:hover:not(:disabled) {
  background: var(--akzent-dunkel);
}

button:disabled {
  cursor: not-allowed;
  background: #9eb0ba;
}

.status {
  grid-column: 1 / -1;
  min-height: 24px;
  margin: 0;
}

.status[data-typ="ok"] {
  color: var(--ok);
}

.status[data-typ="fehler"] {
  color: var(--warnung);
}

.ergebnis {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(280px, 1fr);
  gap: 22px;
  padding: 22px;
}

.statistik {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 10px;
}

.stat-kachel {
  border: 1px solid var(--linie);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfd;
}

.stat-kachel span {
  display: block;
  color: var(--gedaempft);
  font-size: 0.86rem;
}

.stat-kachel strong {
  display: block;
  margin-top: 5px;
  font-size: 1.35rem;
}

.dateiliste {
  min-height: 120px;
  margin: 0;
  padding-left: 18px;
  color: var(--gedaempft);
}

.dateiliste li + li {
  margin-top: 5px;
}

footer {
  padding: 18px;
  text-align: center;
  color: var(--gedaempft);
  font-size: 0.9rem;
}

@media (max-width: 820px) {
  .kopfbereich,
  .konverter,
  .ergebnis {
    grid-template-columns: 1fr;
  }

  .geraete-grafik {
    grid-template-columns: 1fr 72px 1fr;
    min-height: 170px;
  }

  .funkgeraet {
    width: 70px;
    height: 112px;
  }
}

@media (max-width: 520px) {
  .arbeitsflaeche {
    width: min(100% - 20px, 1120px);
    margin-block: 18px;
  }

  .geraete-grafik {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .pfeilspur {
    transform: rotate(90deg);
  }

  .statistik {
    grid-template-columns: 1fr;
  }

  button {
    width: 100%;
  }
}
