/* ============================================================
   HYPERION — Auth Page Styles
   ============================================================ */

/* ── Full Screen Auth Background ────────────────────────── */
.auth-bg {
  position: fixed;
  inset: 0;
  background: #050505;
  overflow: hidden;
  z-index: 0;
}

/* Radial glow blobs */
.auth-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  animation: glow-drift 12s ease-in-out infinite;
  will-change: transform, opacity;
}

.auth-glow-1 {
  width: 600px;
  height: 600px;
  top: -180px;
  right: -120px;
  background: radial-gradient(circle, rgba(99,102,241,0.25) 0%, transparent 70%);
  animation-delay: 0s;
}

.auth-glow-2 {
  width: 480px;
  height: 480px;
  bottom: -120px;
  left: -100px;
  background: radial-gradient(circle, rgba(168,85,247,0.22) 0%, transparent 70%);
  animation-delay: -4s;
}

.auth-glow-3 {
  width: 360px;
  height: 360px;
  top: 50%;
  left: 40%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(201,168,76,0.10) 0%, transparent 70%);
  animation-delay: -8s;
}

@keyframes glow-drift {
  0%, 100% { transform: translate(0, 0) scale(1);        opacity: 0.7; }
  25%       { transform: translate(30px, -30px) scale(1.2); opacity: 1; }
  50%       { transform: translate(-10px, 20px) scale(0.85); opacity: 0.5; }
  75%       { transform: translate(15px, -10px) scale(1.1); opacity: 0.9; }
}

/* Floating particles */
.particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.particle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  animation: particle-float linear infinite;
}

@keyframes particle-float {
  0%   { transform: translateY(0) translateX(0); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 0.8; }
  100% { transform: translateY(-100vh) translateX(30px); opacity: 0; }
}

/* ── Auth Container ──────────────────────────────────────── */
.auth-container {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

/* ── Auth Card ───────────────────────────────────────────── */
.auth-card {
  --rotate-x: 0deg;
  --rotate-y: 0deg;
  --mouse-x: 50%;
  --mouse-y: 50%;
  width: 100%;
  max-width: 420px;
  background: rgba(16,16,16,0.88);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 24px;
  padding: 36px 32px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.7),
              0 0 0 1px rgba(255,255,255,0.04),
              inset 0 1px 0 rgba(255,255,255,0.08);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  animation: scaleIn 0.45s var(--ease-out-expo);
  position: relative;
  overflow: hidden;
  will-change: transform;
  transform: perspective(1000px) rotateX(var(--rotate-x)) rotateY(var(--rotate-y)) translateZ(0);
  transition: transform 0.12s ease-out;
}

/* Top gold shimmer line — brighter */
.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,168,76,0.7), transparent);
}

/* Subtle inner corner glows + touch/mouse tracking spotlight */
.auth-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 24px;
  background: radial-gradient(circle 240px at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(201,168,76,0.05), transparent 80%),
              radial-gradient(ellipse at 20% 10%, rgba(99,102,241,0.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: 1;
}

/* ── Logo Section ────────────────────────────────────────── */
.auth-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 22px;
  width: 100%;
}

.auth-logo .logo-stacked {
  gap: 8px;
}

.auth-logo .logo-symbol {
  width: 160px;
  height: auto;
  filter: drop-shadow(0 0 12px rgba(212, 175, 55, 0.22));
}

.auth-logo .logo-text {
  width: 260px;
  height: auto;
  margin-top: -3px;
}

.logo-img {
  width: 160px;
  height: auto;
  object-fit: contain;
  display: block;
  background: transparent;
  border: none;
  box-shadow: none;
  filter: none;
}

.logo-tagline { display: none; }

/* ── Tabs ────────────────────────────────────────────────── */
.auth-tabs {
  display: flex;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 24px;
  position: relative;
}

.auth-tab {
  flex: 1;
  padding: 9px;
  font-size: 13px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  color: var(--text-secondary);
  border-radius: 8px;
  transition: all 0.25s var(--ease-smooth);
  position: relative;
  z-index: 2;
  text-align: center;
  white-space: nowrap;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

@media (hover: hover) {
  .auth-tab:hover:not(.active) {
    color: var(--text-primary);
    background: rgba(255,255,255,0.04);
  }
}

.auth-tab.active {
  color: var(--gold);
  font-weight: 600;
  text-shadow: 0 0 12px rgba(201,168,76,0.4);
}

/* 2-tab indicator */
.tab-indicator {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--border-hover);
  border-radius: 8px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* 3-tab indicator */
.tab-indicator-3 {
  width: calc(33.333% - 3px);
}

/* ── Teacher Register Badge ──────────────────────────────── */
.teacher-register-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--gold-dim);
  border: 1px solid var(--gold-border);
  color: var(--gold);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  margin-bottom: 4px;
  align-self: flex-start;
  box-shadow: 0 0 12px rgba(201,168,76,0.1);
  animation: fadeIn 0.3s ease;
}

