:root {
  --bg-body: #020617;
  --bg-card: rgba(15,23,42,0.86);
  --bg-card-soft: rgba(15,23,42,0.72);
  --border-subtle: rgba(148,163,184,0.35);
  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
  --accent: #38bdf8;
  --accent-soft: rgba(56,189,248,0.18);
  --accent-strong: #0ea5e9;
  --danger: #ef4444;
  --success: #22c55e;
  --radius-lg: 18px;
  --shadow-soft: 0 18px 45px rgba(8,47,73,0.75);
  --shadow-header: 0 14px 40px rgba(15,23,42,0.9);
  --nav-height: 72px;
}

/* Reset / Basics ------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  color: var(--text-main);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
               "Segoe UI", sans-serif;
}

body.dark {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(56,189,248,0.18), transparent 55%),
    radial-gradient(circle at bottom right, rgba(8,47,73,0.6), transparent 60%),
    url('./bg_darts.jpg') no-repeat center center fixed;
  background-size: cover;
}

/* Overlay, damit Text lesbarer wird */
body.dark::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(15,23,42,0.80), rgba(15,23,42,0.92)),
    radial-gradient(circle at left, rgba(15,23,42,0.20), transparent 55%);
  z-index: -1;
}

/* Layout --------------------------------------------------------- */

main {
  padding: calc(var(--nav-height) + 24px) 16px 32px;
}

.container {
  max-width: 1120px;
  margin: 0 auto 24px auto;
}

/* Header / Navigation ------------------------------------------- */

.main-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  backdrop-filter: blur(18px);
  background: linear-gradient(to right, rgba(15,23,42,0.96), rgba(15,23,42,0.94));
  border-bottom: 1px solid rgba(148,163,184,0.35);
  box-shadow: var(--shadow-header);
  z-index: 50;
}

.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 16px;
}

.logo-block {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-circle {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 20%, #38bdf8, #0f172a);
  box-shadow:
    0 0 14px rgba(56,189,248,0.9),
    0 0 40px rgba(8,47,73,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-text {
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #e5f4ff;
  font-size: 14px;
}

.logo-title .league-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.logo-title .league-sub {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

.main-nav a {
  padding: 6px 10px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--text-muted);
  transition: all 0.16s ease-out;
}

.main-nav a:hover {
  color: #e5f4ff;
  background: rgba(15,23,42,0.9);
  box-shadow: 0 0 0 1px rgba(148,163,184,0.4);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Buttons -------------------------------------------------------- */

.btn-primary,
.btn-outline,
.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 999px;
  padding: 7px 14px;
  border: 1px solid transparent;
  font-size: 12px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease-out;
  white-space: nowrap;
}

.btn-primary {
  background: radial-gradient(circle at 20% 0%, #38bdf8, #0ea5e9);
  border-color: #0ea5e9;
  color: #e0f2fe;
  box-shadow:
    0 0 16px rgba(56,189,248,0.7),
    0 0 40px rgba(8,47,73,0.85);
}

.btn-primary:hover {
  background: radial-gradient(circle at 30% 0%, #7dd3fc, #0ea5e9);
  transform: translateY(-0.5px);
}

.btn-outline {
  background: transparent;
  border-color: rgba(148,163,184,0.65);
  color: var(--text-main);
}

.btn-outline:hover {
  background: rgba(15,23,42,0.9);
  border-color: var(--accent);
  color: #e5f4ff;
}

.btn-danger {
  background: rgba(239,68,68,0.16);
  border-color: rgba(248,113,113,0.7);
  color: #fecaca;
}

.btn-danger:hover {
  background: rgba(248,113,113,0.3);
}

.user-pill {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.6);
  color: var(--text-muted);
}

/* Cards ---------------------------------------------------------- */

.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
  padding: 16px 18px 16px;
  backdrop-filter: blur(18px);
}

.card + .card {
  margin-top: 18px;
}

.card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
}

.card-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.card-grid {
  display: grid;
  grid-template-columns: minmax(0,1.1fr) minmax(0,1fr);
  gap: 18px;
}

/* Tabellen ------------------------------------------------------- */

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table th,
.table td {
  padding: 6px 8px;
  border-bottom: 1px solid rgba(30,64,175,0.6);
}

.table th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.table tbody tr:nth-child(even) {
  background: rgba(15,23,42,0.78);
}

.table tbody tr:hover {
  background: rgba(15,23,42,0.98);
}

/* Formulare ------------------------------------------------------ */

.form-group {
  margin-bottom: 12px;
}

.form-group label {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.form-control,
select.form-control,
textarea.form-control {
  width: 100%;
  padding: 7px 9px;
  border-radius: 10px;
  border: 1px solid rgba(148,163,184,0.55);
  background: rgba(15,23,42,0.96);
  color: var(--text-main);
  font-size: 13px;
}

.form-control:focus,
select.form-control:focus,
textarea.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(56,189,248,0.40);
}

/* Links ---------------------------------------------------------- */

a {
  color: var(--accent-strong);
}

a:hover {
  color: #7dd3fc;
}

/* Footer --------------------------------------------------------- */

.site-footer {
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 16px 32px;
  font-size: 11px;
  color: var(--text-muted);
}

/* Kleine Chips / Filterbuttons ---------------------------------- */

.btn-chip {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:4px 10px;
  border-radius:999px;
  font-size:11px;
  border:1px solid rgba(148,163,184,0.6);
  color:#e5e7eb;
  text-decoration:none;
  background:rgba(15,23,42,0.6);
  cursor:pointer;
}
.btn-chip:hover {
  background:rgba(148,163,184,0.2);
}
.btn-chip-active {
  border-color:var(--accent);
  background:rgba(59,130,246,0.2);
  color:#fff;
}

/* Status-Pills --------------------------------------------------- */

.status-pill {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:2px 8px;
  border-radius:999px;
  font-size:10px;
  text-transform:uppercase;
  letter-spacing:0.06em;
  border:1px solid transparent;
}

.status-scheduled {
  background:rgba(59,130,246,0.15);
  border-color:rgba(59,130,246,0.6);
  color:#bfdbfe;
}
.status-finished {
  background:rgba(34,197,94,0.15);
  border-color:rgba(34,197,94,0.6);
  color:#bbf7d0;
}
.status-postponed {
  background:rgba(248,113,113,0.15);
  border-color:rgba(248,113,113,0.6);
  color:#fecaca;
}
.status-overdue {
  background:rgba(234,179,8,0.15);
  border-color:rgba(234,179,8,0.6);
  color:#facc15;
}

/* Stat-Boxen (Spielerprofil etc.) ------------------------------- */

.stat-box {
  padding: 12px;
  background: rgba(15,23,42,0.8);
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,0.5);
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.stat-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15,23,42,0.7);
}
.stat-value {
  font-size: 22px;
  font-weight: 700;
  color: #e5e7eb;
  margin-bottom: 2px;
}
.stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
}

