* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100vh; }
html { background: #000; transition: background 0.4s ease; }
html[data-auth-theme="light"] { background: #fef4e6; }

body.galaxy-page {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #fff;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: color 0.4s ease;
}
html[data-auth-theme="light"] body.galaxy-page { color: #2a1a08; }

#galaxy {
  position: fixed; inset: 0;
  width: 100vw; height: 100vh;
  z-index: 0;
  display: block;
  pointer-events: none;
}

.auth-stage {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px 40px;
}

.brand-floating {
  position: fixed; top: 28px; left: 32px;
  display: inline-flex; align-items: center; gap: 10px;
  color: white; font-weight: 700; font-size: 17px;
  text-decoration: none; z-index: 5;
  letter-spacing: -0.01em;
  text-shadow: 0 0 24px rgba(255,200,140,0.4), 0 2px 12px rgba(0,0,0,0.8);
  opacity: 0.9;
  transition: color 0.4s, text-shadow 0.4s;
}
html[data-auth-theme="light"] .brand-floating {
  color: #2a1a08;
  text-shadow: 0 0 24px rgba(255,255,255,0.8), 0 2px 8px rgba(255,200,140,0.4);
}

.theme-toggle {
  position: fixed; top: 24px; right: 28px; z-index: 5;
  width: 42px; height: 42px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  color: white;
  cursor: pointer;
  font-size: 18px;
  backdrop-filter: blur(12px);
  transition: all .3s cubic-bezier(.25,1,.5,1);
}
.theme-toggle:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,138,0,0.4);
  transform: rotate(15deg);
}
.theme-toggle .icon { transition: transform .4s; }
html[data-auth-theme="light"] .theme-toggle {
  background: rgba(255,200,140,0.20);
  border-color: rgba(255,138,0,0.30);
  color: #2a1a08;
  box-shadow: 0 4px 16px rgba(255,138,0,0.18);
}
.brand-mark {
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #ff8a00 0%, #ff6a00 100%);
  color: white; border-radius: 9px; font-weight: 800;
  box-shadow:
    0 0 24px rgba(255,138,0,0.5),
    0 0 60px rgba(255,138,0,0.25),
    inset 0 1px 0 rgba(255,255,255,0.3);
}

/* Form schwebt ohne Card — die Galaxie ist der Container */
.auth-anchor {
  width: 100%;
  max-width: 440px;
  position: relative;
  animation: rise 1.0s cubic-bezier(.25,1,.5,1);
}
.auth-anchor.wide { max-width: 500px; }

@keyframes rise {
  from { opacity: 0; transform: translateY(28px) scale(.96); }
  to   { opacity: 1; transform: none; }
}

/* Aurora-Halo direkt hinter den Feldern — verschmilzt mit Canvas-Nebel */
.auth-anchor::before {
  content: '';
  position: absolute;
  inset: -80px -120px;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255,140,80,0.10), transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(120,80,200,0.10), transparent 55%),
    radial-gradient(ellipse at 50% 50%, rgba(255,255,255,0.03), transparent 70%);
  filter: blur(20px);
  z-index: -1;
  pointer-events: none;
}

.auth-tabs {
  display: inline-flex; gap: 0;
  margin: 0 auto 30px;
  width: 100%;
  justify-content: center;
}
.auth-tabs a {
  flex: 0 0 auto;
  padding: 8px 18px;
  font-size: 13px; font-weight: 600;
  color: rgba(255,255,255,0.45);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all .22s;
  letter-spacing: 0.02em;
}
.auth-tabs a + a { margin-left: 6px; }
.auth-tabs a:hover { color: rgba(255,255,255,0.85); }
.auth-tabs a.active {
  color: white;
  border-bottom-color: #ff8a00;
  text-shadow: 0 0 18px rgba(255,138,0,0.5);
}
html[data-auth-theme="light"] .auth-tabs a { color: rgba(80,40,10,0.50); }
html[data-auth-theme="light"] .auth-tabs a:hover { color: rgba(60,30,8,0.95); }
html[data-auth-theme="light"] .auth-tabs a.active {
  color: #2a1a08;
  text-shadow: 0 0 18px rgba(255,138,0,0.5);
}

