/* =====================================================================
   Xyntal – Weltraum- und Terminal-Ebene für alle Seiten:
   Nebel, Raster, Scanlines, Glitch, Prompt-Cursor und Hero-Planet.
   ===================================================================== */
#cosmos {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: -1;
  pointer-events: none;
}

/* Türkiser Nebel und feines Punktraster hinter allem */
body::before {
  content: "";
  position: fixed; inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(60vmax 40vmax at 12% -10%, rgba(45, 226, 206, 0.10), transparent 60%),
    radial-gradient(50vmax 35vmax at 105% 40%, rgba(14, 159, 146, 0.08), transparent 65%),
    radial-gradient(rgba(154, 166, 165, 0.10) 1px, transparent 1.2px) 0 0 / 28px 28px;
}

/* Blur über dem animierten Hintergrund müsste jedes Bild neu berechnet werden: deckende Flächen statt backdrop-filter */
.topbar, .nav { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(5, 6, 7, 0.97); }
.cmdk { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(2, 3, 4, 0.82); }
@media (max-width: 759px) {
  .demo-team { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(10, 12, 13, 0.98); }
}

/* ---------- HUD-Flächen: Karten und Panels lassen den Weltraum durchscheinen ----------
   Leicht durchsichtig statt deckend grau, türkiser Rand und eine Leuchtlinie oben links.
   Bewusst ohne backdrop-filter, damit nichts über dem animierten Hintergrund weichgezeichnet wird. */
.demo, .idea-card, .assembly-panel, .live-role, .ws-bridge,
.card, .feature, .perk, .plan, .member, .post, .listing, .event-card,
.inbox, .card-form, .join-main #register, .table-wrap, .avatar-editor, .phone-login, .event-admin {
  --hud-fill: rgba(9, 12, 13, 0.8);
  background:
    linear-gradient(90deg, rgba(45, 226, 206, 0.75), rgba(45, 226, 206, 0) 38%) top / 100% 1px no-repeat,
    linear-gradient(180deg, rgba(45, 226, 206, 0.045), rgba(45, 226, 206, 0) 140px),
    var(--hud-fill);
  border-color: rgba(45, 226, 206, 0.16);
}
.demo, .idea-card, .assembly-panel, .inbox, .card-form, .join-main #register {
  box-shadow: 0 0 0 1px rgba(45, 226, 206, 0.04), 0 0 60px -28px rgba(45, 226, 206, 0.45), 0 40px 80px -48px rgba(0, 0, 0, 0.8);
}
.card:hover, .feature:hover, .perk:hover, .plan:hover, .member:hover, .listing:hover, .live-role:hover {
  border-color: rgba(45, 226, 206, 0.38);
  box-shadow: 0 0 40px -18px rgba(45, 226, 206, 0.45);
}
/* Volle Bänder auf Unterseiten: Sterne sollen durchscheinen */
.alt { background: rgba(10, 12, 13, 0.6); border-color: rgba(45, 226, 206, 0.1); }

/* ---------- Terminal-Prompt mit blinkendem Cursor ---------- */
.prompt { white-space: nowrap; color: var(--ice, var(--accent)); font-family: "JetBrains Mono", ui-monospace, monospace; }
.caret {
  display: inline-block;
  width: 0.6em; height: 1.1em;
  margin-left: 4px;
  vertical-align: -0.2em;
  background: var(--ice, var(--accent));
  box-shadow: 0 0 10px rgba(45, 226, 206, 0.7);
  animation: caret 1.05s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }

