/* ---------------------------------------------------------------
   Grundlagen: Farbtoken, Reset, Typografie, Layout-Hilfen
   Mobile first - alle Breakpoints erweitern nach oben.
   --------------------------------------------------------------- */

:root {
  color-scheme: dark;

  /* Flaechen */
  --bg: #0b1020;
  --bg-2: #111832;
  --surface: rgba(24, 32, 58, 0.72);
  --surface-2: rgba(32, 42, 74, 0.66);
  --surface-solid: #182038;
  --line: rgba(148, 163, 208, 0.18);
  --line-strong: rgba(148, 163, 208, 0.34);

  /* Text */
  --text: #eef2ff;
  --text-dim: #a9b3d4;
  --text-faint: #7c88ad;

  /* Akzente */
  --brand: #6366f1;
  --brand-2: #a855f7;
  --ok: #22c55e;
  --warn: #f59e0b;
  --bad: #ef4444;

  /* Kartenfarben */
  --uno-red: #e0344a;
  --uno-yellow: #f0b429;
  --uno-green: #2fa84f;
  --uno-blue: #2f7fe0;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.85);
  --shadow-lg: 0 30px 70px -30px rgba(0, 0, 0, 0.95);

  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

  /* Sichere Bereiche fuer Notch und Home-Indicator */
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);

  --tap: 44px; /* Mindestgroesse fuer Touch-Ziele */
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100dvh;
  overflow-x: hidden;
  overscroll-behavior-y: none;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.6rem, 5vw, 2.4rem); }
h2 { font-size: clamp(1.2rem, 3.6vw, 1.6rem); }
h3 { font-size: 1.05rem; }
p { margin: 0; }
a { color: inherit; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
button:disabled { cursor: not-allowed; }

ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 2px solid var(--brand-2);
  outline-offset: 2px;
}

/* Hintergrundstimmung */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(70rem 50rem at 12% -10%, rgba(99, 102, 241, 0.28), transparent 60%),
    radial-gradient(55rem 40rem at 92% 8%, rgba(168, 85, 247, 0.22), transparent 62%),
    radial-gradient(60rem 45rem at 50% 105%, rgba(14, 165, 233, 0.16), transparent 60%),
    linear-gradient(180deg, #0b1020 0%, #0a0e1c 60%, #080b16 100%);
}

.app {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* Ladebildschirm */
.boot {
  min-height: 100dvh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  color: var(--text-dim);
}
.boot__pips { display: flex; gap: 10px; }
.boot__pips span {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--pip);
  animation: bounce 1.1s ease-in-out infinite;
}
.boot__pips span:nth-child(2) { animation-delay: 0.12s; }
.boot__pips span:nth-child(3) { animation-delay: 0.24s; }
.boot__pips span:nth-child(4) { animation-delay: 0.36s; }

@keyframes bounce {
  0%, 100% { transform: translateY(0); opacity: 0.55; }
  50% { transform: translateY(-10px); opacity: 1; }
}

/* Hilfsklassen */
.stack { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; }
.gap-1 { gap: 6px; } .gap-2 { gap: 10px; } .gap-3 { gap: 16px; } .gap-4 { gap: 24px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.center { align-items: center; justify-content: center; }
.between { justify-content: space-between; }
.right { margin-left: auto; }
.muted { color: var(--text-dim); }
.faint { color: var(--text-faint); }
.small { font-size: 0.85rem; }
.tiny { font-size: 0.76rem; }
.bold { font-weight: 700; }
.mono { font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: calc(var(--safe-t) + 14px) calc(var(--safe-r) + 14px) calc(var(--safe-b) + 24px) calc(var(--safe-l) + 14px);
}

@media (min-width: 720px) {
  .shell { padding: calc(var(--safe-t) + 24px) 24px calc(var(--safe-b) + 40px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
