/* =============================================================
   KI-Blocks · style.css
   Modernes Dark-Theme – gleiche Farbwelt wie die Snake-App:
   #0B0E1A → #160E2B, Akzent #54D899, Sekundär #4DB2BF.
   Bewusst eine Datei, null Frameworks, null externe Requests.
   ============================================================= */

:root {
  --bg-top: #0B0E1A;
  --bg-bottom: #160E2B;
  --accent: #54D899;
  --accent-2: #4DB2BF;
  --food: #FF474D;
  --food-light: #FF9E8C;
  --bonus: #FFB838;
  --snake-head: #85CBF2;
  --danger: #FF5555;

  --text: #F2F4FA;
  --text-2: rgba(242, 244, 250, 0.64);
  --text-3: rgba(242, 244, 250, 0.42);

  --card: rgba(255, 255, 255, 0.05);
  --card-strong: rgba(24, 28, 44, 0.88);
  --border: rgba(255, 255, 255, 0.10);
  --border-soft: rgba(255, 255, 255, 0.06);

  --radius: 18px;
  --radius-lg: 24px;
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.35);
  --header-h: 58px;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%) fixed;
  min-height: 100vh;
}

/* Dekorative, stark geblurrte Lichtkreise (wie in der App) */
body::before,
body::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
}
body::before {
  width: 420px; height: 420px;
  background: rgba(84, 216, 153, 0.14);
  top: -140px; left: -110px;
}
body::after {
  width: 380px; height: 380px;
  background: rgba(77, 178, 191, 0.18);
  bottom: -140px; right: -90px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 12px; }

img, svg { vertical-align: middle; }

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

.page { padding: 30px 0 60px; min-height: calc(100vh - var(--header-h) - 120px); }

/* =============================================================
   Header
   ============================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 14, 26, 0.72);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-soft);
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 17px;
  color: var(--text);
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }

.main-nav { display: flex; gap: 4px; }
.main-nav a {
  color: var(--text-2);
  font-weight: 600;
  font-size: 14.5px;
  padding: 8px 14px;
  border-radius: 999px;
}
.main-nav a:hover { color: var(--text); text-decoration: none; background: rgba(255, 255, 255, 0.06); }
.main-nav a.is-active { color: var(--text); background: rgba(84, 216, 153, 0.14); }

/* Sprach-Umschalter (DE / EN / PL) */
.lang-switch {
  display: flex;
  gap: 2px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  padding: 3px;
}
.lang-switch a {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: 999px;
  color: var(--text-3);
  text-decoration: none;
  transition: color 0.15s ease, background 0.15s ease;
}
.lang-switch a:hover { color: var(--text); text-decoration: none; }
.lang-switch a.is-active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #062015;
}

/* =============================================================
   Hero & Suche
   ============================================================= */
.hero { padding: 26px 0 10px; }

.hero-title {
  font-size: clamp(30px, 5vw, 44px);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  background: linear-gradient(90deg, #FFFFFF 30%, #BFE8D2 70%, var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  color: var(--text-2);
  font-size: 16.5px;
  max-width: 640px;
  margin: 0 0 22px;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 8px 7px 18px;
  max-width: 620px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.search-bar:focus-within {
  border-color: rgba(84, 216, 153, 0.5);
  box-shadow: 0 0 0 3px rgba(84, 216, 153, 0.15);
}
.search-bar input[type="search"] {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 15.5px;
  padding: 8px 0;
}
.search-bar input[type="search"]::placeholder { color: var(--text-3); }
.search-bar input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }

.search-bar button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  cursor: pointer;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  color: #062015;
  font-weight: 700;
  font-size: 14.5px;
  padding: 10px 18px;
  border-radius: 999px;
}
.search-bar button:hover { filter: brightness(1.08); }

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}
.tag-cloud-label {
  font-size: 13px;
  color: var(--text-3);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-right: 2px;
}

