:root {
  --bg: #05060f;
  --ink: #eef1ff;
  --muted: #8d93b8;
  --accent: #8be9ff;
  --accent2: #c58bff;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans",
    "PingFang SC", "Hiragino Sans", "Microsoft YaHei", "Noto Sans CJK SC", "Apple SD Gothic Neo",
    "Noto Sans Devanagari", "Noto Sans Bengali", "Noto Naskh Arabic", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  background: radial-gradient(ellipse at 50% 120%, #10163a 0%, var(--bg) 60%) fixed, var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

#sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; }

.nebula {
  position: fixed; inset: -20%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(40% 30% at 20% 30%, rgba(197, 139, 255, .18), transparent 70%),
    radial-gradient(35% 28% at 80% 70%, rgba(139, 233, 255, .14), transparent 70%),
    radial-gradient(30% 25% at 65% 15%, rgba(255, 120, 170, .08), transparent 70%);
  filter: blur(20px);
  animation: drift 60s ease-in-out infinite alternate;
}

@keyframes drift { to { transform: translate3d(3%, -2%, 0) rotate(4deg) scale(1.05); } }

/* Saturn (saturn.svg) */
.planet {
  position: fixed; z-index: 0; pointer-events: none; user-select: none;
  width: clamp(240px, 34vw, 520px); height: auto;
  right: -7vw; top: 4vh;
  filter: drop-shadow(0 0 40px rgba(232, 200, 140, .18));
  animation: float 16s ease-in-out infinite alternate;
}

@keyframes float { to { transform: translateY(22px) rotate(3deg); } }

main {
  position: relative; z-index: 1;
  flex: 1;
  width: 100%; max-width: 1100px;
  margin: 0 auto;
  padding: 12vh 16px 48px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}

.signal {
  font-family: var(--mono); font-size: .8rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--muted);
  border: 1px solid rgba(141, 147, 184, .25);
  border-radius: 999px; padding: .45em 1.1em; margin: 0 0 2.5rem;
  background: rgba(5, 6, 15, .4);
  backdrop-filter: blur(6px);
}

.dot {
  display: inline-block; width: .55em; height: .55em; border-radius: 50%;
  background: #ff5f7a; margin-right: .7em; vertical-align: .05em;
  box-shadow: 0 0 10px #ff5f7a;
  animation: blink 2.4s ease-in-out infinite;
}

@keyframes blink { 50% { opacity: .25; } }

h1 {
  margin: 0;
  min-height: 2.3em;
  display: flex; align-items: center; justify-content: center;
  font-size: clamp(2rem, 6.5vw, 4.6rem);
  font-weight: 700; line-height: 1.1; letter-spacing: -.02em;
  background: linear-gradient(100deg, #fff 10%, var(--accent) 50%, var(--accent2) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 40px rgba(139, 233, 255, .15);
  transition: opacity .6s ease, filter .6s ease, transform .6s ease;
}

h1.out { opacity: 0; filter: blur(8px); transform: translateY(-8px) scale(.98); }

.sub {
  margin: 1rem 0 4rem;
  font-family: var(--mono); font-size: .85rem; letter-spacing: .25em; text-transform: uppercase;
  color: var(--muted);
  transition: opacity .6s ease;
}

.sub.out { opacity: 0; }

.langs {
  list-style: none; margin: 0; padding: 0; width: 100%;
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}

.langs li {
  position: relative;
  padding: 14px 16px 12px;
  border-radius: 14px;
  border: 1px solid rgba(141, 147, 184, .16);
  background: linear-gradient(160deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .01));
  backdrop-filter: blur(4px);
  font-size: 1rem; line-height: 1.4;
  text-align: start;
  color: #cfd4f2;
  transition: border-color .4s, background .4s, transform .4s, color .4s;
}

.langs li::before {
  content: attr(data-name);
  display: block; margin-bottom: 4px;
  font-family: var(--mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted);
}

.langs li:hover,
.langs li.active {
  color: #fff;
  border-color: rgba(139, 233, 255, .55);
  background: linear-gradient(160deg, rgba(139, 233, 255, .12), rgba(197, 139, 255, .06));
  transform: translateY(-2px);
}

footer {
  position: relative; z-index: 1;
  padding: 24px 16px 32px; text-align: center;
  font-family: var(--mono); font-size: .72rem; letter-spacing: .12em;
  color: rgba(141, 147, 184, .6);
}

/* nur in index-pitest.html (waehrend eines PI-Tests): Link zur Testseite */
footer a { display: inline-block; margin-top: 10px; color: var(--accent); text-decoration: none; letter-spacing: .08em; }
footer a:hover { text-decoration: underline; }

@media (max-width: 520px) {
  main { padding-top: 8vh; }
  .planet { width: 260px; top: 1vh; right: -90px; opacity: .75; }
  .langs { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .nebula, .planet, .dot { animation: none; }
  h1, .sub, .langs li { transition: none; }
}
