/* ===== Grundlayout – dunkles Theme ===== */
* { box-sizing: border-box; }

:root {
  --bg: #0a0a0a;
  --bg-2: #111111;
  --bg-3: #161616;
  --border: #2a0d0d;
  --border-2: #3a1414;
  --text: #f0f0f0;
  --muted: #c2bcbc;
  --dim: #8a8080;
  --accent: #e10600;
  --accent-2: #ff1f1a;
  --accent-deep: #8a0300;
}

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(225,6,0,0.18), transparent 60%),
    radial-gradient(1000px 500px at 100% 0%, rgba(225,6,0,0.10), transparent 60%),
    var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

/* ===== Topbar ===== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-2);
  box-shadow: 0 2px 16px rgba(225,6,0,0.15);
  padding: 10px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.topbar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.3px;
}

.topbar .brand img {
  height: 38px;
  width: auto;
  display: block;
  filter: drop-shadow(0 0 6px rgba(225,6,0,0.6));
}

.topbar nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.topbar nav a {
  color: #cfd3dc;
  text-decoration: none;
  padding: 7px 12px;
  border-radius: 6px;
  font-size: 0.92rem;
  transition: background 0.15s, color 0.15s;
}

.topbar nav a:hover {
  background: #1f0808;
  color: #fff;
}

.topbar nav a.active {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 0 12px rgba(225,6,0,0.5);
}

/* ===== Hero (Startseite) ===== */
.hero {
  position: relative;
  padding: 80px 20px 70px;
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(900px 450px at 50% 0%, rgba(225,6,0,0.32), transparent 70%),
    linear-gradient(180deg, #1a0303 0%, transparent 100%);
  border-bottom: 1px solid var(--border-2);
}

.hero-logo {
  height: 130px;
  width: auto;
  margin: 0 auto 18px;
  display: block;
  filter: drop-shadow(0 0 18px rgba(225,6,0,0.6));
}

.hero-inner {
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  margin: 0 0 12px;
  background: linear-gradient(90deg, #ff3b34, #e10600, #8a0300);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: 1px;
  text-shadow: 0 0 30px rgba(225,6,0,0.25);
}

.hero p {
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0 0 28px;
}

.hero-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary, .btn-ghost {
  padding: 12px 22px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.15s, background 0.15s, border-color 0.15s;
  display: inline-block;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-2), var(--accent-deep));
  color: #fff;
  box-shadow: 0 4px 18px rgba(225,6,0,0.45);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #ff3b34, var(--accent));
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(225,6,0,0.6);
}

.btn-ghost {
  border: 1px solid var(--border-2);
  color: #fff;
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* ===== Seiten-Container ===== */
.grid-page {
  max-width: 1100px;
  margin: 24px auto;
  padding: 0 16px;
  display: grid;
  gap: 20px;
}

.section-title {
  margin: 8px 4px 0;
  color: var(--accent);
  font-size: 1.4rem;
}

/* ===== Karten / Tiles (Startseite) ===== */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.tile {
  display: block;
  text-decoration: none;
  color: var(--text);
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px 20px;
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
  position: relative;
  overflow: hidden;
}

.tile:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.tile-icon {
  font-size: 2rem;
  margin-bottom: 10px;
}

.tile h3 {
  margin: 0 0 6px;
  color: #fff;
  font-size: 1.15rem;
}

.tile p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.tile-accent {
  background: linear-gradient(135deg, rgba(225,6,0,0.22), rgba(138,3,0,0.08));
  border-color: rgba(225,6,0,0.5);
  box-shadow: 0 0 18px rgba(225,6,0,0.2) inset;
}

/* ===== Card ===== */
.card {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 22px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.card h2 {
  margin: 0 0 14px;
  color: var(--accent);
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

.hint {
  background: linear-gradient(90deg, rgba(225,6,0,0.12), transparent);
  padding: 10px 12px;
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  margin: 0 0 16px;
  font-size: 0.95rem;
}

/* ===== Rechner ===== */
.calc {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr auto;
  align-items: end;
}

.calc label {
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
  color: var(--muted);
  gap: 4px;
}

.calc input {
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border-2);
  border-radius: 6px;
  color: #fff;
  font-size: 1rem;
  outline: none;
}

.calc input:focus {
  border-color: var(--accent);
}

.calc button {
  padding: 11px 18px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent-deep));
  border: none;
  border-radius: 6px;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 10px rgba(225,6,0,0.4);
}

.calc button:hover {
  background: linear-gradient(135deg, #ff3b34, var(--accent));
  transform: translateY(-1px);
}

.ergebnis {
  margin-top: 18px;
  display: grid;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--border-2);
  border-radius: 8px;
  padding: 14px 16px;
}

.ergebnis[hidden] {
  display: none;
}

.ergebnis span {
  color: var(--muted);
  margin-right: 6px;
}

.ergebnis strong {
  color: var(--accent);
  font-size: 1.05rem;
}

/* ===== Routen-Bilder ===== */
.routen {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
}

.routen figure {
  margin: 0;
  background: var(--bg);
  border: 1px solid var(--border-2);
  border-radius: 8px;
  overflow: hidden;
  cursor: zoom-in;
  transition: transform 0.15s, border-color 0.15s;
  display: flex;
  flex-direction: column;
}

.routen figure:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.routen img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
  background: #000;
}

.routen figcaption {
  padding: 10px 12px;
  text-align: center;
  background: var(--bg-2);
  font-size: 0.92rem;
  color: #cfd3dc;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.routen figcaption strong {
  color: #fff;
  font-size: 1rem;
}

.routen figcaption .info-ort {
  color: var(--muted);
  font-size: 0.88rem;
}

.routen figcaption .info-id {
  font-family: "Consolas", "Courier New", monospace;
  background: rgba(225,6,0,0.15);
  color: var(--accent-2);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.85rem;
}

.empty {
  color: var(--dim);
  font-style: italic;
}

/* ===== Info-Liste (z. B. Koordinaten/Standorte) ===== */
.info-liste {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.info-liste li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--border-2);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
}

.info-rolle {
  font-weight: 600;
  color: #fff;
  min-width: 170px;
}

.info-id {
  font-family: "Consolas", "Courier New", monospace;
  background: rgba(225,6,0,0.15);
  color: var(--accent-2);
  padding: 3px 10px;
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.info-ort {
  color: var(--muted);
  font-size: 0.95rem;
}

.empty code {
  background: var(--bg);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border-2);
  color: var(--accent);
}

footer {
  text-align: center;
  padding: 24px 12px 40px;
  color: #8a8080;
  border-top: 1px solid var(--border);
  margin-top: 24px;
}

footer strong {
  color: var(--accent);
}

/* ===== Lightbox ===== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  cursor: zoom-out;
  padding: 20px;
}

.lightbox[hidden] {
  display: none;
}

.lightbox img {
  max-width: 95vw;
  max-height: 95vh;
  width: auto;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.6);
  object-fit: contain;
}

/* ===== Mobile ===== */
@media (max-width: 640px) {
  .calc {
    grid-template-columns: 1fr;
  }
  .topbar .brand {
    font-size: 1rem;
  }
  .hero {
    padding: 50px 16px 40px;
  }
}