.tag {
  display: inline-block;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  white-space: nowrap;
}
.tag:hover { color: var(--text); border-color: rgba(84, 216, 153, 0.45); text-decoration: none; }
.tag.is-active {
  background: rgba(84, 216, 153, 0.16);
  border-color: rgba(84, 216, 153, 0.5);
  color: var(--accent);
}

/* =============================================================
   Karten (Block-Übersicht)
   ============================================================= */
.cards-section { margin-top: 34px; }

.cards-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.section-title { font-size: 21px; font-weight: 800; letter-spacing: -0.01em; margin: 0; }
.section-count {
  font-size: 13px;
  color: var(--text-3);
  font-weight: 600;
  white-space: nowrap;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}

.block-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}
.block-card:hover {
  transform: translateY(-3px);
  border-color: rgba(84, 216, 153, 0.4);
  background: rgba(255, 255, 255, 0.07);
}

.block-card-top { display: flex; flex-direction: column; gap: 6px; }
.block-title { margin: 0; font-size: 18.5px; font-weight: 800; line-height: 1.3; }
.block-title a { color: var(--text); }
.block-title a:hover { color: var(--accent); text-decoration: none; }

.block-date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-3);
  font-weight: 600;
}

.tag-row { display: flex; flex-wrap: wrap; gap: 6px; }

.block-summary {
  margin: 0;
  color: var(--text-2);
  font-size: 14.5px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.read-more {
  align-self: flex-start;
  font-weight: 700;
  font-size: 14px;
  color: var(--accent);
}
.read-more:hover { text-decoration: underline; }

.empty-state {
  background: var(--card);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 24px;
  text-align: center;
  color: var(--text-2);
  margin: 0;
}

/* =============================================================
   Block-Artikel & Prosa
   ============================================================= */
.block-article { max-width: 780px; margin: 0 auto; }

.back-link {
  display: inline-block;
  color: var(--text-2);
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 18px;
}
.back-link:hover { color: var(--accent); text-decoration: none; }

.article-head { margin-bottom: 26px; }
.article-title {
  font-size: clamp(26px, 4.4vw, 38px);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.18;
  margin: 0 0 14px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.article-meta time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-3);
  font-size: 14px;
  font-weight: 600;
}
.meta-dot { color: var(--text-3); }

