/* Global Styles & Variables */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary-color: #7f56da;
  --primary-glow: rgba(127, 86, 218, 0.4);
  --text-color: #ffffff;
  --secondary-text-color: #a0a0a0;
  --font-family-body: "Poppins", sans-serif;
  --background-color: #05050e;
  --surface-color: rgba(255, 255, 255, 0.03);
  --glass-border: 1px solid rgba(255, 255, 255, 0.06);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.3);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: var(--font-family-body);
  background-color: var(--background-color);
  background-image:
    radial-gradient(
      circle at 10% 20%,
      rgba(127, 86, 218, 0.15) 0%,
      transparent 20%
    ),
    radial-gradient(
      circle at 90% 80%,
      rgba(51, 181, 229, 0.1) 0%,
      transparent 20%
    );
  color: var(--text-color);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 6vw, 80px);
  z-index: 1000;
  background: rgba(5, 5, 14, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: var(--glass-border);
}

.header-logo a img {
  height: 42px;
  width: auto;
  filter: drop-shadow(0 0 8px rgba(127, 86, 218, 0.5));
}

/* Auth Main */
main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 20px 40px;
}

.auth-card {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.05),
    rgba(255, 255, 255, 0.02)
  );
  border: var(--glass-border);
  border-radius: 28px;
  backdrop-filter: blur(20px);
  max-width: 860px;
  /* Horizontal layout width */
  width: 100%;
  box-shadow: var(--shadow-lg);
  animation: fadeInDown 0.6s ease;
  overflow: hidden;
  display: flex;
  /* Horizontal split */
}

/* Horizontal Layout Specifics */
.auth-visual {
  flex: 1;
  background: linear-gradient(
    135deg,
    rgba(127, 86, 218, 0.1) 0%,
    rgba(51, 181, 229, 0.05) 100%
  );
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: var(--glass-border);
}

.visual-content {
  text-align: center;
}

.visual-icon {
  font-size: 5rem;
  color: var(--primary-color);
  margin-bottom: 20px;
  filter: drop-shadow(0 0 15px var(--primary-glow));
}

.visual-title {
  font-size: 1.8rem;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #fff 0%, #a0a0a0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.visual-text {
  color: var(--secondary-text-color);
  line-height: 1.6;
  font-weight: 300;
}

