/* ───────────────────────────────────────────────────────
   WINTERSPIELE – Dark Mobile-First UI
   ─────────────────────────────────────────────────────── */

:root {
  --bg:        #0d1117;
  --bg2:       #161b22;
  --bg3:       #1c2333;
  --card:      #161b22;
  --surface:   #1c2333;
  --border:    #30363d;
  --text:      #e6edf3;
  --muted:     #8b949e;
  --accent:    #58a6ff;
  --ice:       #00d4ff;
  --green:     #3fb950;
  --gold:      #f1c40f;
  --silver:    #bdc3c7;
  --bronze:    #e67e22;
  --danger:    #f85149;
  --warning:   #f0a83a;
  --radius:    14px;
  --radius-sm: 8px;
  --font:      'Poppins', sans-serif;
  --header-h:  60px;
  --bnav-h:    70px;
  --shadow:    0 4px 24px rgba(0,0,0,0.4);
}

/* ── Reset & Base ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  padding-top: var(--header-h);
  padding-bottom: var(--bnav-h);
  -webkit-font-smoothing: antialiased;
}

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

/* ── App Header ───────────────────────────────────────── */
.app-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(13,17,23,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 16px;
  max-width: 600px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text) !important;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
}

.brand-icon { font-size: 1.3rem; }
.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 8px rgba(88,166,255,0.4);
}
.brand-logo-emoji {
  font-size: 1.4rem;
  line-height: 1;
  filter: drop-shadow(0 0 6px rgba(240,165,0,0.5));
}
.brand-text {
  background: linear-gradient(90deg, #ffe066, #f0a500);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-right { display: flex; align-items: center; gap: 10px; }

.user-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.8rem;
  font-weight: 500;
}

.admin-badge {
  background: linear-gradient(135deg, var(--gold), var(--bronze));
  color: #000;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 10px;
}

.username-text { color: var(--text); max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.btn-logout {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 8px;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-logout:hover { color: var(--danger); border-color: var(--danger); }

/* ── Bottom Navigation ───────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--bnav-h);
  background: rgba(22,27,34,0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 1000;
  padding: 0 8px;
}

.bnav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--muted);
  font-size: 0.6rem;
  font-weight: 500;
  padding: 6px 6px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  text-decoration: none;
  flex: 1;
  min-width: 0;
}

.bnav-item i { font-size: 1.15rem; }
.bnav-item.active, .bnav-item:hover { color: var(--accent); }

.add-btn-circle {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, var(--accent), var(--ice));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 20px rgba(88,166,255,0.4);
  margin-bottom: 2px;
}
.add-btn-circle i { color: #000; font-size: 1.5rem; }
.add-btn-nav { margin-top: -20px; }

/* ── Page Content ────────────────────────────────────── */
.page-content {
  max-width: 600px;
  margin: 0 auto;
  padding: 16px 12px 8px;
}

/* ── Section Header ──────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

/* ── Year Filter ─────────────────────────────────────── */
.year-filter {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.year-chip {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  transition: all 0.2s;
}
.year-chip:hover, .year-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
}

/* ── My Stats Card ───────────────────────────────────── */
.my-stats-card {
  background: linear-gradient(135deg, #1a2744 0%, #162032 100%);
  border: 1px solid rgba(88,166,255,0.3);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  box-shadow: 0 0 30px rgba(88,166,255,0.1);
}

.stats-rank {
  font-size: 2.2rem;
  min-width: 50px;
  text-align: center;
}
.rank-num { font-size: 1.4rem; font-weight: 800; color: var(--accent); }

.stats-info { flex: 1; }
.stats-name { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.stats-points { font-size: 1.4rem; font-weight: 800; color: var(--text); }

.stats-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
}

.stat-chip {
  font-size: 0.72rem;
  color: var(--muted);
  background: rgba(255,255,255,0.05);
  padding: 3px 8px;
  border-radius: 12px;
  white-space: nowrap;
}

/* ── Leaderboard ─────────────────────────────────────── */
.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}

.leaderboard-item {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s;
}

.leaderboard-item:hover { border-color: rgba(88,166,255,0.4); transform: translateX(2px); }

.leaderboard-item.me {
  border-color: rgba(88,166,255,0.5);
  background: linear-gradient(135deg, #1a2744 0%, #161b22 100%);
  box-shadow: 0 0 12px rgba(88,166,255,0.15);
}

.lb-rank { font-size: 1.5rem; min-width: 40px; text-align: center; }
.lb-rank-num { font-size: 1rem; font-weight: 700; color: var(--muted); }

.lb-info { flex: 1; min-width: 0; }
.lb-name {
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.lb-meta { font-size: 0.72rem; color: var(--muted); margin-top: 1px; }

.lb-points { text-align: right; }
.points-value { display: block; font-size: 1.2rem; font-weight: 800; color: var(--accent); }
.points-label { font-size: 0.65rem; color: var(--muted); text-transform: uppercase; }

.you-badge {
  background: linear-gradient(135deg, var(--accent), var(--ice));
  color: #000;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
}

.role-badge, .role-tag {
  font-size: 0.6rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
  text-transform: uppercase;
}

.role-admin { background: rgba(241,196,15,0.15); color: var(--gold); border: 1px solid rgba(241,196,15,0.3); }
.role-user  { background: rgba(63,185,80,0.1); color: var(--green); border: 1px solid rgba(63,185,80,0.2); }

.rank-badge {
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid;
  white-space: nowrap;
}

/* ── Recent Feed ─────────────────────────────────────── */
.feed-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.feed-item {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.feed-icon { font-size: 1.4rem; min-width: 32px; text-align: center; }
.feed-info { flex: 1; min-width: 0; }
.feed-name { font-size: 0.88rem; font-weight: 500; }
.feed-meta { font-size: 0.72rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-points { font-size: 0.85rem; font-weight: 700; color: var(--green); white-space: nowrap; }

/* ── Dark Cards ──────────────────────────────────────── */
.card-dark {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 12px;
}

.card-dark-header {
  background: var(--bg3);
  padding: 12px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
}

.card-dark-body { padding: 16px; }

/* ── Activity List ───────────────────────────────────── */
.activity-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.activity-item {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.15s;
}
.activity-item:hover { border-color: rgba(88,166,255,0.3); }

.act-icon { font-size: 1.5rem; min-width: 34px; text-align: center; }
.act-info { flex: 1; min-width: 0; }
.act-name {
  font-weight: 600;
  font-size: 0.9rem;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.act-user { font-size: 0.72rem; color: var(--accent); font-weight: 400; }
.act-meta { font-size: 0.72rem; color: var(--muted); margin-top: 2px; }
.act-notes { color: var(--muted); font-style: italic; }

.act-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.act-points { font-size: 1rem; font-weight: 700; color: var(--green); white-space: nowrap; }

/* ── Summary Bar ─────────────────────────────────────── */
.summary-bar {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  margin-bottom: 12px;
}

.summary-item { text-align: center; }
.summary-val { display: block; font-size: 1.2rem; font-weight: 800; color: var(--text); }
.summary-lbl { font-size: 0.68rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.summary-sep { width: 1px; height: 32px; background: var(--border); }

/* ── Points Preview ──────────────────────────────────── */
.points-preview {
  background: linear-gradient(135deg, rgba(88,166,255,0.1), rgba(0,212,255,0.1));
  border: 1px solid rgba(88,166,255,0.3);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.preview-label { font-size: 0.8rem; color: var(--muted); }
.preview-value { font-size: 1.3rem; font-weight: 800; color: var(--accent); }

/* ── Form Styles ─────────────────────────────────────── */
.form-group { margin-bottom: 14px; }

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

@media (max-width: 380px) {
  .form-row-2 { grid-template-columns: 1fr; }
}

.form-label-dark {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 5px;
}

.input-dark {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 10px 14px;
  font-family: var(--font);
  font-size: 0.9rem;
  transition: all 0.2s;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.input-dark:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(88,166,255,0.15);
  background: rgba(28,35,51,0.8);
}

.input-dark::placeholder { color: var(--muted); }

.input-dark option { background: var(--bg3); color: var(--text); }

.input-hint {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 4px;
  display: block;
}

/* ── Buttons ─────────────────────────────────────────── */
.btn-primary-full {
  width: 100%;
  background: linear-gradient(135deg, var(--accent), var(--ice));
  color: #000;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-primary-full:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(88,166,255,0.35); }
.btn-primary-full:active { transform: translateY(0); }

.btn-primary-sm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--accent), var(--ice));
  color: #000;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 18px;
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.btn-primary-sm:hover { opacity: 0.9; color: #000; }

.btn-delete {
  background: none;
  border: 1px solid rgba(248,81,73,0.3);
  color: var(--danger);
  border-radius: var(--radius-sm);
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s;
}
.btn-delete:hover { background: rgba(248,81,73,0.1); border-color: var(--danger); }

.btn-edit {
  background: none;
  border: 1px solid rgba(88,166,255,0.3);
  color: var(--accent);
  border-radius: var(--radius-sm);
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s;
}
.btn-edit:hover { background: rgba(88,166,255,0.1); border-color: var(--accent); }

.btn-icon-sm {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: var(--radius-sm);
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
}
.btn-edit:hover { color: var(--accent); border-color: var(--accent); }
.btn-danger { color: var(--danger) !important; border-color: rgba(248,81,73,0.3) !important; }
.btn-danger:hover { background: rgba(248,81,73,0.1) !important; }
.btn-info:hover { color: var(--ice); border-color: var(--ice); }
.btn-warning:hover { color: var(--warning); border-color: var(--warning); }
.btn-disabled { opacity: 0.3; cursor: not-allowed !important; }

/* ── Alerts ──────────────────────────────────────────── */
.alert-error {
  background: rgba(248,81,73,0.1);
  border: 1px solid rgba(248,81,73,0.3);
  color: #ff8080;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.85rem;
  display: flex; align-items: center; gap: 8px;
}
.alert-success {
  background: rgba(63,185,80,0.1);
  border: 1px solid rgba(63,185,80,0.3);
  color: var(--green);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.85rem;
  display: flex; align-items: center; gap: 8px;
}

/* ── Auth Page ───────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: radial-gradient(ellipse at top, #162032 0%, #0d1117 60%);
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px 24px;
  box-shadow: var(--shadow);
}

.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo-icon { font-size: 3rem; display: block; margin-bottom: 8px; }
.auth-logo-trophy {
  font-size: 3.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffe066, #f0a500 60%, #b76e00);
  box-shadow: 0 0 0 4px rgba(240,165,0,0.2), 0 0 24px rgba(240,165,0,0.35);
  margin-bottom: 14px;
  line-height: 1;
}
.auth-title {
  font-size: 1.8rem;
  font-weight: 800;
  background: linear-gradient(90deg, #ffe066, #f0a500);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.04em;
}
.auth-subtitle { font-size: 0.85rem; color: var(--muted); margin-top: 4px; }

.auth-form .form-group { margin-bottom: 16px; }

.auth-divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

.auth-link-text { text-align: center; font-size: 0.85rem; color: var(--muted); }
.link-accent { color: var(--accent); font-weight: 600; }
.link-accent:hover { color: var(--ice); }

/* ── Admin ───────────────────────────────────────────── */
.admin-header { margin-bottom: 16px; }
.admin-title { font-size: 1.2rem; font-weight: 800; margin-bottom: 10px; }
.admin-nav { display: flex; gap: 6px; }
.admin-tab {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.2s;
}
.admin-tab.active, .admin-tab:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
}

.sports-list, .users-list { display: flex; flex-direction: column; }

.sport-item, .user-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.sport-item:last-child, .user-item:last-child { border-bottom: none; }

.sport-icon-big { font-size: 1.6rem; min-width: 36px; text-align: center; }
.sport-info, .user-info { flex: 1; min-width: 0; }
.sport-name, .user-name { font-weight: 600; font-size: 0.9rem; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sport-meta, .user-meta { font-size: 0.72rem; color: var(--muted); margin-top: 2px; }
.sport-actions, .user-actions { display: flex; gap: 6px; flex-shrink: 0; }

.user-avatar {
  width: 42px; height: 42px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  font-weight: 800;
  flex-shrink: 0;
}

/* ── Bootstrap Modal override ────────────────────────── */
.modal-dark {
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text);
}
.modal-header-dark {
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

/* ── Error Page ──────────────────────────────────────── */
.error-page {
  text-align: center;
  padding: 60px 20px;
}
.error-icon { font-size: 4rem; margin-bottom: 12px; }
.error-title { font-size: 1.5rem; font-weight: 800; margin-bottom: 8px; }
.error-msg { color: var(--muted); margin-bottom: 20px; }

/* ── Empty State ─────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
  font-size: 0.9rem;
}
.empty-icon { font-size: 3rem; margin-bottom: 10px; }

/* ── Misc ────────────────────────────────────────────── */
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 20px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 20px; }
.d-inline { display: inline; }

/* ── Desktop tweaks (≥ 768px) ───────────────────────── */
@media (min-width: 768px) {
  .page-content { padding: 24px 20px; }
  .bottom-nav { max-width: 600px; left: 50%; transform: translateX(-50%); border-radius: var(--radius) var(--radius) 0 0; border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
  body { padding-bottom: 90px; }
}

/* ── Credentials Box (WhatsApp Share) ────────────────── */
.creds-box {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.creds-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.creds-row:last-child { border-bottom: none; }

.creds-label {
  font-size: 0.78rem;
  color: var(--muted);
  min-width: 110px;
  flex-shrink: 0;
}

.creds-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  font-family: 'Courier New', monospace;
  word-break: break-all;
}

.btn-whatsapp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #25D366;
  color: #fff !important;
  border: none;
  border-radius: var(--radius-sm);
  padding: 13px;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.btn-whatsapp:hover { background: #1ebe5a; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(37,211,102,0.35); }

.btn-copy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: var(--radius-sm);
  padding: 11px;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-copy:hover { color: var(--accent); border-color: var(--accent); }

.btn-close-modal {
  width: 100%;
  background: none;
  border: none;
  color: var(--muted);
  font-family: var(--font);
  font-size: 0.85rem;
  padding: 8px;
  cursor: pointer;
  transition: color 0.2s;
}
.btn-close-modal:hover { color: var(--text); }

.text-muted-custom { color: var(--muted); font-size: 0.88rem; }

.gap-2 { gap: 10px; }
.flex-column { flex-direction: column; }
.d-flex { display: flex; }
.p-4 { padding: 20px; }


/* ── Stats Page ────────────────────────────────────────────────────────────── */
.stab {
  flex: 1;
  background: none;
  border: none;
  color: var(--muted);
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 9px 4px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.18s;
}
.stab.active {
  background: var(--bg3);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.hidden { display: none !important; }

.stat-kpi {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 12px;
  text-align: center;
}
.stat-kpi-val {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}
.stat-kpi-lbl {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 16px;
  margin-bottom: 12px;
}
.stat-card-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}

.stat-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Vergleich */
.stat-cmp-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cmp-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.cmp-num {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
}
.cmp-num.win { color: #3fb950; }
.cmp-fav {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  word-break: break-word;
  text-align: center;
}
.cmp-lbl {
  font-size: 0.65rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 1px;
}

/* ── Bootstrap Dark Overrides ─────────────────────────────────────────────── */
.card {
  background: var(--bg2) !important;
  border: 1px solid var(--border) !important;
  border-radius: 14px !important;
  color: var(--text) !important;
}
.card-body {
  background: transparent !important;
  color: var(--text) !important;
  padding: 18px 16px !important;
}

.form-label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.alert {
  border-radius: 10px !important;
  font-size: 0.88rem;
  padding: 12px 14px !important;
  border: none !important;
  margin-bottom: 14px;
}
.alert-danger {
  background: rgba(248, 81, 73, 0.15) !important;
  color: #f85149 !important;
}
.alert-success {
  background: rgba(63, 185, 80, 0.15) !important;
  color: #3fb950 !important;
}
.alert-warning {
  background: rgba(210, 153, 34, 0.15) !important;
  color: #e3b341 !important;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--ice)) !important;
  border: none !important;
  border-radius: 10px !important;
  color: #000 !important;
  font-family: var(--font) !important;
  font-weight: 700 !important;
  padding: 13px 20px !important;
  font-size: 0.92rem !important;
  transition: all 0.2s !important;
}
.btn-primary:hover { opacity: 0.9 !important; transform: translateY(-1px) !important; }

.btn-secondary {
  background: var(--bg3) !important;
  border: 1px solid var(--border) !important;
  border-radius: 10px !important;
  color: var(--muted) !important;
  font-family: var(--font) !important;
  font-weight: 600 !important;
  padding: 13px 20px !important;
  font-size: 0.92rem !important;
  transition: all 0.2s !important;
}
.btn-secondary:hover { color: var(--text) !important; border-color: var(--accent) !important; }

.modal-content {
  background: var(--bg2) !important;
  border: 1px solid var(--border) !important;
  border-radius: 16px !important;
  color: var(--text) !important;
}
.modal-header {
  border-bottom: 1px solid var(--border) !important;
  padding: 16px 20px !important;
}
.modal-body { padding: 20px !important; }

.input-hint {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 4px;
  display: block;
}

/* ── Achievements ─────────────────────────────────────────────────────────── */
.ach-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 72px;
  padding: 8px 4px;
  border-radius: 12px;
  border: 1px solid var(--border);
  text-align: center;
  transition: all 0.2s;
  cursor: default;
}
.ach-badge.earned {
  background: rgba(88,166,255,0.08);
  border-color: rgba(88,166,255,0.35);
}
.ach-badge.locked {
  background: var(--bg3);
  opacity: 0.4;
  filter: grayscale(0.8);
}
.ach-badge.earned:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(88,166,255,0.25); }
.ach-icon { font-size: 1.6rem; line-height: 1; margin-bottom: 4px; }
.ach-name { font-size: 0.62rem; font-weight: 700; color: var(--text); line-height: 1.2; }
.ach-date { font-size: 0.55rem; color: var(--accent); margin-top: 2px; }
.ach-desc { font-size: 0.55rem; color: var(--muted); margin-top: 2px; line-height: 1.3; }

/* Achievement Toast */
.ach-toast {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #1c2d3a, #0d1f2d);
  border: 1px solid #58a6ff66;
  border-radius: 14px;
  padding: 12px 16px;
  min-width: 260px;
  max-width: 320px;
  pointer-events: none;
  box-shadow: 0 8px 30px rgba(88,166,255,0.3);
  animation: toastIn 0.5s ease forwards, toastOut 0.5s ease 4s forwards;
  opacity: 0;
}
@keyframes toastIn  { from { opacity:0; transform:translateY(-20px) scale(0.9); } to { opacity:1; transform:translateY(0) scale(1); } }
@keyframes toastOut { from { opacity:1; } to { opacity:0; transform:translateY(-10px); } }

/* ── Motivations-Karten ──────────────────────────────────────────────────── */
.motiv-achievements {
  background: linear-gradient(135deg, rgba(227,179,65,0.12), rgba(227,179,65,0.06));
  border: 1px solid rgba(227,179,65,0.35);
  border-radius: 12px;
  padding: 14px;
  animation: motivIn 0.4s ease;
}
.motiv-ach-title {
  font-weight: 800;
  font-size: 0.95rem;
  color: #e3b341;
  margin-bottom: 10px;
}
.motiv-ach-list { display: flex; flex-direction: column; gap: 8px; }
.motiv-ach-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
  padding: 8px 10px;
}
.motiv-ach-icon { font-size: 1.6rem; flex-shrink: 0; }
.motiv-ach-name { font-weight: 700; font-size: 0.88rem; color: var(--text); }
.motiv-ach-desc { font-size: 0.74rem; color: var(--muted); margin-top: 1px; }

.motiv-nudges { display: flex; flex-direction: column; gap: 7px; }
.motiv-nudge {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid;
  border-radius: 10px;
  padding: 10px 13px;
  animation: motivIn 0.4s ease;
}
.motiv-nudge-icon { font-size: 1.2rem; flex-shrink: 0; }
.motiv-nudge-text { font-size: 0.83rem; color: var(--text); line-height: 1.4; }
.motiv-nudge-text strong { color: inherit; }

@keyframes motivIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Rang-Änderungs-Karte ────────────────────────────────────────────────── */
.motiv-rank-change {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 2px solid;
  border-radius: 14px;
  padding: 14px 16px;
  animation: motivIn 0.4s ease, rankPulse 0.8s ease 0.3s;
}
.motiv-rank-medal {
  font-size: 2.2rem;
  flex-shrink: 0;
  animation: medalBounce 0.6s ease 0.2s both;
}
.motiv-rank-text {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.5;
  font-weight: 500;
}
.motiv-rank-text strong { color: #e3b341; }
@keyframes rankPulse {
  0%,100% { box-shadow: none; }
  50%      { box-shadow: 0 0 20px rgba(227,179,65,0.35); }
}
@keyframes medalBounce {
  0%   { transform: scale(0.5) rotate(-10deg); opacity: 0; }
  70%  { transform: scale(1.2) rotate(5deg); }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* ── Gruppen & Teams ─────────────────────────────────────────────────────── */
.groups-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.group-card {
  display: block; background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 14px 16px; text-decoration: none; color: var(--text);
  transition: transform 0.15s, border-color 0.15s;
}
.group-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.group-card-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.group-name { font-weight: 700; font-size: 1.05rem; }
.group-desc { font-size: 0.82rem; color: var(--muted); margin-top: 4px; }
.group-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; font-size: 0.8rem; color: var(--muted); }

.role-chip { font-size: 0.72rem; font-weight: 700; padding: 2px 9px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--border); color: var(--muted); }
.role-chip.admin { background: #e3b34120; border-color: #e3b34155; color: #e3b341; }

.code-chip { font-family: monospace; font-size: 0.8rem; letter-spacing: 2px; font-weight: 700;
  background: var(--surface); border: 1px solid var(--border); padding: 2px 8px; border-radius: 8px; }

/* ── Gruppen-Detail ──────────────────────────────────────────────────────── */
.back-link { font-size: 1.1rem; color: var(--muted); text-decoration: none; }
.back-link:hover { color: var(--accent); }

.season-bar { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 8px; scrollbar-width: none; }
.season-bar::-webkit-scrollbar { display: none; }
.season-chip { flex-shrink: 0; font-size: 0.78rem; font-weight: 600; padding: 4px 12px;
  border-radius: 20px; background: var(--surface); border: 1px solid var(--border);
  color: var(--muted); text-decoration: none; position: relative; }
.season-chip.active { background: var(--accent)22; border-color: var(--accent); color: var(--accent); }
.live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: #2ecc71; margin-left: 4px; vertical-align: middle;
  animation: livePulse 1.5s infinite; }
@keyframes livePulse { 0%,100%{opacity:1}50%{opacity:0.3} }

/* ── Team Vergleich ──────────────────────────────────────────────────────── */
.team-compare-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media(min-width:480px) { .team-compare-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); } }
.team-card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; }
.team-name { font-weight: 800; font-size: 1.05rem; margin-bottom: 4px; }
.team-pts { font-size: 1.5rem; font-weight: 800; margin: 6px 0; }
.team-bar-wrap { height: 8px; background: var(--surface); border-radius: 4px; overflow: hidden; margin: 6px 0 10px; }
.team-bar-fill { height: 100%; border-radius: 4px; transition: width 0.8s ease; }
.team-meta { font-size: 0.8rem; color: var(--muted); margin-bottom: 8px; }
.team-members-list { display: flex; flex-wrap: wrap; gap: 4px; }
.team-member-chip { font-size: 0.75rem; padding: 2px 8px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.team-member-chip.empty { color: var(--muted); }

.unassigned-box { background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 14px; margin-top: 12px; }
.unassigned-title { font-size: 0.82rem; color: var(--muted); margin-bottom: 8px; font-weight: 600; }

/* ── Verwalten-Tab ───────────────────────────────────────────────────────── */
.code-display { font-family: monospace; font-size: 2.5rem; font-weight: 900; letter-spacing: 8px;
  text-align: center; padding: 12px; background: var(--surface); border-radius: 12px;
  margin-bottom: 10px; color: var(--accent); }
.assign-row { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.assign-row:last-child { border-bottom: none; }
.assign-name { font-weight: 600; min-width: 80px; }
.team-assign-btn { font-size: 0.78rem; padding: 4px 10px; border-radius: 20px;
  background: transparent; border: 1.5px solid; cursor: pointer; font-weight: 600;
  transition: background 0.15s; }
.team-assign-btn:hover { opacity: 0.75; }
.btn-danger { width: 100%; padding: 12px; border-radius: 12px; border: none;
  background: #e74c3c22; color: #e74c3c; border: 1.5px solid #e74c3c55; font-weight: 700; cursor: pointer; }
.btn-danger:hover { background: #e74c3c33; }
.btn-danger-sm { padding: 4px 12px; border-radius: 8px; border: 1.5px solid #e74c3c55;
  background: transparent; color: #e74c3c; font-size: 0.78rem; font-weight: 700; cursor: pointer; }
.btn-danger-sm:hover { background: #e74c3c22; }
.trophy-awarded { font-size: 0.82rem; color: #f1c40f; font-weight: 700; }

/* ── Archiv ──────────────────────────────────────────────────────────────── */
.archive-row { display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid var(--border); }
.archive-row:last-child { border-bottom: none; }
.archive-name { font-weight: 700; }
.archive-dates { font-size: 0.78rem; color: var(--muted); }
.archive-winner { font-weight: 700; color: #f1c40f; }

/* ── Saison-Admin ────────────────────────────────────────────────────────── */
.active-season-banner { background: linear-gradient(135deg,#e3b34120,#e3b34108);
  border: 1.5px solid #e3b34155; border-radius: 14px; padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.active-season-name { font-weight: 700; }
.active-season-dates { font-size: 0.8rem; color: var(--muted); margin-top: 2px; }
.season-countdown { font-size: 2rem; font-weight: 900; color: var(--accent); white-space: nowrap; }
.seasons-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.season-item { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; }
.season-item.active-season { border-color: #2ecc7155; background: #2ecc7108; }
.season-item.past-season { opacity: 0.8; }
.season-item-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.season-item-name { font-weight: 700; }
.season-item-dates { font-size: 0.8rem; color: var(--muted); margin-top: 2px; }
.status-chip { font-size: 0.72rem; font-weight: 700; padding: 2px 9px; border-radius: 20px; }
.status-chip.live { background: #2ecc7120; color: #2ecc71; border: 1px solid #2ecc7155; }
.status-chip.past { background: var(--surface); color: var(--muted); border: 1px solid var(--border); }
.status-chip.future { background: #3498db20; color: #3498db; border: 1px solid #3498db55; }
.winner-row { font-size: 0.88rem; margin-top: 8px; padding: 6px 10px; background: #f1c40f15;
  border-radius: 8px; border: 1px solid #f1c40f33; }

/* ── Invite-Seite ────────────────────────────────────────────────────────── */
.invite-card { background: var(--card); border: 1px solid var(--border); border-radius: 18px;
  padding: 24px 20px; text-align: center; }
.invite-group-name { font-size: 1.3rem; font-weight: 800; margin-bottom: 16px; }
.invite-label { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
.invite-code { font-family: monospace; font-size: 3.5rem; font-weight: 900; letter-spacing: 10px;
  color: var(--accent); margin-bottom: 16px; }
.invite-divider { color: var(--muted); font-size: 0.82rem; margin: 12px 0; }
.invite-hint { font-size: 0.8rem; color: var(--muted); margin-top: 16px; line-height: 1.5; }

.btn-secondary { display: block; width: 100%; padding: 12px; border-radius: 12px;
  background: var(--surface); border: 1.5px solid var(--border); color: var(--text);
  font-weight: 700; cursor: pointer; text-align: center; text-decoration: none; }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

.pb-bottom-nav { padding-bottom: 90px; }

/* ── Fehlende Utility-Klassen für Gruppen/Saisons-Seiten ──────────────────── */

/* Wiederverwendbare Form-Inputs (dark) */
.form-input {
  width: 100%; padding: 11px 14px; border-radius: var(--radius-sm);
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text); font-size: 0.93rem; font-family: var(--font);
  outline: none; transition: border-color 0.2s;
}
.form-input:focus { border-color: var(--accent); }
.form-input::placeholder { color: var(--muted); }
.form-input option { background: var(--bg3); color: var(--text); }

/* Form row helper */
.form-row { margin-bottom: 10px; }
.form-label { font-size: 0.8rem; color: var(--muted); font-weight: 600;
  display: block; margin-bottom: 4px; }

/* Card-Panel: dunkle Karten-Box */
.card-panel {
  background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 12px;
}
.card-panel-title {
  font-weight: 700; font-size: 0.88rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px;
}

/* Alert cards */
.alert-card {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: var(--radius-sm);
  font-size: 0.88rem; font-weight: 600; margin-bottom: 12px;
}
.alert-card.success { background: #3fb95018; border: 1px solid #3fb95050; color: #3fb950; }
.alert-card.error   { background: #f8514918; border: 1px solid #f8514950; color: #f85149; }

/* Tabs */
.tab-row {
  display: flex; gap: 0; border-bottom: 1px solid var(--border);
  margin-bottom: 0; overflow-x: auto; scrollbar-width: none;
}
.tab-row::-webkit-scrollbar { display: none; }
.tab-btn {
  flex-shrink: 0; padding: 10px 16px; background: none; border: none;
  color: var(--muted); font-size: 0.85rem; font-weight: 600; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px; font-family: var(--font);
  transition: color 0.15s, border-color 0.15s;
}
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Width & spacing helpers */
.w-100 { width: 100%; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }

/* ── Gruppen-Statistik ───────────────────────────────────────────────────── */
.group-stats-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
}
.group-stat-card {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 14px; text-align: center;
}
.group-stat-icon { font-size: 1.4rem; margin-bottom: 4px; }
.group-stat-val { font-size: 1.4rem; font-weight: 800; color: var(--text); }
.group-stat-label { font-size: 0.72rem; color: var(--muted); margin-top: 2px; }

.sport-legend-list { display: flex; flex-direction: column; gap: 8px; }
.sport-legend-row { display: flex; align-items: center; gap: 8px; }
.sport-legend-icon { font-size: 1rem; width: 22px; text-align: center; flex-shrink: 0; }
.sport-legend-name { font-size: 0.82rem; min-width: 80px; color: var(--text); }
.sport-legend-bar-wrap { flex: 1; height: 6px; background: var(--surface); border-radius: 3px; overflow: hidden; }
.sport-legend-bar { height: 100%; border-radius: 3px; transition: width 0.6s ease; }
.sport-legend-mins { font-size: 0.75rem; color: var(--muted); min-width: 56px; text-align: right; }

.member-contrib-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.member-contrib-name { font-size: 0.82rem; font-weight: 600; min-width: 80px; color: var(--text); }
.member-contrib-bar-wrap { flex: 1; height: 8px; background: var(--surface); border-radius: 4px; overflow: hidden; }
.member-contrib-bar { height: 100%; border-radius: 4px; background: linear-gradient(90deg,#58a6ff,#3fb950); transition: width 0.6s ease; }
.member-contrib-val { font-size: 0.75rem; color: var(--muted); min-width: 60px; text-align: right; }

/* ═══════════════════════════════════════════════════════
   LIGHT THEME
   ═══════════════════════════════════════════════════════ */
.theme-light {
  --bg:      #f6f8fa;
  --bg2:     #ffffff;
  --bg3:     #eef1f5;
  --card:    #ffffff;
  --surface: #eef1f5;
  --border:  #d1d9e0;
  --text:    #1f2328;
  --muted:   #656d76;
  --accent:  #0969da;
  --ice:     #0550ae;
  --green:   #1a7f37;
  --gold:    #9a6700;
  --danger:  #cf222e;
  --warning: #9a6700;
  --shadow:  0 4px 24px rgba(0,0,0,0.10);
}
.theme-light .app-header {
  background: rgba(246,248,250,0.95);
}
.theme-light .bottom-nav {
  background: rgba(246,248,250,0.97);
}
.theme-light .card,
.theme-light .card-panel {
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.theme-light .leaderboard-item {
  background: var(--bg2);
  border-color: var(--border);
}
.theme-light .leaderboard-item.me {
  background: #ddf4ff;
  border-color: #0969da55;
}
.theme-light .my-stats-card {
  background: linear-gradient(135deg, #0969da15, #0550ae0a);
  border-color: #0969da33;
}
.theme-light .feed-item {
  background: var(--bg2);
  border-color: var(--border);
}
.theme-light .btn-primary {
  background: #0969da;
}
.theme-light .btn-secondary {
  background: var(--bg3);
  color: var(--text);
  border-color: var(--border);
}
.theme-light .input-dark,
.theme-light .form-input {
  background: var(--bg2);
  border-color: var(--border);
  color: var(--text);
}
.theme-light .year-chip {
  background: var(--bg3);
  color: var(--muted);
  border-color: var(--border);
}
.theme-light .year-chip.active {
  background: #0969da;
  color: #fff;
}
.theme-light .ach-badge.locked {
  background: var(--bg3);
  border-color: var(--border);
}
.theme-light .tab-btn {
  background: var(--bg3);
  color: var(--muted);
}
.theme-light .tab-btn.active {
  background: #0969da;
  color: #fff;
}
.theme-light .season-chip {
  background: var(--bg3);
  color: var(--muted);
  border-color: var(--border);
}
.theme-light .season-chip.active {
  background: #0969da;
  color: #fff;
}
.theme-light .nav-item { color: var(--muted); }
.theme-light .nav-item.active { color: var(--accent); }
.theme-light .brand { color: var(--text) !important; }
.theme-light .code-display {
  background: var(--bg3);
  color: var(--text);
}

/* Auto-Theme: folgt Systemeinstellung */
@media (prefers-color-scheme: light) {
  .theme-auto {
    --bg:      #f6f8fa;
    --bg2:     #ffffff;
    --bg3:     #eef1f5;
    --card:    #ffffff;
    --surface: #eef1f5;
    --border:  #d1d9e0;
    --text:    #1f2328;
    --muted:   #656d76;
    --accent:  #0969da;
    --ice:     #0550ae;
    --green:   #1a7f37;
    --gold:    #9a6700;
    --danger:  #cf222e;
    --warning: #9a6700;
    --shadow:  0 4px 24px rgba(0,0,0,0.10);
  }
  .theme-auto .app-header  { background: rgba(246,248,250,0.95); }
  .theme-auto .bottom-nav  { background: rgba(246,248,250,0.97); }
  .theme-auto .leaderboard-item { background: var(--bg2); border-color: var(--border); }
  .theme-auto .leaderboard-item.me { background: #ddf4ff; border-color: #0969da55; }
  .theme-auto .my-stats-card { background: linear-gradient(135deg, #0969da15, #0550ae0a); border-color: #0969da33; }
  .theme-auto .feed-item { background: var(--bg2); border-color: var(--border); }
  .theme-auto .year-chip { background: var(--bg3); color: var(--muted); border-color: var(--border); }
  .theme-auto .year-chip.active { background: #0969da; color: #fff; }
  .theme-auto .tab-btn { background: var(--bg3); color: var(--muted); }
  .theme-auto .tab-btn.active { background: #0969da; color: #fff; }
  .theme-auto .nav-item { color: var(--muted); }
  .theme-auto .nav-item.active { color: var(--accent); }
  .theme-auto .input-dark, .theme-auto .form-input { background: var(--bg2); border-color: var(--border); color: var(--text); }
}

/* ═══════════════════════════════════════════════════════
   SCHRIFTGRÖSSEN
   ═══════════════════════════════════════════════════════ */
.font-small  { font-size: 13px; }
.font-normal { font-size: 15px; }
.font-large  { font-size: 17px; }