.prose { font-size: 16.5px; }
.prose p { margin: 0 0 18px; }
.prose h2 {
  font-size: 21px;
  font-weight: 800;
  margin: 30px 0 12px;
  padding-top: 6px;
}
.prose ul { margin: 0 0 18px; padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose strong { color: #fff; font-weight: 700; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: #fff; }
.prose em { color: var(--text-2); }

.prose .quellen {
  margin-top: 30px;
  padding: 14px 18px;
  background: rgba(84, 216, 153, 0.07);
  border: 1px solid rgba(84, 216, 153, 0.22);
  border-radius: 14px;
  font-size: 14px;
  color: var(--text-2);
}

.notfound { text-align: center; padding: 60px 20px; }
.notfound h1 { font-size: 30px; font-weight: 900; }
.notfound p { color: var(--text-2); margin-bottom: 22px; }

/* =============================================================
   Kommentare & Formulare
   ============================================================= */
.comments-section { max-width: 780px; margin: 54px auto 0; }

.form-banner {
  background: rgba(255, 85, 85, 0.12);
  border: 1px solid rgba(255, 85, 85, 0.4);
  color: #FFB4B4;
  border-radius: 14px;
  padding: 12px 16px;
  font-size: 14.5px;
  margin: 0 0 18px;
}
.form-banner--ok {
  background: rgba(84, 216, 153, 0.1);
  border-color: rgba(84, 216, 153, 0.4);
  color: #A9F0CE;
}

.comment-list { display: flex; flex-direction: column; gap: 14px; margin-bottom: 30px; }

.comment {
  display: flex;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.comment-avatar {
  flex: 0 0 auto;
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  color: #062015;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.comment-main { flex: 1; min-width: 0; }
.comment-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin-bottom: 4px;
}
.comment-name { font-weight: 700; font-size: 15px; }
.comment-date { font-size: 12.5px; color: var(--text-3); }
.comment-body { font-size: 15px; color: var(--text-2); overflow-wrap: anywhere; }

.comment-form {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
}
.form-title { font-size: 17px; font-weight: 800; margin: 0 0 16px; }

/* Honeypot: für Menschen unsichtbar */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}

.form-field { display: block; margin-bottom: 14px; }
.form-field > span {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.form-field small {
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-3);
  font-weight: 500;
}
.form-field .req { color: var(--bonus); font-style: normal; }

input[type="text"],
input[type="password"],
input[type="search"],
textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 13px;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  padding: 11px 14px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, textarea:focus {
  border-color: rgba(84, 216, 153, 0.55);
  box-shadow: 0 0 0 3px rgba(84, 216, 153, 0.14);
}
input::placeholder, textarea::placeholder { color: var(--text-3); }
textarea { resize: vertical; min-height: 100px; }

.form-row { display: grid; grid-template-columns: 1fr; gap: 14px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.form-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.btn-primary {
  display: inline-block;
  border: 0;
  cursor: pointer;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  color: #062015;
  font-weight: 800;
  font-size: 15px;
  padding: 12px 26px;
  border-radius: 999px;
  box-shadow: 0 8px 22px rgba(84, 216, 153, 0.35);
  transition: filter 0.15s ease, transform 0.1s ease;
}
.btn-primary:hover { filter: brightness(1.08); text-decoration: none; }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.6; cursor: wait; }
.btn-primary.inline { margin-top: 6px; }
.btn-small { padding: 8px 16px; font-size: 13.5px; }

.ghost-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-2);
  font-weight: 600;
  font-size: 13.5px;
  padding: 8px 15px;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.ghost-btn:hover { color: var(--text); border-color: rgba(84, 216, 153, 0.45); text-decoration: none; }
.ghost-btn--danger { color: #FF9B9B; border-color: rgba(255, 85, 85, 0.35); }
.ghost-btn--danger:hover { color: #FFC4C4; border-color: rgba(255, 85, 85, 0.6); }

.form-status { font-size: 14px; margin: 0; min-height: 20px; font-weight: 600; }
.form-status.is-loading { color: var(--text-2); }
.form-status.is-ok { color: var(--accent); }
.form-status.is-err { color: var(--danger); }

/* =============================================================
   Spielecke
   ============================================================= */
.games-hero { padding: 34px 0 8px; }

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 24px;
  min-height: 230px;
  transition: transform 0.16s ease, border-color 0.16s ease;
}
.game-card--live:hover {
  transform: translateY(-3px);
  border-color: rgba(84, 216, 153, 0.5);
  background: rgba(255, 255, 255, 0.07);
}
.game-card--live { color: var(--text); }
.game-card--live:hover { text-decoration: none; }

.game-card--soon { opacity: 0.62; }

.game-icon { font-size: 40px; line-height: 1; }
.game-name { margin: 0; font-size: 20px; font-weight: 800; }
.game-desc { margin: 0; color: var(--text-2); font-size: 14.5px; flex: 1; }

.game-cta { font-weight: 800; font-size: 15px; color: var(--accent); margin-top: 6px; }
.game-card:hover .game-cta { text-decoration: underline; }
.game-cta--soon { color: var(--text-3); }

.game-badge {
  position: absolute;
  top: 18px; right: 18px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--bonus);
  background: rgba(255, 184, 56, 0.12);
  border: 1px solid rgba(255, 184, 56, 0.35);
  padding: 4px 10px;
  border-radius: 999px;
}

/* =============================================================
   Snake: Spielseite
   ============================================================= */
.game-page { max-width: 640px; margin: 0 auto; padding-top: 10px; }

.game-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-2);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.icon-btn:hover { color: var(--text); border-color: rgba(84, 216, 153, 0.45); }

