/**
 * Streamovo Login / Register — UI passend zur Landing (landing.css zuerst laden).
 * Alle Regeln unter .page-auth, damit nichts global kollidiert.
 */

.page-auth .auth-main {
  position: relative;
  z-index: 1;
  padding: clamp(1.5rem, 5vw, 2.5rem) 0 clamp(2.5rem, 6vw, 4rem);
}

.page-auth .auth-main.container {
  width: min(var(--max, 1200px), 92vw);
  margin: 0 auto;
  padding-left: clamp(1rem, 4vw, 1.5rem);
  padding-right: clamp(1rem, 4vw, 1.5rem);
}

.page-auth .auth-shell {
  width: min(520px, 100%);
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg, 20px);
  background: linear-gradient(165deg, var(--bg-card, #161022) 0%, var(--bg-card-elevated, #1a1628) 100%);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(139, 92, 246, 0.12) inset;
  padding: clamp(1.25rem, 4vw, 1.85rem);
}

.page-auth .auth-tabs {
  display: inline-flex;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-pill, 999px);
  overflow: hidden;
  margin: 0 auto 1.25rem;
  width: fit-content;
  background: rgba(255, 255, 255, 0.04);
}

.page-auth .auth-tabs-centered {
  display: flex;
  justify-content: center;
}