/* ── Student Register Badge ──────────────────────────────── */
.student-register-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--glow-blue-soft);
  border: 1px solid var(--glow-blue-dim);
  color: var(--info);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  margin-bottom: 4px;
  align-self: flex-start;
  box-shadow: 0 0 12px rgba(99,102,241,0.1);
  animation: fadeIn 0.3s ease;
}

/* Teacher submit button — gold variant */
.btn-teacher {
  background: linear-gradient(135deg, var(--gold), #8a6520) !important;
}

@media (hover: hover) {
  .btn-teacher:hover {
    box-shadow: 0 6px 24px var(--gold-glow-strong), var(--shadow-md) !important;
  }
}

/* ── Auth Forms ──────────────────────────────────────────── */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: fadeIn 0.25s ease;
}

/* Override input styling for auth */
.auth-form .form-input {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.07);
}

.auth-form .form-input:focus {
  background: rgba(255,255,255,0.06);
}

/* ── Submit Button (auth-specific size) ──────────────────── */
.auth-form .btn-primary {
  width: 100%;
  justify-content: center;
  padding: 13px;
  font-size: 15px;
  border-radius: var(--radius-md);
  margin-top: 6px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  letter-spacing: 0.3px;
  position: relative;
  overflow: hidden;
}

.auth-form .btn-primary .btn-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(255,255,255,0.14) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

@media (hover: hover) {
  .auth-form .btn-primary:hover .btn-glow { opacity: 1; }
}

/* ── Toggle Password ─────────────────────────────────────── */
.toggle-password {
  transition: all 0.2s var(--ease-spring);
  min-height: 44px;
  min-width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (hover: hover) {
  .toggle-password:hover {
    color: var(--text-primary);
    transform: scale(1.1);
  }
}

.toggle-password:active {
  transform: scale(0.9);
  transition-duration: 0.1s;
}

/* ── Auth Form Title / Desc (inline style replacements) ──── */
.auth-form-title {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
  animation: slideDown 0.3s var(--ease-out-expo);
}

.auth-form-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.5;
  animation: slideDown 0.35s var(--ease-out-expo);
}

/* ── Forgot Password Link ─────────────────────────────────── */
.forgot-link-wrap {
  text-align: right;
  margin-top: 6px;
}

.forgot-link {
  color: var(--gold);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  display: inline-block;
  min-height: 24px;
  line-height: 24px;
}

@media (hover: hover) {
  .forgot-link:hover {
    color: var(--gold-light);
    text-shadow: 0 0 8px rgba(201,168,76,0.4);
  }
}

/* ── Code Input ──────────────────────────────────────────── */
.code-input {
  text-transform: uppercase;
  font-family: 'Courier New', monospace;
  letter-spacing: 1.5px;
  color: var(--gold) !important;
}

.code-input:focus {
  color: var(--gold-light) !important;
}

/* ── Auth Switch Text ────────────────────────────────────── */
.auth-switch {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-secondary);
}

.auth-switch a {
  color: var(--gold);
  font-weight: 500;
  transition: color var(--transition);
}

.switch-item {
  white-space: nowrap;
}

@media (max-width: 480px) {
  .auth-switch {
    flex-direction: column;
    gap: 6px;
  }
  .auth-switch .switch-divider {
    display: none;
  }
}

@media (hover: hover) {
  .auth-switch a:hover {
    color: var(--gold-light);
    text-shadow: 0 0 8px rgba(201,168,76,0.3);
  }
}

/* ── Student Code Input Hint ─────────────────────────────── */
.code-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: -8px;
  padding-left: 2px;
}

.code-hint span {
  font-family: 'Courier New', monospace;
  color: var(--gold);
  background: var(--gold-dim);
  padding: 1px 6px;
  border-radius: 4px;
}

/* ── Loading State ───────────────────────────────────────── */
.btn-loading .btn-text { opacity: 0.7; }

/* ── Responsive Auth ─────────────────────────────────────── */
@media (max-width: 480px) {
  .auth-card {
    padding: 28px 20px;
    border-radius: 20px;
  }

  .logo-img { width: 130px; }
  .auth-logo .logo-symbol { width: 110px; height: auto; }
  .auth-logo .logo-text { width: 170px; height: auto; }
  .auth-form { gap: 14px; }
}