.hud {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.pill {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 7px 10px;
  text-align: center;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.pill-label {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-2);
}
.pill-value {
  display: block;
  font-size: 20px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}
#pillLevel .pill-value { color: var(--accent); }
#pillHigh .pill-value { color: var(--bonus); }
.pill.is-emph {
  border-color: rgba(255, 184, 56, 0.45);
  box-shadow: 0 0 16px rgba(255, 184, 56, 0.35);
}

.pause-btn {
  flex: 0 0 auto;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.pause-btn:hover { border-color: rgba(84, 216, 153, 0.45); }

/* Spielfeld */
.board-wrap {
  position: relative;
  width: min(100%, 560px);
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  --board-radius: 20px;
}

#board {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.45);
}

.board-flash {
  position: absolute;
  inset: 0;
  background: rgba(255, 85, 85, 0.25);
  border-radius: var(--board-radius);
  opacity: 0;
  transition: opacity 0.08s linear;
  pointer-events: none;
}
.board-flash.is-on { opacity: 1; }

.board-wrap.shake { animation: shake 0.05s linear 7 alternate; }
@keyframes shake {
  from { transform: translateX(-8px); }
  to { transform: translateX(8px); }
}

/* Overlay (Menü / Pause / Game Over) */
.board-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  padding: 18px;
}
.board-overlay.is-hidden { display: none; }

.ov-card {
  width: 100%;
  max-width: 330px;
  text-align: center;
  background: var(--card-strong);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px;
  padding: 28px 24px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

.ov-food {
  width: 72px; height: 72px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--food-light), var(--food));
  box-shadow: 0 0 26px rgba(255, 71, 77, 0.65);
  position: relative;
  animation: ovPulse 0.8s ease-in-out infinite alternate;
}
.ov-food::after { /* Blatt */
  content: "";
  position: absolute;
  width: 17px; height: 9px;
  border-radius: 50%;
  background: hsl(119, 60%, 47%);
  transform: rotate(-28deg);
  top: 12px; right: 18px;
}
@keyframes ovPulse {
  from { transform: scale(0.92); }
  to { transform: scale(1.08); }
}

.ov-title {
  font-size: 40px;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
}
.ov-title--snake {
  background: linear-gradient(90deg, #3DF285, #50CBE6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 14px rgba(84, 216, 153, 0.35));
}
.ov-title--sm { font-size: 30px; }

.ov-sub { color: var(--text-2); font-size: 14.5px; font-weight: 600; margin: 0 0 16px; }

.ov-rec {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 999px;
  padding: 9px 18px;
  margin-bottom: 18px;
  font-size: 14px;
}
.ov-rec .rec-label { color: var(--text-2); font-weight: 700; }
.ov-rec .rec-value { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--bonus); }
.ov-rec svg { color: var(--bonus); }

.ov-icon { display: block; margin: 0 auto 10px; }

.ov-stat-row {
  display: flex;
  gap: 12px;
  margin: 0 0 16px;
}
.ov-stat {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 16px;
  padding: 12px 10px;
}
.ov-stat span {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-2);
}
.ov-stat b {
  display: block;
  font-size: 24px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}
.ov-stat--accent b { color: var(--accent); }
.ov-stat--bonus b { color: var(--bonus); }

.ov-buttons { display: flex; flex-direction: column; gap: 10px; }

.btn-primary-block {
  display: block;
  width: 100%;
  border: 0;
  cursor: pointer;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  color: #062015;
  font-weight: 800;
  font-size: 16px;
  padding: 14px 26px;
  border-radius: 999px;
  box-shadow: 0 8px 22px rgba(84, 216, 153, 0.45);
}
.btn-primary-block:hover { filter: brightness(1.08); }
.btn-primary-block:active { transform: scale(0.98); }
.btn-primary-block:disabled { opacity: 0.6; cursor: wait; }

