:root{
  --bg:#0b1220;
  --page:#f3f4f6;
  --text:#111827;
  --muted:#6b7280;
  --line:#e5e7eb;
  --accent:#2563eb;

  --r:14px;
  --container: 1100px;
}

/* Scrollbar-Fix */
html{ scrollbar-gutter: stable; overflow-y: scroll; }

*{ box-sizing:border-box; }

body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  background: var(--page);
  color: var(--text);
  line-height:1.5;
}

.container{
  width:min(var(--container), calc(100% - 2rem));
  margin:0 auto;
}

/* ---------- Topbar (dark) ---------- */

.topbar{
  position:sticky;
  top:0;
  z-index:10;
  background:#0b1220;
  border-bottom:1px solid rgba(255,255,255,.08);
}

.topbar__inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  padding:.9rem 0;
}

.brand{
  display:flex;
  align-items:center;
  gap:.65rem;
  text-decoration:none;
  color:#ffffff;
}

.brand__logo{
  width:28px;
  height:28px;
  object-fit:contain;
}

.brand__name{
  font-weight:800;
  letter-spacing:.12em;
}

/* Navigation */
.nav{
  display:flex;
  gap:.35rem;
  align-items:center;
}

.nav__link{
  color: rgba(255,255,255,.85);
  text-decoration:none;
  padding:.55rem .8rem;
  border-radius:12px;
}

.nav__link:hover{
  background: rgba(255,255,255,.08);
}

.nav__link.is-active{
  background: rgba(255,255,255,.14);
  color:#ffffff;
}

/* Mobile nav button */
.navbtn{
  display:none;
  border:1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
  color:#fff;
  border-radius:12px;
  padding:.45rem .7rem;
  font-size:1.2rem;
  cursor:pointer;
}

/* ---------- Main ---------- */
.main{ padding:0 0 2.5rem; }

/* ---------- Hero (Wallpaper) ---------- */

.hero{
  position:relative;
  border-bottom:1px solid rgba(0,0,0,.06);
}

/* gleiche Höhe für alle Hero-Wallpaper */
.hero--wallpaper,
.hero--wissen,
.hero--neuigkeiten,
.hero--hilfe,
.hero--odin,
.hero--hel,
.hero--freya,
.hero--thor,
.hero--walhall,
.hero--tyr,
.hero--asgard,
.hero--midgard,
.hero--zwerge,
.hero--ragnaroek,
.hero--loki,
.hero--mythologie{
  min-height: 520px;
  display:flex;
  align-items:center;
  background-size: cover;
  background-position: center;
  background-repeat:no-repeat;
}

/* Startseite */
.hero--wallpaper{
  background-image: url("../img/hero.jpg");
}

/* Wiki */
.hero--wissen{
  background-image: url("../img/wissen.jpg");
}

/* Neuigkeiten */
.hero--neuigkeiten{
  background-image: url("../img/neuigkeiten.jpg");
}

/* Hilfe */
.hero--hilfe{
  background-image: url("../img/hilfe.jpg");
}

/* Wiki Wallpapers */
.hero--odin{ background-image: url("../img/odin.jpg"); }
.hero--hel{ background-image: url("../img/hel.jpg"); }
.hero--freya{ background-image: url("../img/freya.jpg"); }
.hero--thor{ background-image: url("../img/thor.jpg"); }
.hero--walhall{ background-image: url("../img/walhall.jpg"); }
.hero--tyr{ background-image: url("../img/tyr.jpg"); }
.hero--asgard{ background-image: url("../img/asgard.jpg"); }
.hero--midgard{ background-image: url("../img/midgard.jpg"); }
.hero--zwerge{ background-image: url("../img/zwerge.jpg"); }
.hero--ragnaroek{ background-image: url("../img/ragnaroek.jpg"); }
.hero--loki{ background-image: url("../img/loki.jpg"); }
.hero--mythologie{ background-image: url("../img/nordische_mythologie.jpg"); }

