:root {
  --bg: #020617;
  --bg-soft: #02081a;
  --card: #020818;
  --accent: #3b82f6;
  --accent-soft: rgba(59,130,246,0.4);
  --accent-soft-2: rgba(56,189,248,0.2);
  --text-main: #e5e7eb;
  --text-dim: #94a3b8;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --dur-fast: 160ms;
  --dur-med: 260ms;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: radial-gradient(circle at top, #020617 0, #000 65%);
  color: var(--text-main);
  overflow: hidden;
}

/* ORBITS */
.bg-orbit {
  position: fixed;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.18;
  pointer-events: none;
  mix-blend-mode: screen;
  animation: float 22s ease-in-out infinite alternate;
}

.orbit-1 {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(59,130,246,0.7), transparent 60%);
  top: -120px;
  left: -80px;
}

.orbit-2 {
  width: 620px;
  height: 620px;
  background: radial-gradient(circle, rgba(56,189,248,0.4), transparent 65%);
  bottom: -180px;
  right: -120px;
  animation-duration: 26s;
}

@keyframes float {
  0% { transform: translate3d(0,0,0); }
  100% { transform: translate3d(40px,-20px,0); }
}

/* TOP BAR */
.top-bar {
  position: relative;
  z-index: 20;
  padding: 18px 7vw 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  gap: 24px;
}

.logo {
  font-family: "Pixellari", monospace;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* NEU: Join-by-code in der Top-Bar */
.top-join {
  flex: 1;
  max-width: 360px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(15,23,42,0.9);
  border: 1px solid rgba(51,65,85,0.9);
}

.top-join-label {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #64748b;
  white-space: nowrap;
}

.top-join-input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: #e5e7eb;
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.18em;
}

.top-join-input::placeholder {
  color: #64748b;
}

.top-join-btn {
  border: none;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(135deg,#38bdf8,#3b82f6);
  color: #020617;
  white-space: nowrap;
}

.top-join-error {
  font-size: 10px;
  color: #f97373;
  margin-left: 6px;
  white-space: nowrap;
}

.top-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.auth-links {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
}

.link-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--text-dim);
  font: inherit;
  cursor: pointer;
  position: relative;
  transition: color var(--dur-fast) ease-out;
}

.link-btn::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  height: 1px;
  width: 0;
  background: var(--accent);
  transition: width var(--dur-fast) ease-out;
}

.link-btn:hover {
  color: var(--text-main);
}

.link-btn:hover::after {
  width: 100%;
}

/* LANGUAGE SWITCH */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(15,23,42,0.85);
  border: 1px solid rgba(148,163,184,0.4);
  box-shadow: 0 0 10px rgba(15,23,42,0.9);
}

.lang-btn {
  border: none;
  background: none;
  font: inherit;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  color: #64748b;
  padding: 2px 4px;
  position: relative;
  transition: color 150ms ease-out, transform 150ms ease-out;
}

.lang-btn::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), #38bdf8);
  box-shadow: 0 0 8px rgba(56,189,248,0.65);
  transition: width 150ms ease-out, opacity 150ms ease-out;
  opacity: 0;
}

.lang-btn:hover {
  color: var(--text-main);
  transform: translateY(-1px);
}

.lang-btn:hover::after {
  width: 100%;
  opacity: 1;
}

.lang-btn.active {
  color: var(--text-main);
}

.lang-btn.active::after {
  width: 100%;
  opacity: 1;
}

.lang-sep {
  font-size: 11px;
  color: #475569;
}

/* MAIN LAYOUT: 2 Spalten (Text / Quiz) */
.center-wrap {
  position: relative;
  z-index: 5;
  padding: 40px 7vw 80px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
  height: 100vh;
}

/* HERO BLOCK */
.hero-block {
  max-width: 640px;
}

.label-row {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.pill {
  border-radius: var(--radius-pill);
  font-size: 11px;
  padding: 4px 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.pill-soft {
  background: rgba(15,23,42,0.9);
  border: 1px solid rgba(148,163,184,0.4);
}

.pill-outline {
  border: 1px solid rgba(148,163,184,0.6);
  color: var(--text-dim);
}

.hero-title {
  font-family: "Pixellari", monospace;
  font-size: 44px;
  line-height: 1.1;
  letter-spacing: 0.02em;
  margin: 0 0 18px;
}

.accent-underline {
  position: relative;
  white-space: nowrap;
}

.accent-underline::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), #38bdf8);
  box-shadow: 0 0 10px rgba(56,189,248,0.65);
  opacity: 0.8;
}