.btn-ghost-block {
  display: block;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.10);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-2);
  font-weight: 700;
  font-size: 15px;
  padding: 12px 24px;
  border-radius: 999px;
}
.btn-ghost-block:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.2); }

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 0;
  color: var(--text-2);
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  padding: 6px;
}
.btn-link:hover { color: var(--accent); text-decoration: underline; }

/* Ergebnis speichern (Game Over) */
.ov-save {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.ov-save-label { font-size: 13px; font-weight: 700; color: var(--text-2); margin-bottom: 8px; }
.save-row { display: flex; gap: 8px; }
#lbNameInput {
  flex: 1;
  min-width: 0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 10px 16px;
  color: #fff;
  font-size: 14px;
  outline: none;
}
#lbNameInput:focus { border-color: rgba(84, 216, 153, 0.55); box-shadow: 0 0 0 3px rgba(84, 216, 153, 0.14); }
.btn-save {
  flex: 0 0 auto;
  border: 0;
  cursor: pointer;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  color: #062015;
  font-weight: 800;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: 999px;
}
.btn-save:disabled { opacity: 0.6; cursor: wait; }
.save-cancel { display: block; margin: 8px auto 0; }
.save-hint { font-size: 13px; color: var(--text-3); margin: 0; }
.save-status { font-size: 13px; font-weight: 600; margin: 8px 0 0; min-height: 17px; }
.save-status.is-loading { color: var(--text-2); }
.save-status.is-ok { color: var(--accent); }
.save-status.is-err { color: var(--danger); }

.ov-hint { margin: 16px 0 0; font-size: 12.5px; color: var(--text-3); }

/* Level-Toast */
.level-toast {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%) translateY(-16px);
  z-index: 6;
  background: var(--card-strong);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(84, 216, 153, 0.4);
  color: var(--accent);
  font-weight: 800;
  font-size: 15px;
  padding: 9px 22px;
  border-radius: 999px;
  box-shadow: 0 0 18px rgba(84, 216, 153, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.level-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* D-Pad (nur Touch) */
.dpad {
  display: none;
  grid-template-columns: repeat(3, 56px);
  grid-template-rows: repeat(2, 56px);
  gap: 8px;
  justify-content: center;
  margin-top: 16px;
}
.dpad-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  touch-action: manipulation;
}
.dpad-btn:active { transform: scale(0.88); }
.dpad.is-hidden { visibility: hidden; } /* Formular offen: Platz bleibt, Buttons inaktiv */

.hint-text {
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
  margin: 16px 0 0;
}

@media (pointer: coarse) {
  .dpad { display: grid; }
  [data-hint] [data-hint-keys] { display: none; }
  [data-hint] [data-hint-touch] { display: inline; }
}

/* =============================================================
   Bestenliste (3 Spalten: Name / Ergebnis / Datum)
   ============================================================= */
.lb-section { max-width: 640px; margin: 40px auto 0; }

.lb-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.lb-head .section-title { display: inline-flex; align-items: center; gap: 8px; }

.lb-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.lb-table thead th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-2);
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}
.lb-table th.num, .lb-table td.num { text-align: right; }
.lb-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 14.5px;
}
.lb-table tbody tr:last-child td { border-bottom: 0; }
.lb-table .num { font-weight: 800; font-variant-numeric: tabular-nums; }
.lb-table td.date { color: var(--text-3); font-size: 13.5px; white-space: nowrap; }

