/* Gießen SMP – Farbblöcke (Variante A) auf animiertem Deep-Dark-Hintergrund */

@font-face {
  font-family: 'Minecraftia';
  src: url('/static/minecraftia.ttf') format('truetype');
  font-display: swap;
}

:root {
  --bg: #070b10;
  --text: #e8eaee;
  --label: #8b93a1;
  --accent: #29dfeb;
  --accent-glow: rgba(41, 223, 235, 0.35);
  --ink: #111;
  --ink-soft: #3b3b3b;
  --light-text: #f2eaf7;
  --c-blue: #8ecdfd;
  --c-teal: #55e6d8;
  --c-lila: #3a2b45;
  --c-yellow: #ffd84a;
  --c-green: #7ce95f;
  --c-pink: #f2b8e6;
  --c-orange: #ffa53a;
  --c-red: #ff6f5e;
  --c-gray: #dcdcdc;
  --c-cream: #e9e2cf;
  --up: #1f7a3a;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mc: 'Minecraftia', 'Courier New', monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 70% 55% at 12% -8%, rgba(41, 223, 235, 0.08), transparent 70%),
    radial-gradient(ellipse 60% 50% at 95% 105%, rgba(41, 223, 235, 0.06), transparent 70%);
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img.px { image-rendering: pixelated; image-rendering: crisp-edges; }

.wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------------------------------------------------------- Partikel (Deep Dark) */

.ambient { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.ambient span {
  position: absolute;
  left: var(--x);
  bottom: -12px;
  width: var(--s);
  height: var(--s);
  border-radius: 1px;
  background: var(--accent);
  box-shadow: 0 0 6px 1px var(--accent-glow);
  opacity: 0;
  animation: rise var(--d) linear var(--delay) infinite;
}
@keyframes rise {
  0%   { transform: translate3d(0, 0, 0); opacity: 0; }
  12%  { opacity: 0.45; }
  70%  { opacity: 0.25; }
  100% { transform: translate3d(var(--drift), -105vh, 0); opacity: 0; }
}

/* ---------------------------------------------------------- Bausteine */

.block {
  border: 3px solid var(--ink);
  box-shadow: 5px 5px 0 #000;
  color: var(--ink);
  background: var(--c-gray);
}
.c-blue { background: var(--c-blue); }
.c-teal { background: var(--c-teal); }
.c-lila { background: var(--c-lila); color: var(--light-text); }
.c-yellow { background: var(--c-yellow); }
.c-green { background: var(--c-green); }
.c-pink { background: var(--c-pink); }
.c-orange { background: var(--c-orange); }
.c-red { background: var(--c-red); }
.c-gray { background: var(--c-gray); }

a.block, button.block { transition: transform .12s ease, box-shadow .12s ease; }
a.block:hover, button.block:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 #000; }
a.block:active, button.block:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 #000; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.h1, .h2, .h3, .eyebrow, .brand-text, .nav a, .btn, .total-num, .total-label, .place, .row-value,
.hero-title, .badge, .tag, .status, .section-meta, .player-name, .board-sub, .note {
  font-family: var(--mc);
  font-weight: normal;
}
.h1 { font-size: 32px; line-height: 1.1; margin: 0; letter-spacing: 1px; text-transform: uppercase; color: var(--text); text-shadow: 3px 3px 0 #000; }
.h2 { font-size: 24px; margin: 0 0 14px; text-transform: uppercase; color: var(--text); text-shadow: 2px 2px 0 #000; }
.h3 { font-size: 16px; margin: 0; line-height: 1.2; }
.eyebrow { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--accent); }
.eyebrow.dark { color: var(--ink); }
.note { font-size: 11px; color: var(--label); margin: 10px 0 0; }

.sq { display: inline-block; width: 10px; height: 10px; border: 2px solid var(--ink); background: #8a8f99; vertical-align: -1px; margin-right: 6px; }
.sq.on { background: var(--c-green); }
.sq.off { background: #8a8f99; }

.btn {
  font-size: 12px;
  text-transform: uppercase;
  padding: 10px 14px 6px;
  border: 3px solid var(--ink);
  background: var(--c-cream);
  box-shadow: 4px 4px 0 #000;
  cursor: pointer;
  white-space: nowrap;
  color: var(--ink);
}
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 #000; }

.section { margin: 56px 0 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 16px; margin-bottom: 18px; }
.section-meta { font-size: 12px; color: var(--label); }

.state { padding: 22px 24px; margin: 0; display: flex; align-items: center; gap: 14px; }
.state.small { padding: 14px 18px; }
.state .glyph { width: 28px; height: 28px; flex: none; }
.state .glyph svg { width: 100%; height: 100%; }

.loading { display: grid; place-items: center; min-height: 40vh; }
.loader { display: inline-flex; gap: 6px; }
.loader i { width: 10px; height: 10px; background: var(--accent); animation: blink 1s infinite ease-in-out; }
.loader i:nth-child(2) { animation-delay: .15s; }
.loader i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 100% { opacity: .2; } 50% { opacity: 1; box-shadow: 0 0 8px var(--accent-glow); } }

.fade-in { animation: fade .35s ease-out both; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------- Kopfzeile */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(7, 11, 16, 0.92);
  border-bottom: 3px solid #000;
  backdrop-filter: blur(6px);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-logo { width: 44px; height: 44px; border: 3px solid var(--ink); box-shadow: 3px 3px 0 #000; flex: none; }
.brand-text { font-size: 22px; white-space: nowrap; text-shadow: 2px 2px 0 #000; padding-top: 6px; }
.nav { display: flex; gap: 10px; }
.nav a {
  font-size: 12px;
  text-transform: uppercase;
  padding: 10px 12px 6px;
  border: 3px solid transparent;
  color: var(--text);
}
.nav a:hover { border-color: var(--c-teal); }
.nav a.on { background: var(--c-teal); color: var(--ink); border-color: var(--ink); box-shadow: 3px 3px 0 #000; }

/* ---------------------------------------------------------- Startbereich */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  padding: 48px 0 8px;
}
.hero-title { font-size: 56px; line-height: 1.05; margin: 22px 0 14px; text-shadow: 4px 4px 0 #000; }
.hero-sub { font-size: 17px; max-width: 34em; margin: 0 0 18px; color: #cfd5de; }
.status { font-size: 12px; color: var(--text); }
.hero-logo { justify-self: end; width: min(100%, 340px); aspect-ratio: 1; background: #000; overflow: hidden; }
.hero-logo img { width: 100%; height: 100%; display: block; object-fit: cover; }

/* ---------------------------------------------------------- Trailer */

.trailer { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.trailer iframe, .trailer-play { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.trailer-play { padding: 0; cursor: pointer; background: #000; display: block; }
.trailer-play img { width: 100%; height: 100%; object-fit: cover; display: block; filter: brightness(.8); transition: filter .2s; }
.trailer-play img.logo-fallback { object-fit: contain; }
.trailer-play:hover img { filter: brightness(1); }
.play-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  background: var(--c-red);
  border: 3px solid var(--ink);
  box-shadow: 5px 5px 0 #000;
  color: var(--ink);
}
.play-btn svg { width: 38px; height: 38px; margin-left: 6px; }

/* ---------------------------------------------------------- Gesamtzahlen */

.totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 56px; }
.total { padding: 22px 22px 16px; display: flex; flex-direction: column; gap: 8px; }
.total-num { font-size: 48px; line-height: 1; padding-top: 10px; }
.total-label { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }

/* ---------------------------------------------------------- Wusstest du? */

.fact { margin-top: 48px; padding: 20px 22px; }
.fact-row { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.fact-head { width: 48px; height: 48px; border: 3px solid var(--ink); flex: none; background: #000; }
.fact-text { flex: 1; margin: 0; font-size: 17px; font-weight: 600; }

/* ---------------------------------------------------------- Spieler */

.search { padding: 10px; margin-bottom: 20px; }
.search-inner { display: flex; align-items: center; gap: 10px; background: var(--c-cream); border: 3px solid var(--ink); padding: 10px 12px; }
.search-inner svg { width: 18px; height: 18px; flex: none; color: var(--ink); }
.search-inner input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 16px; color: var(--ink); outline: none; }
.search-inner input::placeholder { color: #7a7466; }

.player-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 18px; }
.player { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 12px 12px; text-align: center; }
.player-head { width: 64px; height: 64px; border: 3px solid var(--ink); background: #000; }
.player-name { font-size: 14px; margin-top: 6px; max-width: 100%; overflow-wrap: anywhere; }
.player-meta { font-size: 13px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: center; }
.player-time { font-size: 12px; color: var(--ink-soft); }
.tag { font-size: 10px; text-transform: uppercase; background: var(--c-blue); border: 2px solid var(--ink); padding: 3px 5px 0; margin-left: 4px; }

/* ---------------------------------------------------------- Bestenlisten */

.boards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 26px; }
.board { padding: 16px 16px 10px; }
.board-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.board-icon { width: 36px; height: 36px; display: grid; place-items: center; background: var(--ink); color: var(--c-cream); flex: none; }
.board-icon svg { width: 20px; height: 20px; }
.c-lila .board-icon { background: var(--c-cream); color: var(--ink); }
.board-sub { font-size: 10px; margin: 4px 0 0; opacity: .8; }
.board-rows { list-style: none; margin: 0; padding: 0; }
.board-rows li a { display: flex; align-items: center; gap: 10px; padding: 7px 2px; border-top: 1px solid rgba(0, 0, 0, .18); }
.c-lila .board-rows li a { border-top-color: rgba(255, 255, 255, .15); }
.board-rows li a:hover .row-name { text-decoration: underline; }
.place { width: 24px; height: 24px; display: grid; place-items: center; font-size: 11px; padding-top: 4px; flex: none; }
.place.top { background: var(--ink); color: var(--c-cream); }
.c-lila .place.top { background: var(--c-yellow); color: var(--ink); }
.row-head { width: 24px; height: 24px; border: 2px solid var(--ink); flex: none; background: #000; }
.row-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.row-name .sq { margin: 0 0 0 6px; width: 8px; height: 8px; }
.row-value { font-size: 11px; white-space: nowrap; padding-top: 4px; }
.board-empty { margin: 4px 0 8px; font-weight: 600; }

/* ---------------------------------------------------------- Events */

.events { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.event { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; background: var(--c-cream); }
.event-head { width: 40px; height: 40px; border: 2px solid var(--ink); flex: none; background: #000; }
.event-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.event-line { line-height: 1.6; overflow-wrap: anywhere; }
.event-time { font-size: 12px; color: #6b6556; }
.badge {
  display: inline-block;
  font-size: 10px;
  background: var(--c-green);
  border: 2px solid var(--ink);
  padding: 3px 6px 0;
  margin: 0 2px;
  line-height: 1.6;
}
.badge.lila { background: #d98cf0; }

/* ---------------------------------------------------------- Spielerseite */

.back { display: inline-block; margin: 28px 0 16px; font-family: var(--mc); font-size: 12px; color: var(--accent); }
.back:hover { text-decoration: underline; }
.profile-hero { display: flex; align-items: center; gap: 20px; padding: 18px 20px; }
.profile-head { width: 96px; height: 96px; border: 3px solid var(--ink); background: #000; flex: none; }
.profile-name { font-family: var(--mc); font-weight: normal; font-size: 32px; margin: 12px 0 6px; overflow-wrap: anywhere; }
.profile-tags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.profile-tags .status { color: var(--ink); }
.c-violet { background: #e3a8f7; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 22px; margin-top: 18px; }
.tile { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px 16px 12px; text-align: left; cursor: pointer; min-height: 150px; }
.tile.active { outline: 4px solid var(--accent); outline-offset: 3px; }
.tile-top { display: flex; align-items: center; gap: 8px; }
.tile-icon { width: 18px; height: 18px; flex: none; }
.tile-icon svg { width: 100%; height: 100%; }
.tile-label { font-family: var(--mc); font-size: 11px; text-transform: uppercase; line-height: 1.3; padding-top: 3px; }
.tile-value { font-family: var(--mc); font-size: 26px; line-height: 1.2; margin-top: auto; padding-top: 8px; overflow-wrap: anywhere; }
.tile-place { font-size: 13px; font-weight: 600; opacity: .85; }
.tile-week { font-size: 12px; opacity: .75; }

.panel { background: #0f1820; color: var(--text); padding: 18px 18px 16px; }
.panel-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 16px; margin-bottom: 14px; }
.no-margin { margin: 0; }
.h2 small { display: inline-block; vertical-align: middle; font-family: var(--font); font-size: 14px; color: var(--label); text-transform: none; text-shadow: none; margin-left: 6px; }
.chart-sub { margin: 6px 0 0; font-size: 13px; color: var(--label); }
.seg { display: inline-flex; border: 3px solid var(--ink); box-shadow: 3px 3px 0 #000; }
.seg button { font-family: var(--mc); font-size: 11px; padding: 8px 12px 4px; border: 0; background: var(--c-cream); color: var(--ink); cursor: pointer; }
.seg button + button { border-left: 3px solid var(--ink); }
.seg button.on { background: var(--c-teal); }
.chart-box { position: relative; height: 300px; }
.chart-empty { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--label); text-align: center; padding: 0 16px; }
.chart-empty svg { width: 34px; height: 34px; color: var(--accent); }
.loading.small { min-height: 0; height: 100%; }
.tip {
  position: absolute; left: 0; top: 0; pointer-events: none; opacity: 0; transition: opacity .12s;
  background: #070b10; border: 3px solid #000; box-shadow: 4px 4px 0 #000; padding: 8px 10px; min-width: 190px; font-size: 13px;
}
.tip-title { font-family: var(--mc); font-size: 11px; color: var(--accent); margin-bottom: 4px; }
.tip-row { display: flex; justify-content: space-between; gap: 14px; color: var(--label); }
.tip-row b { color: var(--text); font-weight: 600; }
.tip-row.on span, .tip-row.on b { color: var(--accent); }

.favs { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 22px; }
.fav { padding: 14px 14px 8px; }
.fav-rows { list-style: none; margin: 0; padding: 0; }
.fav-rows li { display: flex; align-items: center; gap: 10px; padding: 6px 2px; border-top: 1px solid rgba(0, 0, 0, .18); }
.fav-name { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.fav-count { font-family: var(--mc); font-size: 11px; padding-top: 4px; }

.minis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 18px; margin-top: 18px; }
.mini { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; }
.mini-label { font-family: var(--mc); font-size: 10px; text-transform: uppercase; line-height: 1.4; }
.mini-value { font-family: var(--mc); font-size: 18px; margin-top: auto; padding-top: 4px; overflow-wrap: anywhere; }
.mini-place { font-size: 12px; color: var(--ink-soft); }

.mobs { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 12px; }
.mob { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.mob.hidden { display: none; }
.mob-face { width: 48px; height: 48px; display: grid; place-items: center; background: #000; border: 3px solid var(--ink); box-shadow: 3px 3px 0 #000; }
.mob-face img { width: 40px; height: 40px; object-fit: contain; }
.mob-face.fallback { background: hsl(var(--h), 40%, 35%); font-family: var(--mc); font-size: 12px; color: #fff; padding-top: 4px; }
.mob-count { font-family: var(--mc); font-size: 11px; }
.more { margin-top: 14px; }

.cats { display: grid; gap: 10px; }
.cat { border: 3px solid #000; background: #132029; }
.cat summary { display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; list-style: none; font-weight: 600; }
.cat summary::-webkit-details-marker { display: none; }
.cat .chev { color: var(--accent); transition: transform .15s; }
.cat[open] .chev { transform: rotate(90deg); }
.cat .count { margin-left: auto; font-family: var(--mc); font-size: 11px; color: var(--label); }
.rows { list-style: none; margin: 0; padding: 0 12px 10px; max-height: 420px; overflow-y: auto; }
.rows li { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-top: 1px solid #1c2a33; }
.rows li span { min-width: 0; overflow-wrap: anywhere; }
.rows li b { font-weight: 600; white-space: nowrap; }

/* ---------------------------------------------------------- Karte */

.map-hint { display: flex; align-items: center; gap: 10px; color: var(--label); font-size: 13px; margin: 0 0 14px; }
.map-hint svg { width: 18px; height: 18px; color: var(--accent); flex: none; }
.map-frame { background: #000; height: max(420px, calc(100vh - 72px - 220px)); }
.map-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.map-link { margin: 16px 0 0; }
.map-link a { color: var(--accent); text-decoration: underline; }

/* ---------------------------------------------------------- Fuß */

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  margin-top: 72px;
  padding-top: 20px;
  padding-bottom: 32px;
  border-top: 3px solid #000;
  color: var(--label);
  font-size: 12px;
}
.footer-brand { font-family: var(--mc); color: var(--text); }

/* ---------------------------------------------------------- Handy */

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; padding-top: 28px; }
  .hero-logo { justify-self: start; width: min(100%, 260px); order: -1; }
  .hero-title { font-size: 38px; }
  .totals { grid-template-columns: 1fr; gap: 16px; }
  .events { grid-template-columns: 1fr; }
  .fact-row { flex-wrap: wrap; }
  .fact-text { flex-basis: calc(100% - 62px); }
}
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .topbar-inner { min-height: 60px; gap: 8px; }
  .brand-logo { width: 36px; height: 36px; }
  .brand-text { font-size: 15px; }
  .nav { gap: 4px; }
  .nav a { padding: 8px 6px 4px; font-size: 10px; }
  .h1 { font-size: 24px; }
  .player-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .boards { grid-template-columns: minmax(0, 1fr); }
  .total-num { font-size: 36px; }
  .play-btn { width: 68px; height: 68px; }
  .tiles, .minis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .tile { min-height: 132px; padding: 12px; }
  .tile-value { font-size: 18px; }
  .favs { grid-template-columns: minmax(0, 1fr); }
  .profile-hero { gap: 14px; padding: 14px; }
  .profile-head { width: 64px; height: 64px; }
  .profile-name { font-size: 22px; }
  .chart-box { height: 240px; }
}
@media (max-width: 380px) {
  .brand-text { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ambient { display: none; }
  .fade-in, a.block, button.block { animation: none; transition: none; }
}