.hero-sub {
  margin: 0 0 26px;
  font-size: 14px;
  color: var(--text-dim);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

/* BUTTONS */
.btn-main {
  position: relative;
  border: none;
  border-radius: var(--radius-pill);
  padding: 12px 26px;
  font-size: 15px;
  font-weight: 600;
  color: #020617;
  background: radial-gradient(circle at 0 0, #38bdf8, var(--accent));
  cursor: pointer;
  overflow: hidden;
  box-shadow:
    0 0 25px rgba(59,130,246,0.6),
    0 14px 40px rgba(30,64,175,0.9);
  transition:
    transform var(--dur-med) cubic-bezier(0.19, 1, 0.22, 1),
    box-shadow var(--dur-med) ease-out;
}

.btn-main:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow:
    0 0 32px rgba(56,189,248,0.9),
    0 18px 50px rgba(17,24,39,1);
}

.btn-main:active {
  transform: translateY(0) scale(0.99);
  box-shadow:
    0 0 18px rgba(56,189,248,0.6),
    0 12px 30px rgba(15,23,42,1);
}

.btn-glow {
  position: absolute;
  inset: -30%;
  background:
    radial-gradient(circle at 0 0, rgba(248,250,252,0.32), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(248,250,252,0.26), transparent 60%);
  opacity: 0.75;
  mix-blend-mode: screen;
  pointer-events: none;
}

.meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-dim);
  opacity: 0.9;
}

.meta-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: radial-gradient(circle, #22c55e, #16a34a);
  box-shadow: 0 0 12px rgba(34,197,94,0.9);
}

/* SIDE CARD (Quiz rechts) */
.side-card {
  justify-self: end;
  width: 360px;
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at top, #02081b, #020617);
  border: 1px solid rgba(148,163,184,0.5);
  box-shadow:
    0 18px 60px rgba(15,23,42,0.95),
    0 0 40px rgba(37,99,235,0.32);
  backdrop-filter: blur(18px);
  padding: 18px 18px 16px;
  transform: perspective(900px) rotateY(-12deg) rotateX(5deg);
  transform-origin: center;
  transition:
    transform var(--dur-med) cubic-bezier(0.19, 1, 0.22, 1),
    box-shadow var(--dur-med) ease-out;
}

.side-card:hover {
  transform: perspective(900px) rotateY(-6deg) rotateX(2deg) translateY(-3px);
  box-shadow:
    0 22px 70px rgba(15,23,42,1),
    0 0 48px rgba(59,130,246,0.55);
}

.side-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: radial-gradient(circle, #22c55e, #15803d);
  box-shadow: 0 0 12px rgba(34,197,94,0.9);
}

.status-text {
  flex: 1;
  margin: 0 8px;
}

.code-tag {
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(148,163,184,0.55);
}

.side-body {
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(15,23,42,0.9), rgba(15,23,42,0.98));
  border: 1px solid rgba(51,65,85,0.8);
  padding: 14px 12px 12px;
}

.side-question {
  font-size: 14px;
  margin: 0 0 12px;
}

.side-answers {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: grid;
  gap: 8px;
}

.side-answers li {
  font-size: 13px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(15,23,42,0.9);
  border: 1px solid rgba(51,65,85,0.8);
  cursor: pointer;
  transition:
    border-color var(--dur-fast) ease-out,
    background var(--dur-fast) ease-out,
    transform var(--dur-fast) ease-out,
    box-shadow var(--dur-fast) ease-out;
}

.side-answers li:hover {
  border-color: var(--accent);
  box-shadow: 0 0 16px var(--accent-soft-2);
  transform: translateY(-1px);
}

.side-answers li.active {
  background: linear-gradient(135deg, rgba(59,130,246,0.32), rgba(8,47,73,0.9));
  border-color: var(--accent);
}

.side-footer {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-dim);
}

/* FOOTER FIXED */
.site-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  padding: 8px 7vw 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-dim);
  backdrop-filter: blur(10px);
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-link {
  color: var(--text-dim);
  text-decoration: none;
  position: relative;
  transition: color 140ms ease-out;
}

.footer-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 140ms ease-out;
}

.footer-link:hover {
  color: var(--text-main);
}

.footer-link:hover::after {
  width: 100%;
}

.footer-dot {
  opacity: 0.5;
}

.footer-right {
  text-align: right;
}

.footer-made {
  color: var(--text-dim);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 150ms ease-out, transform 150ms ease-out, text-shadow 150ms ease-out;
}

.footer-heart {
  color: #f97373;
  filter: drop-shadow(0 0 6px rgba(248,113,113,0.7));
}

