/* ===== Register Page Styles - EduTest ===== */

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

body {
  font-family: 'Poppins', sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #f0f4ff 0%, #e8f0fe 100%);
}

/* ===== Background Decorative ===== */
body::before {
  content: '';
  position: absolute;
  top: -20%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.06), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: floatBg 22s ease-in-out infinite;
}

body::after {
  content: '';
  position: absolute;
  bottom: -20%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.04), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: floatBg 18s ease-in-out infinite reverse;
}

@keyframes floatBg {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* ======== Auth Card ======== */
.auth-card {
  width: 100%;
  max-width: 440px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 24px;
  padding: 36px 32px 32px;
  position: relative;
  z-index: 10;
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.02),
    0 10px 24px -4px rgba(37, 99, 235, 0.06),
    0 20px 60px rgba(37, 99, 235, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.5) inset;
  animation: cardEntry 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cardEntry {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ======== Back Button ======== */
.back-btn {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1.5px solid #e5e7eb;
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  color: #6b7280;
  z-index: 11;
}

.back-btn:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
  color: #374151;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.back-btn:active {
  transform: scale(0.95);
}

.back-btn:focus-visible {
  outline: 2px solid #2563EB;
  outline-offset: 2px;
}

.back-btn .material-symbols-outlined {
  font-size: 22px;
}

/* ======== Logo ======== */
.logo {
  text-align: center;
  margin-bottom: 24px;
}

.logo-icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, #2563EB, #1d4ed8);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.22);
}

.logo-icon span {
  color: #fff;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -1px;
}

.logo h1 {
  font-size: 36px;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.logo p {
  font-size: 16px;
  color: #6b7280;
  margin-top: 4px;
  font-weight: 400;
}

/* ======== Form ======== */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #4b5563;
  margin-bottom: 6px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrapper .material-symbols-outlined {
  position: absolute;
  left: 16px;
  color: #9ca3af;
  font-size: 20px;
  pointer-events: none;
  z-index: 2;
}

.input-wrapper input {
  width: 100%;
  height: 54px;
  padding: 0 16px 0 48px;
  border: 1.5px solid #e5e7eb;
  border-radius: 14px;
  font-size: 15px;
  font-family: 'Poppins', sans-serif;
  background: rgba(255, 255, 255, 0.85);
  transition: all 0.25s ease;
  outline: none;
  color: #1f2937;
}

.input-wrapper input::placeholder {
  color: #9ca3af;
  font-size: 15px;
}

.input-wrapper input:focus {
  border-color: #2563EB;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
  background: #fff;
}

.input-wrapper input.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.08);
}

/* ======== Password Toggle ======== */
.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #9ca3af;
  background: none;
  border: none;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
  z-index: 2;
  border-radius: 8px;
}

.password-toggle:hover {
  color: #6b7280;
  background: rgba(0, 0, 0, 0.03);
}

.password-toggle:focus-visible {
  outline: 2px solid #2563EB;
  outline-offset: 2px;
}

.password-toggle .material-symbols-outlined {
  position: static;
  font-size: 20px;
  pointer-events: none;
  color: inherit;
}

/* Input with password toggle - extra right padding */
.input-wrapper input[type="password"],
.input-wrapper input[type="text"] {
  padding-right: 48px;
}

/* ======== Submit Button ======== */
.submit-btn {
  width: 100%;
  height: 54px;
  background: linear-gradient(135deg, #2563EB, #1D4ED8);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.25);
  position: relative;
  overflow: hidden;
}

.submit-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.08) 100%);
  pointer-events: none;
}

.submit-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(37, 99, 235, 0.35);
}

.submit-btn:active:not(:disabled) {
  transform: translateY(0);
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.submit-btn:focus-visible {
  outline: 2px solid #2563EB;
  outline-offset: 2px;
}

.btn-loader {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ======== Separator ======== */
.separator {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 20px 0;
  color: #9ca3af;
  font-size: 13px;
  font-weight: 500;
}

.separator::before,
.separator::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

/* ======== Google Button ======== */
.google-btn {
  width: 100%;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #ffffff;
  border: 1.5px solid #e5e7eb;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 500;
  font-family: 'Poppins', sans-serif;
  color: #374151;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
}

.google-btn:hover {
  background: #f9fafb;
  border-color: #d1d5db;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.google-btn:active {
  transform: scale(0.99);
  box-shadow: none;
}

.google-btn:focus-visible {
  outline: 2px solid #2563EB;
  outline-offset: 2px;
}

.google-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.google-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.google-btn .btn-loader {
  border-color: rgba(0, 0, 0, 0.15);
  border-top-color: #2563EB;
}

/* ======== Footer Link ======== */
.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: #6b7280;
}

.auth-footer a {
  color: #2563EB;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
}

.auth-footer a:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

/* ======== Toast Container ======== */
#toastContainer {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 400px;
  width: calc(100% - 48px);
  pointer-events: none;
}

#toastContainer > * {
  pointer-events: auto;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ======== Responsive ======== */
@media (max-width: 480px) {
  body {
    padding: 12px;
  }

  .auth-card {
    max-width: 100%;
    width: 100%;
    padding: 32px 20px 28px;
    border-radius: 24px;
  }

  .logo h1 {
    font-size: 30px;
  }

  .logo p {
    font-size: 15px;
  }

  .submit-btn {
    height: 50px;
    font-size: 15px;
  }

  .input-wrapper input {
    height: 50px;
    font-size: 14px;
  }

  .back-btn {
    top: 12px;
    left: 12px;
    width: 36px;
    height: 36px;
  }

  #toastContainer {
    top: 12px;
    right: 12px;
    width: calc(100% - 24px);
  }
}

