/* ===== MagierJo Hub — dunkles, verspieltes Theme ===== */

:root {
  --bg: #120f22;
  --text: #ece9f8;
  --muted: #a49fc0;
  --card-bg: rgba(255, 255, 255, 0.045);
  --card-border: rgba(255, 255, 255, 0.09);
  --violet: #a78bfa;
  --pink: #f472b6;
  --cyan: #67e8f9;
  --green: #4ade80;
  --amber: #fbbf24;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(124, 58, 237, 0.22), transparent 60%),
    radial-gradient(900px 500px at 10% 110%, rgba(217, 70, 239, 0.14), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ---- Hintergrund-Deko ---- */

.bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.blob {
  position: absolute;
  width: 55vmax;
  height: 55vmax;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.16;
  animation: drift 26s ease-in-out infinite alternate;
}
.blob-a { top: -25%; left: -15%; background: #7c3aed; }
.blob-b { bottom: -30%; right: -15%; background: #db2777; animation-delay: -13s; }

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(6vw, 4vh) scale(1.15); }
}

.spark {
  position: absolute;
  left: var(--x);
  top: var(--y);
  font-size: calc(1rem * var(--s, 1));
  color: var(--violet);
  opacity: 0;
  animation: twinkle 4.5s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}

@keyframes twinkle {
  0%, 100% { opacity: 0; transform: scale(0.6) rotate(0deg); }
  50%      { opacity: 0.85; transform: scale(1) rotate(25deg); }
}

/* ---- Hero ---- */

.hero {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: clamp(3.5rem, 10vh, 7rem) 1.5rem 1rem;
}

.wand {
  font-size: 2.6rem;
  display: inline-block;
  animation: wiggle 3.5s ease-in-out infinite;
}

@keyframes wiggle {
  0%, 100% { transform: rotate(-8deg); }
  50%      { transform: rotate(10deg) translateY(-4px); }
}

.wordmark {
  margin: 0.2rem 0 0;
  font-family: "Baloo 2", "Nunito", sans-serif;
  font-weight: 800;
  font-size: clamp(2.8rem, 8vw, 4.6rem);
  letter-spacing: 0.01em;
  background: linear-gradient(92deg, #c4b5fd 5%, #f0abfc 50%, #a5f3fc 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tagline {
  margin: 0.4rem 0 0;
  font-family: "Baloo 2", "Nunito", sans-serif;
  font-weight: 600;
  font-size: clamp(1.1rem, 3vw, 1.4rem);
  color: var(--text);
}

.sub {
  margin: 0.5rem auto 0;
  max-width: 34rem;
  color: var(--muted);
}

/* ---- Karten ---- */

main {
  position: relative;
  z-index: 1;
  flex: 1;
  width: 100%;
  max-width: 68rem;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16.5rem, 1fr));
  gap: 1.4rem;
}

.card {
  --accent: var(--violet);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.6rem 1.5rem 1.3rem;
  border-radius: 1.25rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(6px);
  text-decoration: none;
  color: inherit;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.card-quiz   { --accent: var(--violet); }
.card-sketch { --accent: var(--pink); }
.card-soon   { --accent: var(--cyan); }

a.card:hover, a.card:focus-visible {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  box-shadow: 0 12px 40px -12px color-mix(in srgb, var(--accent) 45%, transparent);
  outline: none;
}

a.card:focus-visible { border-color: var(--accent); }

.card-emoji {
  width: 3.4rem;
  height: 3.4rem;
  display: grid;
  place-items: center;
  font-size: 1.9rem;
  border-radius: 1rem;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}

.card h2 {
  margin: 0.2rem 0 0;
  font-family: "Baloo 2", "Nunito", sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: color-mix(in srgb, var(--accent) 70%, white);
}

.card-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.97rem;
  flex: 1;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.play {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--accent);
  transition: transform 0.22s ease;
}

a.card:hover .play { transform: translateX(4px); }

/* Coming-soon-Karte */

.card-soon {
  border-style: dashed;
  opacity: 0.75;
}

.soon-hint {
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
}

/* ---- Status-Punkt ---- */

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: #8b8798;
  flex: none;
}

.status[data-state="checking"] .dot {
  background: var(--amber);
  animation: pulse 1.2s ease-in-out infinite;
}

.status[data-state="online"] .dot {
  background: var(--green);
  box-shadow: 0 0 10px rgba(74, 222, 128, 0.75);
  animation: pulse 2.4s ease-in-out infinite;
}

.status[data-state="online"] .status-text { color: var(--green); }

.status[data-state="offline"] .dot { background: #6b6880; }

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(0.78); opacity: 0.6; }
}

/* ---- Footer ---- */

footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 1.2rem;
  color: var(--muted);
  font-size: 0.85rem;
}

footer a { color: var(--violet); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ---- Reduced Motion ---- */

@media (prefers-reduced-motion: reduce) {
  .blob, .spark, .wand,
  .status .dot { animation: none; }
  .spark { opacity: 0.5; }
  .card, .play { transition: none; }
}