.footer-made:hover {
  color: var(--text-main);
  transform: translateY(-1px);
  text-shadow: 0 0 12px rgba(59,130,246,0.55);
}

/* LOGIN & REGISTER MODAL */
.login-backdrop {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top, rgba(15,23,42,0.9), rgba(15,23,42,0.96));
  backdrop-filter: blur(22px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 40;
  pointer-events: none;
}

.login-backdrop.open {
  display: flex;
  pointer-events: auto;
}

.login-modal {
  position: relative;
  width: 360px;
  max-width: 90vw;
  border-radius: 24px;
  padding: 22px 22px 20px;
  background: radial-gradient(circle at top, #02081b, #020617);
  border: 1px solid rgba(148,163,184,0.7);
  box-shadow:
    0 22px 60px rgba(15,23,42,1),
    0 0 40px rgba(37,99,235,0.5);
  animation: modal-in 220ms ease-out;
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(16px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.login-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: none;
  background: none;
  color: var(--text-dim);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  padding: 2px 4px;
  transition: color 140ms ease-out, transform 140ms ease-out;
}

.login-close:hover {
  color: var(--text-main);
  transform: scale(1.08);
}

.login-title {
  margin: 4px 0 4px;
  font-family: "Pixellari", monospace;
  font-size: 26px;
}

.login-sub {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--text-dim);
}

/* Social Login */
.social-login {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.social-btn {
  width: 100%;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.7);
  background: rgba(15,23,42,0.9);
  color: var(--text-main);
  padding: 8px 12px;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition:
    background 150ms ease-out,
    border-color 150ms ease-out,
    transform 150ms ease-out,
    box-shadow 150ms ease-out;
}

.social-btn:hover {
  background: rgba(15,23,42,1);
  border-color: var(--accent);
  box-shadow: 0 0 14px var(--accent-soft-2);
  transform: translateY(-1px);
}

.social-discord {
  border-color: #5865f2;
}

.social-google {
  border-color: #ea4335;
}

.social-divider {
  text-align: center;
  font-size: 11px;
  color: var(--text-dim);
  margin: 6px 0 10px;
}

.login-form {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}

.field {
  display: grid;
  gap: 4px;
  font-size: 12px;
}

.field-label {
  color: var(--text-dim);
}

.field input {
  border-radius: 12px;
  border: 1px solid rgba(51,65,85,0.9);
  background: rgba(15,23,42,0.9);
  color: var(--text-main);
  padding: 8px 10px;
  font: inherit;
  outline: none;
  transition:
    border-color 150ms ease-out,
    box-shadow 150ms.ease-out,
    background 150ms ease-out;
}

.field input::placeholder {
  color: #64748b;
}

.field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 16px var(--accent-soft-2);
  background: rgba(15,23,42,1);
}

/* Register: Datenschutz-Checkbox */
.field-inline {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 4px;
}

.consent-checkbox {
  margin-top: 2px;
  width: 14px;
  height: 14px;
  accent-color: var(--accent);
  cursor: pointer;
}

.consent-label {
  font-size: 11px;
  color: var(--text-dim);
}

.consent-link {
  color: var(--accent);
  text-decoration: none;
  margin-left: 4px;
}

.consent-link:hover {
  text-decoration: underline;
}

.consent-error {
  min-height: 14px;
  margin: 2px 0 0;
  font-size: 11px;
  color: #f97373;
}

.field-inline.consent-error-state .consent-label {
  color: #fecaca;
}

.login-submit {
  width: 100%;
  margin-top: 4px;
  justify-content: center;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.login-meta {
  margin: 4px 0 0;
  font-size: 11px;
  color: var(--text-dim);
  opacity: 0.9;
}

/* RESPONSIVE */
@media (max-width: 960px) {
  body {
    overflow-y: auto;
  }

  .top-bar {
    flex-wrap: wrap;
    row-gap: 10px;
  }

  .top-join {
    order: 3;
    width: 100%;
    max-width: none;
  }

  .center-wrap {
    grid-template-columns: minmax(0, 1fr);
    height: auto;
    padding-bottom: 100px;
  }

  .side-card {
    justify-self: flex-start;
    width: 100%;
    max-width: 380px;
    margin-top: 16px;
    transform: perspective(900px) rotateY(0) rotateX(0);
  }

  .side-card:hover {
    transform: translateY(-2px);
  }

  .site-footer {
    padding-inline: 18px;
  }
}

@media (max-width: 600px) {
  .hero-title {
    font-size: 34px;
  }

  .top-bar {
    padding-inline: 18px;
  }

  .center-wrap {
    padding-inline: 18px;
  }
}