.hero__overlay{
  position:absolute;
  inset:0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,.55),
    rgba(0,0,0,.33)
  );
}

.hero__content{
  position:relative;
  z-index:1;
  padding: 3.2rem 0;
  color:#ffffff;
}

.hero h1{
  margin:0 0 .6rem;
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  letter-spacing:-.02em;
  text-shadow: 0 1px 10px rgba(0,0,0,.35);
}

.lead{
  margin:0 0 1.4rem;
  font-size:1.1rem;
  color: rgba(255,255,255,.88);
  max-width: 48rem;
}

/* CTA */
.cta-main{
  display:inline-block;
  padding: .9rem 1.7rem;
  font-size: 1.15rem;
  font-weight: 700;
  background: var(--accent);
  color:#ffffff;
  border-radius: 12px;
  border:1px solid rgba(0,0,0,0);
  text-decoration:none;
  transition: background .15s ease;
}

.cta-main:hover,
.cta-main:focus-visible{
  background:#1e40af;
  text-decoration:none;
}

.cta-sub{
  margin:.55rem 0 0;
  font-size:.95rem;
  color: rgba(255,255,255,.85);
}

/* Section spacing */
.section{ padding: 1.4rem 0 0; }

/* ---------- Cards / Grids ---------- */

.grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.stack{ display:grid; gap:1rem; }

.card{
  background:#ffffff;
  border:1px solid rgba(0,0,0,.08);
  border-radius: 16px;
  padding: 1.2rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.06);
}

.card h2{
  margin:.1rem 0 .5rem;
  font-size: 1.35rem;
}

.muted{ color: var(--muted); }

/* Links in content + footer */
.main a:not(.cta-main),
.footer a{
  color:#1d4ed8;
  text-decoration:none;
}
.main a:not(.cta-main):visited,
.footer a:visited{
  color:#1d4ed8;
}
.main a:not(.cta-main):hover,
.footer a:hover{
  text-decoration:underline;
}

/* Page head (für Unterseiten) */
.pagehead{
  padding: 1.6rem 0 1rem;
}
.pagehead h1{
  margin:0 0 .35rem;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}
.pagehead .lead{
  margin:0;
  color: var(--muted);
  text-shadow:none;
}

pre{
  max-width: 100%;
  white-space: pre-wrap;
  overflow-wrap: anywhere;

  margin: .8rem 0;
  padding: .75rem .9rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f9fafb;
}

/* Inline-Code weiterhin hübsch */
code{
  padding:.22rem .45rem;
  border-radius:10px;
  border:1px solid var(--line);
  background:#f9fafb;
}

/* Code INSIDE pre neutralisieren */
pre code{
  padding: 0;
  border: 0;
  background: transparent;
}

/* ---------- Timeline (schöner / chronikartig) ---------- */

.timeline{
  display:grid;
  gap:1.1rem;
  margin-top:1rem;
}

.timeline__item{
  display:grid;
  grid-template-columns: 140px 1fr;
  gap:1rem;
  padding:.2rem 0;
  border:0;
  background:transparent;
}

.timeline__date{
  font-weight:800;
  color:#111827;
}

.timeline__content{
  color: var(--muted);
  padding-left: .9rem;
  border-left: 2px solid rgba(0,0,0,.08);
}

/* ---------- DML table (ALT, kann bleiben) ---------- */

.tablewrap{ width:100%; overflow:auto; }
.dml{
  width:100%;
  border-collapse:collapse;
  min-width:720px;
}
.dml th,
.dml td{
  text-align:left !important;
  padding:.75rem .7rem;
  border-top:1px solid var(--line);
  vertical-align:top;
}
.dml thead th{
  border-top:0;
  font-weight:800;
  background:#f9fafb;
}
.dml small{ font-weight:400; }

