/* Leerlevels theme: shared look for the hub and every game.
   Use in a game:
     <link rel="preconnect" href="https://fonts.googleapis.com">
     <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
     <link href="https://fonts.googleapis.com/css2?family=Bungee&family=Nunito:wght@600;800;900&display=swap" rel="stylesheet">
     <link rel="stylesheet" href="../../shared/theme.css">
   Optional: <div class="ll-stars" aria-hidden="true"></div> as the first child of <body> for the starfield.
   Classes: .ll-title .ll-heading .ll-panel .ll-card .ll-btn (.ll-btn--ghost) .ll-pill .ll-bar>span .ll-back
   A game may set its own accent: body { --ll-accent: #ffd23f; } */

:root {
  --ll-bg: #120a2e; --ll-bg2: #24105a; --ll-fg: #ffffff; --ll-muted: #c9c3ef;
  --ll-yellow: #ffd23f; --ll-pink: #ff4fa3; --ll-cyan: #3ee6ff; --ll-lime: #8cff5a;
  --ll-card: #1d1247; --ll-accent: var(--ll-yellow);
  --ll-font: Nunito, system-ui, sans-serif;
  --ll-display: Bungee, Impact, sans-serif;
  --ll-radius: 22px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh; overflow-x: hidden;
  font-family: var(--ll-font); font-weight: 800; color: var(--ll-fg);
  background: radial-gradient(ellipse at 20% 0%, #3b1a8f 0%, transparent 55%),
              radial-gradient(ellipse at 90% 30%, #6a1466 0%, transparent 50%),
              linear-gradient(180deg, var(--ll-bg2), var(--ll-bg) 60%);
  background-color: var(--ll-bg);
}
a { color: var(--ll-cyan); }
:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

/* starfield */
.ll-stars, .ll-stars::after {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    radial-gradient(2px 2px at 10% 20%, #fff8 50%, transparent 51%),
    radial-gradient(2px 2px at 30% 70%, #fff6 50%, transparent 51%),
    radial-gradient(3px 3px at 55% 35%, #fffa 50%, transparent 51%),
    radial-gradient(2px 2px at 75% 80%, #fff7 50%, transparent 51%),
    radial-gradient(2px 2px at 85% 15%, #fff9 50%, transparent 51%),
    radial-gradient(3px 3px at 45% 90%, #fff5 50%, transparent 51%);
  background-size: 400px 400px;
  animation: ll-drift 60s linear infinite;
}
.ll-stars::after { content: ""; background-size: 260px 260px; animation-duration: 35s; opacity: .6; }
@keyframes ll-drift { to { background-position: 0 400px; } }

/* typography */
.ll-title {
  font-family: var(--ll-display); font-weight: 400; line-height: 1;
  font-size: clamp(2rem, 8vw, 4rem); margin: 12px 0 8px; overflow-wrap: anywhere;
  background: linear-gradient(90deg, var(--ll-yellow), var(--ll-pink), var(--ll-cyan), var(--ll-yellow));
  background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: ll-shimmer 8s linear infinite;
  filter: drop-shadow(0 4px 0 #0008);
}
@keyframes ll-shimmer { to { background-position: 300% 0; } }
.ll-heading { font-family: var(--ll-display); font-weight: 400; font-size: 1.5rem; margin: 0 0 16px; }
.ll-muted { color: var(--ll-muted); }

/* surfaces */
.ll-panel {
  background: #ffffff10; border: 2px solid #ffffff25; border-radius: 20px;
  padding: 16px 20px; backdrop-filter: blur(6px);
}
.ll-card {
  --c: var(--ll-accent);
  background: var(--ll-card); color: var(--ll-fg);
  border: 3px solid var(--c); border-radius: var(--ll-radius); padding: 20px;
  box-shadow: 0 8px 0 0 color-mix(in srgb, var(--c) 55%, #000);
}
.ll-pill {
  display: inline-block; background: var(--ll-accent); color: var(--ll-bg);
  padding: 3px 10px; border-radius: 999px; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em;
}

/* buttons */
.ll-btn {
  display: inline-block; font-family: var(--ll-display); font-weight: 400; font-size: 1rem;
  padding: 10px 18px; border-radius: 14px; border: 0; cursor: pointer; text-decoration: none;
  background: var(--ll-accent); color: var(--ll-bg);
  box-shadow: 0 5px 0 color-mix(in srgb, var(--ll-accent) 55%, #000);
  transition: transform .15s ease, box-shadow .15s ease;
}
.ll-btn:hover { transform: translateY(-2px); box-shadow: 0 7px 0 color-mix(in srgb, var(--ll-accent) 55%, #000); }
.ll-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 color-mix(in srgb, var(--ll-accent) 55%, #000); }
.ll-btn--ghost { background: transparent; color: var(--ll-muted); border: 2px solid #ffffff40; box-shadow: none; }
.ll-btn--ghost:hover, .ll-btn--ghost:active { box-shadow: none; }

/* progress bar: <div class="ll-bar" role="progressbar" ...><span style="width:40%"></span></div> */
.ll-bar { height: 16px; background: #0006; border-radius: 999px; overflow: hidden; border: 2px solid #ffffff30; }
.ll-bar > span { display: block; height: 100%; border-radius: 999px;
                 background: linear-gradient(90deg, var(--ll-lime), var(--ll-cyan)); transition: width .8s ease; }

/* back link to the hub: <a class="ll-back" href="../../">← Alle werelden</a> */
.ll-back { display: inline-block; color: var(--ll-muted); text-decoration: none; font-size: .95rem; padding: 6px 0; }
.ll-back:hover, .ll-back:focus-visible { color: var(--ll-fg); text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
