/* ============================================================
   Athenaeum — Authentication UI Styles (Redesign)
============================================================ */

:root {
  --clr-primary: #005088;
  --clr-primary-light: #e6f0f7;
  --clr-primary-dark: #00365c;
  --clr-secondary: #00D2FF;
  --clr-secondary-light: #e0f7fa;
  --clr-purple: #7B2CBF;
  --clr-pink: #FF0076;
  --clr-accent: #FFD700;
  --clr-surface: #f8fafc;
  --clr-border: #cbd5e1;
  --clr-text-main: #0f172a;
  --clr-text-muted: #64748b;
  --radius-xl: 24px;
  --radius-lg: 16px;
  --radius-md: 10px;
  --font-main: 'Urbanist', sans-serif;
  --font-heading: 'Merriweather', serif;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0; padding: 0; box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  color: var(--clr-text-main);
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  font-size: 15px;
  line-height: 1.6;
  background-color: var(--clr-primary-dark);
}

/* Animated Gradient Background */
.auth-bg {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: linear-gradient(45deg, #001f3f, #005088, #7B2CBF, #FF0076);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
  z-index: 0;
}

@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Floating Glass Orbs */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  z-index: 1;
  animation: float 10s ease-in-out infinite;
}

.orb-1 {
  width: 300px; height: 300px;
  background: var(--clr-secondary);
  top: -50px; left: 10%;
  animation-delay: 0s;
}

.orb-2 {
  width: 400px; height: 400px;
  background: var(--clr-purple);
  bottom: -100px; right: 5%;
  animation-delay: -3s;
}

.orb-3 {
  width: 250px; height: 250px;
  background: var(--clr-pink);
  top: 40%; left: -50px;
  animation-delay: -6s;
}

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-30px) scale(1.05); }
}

/* Auth Layout */
.auth-container {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100vh;
  padding: 3rem 1.5rem;
}

/* Glassmorphism Card */
.auth-form-wrapper {
  width: 100%;
  max-width: 380px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-top: 1px solid rgba(255, 255, 255, 0.9);
  border-left: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 30px; /* Adjusted radius */
  padding: 24px 28px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.25), inset 0 0 20px rgba(255, 255, 255, 0.8);
  display: flex;
  flex-direction: column;
  margin: auto; /* Guaranteed centering */
  animation: popIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

@keyframes popIn {
  0% { opacity: 0; transform: scale(0.95) translateY(10px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 16px;
  font-weight: 800;
  text-decoration: none;
  color: var(--clr-primary);
  margin-bottom: 6px;
}

.auth-header {
  text-align: center;
  margin-bottom: 8px;
}

.auth-header h2 {
  font-family: var(--font-heading);
  font-size: 20px;
  color: var(--clr-text-main);
  margin-bottom: 2px;
}

.auth-header p {
  color: var(--clr-text-muted);
  font-size: 12px;
}

/* Role Selector */
.role-selector {
  display: flex;
  gap: 4px;
  background: var(--clr-surface);
  border-radius: var(--radius-md);
  padding: 0.2rem;
  margin-bottom: 10px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.role-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 6px 10px;
  border: none;
  background: transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--clr-text-muted);
  font-family: var(--font-main);
  font-weight: 700;
  transition: var(--transition);
  font-size: 12px;
}

.role-btn .material-symbols-outlined {
  font-size: 14px;
}

.role-btn:hover {
  color: var(--clr-primary);
}

.role-btn.active {
  background: white;
  color: var(--clr-primary);
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
  transform: translateY(-1px);
}

.role-btn.active .material-symbols-outlined {
  color: var(--clr-purple);
}

/* Google Auth Button */
.btn-google {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  background: white;
  color: #3c4043;
  border: 1px solid #dadce0;
  border-radius: 50px; /* Pill shape */
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-main);
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
  margin-bottom: 6px;
}

.btn-google img {
  width: 16px;
  height: 16px;
}

.btn-google:hover {
  background: #f8f9fa;
  box-shadow: 0 1px 2px 0 rgba(60,64,67,0.3), 0 1px 3px 1px rgba(60,64,67,0.15);
}

.auth-separator {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 8px 0;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
}

.auth-separator::before,
.auth-separator::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #cbd5e1;
}

.auth-separator span {
  padding: 0 10px;
}

/* Form Styles */
.form-group {
  margin-bottom: 10px;
  position: relative;
  display: flex;
  flex-direction: column;
}

.form-group label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 2px;
  color: var(--clr-text-main);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-control {
  width: 100%;
  height: 38px;
  padding: 0 12px 0 34px;
  background: var(--clr-surface);
  border: 1.5px solid transparent;
  border-radius: 12px; /* Smooth input edges */
  font-family: var(--font-main);
  font-size: 13px;
  color: var(--clr-text-main);
  transition: var(--transition);
  outline: none;
}

.form-control::placeholder {
  color: #94a3b8;
}

.form-control:focus {
  background: white;
  border-color: var(--clr-secondary);
  box-shadow: 0 0 0 4px rgba(0, 210, 255, 0.15);
}

.input-icon {
  position: absolute;
  left: 10px;
  bottom: 8px; /* Align within the input */
  font-size: 20px;
  color: #94a3b8;
  pointer-events: none;
  transition: var(--transition);
}

.form-control:focus + .input-icon,
.form-control:focus ~ .input-icon {
  color: var(--clr-secondary);
}

.auth-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 6px 0;
  font-size: 12px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  color: var(--clr-text-muted);
  font-weight: 500;
}

.checkbox-label input {
  width: 16px; height: 16px;
  accent-color: var(--clr-primary);
  cursor: pointer;
}

.auth-options a {
  color: var(--clr-purple);
  text-decoration: none;
  font-weight: 700;
  transition: var(--transition);
}

.auth-options a:hover {
  color: var(--clr-pink);
  text-decoration: underline;
}

.btn-submit {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  margin-top: 10px;
  background: linear-gradient(135deg, var(--clr-primary), var(--clr-purple));
  color: white;
  border: none;
  border-radius: 50px; /* Pill shape for premium feel */
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 10px rgba(123, 44, 191, 0.3);
  position: relative;
  overflow: hidden;
}

.btn-submit::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: var(--transition);
}

.btn-submit:hover {
  background: linear-gradient(135deg, var(--clr-primary-dark), #5c2092);
  box-shadow: 0 10px 25px rgba(123, 44, 191, 0.4);
  transform: translateY(-2px);
}

.btn-submit:hover::after {
  left: 100%;
  transition: 0.6s ease;
}

.auth-footer {
  text-align: center;
  margin-top: 8px;
  font-size: 12px;
  color: var(--clr-text-muted);
}

.auth-footer a {
  color: var(--clr-purple);
  font-weight: 800;
  text-decoration: none;
  transition: var(--transition);
}

.auth-footer a:hover {
  color: var(--clr-pink);
  text-decoration: underline;
}

/* Floating Glass Back Button */
.floating-back-btn {
  position: fixed;
  top: 2rem; left: 2rem;
  width: 48px; height: 48px;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100;
  transition: var(--transition);
}

.floating-back-btn svg {
  width: 24px; height: 24px;
  stroke: white;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  transition: var(--transition);
}

.floating-back-btn:hover {
  background: rgba(255,255,255,0.4);
  transform: scale(1.1) translateX(-2px);
}

@media (max-width: 480px) {
  .auth-form-wrapper {
    padding: 2.5rem 1.5rem;
    box-shadow: none;
    border: none;
    border-radius: var(--radius-lg);
  }
  .floating-back-btn {
    top: 1rem; left: 1rem;
    width: 40px; height: 40px;
  }
}
