/* auth.css — Login / Register modal, tab switcher, error box */

/* ---------------- AUTH MODAL ---------------- */
#auth-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(1100px 600px at 50% 25%, var(--bg-glow) 0%, var(--bg-edge) 70%);
  overflow: hidden;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-box {
  position: relative;
  z-index: 2;
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: 24px;
  padding: 30px;
  width: 360px;
  text-align: center;
  box-shadow: 0 0 50px rgba(16, 185, 129, 0.15), 0 15px 35px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.auth-logo {
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 5px;
}
.auth-logo span:nth-child(1) { color: var(--neon-red); }
.auth-logo span:nth-child(2) { color: var(--neon-blue); }
.auth-logo span:nth-child(3) { color: var(--text-main); }

/* Auth Tab Switcher */
.auth-tabs {
  display: flex;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
}

.auth-tab {
  flex: 1;
  padding: 6px;
  font-size: 1.5rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.auth-tab.active {
  background: var(--card-bg);
  color: var(--text-main);
  font-weight: bold;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.auth-form {
  display: none;
  flex-direction: column;
  gap: 12px;
}

.auth-form.active {
  display: flex;
}

.auth-input {
  width: 100%;
  padding: 10px 15px;
  font-size: 1.5rem;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  outline: none;
  background: var(--card-bg);
  color: var(--text-main);
}

.auth-input:focus {
  border-color: var(--neon-blue);
  background: #fff;
  color: #14161f;
}

.auth-btn {
  width: 100%;
  padding: 10px;
  font-size: 1.8rem;
  background: var(--neon-green);
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}

.auth-btn:hover {
  transform: translateY(-2px);
  background: #0ea5e9;
}

.auth-btn:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

/* Cosmetic loading bar under the auth buttons while a request is in flight.
   Purely visual: not tied to real network progress, adds no latency. */
.auth-progress-track {
  width: 100%; height: 4px; border-radius: 2px;
  background: var(--border-color); overflow: hidden;
  margin-top: -4px; opacity: 0; transition: opacity 0.2s ease;
}
.auth-progress-track.active { opacity: 1; }
.auth-progress-fill {
  height: 100%; width: 0%; background: var(--neon-green);
  border-radius: 2px; transition: width 0.3s ease;
}
.auth-forgot-link {
  background: none; border: none; color: var(--neon-blue);
  font-size: 1.2rem; cursor: pointer; align-self: center; margin-top: -4px;
}
.auth-forgot-link:hover { text-decoration: underline; }

/* Error Message Box */
.auth-error {
  color: var(--neon-red);
  font-size: 1.4rem;
  display: none;
  background: rgba(255, 59, 92, 0.1);
  padding: 6px;
  border-radius: 8px;
  border: 1px solid var(--neon-red);
}