h1.auth-title {
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 8px;
  text-align: center;
  background: linear-gradient(180deg, #ffffff 0%, #d8d4f0 60%, #b8b0d8 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
html[data-auth-theme="light"] h1.auth-title {
  background: linear-gradient(180deg, #3a1f08 0%, #6a3a14 60%, #8a4a18 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.auth-subtitle {
  color: rgba(255,255,255,0.55);
  font-size: 14px;
  text-align: center;
  margin: 0 0 32px;
  font-weight: 400;
}
html[data-auth-theme="light"] .auth-subtitle { color: rgba(80,40,10,0.62); }

.perk-row {
  display: flex; gap: 8px; flex-wrap: wrap; justify-content: center;
  margin: 0 0 28px;
}

/* Felder: kein Card-Background, jedes Feld leuchtet einzeln */
label {
  display: block;
  margin-bottom: 16px;
  position: relative;
}
label > span {
  display: block;
  font-size: 11px;
  color: rgba(255,255,255,0.55);
  margin-bottom: 6px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.4s;
}
html[data-auth-theme="light"] label > span { color: rgba(80,40,10,0.55); }

input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(20,20,40,0.35);
  border: 1px solid rgba(255,255,255,0.10);
  color: white;
  font-family: inherit;
  font-size: 15px;
  transition: all .25s cubic-bezier(.25,1,.5,1);
  backdrop-filter: blur(12px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 4px 24px rgba(0,0,0,0.4);
}
input::placeholder { color: rgba(255,255,255,0.25); }
input:hover {
  border-color: rgba(255,255,255,0.20);
  background: rgba(30,25,55,0.45);
}
input:focus {
  outline: none;
  background: rgba(40,30,70,0.5);
  border-color: rgba(255,138,0,0.55);
  box-shadow:
    0 0 0 3px rgba(255,138,0,0.12),
    0 0 32px rgba(255,138,0,0.25),
    inset 0 1px 0 rgba(255,255,255,0.1);
}

html[data-auth-theme="light"] input {
  background: rgba(255,255,255,0.55);
  border-color: rgba(180,120,60,0.20);
  color: #2a1a08;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.8),
    0 4px 18px rgba(255,180,100,0.15);
}
html[data-auth-theme="light"] input::placeholder { color: rgba(80,40,10,0.30); }
html[data-auth-theme="light"] input:hover {
  background: rgba(255,255,255,0.75);
  border-color: rgba(180,120,60,0.35);
}
html[data-auth-theme="light"] input:focus {
  background: rgba(255,255,255,0.95);
  border-color: rgba(255,138,0,0.70);
  box-shadow:
    0 0 0 3px rgba(255,138,0,0.18),
    0 0 32px rgba(255,138,0,0.30),
    inset 0 1px 0 rgba(255,255,255,0.9);
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* Button als leuchtende Sphäre */
.btn-cosmic {
  width: 100%;
  margin-top: 16px;
  padding: 16px 22px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #ff8a00 0%, #ff6a00 70%, #e85a00 100%);
  color: white;
  font-family: inherit;
  font-size: 15px; font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 12px;
  transition: all .25s cubic-bezier(.25,1,.5,1);
  position: relative;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255,160,80,0.5),
    0 8px 24px rgba(255,138,0,0.35),
    0 0 60px rgba(255,138,0,0.25),
    inset 0 1px 0 rgba(255,255,255,0.3);
}
.btn-cosmic::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% -50%, rgba(255,255,255,0.4), transparent 60%);
  pointer-events: none;
}
.btn-cosmic:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px rgba(255,180,100,0.7),
    0 14px 36px rgba(255,138,0,0.5),
    0 0 80px rgba(255,138,0,0.45),
    inset 0 1px 0 rgba(255,255,255,0.35);
  filter: brightness(1.08);
}
.btn-cosmic:active { transform: translateY(0); }
.btn-cosmic svg { transition: transform .25s; }
.btn-cosmic:hover svg { transform: translateX(4px); }

.error {
  margin-top: 16px;
  padding: 11px 14px;
  background: rgba(248,113,113,0.10);
  border: 1px solid rgba(248,113,113,0.35);
  border-radius: 10px;
  color: #fca5a5;
  font-size: 13px;
  backdrop-filter: blur(8px);
}

.auth-foot {
  margin: 26px 0 0;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  text-align: center;
  transition: color 0.4s;
}
html[data-auth-theme="light"] .auth-foot { color: rgba(80,40,10,0.55); }
.auth-foot a {
  color: #ffb160;
  text-decoration: none;
  font-weight: 600;
  transition: all .2s;
}
.auth-foot a:hover {
  color: #ffd49a;
  text-shadow: 0 0 18px rgba(255,138,0,0.6);
}

/* Body-Glow am unteren Rand für extra Atmosphäre */
body.galaxy-page::after {
  content: '';
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 120px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.6));
  z-index: 1;
  pointer-events: none;
  transition: background 0.4s ease;
}
html[data-auth-theme="light"] body.galaxy-page::after {
  background: linear-gradient(180deg, transparent, rgba(255,200,140,0.3));
}

.perk {
  padding: 5px 13px;
  background: rgba(255,138,0,0.08);
  border: 1px solid rgba(255,138,0,0.25);
  border-radius: 100px;
  font-size: 11.5px; font-weight: 600;
  color: #ffb160;
  letter-spacing: 0.02em;
  backdrop-filter: blur(8px);
}
html[data-auth-theme="light"] .perk {
  background: rgba(255,138,0,0.10);
  border-color: rgba(255,138,0,0.40);
  color: #b85a00;
}

@media (max-width: 500px) {
  .auth-stage { padding: 60px 18px 30px; }
  h1.auth-title { font-size: 28px; }
  .brand-floating { top: 20px; left: 20px; font-size: 15px; }
  .form-row-2 { grid-template-columns: 1fr; }
  .auth-anchor::before { inset: -40px -60px; }
}
