/* Fischerleben – Webseite. Farben wie im Spiel (scripts/ui/ui_style.gd) */
:root {
  --bg: #0b1210;
  --bg2: #111b18;
  --panel: #16221f;
  --line: #24352f;
  --text: #e8efe9;
  --muted: #9db0a7;
  --accent: #5cb88c;
  --accent-dark: #33735a;
  --gold: #f2bf4d;
  --sun: #f2b56b;
  --danger: #e57a6a;
  --radius: 12px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 var(--font); -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
h3 { font-size: 1.1rem; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
kbd {
  font: inherit; font-size: .85em; padding: 1px 6px; border: 1px solid var(--line);
  border-bottom-width: 2px; border-radius: 5px; background: var(--bg2);
}
[hidden] { display: none !important; }

/* Kopfzeile */
.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(11, 18, 16, .88); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.top-in { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.15rem; }
.brand img { border-radius: 8px; }
#nav { display: flex; gap: 4px; align-items: center; }
#nav a { color: var(--muted); text-decoration: none; padding: 8px 12px; border-radius: 8px; font-weight: 500; }
#nav a:hover { color: var(--text); background: var(--panel); }
#nav .nav-cta { color: #0b1210; background: var(--accent); margin-left: 6px; }
#nav .nav-cta:hover { background: #74cca0; color: #0b1210; }
.menu-btn { display: none; background: none; border: 1px solid var(--line); color: var(--text); font-size: 1.3rem; border-radius: 8px; width: 44px; height: 40px; cursor: pointer; }

/* Startbild */
.hero { position: relative; min-height: min(88vh, 760px); display: flex; align-items: flex-end; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,18,16,.15) 0%, rgba(11,18,16,.35) 50%, var(--bg) 100%),
              linear-gradient(90deg, rgba(11,18,16,.75) 0%, rgba(11,18,16,0) 65%),
              url("img/hero.jpg") center / cover no-repeat, #1d3557;
}
.hero-in { position: relative; padding-top: 120px; padding-bottom: 72px; width: 100%; }
.kicker { color: var(--sun); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; font-size: .85rem; margin: 0 0 12px; }
.hero h1 { font-size: clamp(2.6rem, 8vw, 5rem); margin-bottom: 16px; letter-spacing: -.01em; text-shadow: 0 2px 24px rgba(0,0,0,.5); }
.hero h1 span { display: block; font-size: .42em; font-weight: 500; color: #f5dcb8; letter-spacing: .02em; margin-top: 6px; }
.lead { max-width: 560px; font-size: 1.15rem; color: #dfe8e2; margin: 0 0 28px; text-shadow: 0 1px 12px rgba(0,0,0,.6); }
.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.online-pill {
  display: inline-flex; align-items: center; gap: 8px; margin: 24px 0 0;
  padding: 6px 14px; border-radius: 999px; background: rgba(11,18,16,.7); border: 1px solid var(--line); font-size: .9rem;
}
.online-pill i { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(92,184,140,.6); animation: puls 2s infinite; }
@keyframes puls { 70% { box-shadow: 0 0 0 8px rgba(92,184,140,0); } 100% { box-shadow: 0 0 0 0 rgba(92,184,140,0); } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px;
  border-radius: 10px; font: 600 1rem var(--font); text-decoration: none; cursor: pointer; border: 0;
  transition: transform .1s, background .15s;
}
.btn:active { transform: translateY(1px); }
.btn-main { background: var(--accent); color: #0b1210; }
.btn-main:hover { background: #74cca0; }
.btn-main:disabled { opacity: .6; cursor: wait; }
.btn-ghost { background: rgba(255,255,255,.08); color: var(--text); border: 1px solid rgba(255,255,255,.18); }
.btn-ghost:hover { background: rgba(255,255,255,.14); }

/* Abschnitte */
.sec { padding: 80px 0; }
.sec-alt { background: var(--bg2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sec-lead { color: var(--muted); max-width: 720px; margin: -4px 0 32px; font-size: 1.05rem; }

.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.features article, .card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px;
}
.features article { border-top: 3px solid var(--accent-dark); }
.features h3 { color: var(--text); }
.features p { margin: 0; color: var(--muted); font-size: .95rem; }

/* Bilder */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.gallery button {
  padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; cursor: zoom-in;
  background: var(--panel); aspect-ratio: 16 / 9; position: relative;
}
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gallery button:hover img { transform: scale(1.04); }
.gallery span {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 10px 8px; text-align: left;
  background: linear-gradient(transparent, rgba(0,0,0,.75)); color: #fff; font: 500 .85rem var(--font);
}
.gallery button:first-child { grid-column: span 2; grid-row: span 2; }

.lightbox {
  position: fixed; inset: 0; z-index: 50; background: rgba(5,8,7,.94);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.lightbox figure { margin: 0; max-width: 1400px; width: 100%; }
.lightbox img { width: 100%; max-height: 82vh; object-fit: contain; border-radius: 8px; }
.lightbox figcaption { text-align: center; color: var(--muted); padding-top: 10px; }
.lightbox button {
  position: absolute; background: rgba(255,255,255,.08); border: 0; color: #fff; font-size: 2rem; line-height: 1;
  width: 48px; height: 48px; border-radius: 50%; cursor: pointer;
}
.lightbox button:hover { background: rgba(255,255,255,.18); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; translate: 0 -50%; }
.lb-next { right: 16px; top: 50%; translate: 0 -50%; }

/* Live */
.notice { background: rgba(242,191,77,.12); border: 1px solid rgba(242,191,77,.4); color: #f8dfa6; padding: 12px 16px; border-radius: 10px; }
.stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 16px; }
@media (max-width: 1000px) { .stats { grid-template-columns: repeat(3, 1fr); } }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 16px; }
.stat b { display: block; font-size: 1.9rem; font-variant-numeric: tabular-nums; color: var(--text); line-height: 1.15; }
.stat span { color: var(--muted); font-size: .9rem; }
.stat:first-child b { color: var(--accent); }
.live-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.bars { list-style: none; padding: 0; margin: 0; }
.bars li { position: relative; display: flex; justify-content: space-between; gap: 12px; padding: 7px 10px; margin-bottom: 6px; border-radius: 6px; overflow: hidden; z-index: 0; }
.bars li::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w, 0%); background: rgba(92,184,140,.16); z-index: -1; border-radius: 6px; }
.bars b { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 600; }
#contest { border-color: var(--gold); }
#contest h3 { color: var(--gold); }

/* Bestenliste */
.tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.tabs button {
  font: 600 .95rem var(--font); padding: 10px 18px; border-radius: 10px; cursor: pointer;
  background: var(--panel); color: var(--muted); border: 1px solid var(--line);
}
.tabs button.on { background: var(--accent-dark); color: #fff; border-color: var(--accent-dark); }
.filters { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.filters label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .9rem; }
select, input {
  font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line);
  border-radius: 8px; padding: 9px 12px; min-height: 42px;
}
select:focus, input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.table-box { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.board { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.board th, .board td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.board th { color: var(--muted); font-weight: 600; font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; }
.board tbody tr:last-child td { border-bottom: 0; }
.board tbody tr:hover td { background: rgba(255,255,255,.02); }
.board .num { text-align: right; }
.board .rank { width: 48px; color: var(--muted); font-weight: 700; }
.board tr:nth-child(1) .rank { color: var(--gold); }
.board tr:nth-child(2) .rank { color: #cfd8dc; }
.board tr:nth-child(3) .rank { color: #d39a6a; }
.board .empty { text-align: center; color: var(--muted); padding: 32px; white-space: normal; }
.lvl { display: inline-block; font-size: .78rem; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; margin-left: 6px; }

/* Neuigkeiten */
.news-item { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 16px; }
.news-item h3 { font-size: 1.25rem; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.news-item h3 small { color: var(--accent); font-size: .85rem; font-weight: 600; border: 1px solid var(--accent-dark); border-radius: 6px; padding: 1px 8px; }
.news-item ul { margin: 0; padding-left: 20px; color: #cfdbd4; }
.news-item li { margin-bottom: 4px; }
.news-item li b { color: var(--text); }
.news-more { background: none; border: 0; color: var(--accent); font: 600 .95rem var(--font); cursor: pointer; padding: 8px 0 0; }

/* Download */
.sec-dl { background: radial-gradient(ellipse at 80% 0%, rgba(242,181,107,.10), transparent 60%), var(--bg2); border-top: 1px solid var(--line); }
.dl-in { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: start; }
.req { list-style: none; padding: 0; margin: 0; }
.req li { padding: 10px 0; border-bottom: 1px solid var(--line); color: #cfdbd4; }
.req span { display: inline-block; width: 100px; color: var(--muted); font-weight: 600; }
.dl-form { display: flex; flex-direction: column; gap: 10px; padding: 28px; }
.dl-form h3 { font-size: 1.3rem; margin: 0; }
.dl-form p { margin: 0; }
.dl-form label { font-weight: 600; font-size: .9rem; margin-top: 6px; }
.dl-msg { min-height: 1.4em; font-weight: 500; }
.dl-msg.err { color: var(--danger); }
.dl-msg.ok { color: var(--accent); }

/* Fuß */
.foot { border-top: 1px solid var(--line); padding: 28px 0; color: var(--muted); font-size: .9rem; }
.foot-in { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot nav { display: flex; gap: 20px; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--text); }

/* Rechtstexte */
.legal { max-width: 760px; padding: 48px 16px 80px; }
.legal h1 { font-size: 2rem; }
.legal h2 { font-size: 1.25rem; margin-top: 2em; }
.legal p, .legal li { color: #cfdbd4; }
.todo { background: rgba(229,122,106,.15); color: #f2b0a5; padding: 0 4px; border-radius: 4px; }

@media (max-width: 860px) {
  .menu-btn { display: block; }
  #nav {
    position: absolute; top: 60px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; display: none;
  }
  #nav.open { display: flex; }
  #nav a { padding: 12px; }
  #nav .nav-cta { margin: 6px 0 0; text-align: center; }
  .dl-in { grid-template-columns: 1fr; }
  .sec { padding: 56px 0; }
  .gallery { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .gallery { grid-template-columns: 1fr; }
  .gallery button:first-child { grid-column: auto; grid-row: auto; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat b { font-size: 1.5rem; }
  .req span { display: block; width: auto; }
  .lb-prev, .lb-next { top: auto; bottom: 16px; translate: none; }
  .hero-in { padding-bottom: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .online-pill i { animation: none; }
}