.playbtn{
  display:inline-block;
  padding:.45rem .75rem;
  border:1px solid var(--line);
  border-radius:12px;
  background:#ffffff;
  text-decoration:none;
  color:#1d4ed8;
}
.playbtn:hover{ background:#f9fafb; text-decoration:none; }

/* ---------- DML Liste (NEU, ersetzt Table im Markup) ---------- */

.dmlList{
  display:grid;
  gap:.85rem;
  margin-top:.6rem;
}

.dmlItem{
  border:1px solid rgba(0,0,0,.08);
  border-radius:16px;
  padding:1rem;
  background:#ffffff;
  box-shadow: 0 8px 24px rgba(0,0,0,.04);
}

.dmlHead{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:.9rem;
  padding-bottom:.8rem;
  border-bottom:1px solid var(--line);
}

.dmlTitle{
  display:flex;
  align-items:baseline;
  flex-wrap:wrap;
  gap:.45rem;
  min-width:0;
}

.dmlName{
  font-weight:800;
  font-size:1.05rem;
  text-decoration:none;
}

.dmlName:hover{ text-decoration:underline; }

.dmlLang{ font-size:.95rem; }

.dmlPlay{
  flex:0 0 auto;
  white-space:nowrap;
}

.dmlMeta{
  display:grid;
  gap:.65rem;
  padding-top:.85rem;
}

.dmlRow{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:1rem;
}

.dmlLabel{
  flex:0 0 auto;
  min-width:130px;
}

.dmlRow code{
  max-width:100%;
  overflow-wrap:anywhere;
}

/* ---------- Wiki Matrix ---------- */

.wikiMatrix{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top:.8rem;
}

.wikiCell{
  border:1px solid rgba(0,0,0,.07);
  background:#ffffff;
  border-radius:14px;
  padding:.95rem 1rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.04);
}

.wikiCell h3{
  margin:0 0 .55rem;
  font-size:.98rem;
}

/* Keywords */
.kwRow{
  display:flex;
  flex-wrap:wrap;
  line-height:1.7;
}

.kwRow a{
  font-weight:700;
  color:#1d4ed8;
  text-decoration:none;
}

.kwRow a:hover{ text-decoration:underline; }

.kwSep{
  color: rgba(17,24,39,.35);
  user-select:none;
  white-space:nowrap;
}

/* ---------- Footer ---------- */

.footer{
  margin-top:2.2rem;
  background:#0b1220;
  border-top:1px solid rgba(255,255,255,.08);
}

.footer__inner{
  padding:1.2rem 0;
  color: rgba(255,255,255,.72);
  font-size:.95rem;
}

.footer__inner a{
  color: rgba(255,255,255,.85);
}

.footer__inner a:hover{
  text-decoration:underline;
}

.sep{ margin:0 .45rem; opacity:.7; }

/* ---------- Mobile ---------- */

@media (max-width: 860px){
  .navbtn{ display:block; }

  .nav{
    display:none;
    position:absolute;
    top:64px;
    left:1rem;
    right:1rem;
    background:#0b1220;
    border:1px solid rgba(255,255,255,.12);
    border-radius:14px;
    flex-direction:column;
    padding:.6rem;
  }

  .nav.is-open{ display:flex; }

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

  .cta-main{
    width:100%;
    text-align:center;
  }

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

  .timeline__content{
    padding-left: 0;
    border-left: 0;
    border-top: 2px solid rgba(0,0,0,.08);
    padding-top: .6rem;
  }
}

@media (max-width: 640px){
  .dmlHead{
    flex-direction:column;
    align-items:stretch;
  }

  .dmlPlay{
    align-self:flex-start;
  }

  .dmlRow{
    flex-direction:column;
    gap:.35rem;
  }

  .dmlLabel{
    min-width:0;
  }
}

/* Footer links white */
.footer a,
.footer a:visited{
  color:#ffffff;
}
.footer a:hover{
  text-decoration:underline;
}
