/* ============================================================
   Twizzle — Auth page styles (ergänzt styles.css)
   ============================================================ */

.auth-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--text);
  padding: 1.4rem clamp(1rem, 4vw, 2.5rem);
  position: relative;
  z-index: 3;
  width: max-content;
}
.auth-brand .brand-name { font-size: 1.3rem; }

.auth-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.2rem 3rem;
  position: relative;
  z-index: 2;
}

.auth-card {
  width: 100%;
  max-width: 430px;
  padding: clamp(1.8rem, 4vw, 2.6rem);
  border-radius: var(--radius-lg);
  background: rgba(13, 10, 26, 0.72);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(18px);
  box-shadow: 0 40px 90px -30px rgba(124, 58, 237, 0.5);
}

.auth-card h1 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.7rem;
  letter-spacing: -0.02em;
}
.auth-sub {
  color: var(--text-dim);
  font-size: 0.95rem;
  margin-top: 0.4rem;
  margin-bottom: 1.6rem;
}

/* --- Tabs --- */
.auth-tabs {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 1.7rem;
}
.auth-tabs .tab {
  position: relative;
  z-index: 2;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 0.94rem;
  padding: 0.6rem 0;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.25s;
}
.auth-tabs .tab.active { color: #0a0713; }
.tab-indicator {
  position: absolute;
  z-index: 1;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  border-radius: 999px;
  background: var(--grad);
  transition: transform 0.28s cubic-bezier(0.4, 0.1, 0.2, 1);
}
.tab-indicator.right { transform: translateX(100%); }

/* --- Social login --- */
.btn-social {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  background: #fff;
  color: #1f1f1f;
  border: 1px solid var(--border);
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.25s ease, opacity 0.2s;
}
.btn-social:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px -10px rgba(0, 0, 0, 0.6);
}
.btn-social:disabled { opacity: 0.6; cursor: default; transform: none; }

.divider {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 1.3rem 0;
  color: var(--text-mute);
  font-size: 0.8rem;
}
.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* --- Fields --- */
.field { display: block; margin-bottom: 1.1rem; }
.field > span {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 0.45rem;
}
.field input {
  width: 100%;
  padding: 0.8rem 0.95rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: "Inter", sans-serif;
  font-size: 0.98rem;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.field input::placeholder { color: var(--text-mute); }
.field input:focus {
  outline: none;
  border-color: var(--violet);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.18);
}
.field input:user-invalid { border-color: rgba(239, 95, 107, 0.6); }

.pw-wrap { position: relative; }
.pw-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1.05rem;
  opacity: 0.6;
  padding: 0.3rem 0.4rem;
  transition: opacity 0.2s;
}
.pw-toggle:hover { opacity: 1; }

.form-row {
  display: flex;
  justify-content: flex-end;
  margin: -0.3rem 0 1.1rem;
}
.link-muted {
  color: var(--text-mute);
  font-size: 0.85rem;
  text-decoration: none;
  transition: color 0.2s;
}
.link-muted:hover { color: var(--text); }

/* --- Message --- */
.auth-msg {
  font-size: 0.88rem;
  padding: 0;
  margin: 0 0 1rem;
  min-height: 0;
  border-radius: 10px;
  transition: all 0.2s;
}
.auth-msg.show {
  padding: 0.65rem 0.85rem;
  min-height: auto;
  margin-bottom: 1.1rem;
}
.auth-msg.error {
  background: rgba(239, 95, 107, 0.12);
  border: 1px solid rgba(239, 95, 107, 0.35);
  color: #ff9ba3;
}
.auth-msg.success {
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: #6ee7b7;
}

/* --- Submit + spinner --- */
#submitBtn { position: relative; }
#submitBtn[disabled] { opacity: 0.75; cursor: default; }
.spinner {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 2px solid rgba(10, 7, 19, 0.35);
  border-top-color: #0a0713;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.auth-switch {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.92rem;
  color: var(--text-dim);
}
.auth-switch a {
  color: var(--violet);
  text-decoration: none;
  font-weight: 600;
  margin-left: 0.3rem;
}
.auth-switch a:hover { text-decoration: underline; }

.auth-foot {
  margin-top: 1.6rem;
  max-width: 430px;
  text-align: center;
  color: var(--text-mute);
  font-size: 0.8rem;
  line-height: 1.5;
}
.auth-foot a { color: var(--text-dim); text-decoration: none; }
.auth-foot a:hover { text-decoration: underline; }