.lb-table tr.lb-top1 td { background: rgba(255, 184, 56, 0.09); }
.lb-table tr.lb-top1 td:first-child { color: var(--bonus); font-weight: 800; }
.lb-table tr.lb-top2 td { background: rgba(205, 210, 220, 0.06); }
.lb-table tr.lb-top2 td:first-child { color: #D8DCE4; font-weight: 700; }
.lb-table tr.lb-top3 td { background: rgba(205, 127, 50, 0.07); }
.lb-table tr.lb-top3 td:first-child { color: #D9A066; font-weight: 700; }

.lb-loading td { text-align: center; color: var(--text-3); padding: 26px; }

.lb-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.lb-note { font-size: 12.5px; color: var(--text-3); }

/* =============================================================
   Modal (Einstellungen)
   ============================================================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-backdrop[hidden] { display: none; }

.modal-card {
  width: 100%;
  max-width: 380px;
  background: rgba(24, 28, 44, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.modal-head h2 { margin: 0; font-size: 20px; font-weight: 800; }

.opt-group { margin-bottom: 18px; }
.opt-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.opt-cards { display: flex; gap: 10px; }
.opt {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 13px 10px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-2);
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
}
.opt.is-active {
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  color: #062015;
  border-color: transparent;
}
.opt-desc { margin: 8px 2px 0; font-size: 12.5px; color: var(--text-3); }

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 2px;
  border-top: 1px solid var(--border-soft);
  cursor: pointer;
}
.switch-label { font-weight: 600; font-size: 15px; }

.switch { position: relative; display: inline-block; width: 46px; height: 28px; flex: 0 0 auto; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch i {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  transition: background 0.18s ease;
}
.switch i::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.18s ease;
}
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { box-shadow: 0 0 0 3px rgba(84, 216, 153, 0.35); }

.modal-hint {
  margin: 16px 0 0;
  font-size: 12.5px;
  color: var(--text-3);
  text-align: center;
}

/* Toast */
#toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%) translateY(16px);
  z-index: 200;
  background: rgba(24, 28, 44, 0.94);
  border: 1px solid rgba(84, 216, 153, 0.4);
  color: #fff;
  font-weight: 700;
  font-size: 14.5px;
  padding: 12px 24px;
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* =============================================================
   Admin
   ============================================================= */
.admin-login { max-width: 400px; margin: 50px auto; }
.admin-login .section-title { font-size: 26px; }
.login-form { text-align: left; }
.fineprint-note { margin-top: 16px; font-size: 12.5px; color: var(--text-3); }

.admin-wrap { display: flex; flex-direction: column; gap: 22px; }

.admin-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.admin-top-actions { display: flex; gap: 10px; align-items: center; }

.admin-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
}
.admin-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.admin-card .section-title { margin-bottom: 12px; }
.lang-sec {
  margin: 22px 0 10px;
  padding-top: 18px;
  border-top: 1px solid var(--border-soft);
  font-size: 15px;
  font-weight: 800;
}

.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-2);
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
}
.admin-table td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 14.5px;
  vertical-align: middle;
}
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table .muted { color: var(--text-3); font-size: 13.5px; }
.admin-table .comment-preview { color: var(--text-2); max-width: 340px; }
.row-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.inline-form { display: inline; }

.admin-form code {
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 12.5px;
}

/* =============================================================
   Footer
   ============================================================= */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border-soft);
  padding: 26px 0 34px;
  margin-top: 40px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  font-weight: 700;
  color: var(--text-2);
  font-size: 14.5px;
}
.fineprint { margin: 0; color: var(--text-3); font-size: 12.5px; }

/* =============================================================
   Responsive
   ============================================================= */
@media (max-width: 640px) {
  .page { padding-top: 22px; }
  .hero { padding-top: 16px; }
  .search-btn-label { display: none; }
  .search-bar button { padding: 10px 13px; }
  .card-grid { grid-template-columns: 1fr; }
  .form-row-2 { grid-template-columns: 1fr; }
  .lb-note { width: 100%; }
  .admin-table { display: block; overflow-x: auto; }
  .pill-value { font-size: 17px; }
  .nav-row { gap: 10px; }
  .main-nav a { padding: 7px 10px; font-size: 13.5px; }
  .lang-switch a { padding: 5px 9px; font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