.auth-content {
  flex: 1.1;
  padding: 50px;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-header {
  text-align: left;
  margin-bottom: 30px;
}

.auth-title {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.gradient-text {
  background: linear-gradient(135deg, #fff 0%, var(--primary-color) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-align: center;
}

.auth-subtitle {
  color: var(--secondary-text-color);
  font-size: 1rem;
}

/* Form Styles */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.input-group label {
  color: #fff;
  font-weight: 500;
  font-size: 0.95rem;
  margin-left: 4px;
}

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

.input-wrapper i {
  position: absolute;
  left: 16px;
  color: var(--secondary-text-color);
  font-size: 1.2rem;
  transition: var(--transition);
}

.input-wrapper input {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 18px 52px 18px 52px;
  color: white;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  outline: none;
  transition: var(--transition);
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.input-wrapper input:focus {
  border-color: var(--primary-color);
  background: rgba(0, 0, 0, 0.3);
  box-shadow: 0 0 0 3px rgba(127, 86, 218, 0.1);
}

.input-wrapper input:focus + i {
  color: var(--primary-color);
  font-weight: 600;
}

.input-wrapper textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 18px 52px 18px 52px;
  color: white;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  outline: none;
  transition: var(--transition);
  resize: none;
  min-height: 100px;
}

.input-wrapper textarea:focus {
  border-color: var(--primary-color);
  background: rgba(0, 0, 0, 0.3);
  box-shadow: 0 0 0 3px rgba(127, 86, 218, 0.1);
}

.input-wrapper textarea:focus + i {
  color: var(--primary-color);
}

.input-wrapper textarea + i {
  position: absolute;
  left: 16px;
  top: 18px;
  color: var(--secondary-text-color);
  font-size: 1.2rem;
  transition: var(--transition);
}

.toggle {
  position: absolute;
  right: 16px;
  left: auto !important;
  cursor: pointer;
  z-index: 10;
}

.toggle:hover {
  color: #fff !important;
}

/* Options */
.auth-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

.checkbox-container {
  display: flex;
  align-items: center;
  cursor: pointer;
  color: var(--secondary-text-color);
  gap: 10px;
  font-weight: 600;
}

.checkbox-container input {
  display: none;
}

.checkmark {
  width: 20px;
  height: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  position: relative;
  transition: var(--transition);
}

.checkbox-container input:checked + .checkmark {
  background: var(--primary-color);
  border-color: var(--primary-color);
}

.checkbox-container input:checked + .checkmark::after {
  content: "\f058";
  font-family: "boxicons";
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 14px;
}

.forgot-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.forgot-link:hover {
  filter: brightness(1.2);
}

/* Buttons */
.btn-primary {
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 14px;
  padding: 16px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
  min-height: 56px; /* Ensures height doesnt collapse when text is removed for spinner */
}

.btn-primary i.bx-spin {
  font-size: 1.4rem;
  line-height: 1;
}

.btn-primary:hover {
  background: var(--primary-glow);
}

.auth-footer {
  text-align: center;
  margin-top: 30px;
  color: var(--secondary-text-color);
  font-size: 0.95rem;
  font-weight: 600;
}

.auth-footer a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.auth-footer a:hover {
  filter: brightness(1.2);
}

/* Site Footer */
footer {
  padding: 40px 20px;
  text-align: center;
  margin-top: auto;
}

.footer-divider {
  width: 100%;
  height: 1px;
  background-color: rgba(255, 255, 255, 0.06);
  margin-bottom: 25px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-copyright {
  color: var(--secondary-text-color);
  font-size: 1rem;
  font-weight: 400;
}

.footer-legal-links a {
  color: var(--secondary-text-color);
  text-decoration: none;
  font-weight: 400;
  font-size: 1rem;
  transition: 0.3s;
}

.footer-legal-links a:hover {
  color: var(--text-color);
}

/* OTP Verification Styles */
.otp-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin: 20px 0;
}

.otp-input {
  width: 100%;
  height: 60px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 600;
  color: #fff;
  transition: var(--transition);
  outline: none;
}

.otp-input:focus {
  border-color: var(--primary-color);
  background: rgba(0, 0, 0, 0.4);
  box-shadow: 0 0 0 4px rgba(127, 86, 218, 0.15);
  transform: translateY(-2px);
}

.otp-input.error {
  border-color: #ff5555;
  box-shadow: 0 0 0 4px rgba(255, 85, 85, 0.1);
}

.otp-input.success {
  border-color: #00c851;
  box-shadow: 0 0 0 4px rgba(0, 200, 81, 0.1);
}

.timer-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 15px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--secondary-text-color);
}

.timer-countdown {
  color: var(--primary-color);
  font-weight: 600;
  min-width: 45px;
}

.resend-button {
  background: none;
  border: none;
  color: var(--primary-color);
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  transition: var(--transition);
  font-size: 0.95rem;
}

.resend-button:disabled {
  color: var(--secondary-text-color);
  cursor: not-allowed;
  opacity: 0.5;
}

.resend-button:hover:not(:disabled) {
  filter: brightness(1.2);
  text-decoration: none;
}

@media (max-width: 768px) {
  .auth-card {
    flex-direction: column;
    max-width: 420px;
  }

  .auth-visual {
    display: none;
  }

  .auth-content {
    padding: 35px 25px;
  }
}

/* Tutor-specific styles */
.security-notice {
  display: flex;
  align-items: flex-start;
  padding: 16px;
  background: rgba(72, 187, 120, 0.1);
  border: 1px solid rgba(72, 187, 120, 0.3);
  border-radius: 12px;
  margin: 20px 0;
  gap: 12px;
}

.notice-icon {
  width: 32px;
  height: 32px;
  background: rgba(72, 187, 120, 0.2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notice-icon i {
  font-size: 16px;
  color: #48bb78;
}

.notice-text strong {
  display: block;
  color: var(--text-color);
  font-weight: 600;
  margin-bottom: 4px;
  font-size: 0.9rem;
}

.notice-text p {
  font-size: 0.8rem;
  color: var(--secondary-text-color);
  line-height: 1.4;
  margin: 0;
}

.form-hint {
  display: block;
  margin-top: 6px;
  font-size: 0.75rem;
  color: var(--secondary-text-color);
  font-style: italic;
  line-height: 1.3;
}

@media (max-width: 600px) {
  .footer-content {
    flex-direction: column;
  }

  .otp-grid {
    gap: 8px;
  }

  .otp-input {
    height: 50px;
    font-size: 1.2rem;
  }

  .security-notice {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }
}