/* ── Custom Webkit Autofill Override to prevent random yellow highlights ── */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px #161616 inset !important;
  -webkit-text-fill-color: var(--text-primary) !important;
  transition: background-color 5000s ease-in-out 0s;
}

/* ── Form Slider & Carousel Viewport ─────────────────────── */
.auth-slider-viewport {
  overflow: hidden;
  width: 100%;
  position: relative;
}

.auth-slider-track {
  display: flex;
  width: 300%;
  transition: transform 0.22s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

.auth-slide {
  width: 33.3333%;
  flex-shrink: 0;
  box-sizing: border-box;
  padding: 0 6px;
}

.auth-slide.hidden {
  display: none;
}

/* ── Bottom-Up Overlay Sheets for Forgot/Reset ───────────── */
.auth-overlay {
  position: absolute;
  inset: 0;
  background: rgba(16, 16, 16, 0.96);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  z-index: 20;
  padding: 36px 32px;
  border-radius: 24px;
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  display: flex;
  flex-direction: column;
}

.auth-overlay.active {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
  display: flex !important;
}

@media (max-width: 480px) {
  .auth-overlay {
    padding: 28px 20px;
    border-radius: 20px;
  }
}

/* ── Signature Footer ── */
.auth-signature {
  margin-top: 24px;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: var(--text-secondary);
  text-align: center;
  letter-spacing: 0.5px;
  z-index: 10;
  pointer-events: auto;
}

.auth-signature .sig-link {
  color: var(--gold);
  font-weight: 600;
  text-decoration: none;
  transition: text-shadow 0.2s ease, color 0.2s ease;
  text-shadow: 0 0 8px rgba(201, 168, 76, 0.35);
}

@media (hover: hover) {
  .auth-signature .sig-link:hover {
    color: var(--gold-light);
    text-shadow: 0 0 12px rgba(201, 168, 76, 0.75), 0 0 20px rgba(201, 168, 76, 0.35);
  }
}

.auth-container {
  padding-bottom: 60px !important;
}

/* Remove tap blue highlighting on mobile */
button, a, .auth-tab, input, select, textarea {
  -webkit-tap-highlight-color: transparent !important;
}

/* ── Welcome Popup Modal ── */
.welcome-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 5, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: var(--z-modal, 1000);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease-out;
}

.welcome-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.welcome-modal-card {
  width: 100%;
  max-width: 440px;
  background: rgba(22, 22, 22, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 36px 32px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.8),
              0 0 0 1px rgba(255, 255, 255, 0.02),
              inset 0 1px 0 rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transform: scale(0.95) translateY(10px);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: transform;
}

.welcome-overlay.active .welcome-modal-card {
  transform: scale(1) translateY(0);
}

.welcome-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 24px;
  gap: 8px;
}

.welcome-logo-symbol {
  width: 180px;
  height: auto;
  filter: drop-shadow(0 0 16px rgba(212, 175, 55, 0.25));
}

.welcome-title {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  letter-spacing: 0.3px;
}

.welcome-text {
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-secondary);
  margin-bottom: 28px;
  text-align: center;
}

.welcome-link {
  color: var(--gold);
  font-weight: 500;
  text-decoration: none;
  transition: text-shadow 0.2s ease, color 0.2s ease;
  text-shadow: 0 0 8px rgba(201, 168, 76, 0.2);
  border-bottom: 1px solid rgba(201, 168, 76, 0.2);
  padding-bottom: 1px;
}

@media (hover: hover) {
  .welcome-link:hover {
    color: var(--gold-light);
    text-shadow: 0 0 12px rgba(201, 168, 76, 0.6);
    border-bottom-color: var(--gold-light);
  }
}

.welcome-btn {
  width: 100%;
  justify-content: center;
  padding: 13px !important;
  font-size: 15px !important;
  border-radius: var(--radius-md) !important;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 16px rgba(201, 168, 76, 0.15);
  transition: all 0.25s var(--ease-spring) !important;
}

.welcome-btn:active {
  transform: scale(0.97) !important;
}

/* Exit fast fade-out animation */
.welcome-overlay.dismissing {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-in;
}

.welcome-overlay.dismissing .welcome-modal-card {
  transform: scale(0.97) translateY(-5px);
  transition: transform 0.2s ease-in;
}

@media (max-width: 480px) {
  .welcome-modal-card {
    padding: 28px 20px;
    border-radius: 20px;
  }
  .welcome-title {
    font-size: 19px;
  }
  .welcome-text {
    font-size: 12.5px;
    line-height: 1.6;
    margin-bottom: 22px;
  }
  .welcome-logo-symbol {
    width: 130px;
  }
}