/* ---------- Glitch für Überschriften ---------- */
.glitch { position: relative; }
.glitch::before, .glitch::after {
  content: attr(data-text);
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: 0;
}
.glitch::before { color: #2DE2CE; text-shadow: -2px 0 #2DE2CE; }
.glitch::after { color: #9AA6A5; text-shadow: 2px 0 #E4ECEB; }
@media (prefers-reduced-motion: no-preference) {
  .glitch::before { animation: glitch-a 5s infinite steps(1); }
  .glitch::after { animation: glitch-b 5s infinite steps(1); }
}
@keyframes glitch-a {
  0%, 88%, 100% { opacity: 0; transform: none; clip-path: inset(0 0 100% 0); }
  89% { opacity: 0.9; transform: translate(-4px, -1px); clip-path: inset(10% 0 62% 0); }
  91% { opacity: 0.9; transform: translate(3px, 1px); clip-path: inset(55% 0 20% 0); }
  93% { opacity: 0.9; transform: translate(-2px, 0); clip-path: inset(30% 0 45% 0); }
  95% { opacity: 0; }
}
@keyframes glitch-b {
  0%, 89%, 100% { opacity: 0; transform: none; clip-path: inset(100% 0 0 0); }
  90% { opacity: 0.8; transform: translate(4px, 1px); clip-path: inset(70% 0 5% 0); }
  92% { opacity: 0.8; transform: translate(-3px, -1px); clip-path: inset(5% 0 75% 0); }
  94% { opacity: 0; }
}

/* ---------- Leuchtende Akzente ---------- */
.btn-primary { box-shadow: 0 0 0 1px rgba(45, 226, 206, 0.5), 0 0 24px -4px rgba(45, 226, 206, 0.55); }
.btn-primary:hover { box-shadow: 0 0 0 1px rgba(45, 226, 206, 0.8), 0 0 34px -2px rgba(45, 226, 206, 0.75); }
.label-dot, .eyebrow::before { box-shadow: 0 0 12px rgba(45, 226, 206, 0.8); }
.ht-dot { text-shadow: 0 0 18px rgba(45, 226, 206, 0.9); }
.hero-kicker .prompt { margin-right: 2px; }

/* ---------- Hero: Ringplanet mit HUD und Terminal ---------- */
.hero { position: relative; isolation: isolate; }
.hero-cosmos {
  position: absolute;
  z-index: -1;
  top: -20px; right: -14vw;
  width: min(82vw, 760px);
  pointer-events: none;
  opacity: 0.5;
}
.hero-cosmos svg { display: block; width: 100%; height: auto; overflow: visible; }
@media (min-width: 720px) { .hero-cosmos { right: -6vw; width: min(64vw, 760px); opacity: 0.85; } }
@media (min-width: 1200px) { .hero-cosmos { top: -60px; right: -2vw; opacity: 1; } }

.hc-orbit { fill: none; stroke: rgba(45, 226, 206, 0.22); stroke-width: 1; stroke-dasharray: 2 6; }
.hc-ring { fill: none; stroke: url(#hc-ring-grad); }
.hc-band { fill: none; stroke: rgba(45, 226, 206, 0.16); stroke-width: 1; }
.hc-hud { fill: none; stroke: rgba(45, 226, 206, 0.55); stroke-width: 1.2; }
.hc-text { fill: rgba(154, 166, 165, 0.9); font: 500 11px "JetBrains Mono", ui-monospace, monospace; letter-spacing: 0.06em; }
.hc-text-hi { fill: #2DE2CE; }
.hc-moon { fill: #c8d6d4; }
.hc-moon-glow { fill: rgba(45, 226, 206, 0.22); }
.hc-sat { fill: #2DE2CE; }
/* Drehende Teile liegen als eigene Ebenen über dem Planeten und drehen sich nur per transform:
   die Grafikkarte verschiebt sie, ohne das große SVG neu zu malen */
.hero-cosmos > .hc-layer { position: absolute; inset: 0; width: 100%; height: 100%; }
@media (prefers-reduced-motion: no-preference) {
  .hc-spin { will-change: transform; animation: hc-spin 120s linear infinite; }
  .hc-spin-rev { will-change: transform; animation: hc-spin 40s linear infinite reverse; }
}
@keyframes hc-spin { to { transform: rotate(360deg); } }

/* Terminal-Fenster */
.hero-term {
  display: none;
  align-self: start;
  width: 100%; max-width: 420px;
  border: 1px solid rgba(45, 226, 206, 0.35);
  border-radius: 10px;
  background: rgba(5, 8, 9, 0.94);
  box-shadow: 0 0 40px -10px rgba(45, 226, 206, 0.45), 0 20px 50px rgba(0, 0, 0, 0.6);
  font: 12px/1.65 "JetBrains Mono", ui-monospace, monospace;
  color: #9AA6A5;
  overflow: hidden;
}
@media (min-width: 1100px) {
  .hero-term { display: block; grid-column: 1 / 6; grid-row: 3; }
  .hero-side { grid-row: 3 / 5; align-self: end; }
  .hero-disciplines { grid-row: 4; }
}
.hero-term-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(45, 226, 206, 0.18);
  font-size: 11px; color: #7C8988;
}
.hero-term-bar i { width: 8px; height: 8px; border-radius: 50%; background: #2A3234; }
.hero-term-bar i:first-child { background: #2DE2CE; box-shadow: 0 0 8px #2DE2CE; }
.hero-term-bar span { margin-left: auto; }
.hero-term pre { margin: 0; padding: 12px 14px 14px; white-space: pre-wrap; min-height: 9.5em; font: inherit; }
.hero-term .ok { color: #2DE2CE; }
.hero-term .cmd { color: #E4ECEB; }
