/* Schrift: Inter (SIL Open Font License), lokal ausgeliefert – keine externen Requests. */
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --navy: #0a1a5c;
  --primary: #1438c8;
  --primary-hover: #0f2ba0;
  --primary-soft: #eaf0fd;
  --sky: #7fa2ff;
  --bg: #ffffff;
  --bg-alt: #f5f7fb;
  --text: #121731;
  --muted: #5d6481;
  --border: #e1e5ef;
  --success: #0f7a47;
  --success-soft: #e6f5ed;
  --danger: #c4122f;
  --danger-soft: #fdecef;
  --radius: 4px;
  --shadow: 0 1px 2px rgba(10, 26, 92, .06), 0 4px 16px rgba(10, 26, 92, .06);
  --wrap: 1140px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; }
a { color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--primary-hover); }
h1, h2, h3 { color: var(--navy); line-height: 1.2; letter-spacing: -.01em; margin: 0 0 .5rem; }
h1 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); font-weight: 800; }
h2 { font-size: 1.25rem; font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0 0 1rem; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.section { padding-top: 40px; padding-bottom: 64px; }
.muted { color: var(--muted); }
.lead { font-size: 1.1rem; color: var(--muted); }
.eyebrow {
  font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--primary); margin-bottom: .75rem;
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
form.inline { display: inline; margin: 0; }

/* Kopfzeile */
.site-header { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--navy); }
.brand-mark { color: var(--primary); display: flex; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: 1.15rem; font-weight: 800; letter-spacing: -.01em; }
.brand-text small { font-size: .75rem; color: var(--muted); font-weight: 500; }
.main-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.main-nav > a:not(.btn), .nav-button {
  position: relative; padding: 24px 14px; color: var(--text); text-decoration: none;
  font: inherit; font-weight: 600; font-size: .95rem; background: none; border: 0; cursor: pointer;
}
.main-nav > a:not(.btn):hover, .nav-button:hover { color: var(--primary); }
.main-nav > a.active { color: var(--primary); }
.main-nav > a.active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 3px; background: var(--primary);
}
.main-nav .btn { margin-left: 8px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: var(--radius); border: 2px solid transparent;
  font: inherit; font-weight: 700; font-size: .95rem; letter-spacing: .01em;
  text-decoration: none; cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.btn-sm { padding: 8px 18px; font-size: .9rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); color: #fff; }
.btn-inverse { background: #fff; color: var(--navy); }
.btn-inverse:hover { background: var(--primary-soft); color: var(--navy); }
.btn-ghost { border-color: rgba(255,255,255,.7); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.1); color: #fff; }
.btn:focus-visible, .btn-link:focus-visible, input:focus-visible, .nav-button:focus-visible, .main-nav a:focus-visible {
  outline: 3px solid var(--sky); outline-offset: 2px;
}
.btn-link {
  background: none; border: 0; padding: 4px 0; font: inherit; font-size: .88rem; font-weight: 600;
  color: var(--primary); cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn-link:hover { text-decoration: underline; }
.btn-link.danger { color: var(--danger); }

/* Hero */
.hero {
  background: linear-gradient(120deg, var(--navy) 0%, #12309e 60%, var(--primary) 100%);
  color: #fff; overflow: hidden;
}
.hero-inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; padding-top: 88px; padding-bottom: 96px; }
.hero h1 { color: #fff; font-size: clamp(2.3rem, 5vw, 3.6rem); margin-bottom: 1.25rem; }
.hero .eyebrow { color: var(--sky); }
.hero .lead { color: rgba(255,255,255,.82); font-size: 1.2rem; max-width: 34em; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 2rem; }
.hero-art { color: rgba(255,255,255,.28); transform: rotate(-8deg); }
.hero-art svg { width: 100%; height: auto; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.steps li { padding: 28px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
.steps p { color: var(--muted); margin: 0; }
.step-no {
  display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center;
  background: var(--primary-soft); color: var(--primary); font-weight: 800; border-radius: 50%; margin-bottom: 16px;
}

/* Seitenkopf */
.page-header { background: var(--bg-alt); border-bottom: 1px solid var(--border); padding: 48px 0 40px; }
.page-header .lead { margin: 0; }

/* Panels */
.panel {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 28px; margin-bottom: 24px;
}
.panel-flush { padding: 0; }
.panel-flush > h2 { padding: 24px 28px 8px; margin: 0; }
.panel .pad { padding: 0 28px 24px; }
.count {
  display: inline-block; margin-left: 6px; padding: 1px 10px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary); font-size: .85rem; vertical-align: middle;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.empty-state { text-align: center; padding: 56px 28px; }
.empty-state p { color: var(--muted); }
.empty-icon { color: var(--primary); margin-bottom: 12px; }
.error-code { font-size: 3.5rem; font-weight: 800; color: var(--primary); margin: 0; }

/* Formulare */
.form .field { margin-bottom: 20px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
label { display: block; font-size: .88rem; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
.optional { font-weight: 500; color: var(--muted); margin-left: 4px; }
input {
  display: block; width: 100%; padding: 12px 14px; font: inherit; color: var(--text);
  background: #fff; border: 1px solid #c9cfdd; border-radius: var(--radius);
  transition: border-color .15s, box-shadow .15s;
}
input:hover { border-color: #9aa3bb; }
input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(20, 56, 200, .15); }
input::placeholder { color: #9aa1b5; }
.input-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; text-transform: uppercase; font-size: 1.05rem; }
.hint { font-size: .82rem; color: var(--muted); margin: 6px 0 0; }
.form-inline { display: grid; grid-template-columns: repeat(4, 1fr) auto; gap: 16px; align-items: end; }
.form-inline .field { margin: 0; }

/* Meldungen */
.alert { padding: 14px 16px; border-radius: var(--radius); margin-bottom: 20px; border-left: 4px solid; font-weight: 500; }
.alert-error { background: var(--danger-soft); border-color: var(--danger); color: #8c0d22; }
.alert-success { background: var(--success-soft); border-color: var(--success); color: #0a5732; }

/* Anmelde- und Registrierungsseiten */
.auth { display: grid; grid-template-columns: 5fr 7fr; min-height: calc(100vh - 73px - 61px); }
.auth-panel {
  position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(160deg, var(--navy) 0%, #12309e 70%, var(--primary) 100%);
  display: flex; align-items: center;
}
.auth-panel-inner { position: relative; z-index: 1; padding: 64px 48px; max-width: 460px; margin-left: auto; }
.auth-panel h2 { color: #fff; font-size: clamp(1.8rem, 2.6vw, 2.4rem); font-weight: 800; margin-bottom: 1.25rem; }
.auth-panel .eyebrow { color: var(--sky); }
.auth-panel p { color: rgba(255,255,255,.82); }
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { position: relative; padding-left: 32px; margin-bottom: 14px; color: rgba(255,255,255,.9); }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: rgba(127,162,255,.25) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat;
}
.pitch {
  position: absolute; right: -120px; bottom: -120px; width: 360px; height: 360px;
  border: 2px solid rgba(255,255,255,.12); border-radius: 50%;
}
.pitch::after { content: ""; position: absolute; inset: 70px; border: 2px solid rgba(255,255,255,.12); border-radius: 50%; }
.auth-form { display: flex; align-items: center; padding: 56px 24px; }
.auth-form-inner { width: 100%; max-width: 500px; margin: 0 auto 0 64px; }
.auth-form .lead { margin-bottom: 28px; }
.switch { margin-top: 24px; color: var(--muted); }
.page-auth .site-footer { display: none; }
.page-auth .auth { min-height: calc(100vh - 73px); }

/* Tabellen */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { text-align: left; padding: 14px 16px; border-top: 1px solid var(--border); white-space: nowrap; vertical-align: middle; }
th:first-child, td:first-child { padding-left: 28px; }
th:last-child, td:last-child { padding-right: 28px; }
th { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); background: var(--bg-alt); }
tbody tr:hover { background: #fafbfd; }
tr.inactive td { opacity: .5; }
.row-actions { display: flex; gap: 16px; justify-content: flex-end; align-items: center; }
.code-chip {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; font-weight: 600;
  background: var(--primary-soft); color: var(--navy); padding: 3px 8px; border-radius: 3px;
}
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--bg-alt); color: var(--muted); }
.badge-ok { background: var(--success-soft); color: var(--success); }
.badge-off { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--primary-soft); color: var(--primary); }
.member { display: flex; align-items: center; gap: 12px; line-height: 1.3; }
.avatar {
  flex: none; width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--navy); color: #fff; font-weight: 700; font-size: .9rem;
}

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 24px; }
.stat { padding: 22px 24px; border-radius: var(--radius); background: var(--bg-alt); border-left: 4px solid var(--primary); }
.stat-value { display: block; font-size: 2rem; font-weight: 800; color: var(--navy); line-height: 1.1; }
.stat-label { font-size: .85rem; color: var(--muted); font-weight: 600; }

.facts { display: grid; grid-template-columns: auto 1fr; gap: 12px 24px; margin: 0; }
.facts dt { color: var(--muted); font-size: .9rem; }
.facts dd { margin: 0; font-weight: 600; }

.site-footer { border-top: 1px solid var(--border); padding: 20px 0; font-size: .85rem; color: var(--muted); }

/* Mobil */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; padding-top: 56px; padding-bottom: 64px; }
  .hero-art { display: none; }
  .steps, .stats, .grid-2 { grid-template-columns: 1fr; }
  .form-inline { grid-template-columns: 1fr 1fr; }
  .form-inline .btn { grid-column: 1 / -1; }
  .auth { grid-template-columns: 1fr; min-height: 0; }
  .auth-panel-inner { padding: 36px 24px; margin: 0; max-width: none; }
  .auth-panel .checks { display: none; }
  .auth-form { padding: 36px 24px 56px; }
  .auth-form-inner { margin: 0 auto; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .header-inner { min-height: 60px; padding-top: 8px; padding-bottom: 8px; }
  .main-nav > a:not(.btn), .nav-button { padding: 10px 8px; }
  .main-nav > a.active::after { left: 8px; right: 8px; bottom: 2px; }
  .field-row, .form-inline { grid-template-columns: 1fr; }
  .field-row { gap: 0; }
  .stats { gap: 12px; }
  .panel { padding: 20px; }
  .panel-flush { padding: 0; }
  .panel-flush > h2 { padding: 20px 20px 8px; }
  th:first-child, td:first-child { padding-left: 20px; }
}

/* Minispiel */
.game-section { padding: 56px 0 72px; background: var(--bg-alt); border-top: 1px solid var(--border); }
.game-section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.game-section-head h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); font-weight: 800; }
.game-section-head .lead { margin: 0; }
.game-info { margin-top: 32px; }
.embed-code { background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; overflow-x: auto; font-size: .82rem; margin: 0; }
