/* ============================================================
   Sportstech App-Token-Layer
   ============================================================
   Kopiere den Inhalt in die globals.css der App. Wenn Tailwind
   im Einsatz ist, danach `@import "tailwindcss";` einfuegen.
   Token-Namen sind der Standard fuer alle internen Apps —
   nicht umbenennen, nur ergaenzen.
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Archivo:ital,wdth,wght@0,100..125,400..900;1,100..125,400..900&family=Inter:ital,opsz,wght@0,14..32,300..700;1,14..32,300..700&display=swap');

/* ── Sportstech Design Tokens (Knowledge Base parity) ─────── */
:root {
  /* Brand */
  --red:        #E4002B;
  --red-hi:     #FF1A40;
  --red-dim:    rgba(228, 0, 43, 0.10);
  --red-faint:  rgba(228, 0, 43, 0.05);
  --grad-primary: linear-gradient(135deg, #E4002B 0%, #C84B30 100%);
  --grad-subtle:  linear-gradient(135deg, rgba(228,0,43,0.10) 0%, rgba(200,75,48,0.06) 100%);
  --shadow-red: 0 4px 16px rgba(228, 0, 43, 0.22), 0 1px 4px rgba(228, 0, 43, 0.14);

  /* Surfaces — light Sportstech */
  --bg:    #E7E3D8;   /* warm beige — page background (KB body) */
  --bg-2:  #FFFFFF;   /* cards */
  --bg-3:  #F6F4EE;   /* off-white — elevated / inset */
  --bg-4:  #DDD9CE;   /* deeper inset */
  --bg-5:  #D1CCBD;   /* warm-grey */
  --off-white: #F6F4EE;

  /* Text */
  --t1:  #25282A;
  --t2:  #4A4D4F;
  --t3:  #85888A;
  --t4:  rgba(37, 40, 42, 0.35);

  /* Borders */
  --sep:   rgba(37, 40, 42, 0.10);
  --sep-2: rgba(37, 40, 42, 0.20);

  /* Status */
  --green:     #1A7F4B;
  --green-dim: rgba(26, 127, 75, 0.10);
  --coral:     #C84B30;

  /* Aliases */
  --accent:       var(--red);
  --accent-dim:   var(--red-dim);
  --accent-faint: var(--red-faint);

  /* Nav */
  --nav-h:  80px;
  --top-h:  52px;

  /* Fonts — Sportstech standard */
  --font-display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --font-body:    'Inter', 'Helvetica Neue', Arial, sans-serif;

  /* Radii */
  --r-sm: 4px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;

  /* Motion */
  --ease-out:    cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-cinema: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 120ms;
  --dur-base: 200ms;
  --dur-slow: 360ms;

  /* Shadows — light theme */
  --shadow-sm:   0 1px 3px rgba(37, 40, 42, 0.08);
  --shadow-card: 0 2px 16px rgba(37, 40, 42, 0.08);
  --shadow-md:   0 8px 28px rgba(37, 40, 42, 0.12);
}

/* ── Base ─────────────────────────────────────────────────── */
* { -webkit-tap-highlight-color: transparent; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--t1);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Kein horizontaler Seiten-Scroll: verhindert, dass ein überstehendes
     Element einen leeren Streifen rechts (Seiten-Hintergrund) sichtbar macht. */
  overflow-x: hidden;
}

/* ── Typography ───────────────────────────────────────────── */
.st-display {
  font-family: var(--font-display);
  font-weight: 700;
  font-stretch: 112%;
  letter-spacing: -0.01em;
}
.st-label {
  font-family: var(--font-display);
  font-weight: 600;
  font-stretch: 112%;
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

/* ── Nav — light glass ────────────────────────────────────── */
.nav-glass {
  background: rgba(246, 244, 238, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--sep);
}
.nav-sidebar {
  background: var(--off-white);
  border-right: 1px solid var(--sep);
}
.nav-indicator { background: var(--red-dim); border-radius: var(--r-md); border: 1px solid rgba(228,0,43,0.15); }
.nav-item-active { background: var(--red-dim); border-radius: var(--r-md); }

/* ── Card / Glass — light ─────────────────────────────────── */
.glass {
  background: rgba(255,255,255,0.80);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--sep);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  position: relative;
}
.glass::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(160deg, rgba(255,255,255,0.5) 0%, transparent 50%);
  pointer-events: none;
  z-index: 1;
}

.glass-card {
  background: #FFFFFF;
  border: 1px solid var(--sep);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  position: relative;
  transition: box-shadow 0.22s var(--ease-out), transform 0.22s var(--ease-out), border-color 0.22s var(--ease-out);
}
/* Interactive cards (links/buttons) get a subtle lift on hover */
a.glass-card:hover, button.glass-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: rgba(228,0,43,0.18);
}
.glass-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 40%;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.6) 0%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}

.glass-red {
  background: var(--red-faint);
  border: 1px solid rgba(228,0,43,0.15);
  box-shadow: 0 2px 12px rgba(228,0,43,0.08);
  overflow: hidden;
  position: relative;
}

.btn-glass {
  position: relative;
  background: var(--grad-primary);
  border: none;
  box-shadow: var(--shadow-red);
  overflow: hidden;
  color: #fff;
}
.btn-glass::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,0.15) 0%, transparent 100%);
  pointer-events: none;
}

/* ── Animations ───────────────────────────────────────────── */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes scale-in {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes xp-bounce {
  0%,100% { transform: scale(1); }
  40%     { transform: scale(1.28); }
}

.animate-fade-up  { animation: fade-up  0.36s var(--ease-cinema) both; }
.animate-scale-in { animation: scale-in 0.24s var(--ease-cinema) both; }
.animate-xp-pop   { animation: xp-bounce 0.45s cubic-bezier(0.34,1.56,0.64,1); }
.animate-slide-up { animation: fade-up  0.28s var(--ease-cinema) both; }

/* ── Progress ─────────────────────────────────────────────── */
.progress-bar { transition: width 0.6s cubic-bezier(0.4,0,0.2,1); }

/* ── Layout ───────────────────────────────────────────────── */
/* Top-bar navigation is sticky & in-flow, so content needs no offset. */
.page-content { }

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-5); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--bg-4); }

/* ── Pressable ────────────────────────────────────────────── */
.pressable { transition: opacity var(--dur-fast), transform var(--dur-fast); cursor: pointer; }
.pressable:active { opacity: 0.65; transform: scale(0.97); }

/* ── Chip ─────────────────────────────────────────────────── */
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(255,255,255,0.6);
  font-size: 12px; color: var(--t2);
  font-family: var(--font-body); font-weight: 500;
  border: 1px solid var(--sep);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.chip:hover { background: #fff; border-color: var(--sep-2); color: var(--t1); }