.page-auth .auth-tab {
  font-family: var(--font-body, system-ui);
  text-decoration: none;
  color: var(--text-muted, #9ca3af);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.5rem 1.1rem;
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.page-auth .auth-tab:hover {
  color: rgba(255, 255, 255, 0.9);
}

.page-auth .auth-tab.active {
  color: #fff;
  background: var(--gradient-cta, linear-gradient(90deg, #8b5cf6, #ec4899, #f97316));
}

.page-auth .auth-forms-window {
  position: relative;
  width: 100%;
}

.page-auth .auth-forms-track {
  width: 100%;
  position: relative;
  min-height: 32rem;
}

.page-auth .auth-pane {
  position: absolute;
  inset: 0;
  width: 100%;
  padding-right: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(14px);
  transition: opacity 0.28s ease, transform 0.32s ease, visibility 0.28s ease;
}

.page-auth .auth-shell.is-login #loginPane {
  position: relative;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
}

.page-auth .auth-shell.is-register #registerPane {
  position: relative;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
}

.page-auth .auth-shell.is-register #loginPane {
  transform: translateX(-14px);
}

.page-auth .auth-pane h1,
.page-auth .auth-shell--forgot > h1 {
  font-family: var(--font-display, Impact, sans-serif);
  font-size: clamp(1.85rem, 4vw, 2.35rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 0.5rem;
  line-height: 1.1;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.page-auth .auth-forgot-links {
  margin-top: 1.15rem;
  text-align: center;
}

.page-auth .auth-forgot-links a {
  font-size: 0.9rem;
}

.page-auth .auth-sub {
  margin: 0 0 1.35rem;
  color: var(--text-muted, #9ca3af);
  font-size: 0.95rem;
  line-height: 1.55;
}

.page-auth .auth-group {
  margin-bottom: 1rem;
}

.page-auth .auth-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
}

.page-auth .auth-shell input[type="text"],
.page-auth .auth-shell input[type="email"],
.page-auth .auth-shell input[type="password"] {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text, #fff);
  padding: 0.75rem 0.9rem;
  outline: 0;
  font: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.page-auth .input-wrap input {
  padding-right: 3rem;
}

.page-auth .auth-shell input:focus {
  border-color: rgba(139, 92, 246, 0.65);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.page-auth .input-wrap {
  position: relative;
}

.page-auth .toggle-password {
  position: absolute;
  top: 50%;
  right: 0.5rem;
  transform: translateY(-50%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.75);
  border-radius: 10px;
  padding: 0.35rem 0.5rem;
  cursor: pointer;
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.page-auth .toggle-password:hover {
  color: #fff;
  border-color: rgba(236, 72, 153, 0.35);
}

.page-auth .auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin: 0.65rem 0 1rem;
  color: var(--text-muted, #9ca3af);
  font-size: 0.88rem;
}

.page-auth .auth-row a {
  color: #e9d5ff;
  text-decoration: none;
  font-weight: 600;
}

.page-auth .auth-row a:hover {
  color: #fff;
}

.page-auth .auth-row-design {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0.65rem 0.85rem;
}

.page-auth .check-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.88);
  cursor: pointer;
}

.page-auth .check-pill input {
  width: 1rem;
  height: 1rem;
  accent-color: #a855f7;
}

.page-auth .auth-submit,
.page-auth .passkey-btn {
  width: 100%;
  border-radius: var(--radius-pill, 999px);
  padding: 0.85rem 1.25rem;
  font-family: var(--font-body, system-ui);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
}

.page-auth .auth-submit {
  border: none;
  color: #fff;
  background: var(--gradient-cta, linear-gradient(90deg, #8b5cf6, #ec4899, #f97316));
  box-shadow: 0 4px 24px rgba(139, 92, 246, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.page-auth .auth-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 32px rgba(236, 72, 153, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.page-auth .passkey-btn {
  margin-top: 0.65rem;
  color: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
}

.page-auth .passkey-btn:hover {
  border-color: rgba(236, 72, 153, 0.35);
  background: rgba(255, 255, 255, 0.1);
}

.page-auth .passkey-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.page-auth .divider {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text-muted, #9ca3af);
  font-size: 0.82rem;
  margin: 1rem 0 0.35rem;
}

.page-auth .divider::before,
.page-auth .divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: rgba(255, 255, 255, 0.1);
}

.page-auth .text-link {
  border: 0;
  background: transparent;
  color: #e9d5ff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.page-auth .text-link:hover {
  color: #fff;
}

.page-auth .auth-hint {
  margin-top: 1rem;
  color: var(--text-muted, #9ca3af);
  font-size: 0.9rem;
  line-height: 1.5;
}

.page-auth .turnstile-wrap {
  margin: 1rem 0 0;
  display: flex;
  justify-content: center;
}

.page-auth .turnstile-wrap .cf-turnstile {
  margin: 0 auto;
}

.page-auth .password-meter {
  margin-top: 0.5rem;
}

.page-auth .password-rules {
  margin-top: 0;
  display: grid;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--text-muted, #9ca3af);
  max-height: 0;
  opacity: 0;
  transform: translateY(-6px);
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.28s ease, transform 0.28s ease, margin-top 0.28s ease;
}

.page-auth .password-rules.is-visible {
  margin-top: 0.5rem;
  max-height: 200px;
  opacity: 1;
  transform: translateY(0);
}

.page-auth .password-rules div {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.page-auth .password-rules div.is-valid {
  color: #6ee7b7;
}

.page-auth .password-rules div.is-valid i::before {
  content: "\f058";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
}

.page-auth .password-meter-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.page-auth .password-meter-bar i {
  display: block;
  height: 100%;
  width: 0;
  transition: width 0.25s ease, background 0.25s ease;
}

.page-auth .password-meter-text,
.page-auth .password-match-text,
.page-auth .password-breach-text {
  margin-top: 0.4rem;
  font-size: 0.82rem;
  color: var(--text-muted, #9ca3af);
}

.page-auth .password-meter-text.is-weak,
.page-auth .password-match-text.is-invalid {
  color: #f87171;
}

.page-auth .password-meter-text.is-medium {
  color: #fbbf24;
}

.page-auth .password-meter-text.is-strong,
.page-auth .password-match-text.is-valid {
  color: #6ee7b7;
}

.page-auth .password-breach-text.is-checking {
  color: #fbbf24;
}

.page-auth .password-breach-text.is-valid {
  color: #6ee7b7;
}

.page-auth .password-breach-text.is-invalid {
  color: #f87171;
}

.page-auth .field-error {
  min-height: 1.1rem;
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: #f87171;
}

.page-auth .alert {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  line-height: 1.45;
  border: 1px solid transparent;
}

.page-auth .alert-danger {
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.35);
  color: #fecaca;
}

.page-auth .alert-success {
  background: rgba(52, 211, 153, 0.12);
  border-color: rgba(52, 211, 153, 0.35);
  color: #a7f3d0;
}

.page-auth .alert-warning {
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.35);
  color: #fde68a;
}

.page-auth .alert-info {
  background: rgba(139, 92, 246, 0.12);
  border-color: rgba(167, 139, 250, 0.35);
  color: #ddd6fe;
}

.page-auth .alert p {
  margin: 0.5em 0 0;
}

.page-auth .alert p:first-child {
  margin-top: 0;
}

.page-auth .mt-2 {
  margin-top: 0.5rem;
}

.page-auth .auth-disabled-box {
  margin-top: 0.5rem;
  padding: 1.25rem 1rem;
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: var(--radius-lg, 20px);
  background: rgba(251, 191, 36, 0.08);
  text-align: center;
}

.page-auth .auth-disabled-icon {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 0.65rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(251, 191, 36, 0.15);
  color: #fcd34d;
}

.page-auth .auth-disabled-title {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-family: var(--font-body);
  font-weight: 700;
  color: #fef3c7;
}

.page-auth .auth-disabled-text {
  margin: 0 0 0.35rem;
  color: #fde68a;
  font-size: 0.92rem;
}

.page-auth .auth-disabled-hint {
  margin: 0;
  color: var(--text-muted, #9ca3af);
  font-size: 0.88rem;
}

/* Register-only: klassisches Formular (POST register.php) */
.page-auth .auth-register-standalone .auth-shell {
  max-width: 520px;
}

.page-auth .auth-register-standalone .form-group {
  margin-bottom: 1rem;
}

.page-auth .auth-register-standalone .form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
}

.page-auth .auth-register-standalone .form-control {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text, #fff);
  padding: 0.75rem 0.9rem;
  font: inherit;
}

.page-auth .auth-register-standalone .form-control:focus {
  border-color: rgba(139, 92, 246, 0.65);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
  outline: none;
}

.page-auth .auth-register-standalone .form-text {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: var(--text-muted, #9ca3af);
  line-height: 1.4;
}

.page-auth .auth-register-standalone .form-actions {
  margin-top: 1.25rem;
}

.page-auth .auth-register-standalone .btn-primary,
.page-auth .auth-register-standalone .btn-block {
  width: 100%;
  border: none;
  border-radius: var(--radius-pill, 999px);
  padding: 0.85rem 1.25rem;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  background: var(--gradient-cta, linear-gradient(90deg, #8b5cf6, #ec4899, #f97316));
  color: #fff;
  box-shadow: 0 4px 24px rgba(139, 92, 246, 0.35);
}

.page-auth .auth-register-standalone .btn-primary:hover {
  transform: translateY(-1px);
}

.page-auth .auth-register-standalone .auth-links {
  margin-top: 1.25rem;
  text-align: center;
  color: var(--text-muted, #9ca3af);
  font-size: 0.9rem;
}

.page-auth .auth-register-standalone .auth-link {
  color: #e9d5ff;
  font-weight: 600;
}

.page-auth .auth-register-standalone .social-login {
  margin-top: 1.5rem;
}

.page-auth .auth-register-standalone .social-login-divider {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1rem;
  color: var(--text-muted, #9ca3af);
  font-size: 0.82rem;
}

.page-auth .auth-register-standalone .social-login-divider::before,
.page-auth .auth-register-standalone .social-login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.page-auth .auth-register-standalone .btn-twitch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #9146ff;
  color: #fff;
  border: none;
  border-radius: var(--radius-pill, 999px);
  padding: 0.75rem 1rem;
  font-weight: 600;
  text-decoration: none;
}

.page-auth .auth-register-standalone .btn-twitch:hover {
  filter: brightness(1.08);
}

/* Passkey-Fehler-Modal */
.page-auth .login-error-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pageAuthErrFade 0.2s ease;
}

@keyframes pageAuthErrFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes pageAuthErrSlide {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.page-auth .login-error-modal {
  background: linear-gradient(165deg, var(--bg-card, #161022), var(--bg-card-elevated, #1a1628));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg, 20px);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
  max-width: 420px;
  width: 90%;
  overflow: hidden;
  animation: pageAuthErrSlide 0.25s ease;
}

.page-auth .login-error-modal-header {
  padding: 1.35rem 1.5rem 0;
  text-align: center;
}

.page-auth .login-error-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: rgba(248, 113, 113, 0.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  color: #f87171;
  margin-bottom: 0.65rem;
}

.page-auth .login-error-modal-header h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text, #fff);
  font-family: var(--font-body);
}

.page-auth .login-error-modal-body {
  padding: 0.65rem 1.5rem 0.5rem;
  text-align: center;
}

.page-auth .login-error-modal-body p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-muted, #9ca3af);
  word-break: break-word;
}

.page-auth .login-error-modal-footer {
  padding: 1rem 1.5rem 1.35rem;
  display: flex;
  justify-content: center;
}

.page-auth .login-error-ok-btn {
  border: none;
  border-radius: var(--radius-pill, 999px);
  padding: 0.65rem 2rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  color: #fff;
  background: var(--gradient-cta, linear-gradient(90deg, #8b5cf6, #ec4899, #f97316));
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.35);
}

.page-auth .login-error-ok-btn:hover {
  transform: translateY(-1px);
}

.page-auth .login-error-ok-btn:focus-visible {
  outline: 2px solid #c084fc;
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .page-auth .auth-forms-track {
    min-height: 36rem;
  }
}
