/* ---------------------------------------------------------------------------
   Futureplanet – Sport-Bar Dark
   Tokens oben ändern, dann ändert sich die ganze Seite mit.
--------------------------------------------------------------------------- */
:root {
  --bs-body-bg: #0b0d10;
  --bs-body-color: #e7ebef;
  --bs-border-color: #1f242c;
  --bs-tertiary-bg: #14181e;
  --bs-secondary-bg: #1a1f27;

  --fp-accent: #ffcf3b;
  --fp-accent-2: #ff5e3a;
  --fp-green: #2ecc71;
  --fp-red: #e74c3c;
  --fp-blue: #3a8dff;
  --fp-mute: #6b7480;
  --fp-card: #14181e;
  --fp-line: #1f242c;
}

body {
  font-family: 'Outfit', system-ui, sans-serif;
  background:
    radial-gradient(ellipse at top, rgba(255, 207, 59, .05), transparent 60%),
    var(--bs-body-bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.mono, .fp-score input, .fp-num {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}
.fp-mute { color: var(--fp-mute); }

/* ---- Navigation ---------------------------------------------------------- */
.fp-nav {
  background: rgba(11, 13, 16, .92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--fp-line);
  position: sticky; top: 0; z-index: 30;
}
.fp-brand {
  font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em;
  color: var(--bs-body-color); text-decoration: none;
}
.fp-brand span { color: var(--fp-accent); }

.fp-pill {
  font-size: .78rem; font-weight: 600; letter-spacing: .04em;
  color: var(--fp-mute); text-decoration: none;
  padding: .35rem .8rem; border-radius: 999px; white-space: nowrap;
}
.fp-pill:hover { color: var(--bs-body-color); background: var(--bs-secondary-bg); }
.fp-pill.active { color: #0b0d10; background: var(--fp-accent); }

.fp-sports-mobile { overflow-x: auto; }
.fp-sports-mobile .container-xl { flex-wrap: nowrap; }

.fp-user {
  background: none; border: 1px solid var(--fp-line); color: var(--bs-body-color);
  border-radius: 999px; padding: .3rem .8rem; font-size: .85rem; font-weight: 600;
}

.fp-subnav { border-bottom: 1px solid var(--fp-line); background: rgba(20, 24, 30, .6); }
.fp-tab {
  padding: .7rem .9rem; font-size: .85rem; font-weight: 600;
  color: var(--fp-mute); text-decoration: none; white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.fp-tab:hover { color: var(--bs-body-color); }
.fp-tab.active { color: var(--fp-accent); border-bottom-color: var(--fp-accent); }

/* ---- Bausteine ----------------------------------------------------------- */
.fp-card {
  background: var(--fp-card);
  border: 1px solid var(--fp-line);
  border-radius: 14px;
}
.fp-card-head {
  padding: .75rem 1rem; border-bottom: 1px solid var(--fp-line);
  display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
}
.fp-h1 { font-weight: 800; letter-spacing: -.02em; font-size: 1.5rem; margin: 0; }
.fp-sub { color: var(--fp-mute); font-size: .875rem; }

.fp-daybar {
  padding: .4rem 1rem; font-size: .78rem; font-weight: 600;
  color: var(--fp-mute); background: rgba(255, 255, 255, .02);
  border-bottom: 1px solid var(--fp-line);
}

/* ---- Tippzeile ----------------------------------------------------------- */
.fp-game {
  display: grid;
  grid-template-columns: 4.2rem 1fr auto 1fr 5.5rem;
  align-items: center; gap: .5rem;
  padding: .6rem 1rem; border-bottom: 1px solid var(--fp-line);
}
.fp-game:last-child { border-bottom: 0; }
.fp-game .team { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.fp-game .team.away { flex-direction: row-reverse; text-align: right; }
.fp-game .team span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fp-game img.logo { width: 24px; height: 24px; object-fit: contain; }
.fp-game .time { font-size: .75rem; color: var(--fp-mute); }

.fp-score { display: flex; align-items: center; gap: .25rem; }
.fp-score input {
  width: 2.6rem; text-align: center; font-weight: 700;
  background: #0f1319; border: 1px solid var(--fp-line); color: var(--bs-body-color);
  border-radius: 8px; padding: .3rem .1rem;
}
.fp-score input:focus {
  outline: none; border-color: var(--fp-accent);
  box-shadow: 0 0 0 3px rgba(255, 207, 59, .15);
}
.fp-score input:disabled { opacity: .45; }
.fp-score .sep { color: var(--fp-mute); font-weight: 700; }

.fp-state { font-size: .72rem; text-align: right; color: var(--fp-mute); }
.fp-state.hit  { color: var(--fp-green); font-weight: 700; }
.fp-state.part { color: var(--fp-accent); font-weight: 700; }
.fp-state.miss { color: var(--fp-red); }
.fp-state.saved  { color: var(--fp-green); font-weight: 700; }
.fp-state.failed { color: var(--fp-red); font-weight: 700; }

.fp-locked { background: rgba(255, 255, 255, .015); }

@media (max-width: 640px) {
  .fp-game { grid-template-columns: 1fr auto 1fr; row-gap: .35rem; }
  .fp-game .time { grid-column: 1 / -1; }
  .fp-state { grid-column: 1 / -1; text-align: left; }
}

/* ---- Tabellen ------------------------------------------------------------ */
.fp-table { width: 100%; font-size: .875rem; }
.fp-table th, .fp-table td {
  padding: .5rem .6rem; border-bottom: 1px solid var(--fp-line); white-space: nowrap;
}
.fp-table th {
  font-size: .72rem; font-weight: 700; color: var(--fp-mute); text-align: left;
  position: sticky; top: 0; background: var(--fp-card); z-index: 2;
}
.fp-table td.num, .fp-table th.num { text-align: center; }
.fp-table tbody tr:hover { background: rgba(255, 255, 255, .02); }
.fp-scroll { overflow-x: auto; }

/* Erste Spalte bleibt beim Querscrollen stehen ------------------------------ */
.fp-table.sticky-first th:first-child,
.fp-table.sticky-first td:first-child {
  position: sticky; left: 0;
  background: var(--fp-card);
  box-shadow: 1px 0 0 var(--fp-line);
}
.fp-table.sticky-first td:first-child { z-index: 1; }
.fp-table.sticky-first th:first-child { z-index: 3; }
.fp-table.sticky-first tbody tr:hover td:first-child { background: #191e25; }

/* Paarung als Wappen statt als Text ---------------------------------------- */
.fp-pair { display: flex; align-items: center; gap: .3rem; }
.fp-pair img { width: 22px; height: 22px; object-fit: contain; }
.fp-pair .vs { color: var(--fp-mute); font-size: .7rem; }
.fp-pair .kurz {
  font-size: .7rem; font-weight: 700; color: var(--fp-mute);
  min-width: 2.2rem; text-align: center;
}
/* Wappenpaar im Spaltenkopf: kleiner und mittig */
.fp-pair.mini { justify-content: center; gap: .15rem; }
.fp-pair.mini img { width: 18px; height: 18px; }
.fp-pair.mini .kurz { min-width: 0; }
.fp-table thead th .fp-pair { margin-bottom: .1rem; }

/* Erste Spalte der Ranglisten: Platz und Name in einer Zelle ---------------- */
.fp-name { display: flex; align-items: baseline; gap: .5rem; }
.fp-name .platz { font-weight: 800; color: var(--fp-mute); min-width: 1.2rem; }
.fp-name .platz.top1 { color: var(--fp-accent); }

@media (max-width: 640px) {
  .fp-table th, .fp-table td { padding: .45rem .4rem; }
  .fp-table.sticky-first th:first-child,
  .fp-table.sticky-first td:first-child { max-width: 8.5rem; }
  .fp-table.sticky-first td:first-child .fp-name span:last-child {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
}

.fp-rank { font-weight: 800; color: var(--fp-mute); width: 2.5rem; }
.fp-rank.top1 { color: var(--fp-accent); }
.fp-total { font-weight: 800; }

.cell-hit  { background: rgba(46, 204, 113, .16); color: #b7f5d0; font-weight: 700; }
.cell-part { background: rgba(255, 207, 59, .14); color: #ffe79a; font-weight: 600; }
.cell-miss { color: var(--fp-mute); }
.cell-none { color: #2b3038; }
.cell-hidden { color: #2b3038; }   /* verdeckt sieht aus wie „kein Tipp" */

/* ---- Badges & Buttons ---------------------------------------------------- */
.fp-badge {
  font-size: .7rem; font-weight: 700; padding: .15rem .5rem;
  border-radius: 999px; border: 1px solid var(--fp-line); color: var(--fp-mute);
}
.fp-badge.open  { color: var(--fp-green); border-color: rgba(46, 204, 113, .4); }
.fp-badge.live  { color: var(--fp-accent-2); border-color: rgba(255, 94, 58, .4); }

.btn-fp {
  background: var(--fp-accent); color: #0b0d10; font-weight: 700;
  border: 0; border-radius: 10px; padding: .5rem 1.1rem;
}
.btn-fp:hover { background: #ffd964; color: #0b0d10; }
.btn-ghost {
  background: transparent; color: var(--bs-body-color); font-weight: 600;
  border: 1px solid var(--fp-line); border-radius: 10px; padding: .45rem 1rem;
}
.btn-ghost:hover { border-color: var(--fp-mute); color: var(--bs-body-color); }
.btn-ghost.disabled { opacity: .35; pointer-events: none; }
.btn-ghost.btn-sm { padding: .3rem .6rem; }

/* Blättern zwischen Spieltagen */
.fp-mdnav { display: flex; align-items: center; gap: .4rem; }
.fp-mdnav form { margin: 0; display: flex; gap: .4rem; }
.fp-mdnav select { min-width: 10rem; }
@media (max-width: 480px) { .fp-mdnav select { min-width: 7.5rem; } }

.fp-savebar {
  position: sticky; bottom: 0; z-index: 20;
  background: rgba(11, 13, 16, .94); backdrop-filter: blur(10px);
  border-top: 1px solid var(--fp-line);
  padding: .7rem 1rem; display: flex; align-items: center; gap: 1rem;
  border-radius: 0 0 14px 14px;
}

.fp-footer { border-top: 1px solid var(--fp-line); color: var(--fp-mute); font-size: .8rem; margin-top: 3rem; }

/* Formulare im Adminbereich */
.form-control, .form-select {
  background: #0f1319; border-color: var(--fp-line); color: var(--bs-body-color);
}
.form-control:focus, .form-select:focus {
  background: #0f1319; color: var(--bs-body-color);
  border-color: var(--fp-accent); box-shadow: 0 0 0 3px rgba(255, 207, 59, .15);
}

:focus-visible { outline: 2px solid var(--fp-accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