/* DASHBOARD V2 (C, kompakt 4er-Grid) ---------------------------- */

.dash-hero {
  position: relative;
  padding: 24px 22px 24px;
}

.dash-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 0% 0%, rgba(56,189,248,0.18), transparent 60%),
    radial-gradient(circle at 100% 100%, rgba(8,47,73,0.6), transparent 70%);
  opacity: .9;
  pointer-events: none;
}

.dash-hero-inner {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.hero-subtitle {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .22em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.hero-title {
  font-size: 26px;
  margin: 0;
  text-transform: uppercase;
}

.hero-text {
  max-width: 520px;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 6px;
}

.hero-season {
  margin-top: 8px;
  font-size: 13px;
  color: #38bdf8;
}

.qa-title {
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.qa-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.qa-btn {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(30,41,59,.8);
  border: 1px solid rgba(148,163,184,.3);
  color: white;
  font-size: 13px;
  text-decoration: none;
  transition: .2s;
}

.qa-btn:hover {
  background: rgba(59,130,246,.2);
}

.qa-blue {
  background: #38bdf8;
  border-color: #38bdf8;
  color: #0f172a;
  font-weight: 600;
}

.hero-user {
  margin-top: 10px;
  font-size: 11px;
  color: var(--text-muted);
}

/* 4-Kachel-Row */

.dash-stats-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 16px;
}

.dash-stat {
  background: rgba(15,23,42,.75);
  border: 1px solid rgba(148,163,184,.35);
  padding: 14px 14px 12px;
  border-radius: 16px;
  text-align: left;
  box-shadow: inset 0 0 20px rgba(56,189,248,.04);
}

.ds-icon {
  font-size: 18px;
  opacity: .85;
  margin-bottom: 2px;
}

.ds-value {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}

.ds-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.ds-small {
  font-size: 11px;
  opacity: .7;
  margin-top: 4px;
}

/* Listen rechts im Dashboard */

.dash-list {
  list-style: none;
  padding-left: 0;
  font-size: 13px;
  margin: 0;
}

.dash-list li {
  padding: 6px 0;
  border-bottom: 1px solid rgba(148,163,184,.25);
}

.dash-list .meta {
  font-size: 12px;
  color: var(--text-muted);
}

.vs {
  opacity: .65;
  margin: 0 3px;
}

/* Responsive Anpassungen ---------------------------------------- */

@media (max-width: 1024px) {
  .dash-stats-4 {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }
}

@media (max-width: 840px) {
  main {
    padding-top: calc(var(--nav-height) + 12px);
  }
  .card-grid {
    grid-template-columns: minmax(0,1fr);
  }
  .header-inner {
    gap: 10px;
  }
  .main-nav {
    display: none; /* Mobile: Menü ausblenden */
  }
}

@media (max-width: 640px) {
  .dash-stats-4 {
    grid-template-columns: minmax(0,1fr);
  }
  .col-details {
    display:none;
  }
}
/* Dashboard V2 – 4er Stats-Grid */
.dash-stats-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
    padding: 6px 4px;
}

/* Einzelne Statistik-Kacheln */
.dash-stat {
    background: rgba(15,23,42,0.72);
    border: 1px solid rgba(148,163,184,0.28);
    padding: 18px;
    border-radius: 16px;
    box-shadow: inset 0 0 22px rgba(56,189,248,0.05);
    transition: 0.15s ease;
}

.dash-stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(0,0,0,0.4);
}

.ds-icon {
    font-size: 22px;
    opacity: .85;
    margin-bottom: 4px;
}

.ds-value {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 2px;
}

.ds-label {
    font-size: 13px;
    color: var(--text-muted);
}

.ds-small {
    font-size: 11px;
    opacity: .65;
    margin-top: 2px;
}

.btn-danger {
    background-color: #d9534f;
    color: #fff;
    border: none;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: 0.2s;
}

.btn-danger:hover {
    background-color: #c9302c;
}