* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Poppins", sans-serif;
}

@import url('theme.css');

:root {
  --primary-color: var(--brand-maroon);
  --secondary-color: var(--brand-gold-dark);
  --accent-color: #ff6b6b;
  --success-color: #51cf66;
  --warning-color: var(--brand-gold);
  --danger-color: #ff6b6b;
  --text-dark: var(--brand-text);
  --text-light: var(--brand-muted);
  --white: #ffffff;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  --border-radius: 15px;
  
  /* Safe Area Insets */
  --safe-area-top: env(safe-area-inset-top, 0px);
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
  --safe-area-left: env(safe-area-inset-left, 0px);
  --safe-area-right: env(safe-area-inset-right, 0px);
}

body {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(10px, 3vw, 20px);
  padding-top: calc(clamp(10px, 3vw, 20px) + var(--safe-area-top));
  padding-bottom: calc(clamp(10px, 3vw, 20px) + var(--safe-area-bottom));
  padding-left: calc(clamp(10px, 3vw, 20px) + var(--safe-area-left));
  padding-right: calc(clamp(10px, 3vw, 20px) + var(--safe-area-right));
  position: relative;
  overflow-x: hidden;
  background: var(--brand-bg);
}

/* Animated Background */
.animated-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
  background: var(--brand-bg);
}

.gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.6;
  animation: float 20s infinite ease-in-out;
}

.orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(97, 0, 0, 0.35), transparent);
  top: -200px;
  left: -200px;
  animation-delay: 0s;
}

.orb-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 223, 97, 0.55), transparent);
  bottom: -150px;
  right: -150px;
  animation-delay: 7s;
}

.orb-3 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(184, 134, 11, 0.35), transparent);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: 14s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(50px, -50px) scale(1.1); }
  50% { transform: translate(-30px, 30px) scale(0.9); }
  75% { transform: translate(30px, 50px) scale(1.05); }
}

/* Floating School Icons */
.floating-elements {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.floating-icon {
  position: absolute;
  font-size: clamp(20px, 4vw, 40px);
  color: rgba(255, 255, 255, 0.15);
  animation: floatIcon 15s infinite ease-in-out;
}

@keyframes floatIcon {
  0%, 100% { 
    transform: translate(0, 0) rotate(0deg);
    opacity: 0;
  }
  10%, 90% { opacity: 0.15; }
  50% { 
    transform: translate(50px, -100vh) rotate(360deg);
    opacity: 0.3;
  }
}

/* Auth Wrapper */
.auth-wrapper {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  animation: slideInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide-in {
  animation: slideInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Main Container */
.auth-container {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  padding: clamp(25px, 4vw, 40px);
  border-radius: 20px;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.2) inset;
  position: relative;
  overflow: hidden;
  max-width: 480px;
  width: 90%;
}

.auth-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Logo Section */
.logo-section {
  text-align: center;
  margin-bottom: 20px;
  animation: fadeInDown 0.8s ease 0.2s both;
}

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

.logo-circle {
  width: clamp(60px, 12vw, 75px);
  height: clamp(60px, 12vw, 75px);
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 50%;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(28px, 6vw, 36px);
  color: white;
  box-shadow: 0 10px 30px rgba(97, 0, 0, 0.3);
  animation: pulse 2s ease-in-out infinite;
  position: relative;
}

.logo-circle::before {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  opacity: 0;
  animation: pulseRing 2s ease-in-out infinite;
  z-index: -1;
}

.logo-circle img {
  width: clamp(32px, 7vw, 40px);
  height: clamp(32px, 7vw, 40px);
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.2));
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes pulseRing {
  0% { 
    transform: scale(1);
    opacity: 0.5;
  }
  100% { 
    transform: scale(1.3);
    opacity: 0;
  }
}

.brand-name {
  font-size: clamp(22px, 4.5vw, 28px);
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
}

.tagline {
  font-size: clamp(11px, 2.2vw, 13px);
  color: #4b5563;
  font-weight: 400;
}

/* Form Container */
.form-container {
  display: none;
  animation: fadeIn 0.5s ease;
}

.form-container.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.form-header {
  text-align: center;
  margin-bottom: 20px;
}

.form-header h2 {
  font-size: clamp(20px, 3.8vw, 24px);
  color: var(--text-dark);
  margin-bottom: 6px;
  font-weight: 700;
}

.form-header p {
  font-size: clamp(12px, 2.3vw, 14px);
  color: #4b5563;
}

/* Form Inputs */
.auth-form {
  margin-bottom: 16px;
}

.input-wrapper {
  position: relative;
  margin-bottom: 16px;
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary-color);
  font-size: 16px;
  z-index: 2;
  transition: all 0.3s ease;
}

.input-wrapper input,
.input-wrapper select,
.select-input {
  width: 100%;
  padding: 13px 13px 13px 42px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: clamp(13px, 2.4vw, 15px);
  transition: all 0.3s ease;
  background: white;
  font-family: inherit;
  color: #111827;
  letter-spacing: 0;
  text-shadow: none;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
}

.select-input {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23667eea' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  padding-right: 45px;
  color: #ffffff;
  font-weight: 600;
  background-color: rgba(255, 255, 255, 0.1);
}

.select-input option {
  color: #000000;
  background-color: white;
  padding: 12px;
  font-size: 16px;
  font-weight: 600;
}

.select-input option:checked {
  background-color: #667eea;
  color: white;
  font-weight: 700;
}

.select-input option:hover {
  background-color: #667eea;
  color: white;
}

.select-input option:disabled {
  color: #bbb;
  font-style: italic;
  font-weight: normal;
}

.select-input:invalid {
  color: rgba(255, 255, 255, 0.5);
  font-style: italic;
}

.select-input:valid {
  color: #ffffff;
  font-weight: 600;
}

.input-wrapper input:focus,
.input-wrapper select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.input-wrapper input::placeholder {
  color: #9ca3af;
}

.floating-label {
  position: absolute;
  left: 45px;
  top: 50%;
  transform: translateY(-50%);
  color: #6b7280;
  font-size: 14px;
  pointer-events: none;
  transition: all 0.3s ease;
}

.input-wrapper input:focus + .floating-label,
.input-wrapper input:not(:placeholder-shown) + .floating-label {
  top: -10px;
  font-size: 12px;
  color: var(--primary-color);
  background: white;
  padding: 0 5px;
}

.toggle-password {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--primary-color);
  cursor: pointer;
  font-size: 18px;
  transition: color 0.3s;
  z-index: 3;
}

.toggle-password:hover {
  color: var(--primary-color);
}

/* Password Strength */
.password-strength {
  margin: -10px 0 20px 0;
  padding: 0 5px;
}

.strength-bar {
  height: 4px;
  background: #e0e0e0;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 5px;
  position: relative;
  width: 0%;
  transition: all 0.3s ease;
}

.strength-text {
  font-size: 12px;
  color: var(--text-light);
  transition: color 0.3s ease;
}

/* Password Match Message */
.password-match {
  font-size: 13px;
  margin: -10px 0 15px 5px;
  font-weight: 500;
  transition: all 0.3s ease;
}

/* Form Options */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}

.checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: clamp(13px, 2.5vw, 14px);
  color: var(--text-dark);
  margin-bottom: 15px;
}

.checkbox-wrapper input {
  display: none;
}

.checkmark {
  width: 20px;
  height: 20px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  position: relative;
  transition: all 0.3s ease;
}

.checkbox-wrapper input:checked + .checkmark {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-color: var(--primary-color);
}

.checkbox-wrapper input:checked + .checkmark::after {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 12px;
}

.forgot-link {
  font-size: clamp(12px, 2.5vw, 13px);
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.forgot-link:hover {
  color: var(--secondary-color);
}

/* Buttons */
.btn {
  width: 100%;
  padding: clamp(12px, 3vw, 16px) 25px;
  border: none;
  border-radius: 12px;
  font-size: clamp(14px, 3vw, 16px);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
  font-family: inherit;
  min-height: 48px; /* Ensure touch target size */
  text-decoration: none;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  box-shadow: 0 10px 25px rgba(97, 0, 0, 0.25);
  margin-top: 10px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 35px rgba(97, 0, 0, 0.35);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-secondary:hover {
  background: var(--primary-color);
  color: white;
}

.btn-face-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  box-shadow: 0 10px 25px rgba(97, 0, 0, 0.25);
  animation: glow 2s infinite;
}

@keyframes glow {
  0%, 100% {
    box-shadow: 0 10px 25px rgba(97, 0, 0, 0.25);
  }
  50% {
    box-shadow: 0 10px 40px rgba(184, 134, 11, 0.35);
  }
}

.btn-face-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(97, 0, 0, 0.35);
}

.btn-face-secondary {
  background: rgba(97, 0, 0, 0.08);
  color: var(--primary-color);
  border: 2px solid rgba(97, 0, 0, 0.3);
}

/* Google Sign-In Button */
.btn-google {
  width: 100%;
  padding: clamp(12px, 2.5vw, 15px) clamp(20px, 4vw, 25px);
  font-size: clamp(14px, 2.5vw, 16px);
  font-weight: 600;
  border: 2px solid #dadce0;
  border-radius: clamp(10px, 2vw, 12px);
  background: white;
  color: #3c4043;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-google:hover {
  background: #f8f9fa;
  border-color: #4285f4;
  box-shadow: 0 4px 12px rgba(66, 133, 244, 0.2);
  transform: translateY(-2px);
}

.btn-google:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-success {
  background: linear-gradient(135deg, #38ef7d, #11998e);
  color: white;
  box-shadow: 0 10px 25px rgba(56, 239, 125, 0.3);
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 35px rgba(56, 239, 125, 0.4);
}

/* Divider */
.divider {
  display: flex;
  align-items: center;
  margin: 25px 0;
  color: var(--text-light);
  font-size: clamp(12px, 2.5vw, 14px);
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(97, 0, 0, 0.3), transparent);
}

.divider span {
  padding: 0 15px;
}

/* Toggle Links */
.toggle-link {
  text-align: center;
  margin-top: 20px;
  font-size: clamp(13px, 2.5vw, 14px);
  color: var(--text-light);
}

.link-highlight {
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
}

.link-highlight::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width 0.3s;
}

.link-highlight:hover::after {
  width: 100%;
}

/* Messages */
.message {
  margin-top: 15px;
  padding: 12px 15px;
  border-radius: 10px;
  font-size: clamp(13px, 2.5vw, 14px);
  display: none;
  animation: slideDown 0.3s ease;
  align-items: center;
  gap: 10px;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message.show {
  display: flex;
}

.message.success {
  background: linear-gradient(135deg, rgba(56, 239, 125, 0.1), rgba(56, 239, 125, 0.05));
  color: var(--success-color);
  border: 1px solid rgba(56, 239, 125, 0.3);
}

.message.error {
  background: linear-gradient(135deg, rgba(238, 90, 111, 0.1), rgba(238, 90, 111, 0.05));
  color: var(--error-color);
  border: 1px solid rgba(238, 90, 111, 0.3);
}

/* Face Modal Content */
.face-modal-content {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: clamp(25px, 5vw, 35px);
  max-width: min(600px, 90vw);
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  position: relative;
  animation: modalZoom 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalZoom {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-header {
  text-align: center;
  margin-bottom: 25px;
}

.modal-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 15px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: white;
  animation: modalIconPulse 2s infinite;
}

.modal-icon img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.2));
}

@keyframes modalIconPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.4); }
  50% { transform: scale(1.05); box-shadow: 0 0 0 15px rgba(102, 126, 234, 0); }
}

.modal-header h2 {
  font-size: clamp(20px, 4vw, 26px);
  color: var(--text-dark);
  margin-bottom: 8px;
}

.modal-header p {
  font-size: clamp(13px, 2.5vw, 15px);
  color: var(--text-light);
}

/* Camera Wrapper */
.camera-wrapper {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 25px;
  background: #000;
  aspect-ratio: 4 / 3;
}

#video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* Mirror the camera feed to match user's movements (like Google Meet) */
  /* Only the video is mirrored, not the overlay elements */
  transform: scaleX(-1);
}

#canvas {
  display: none;
  width: 100%;
  border-radius: 20px;
  /* Mirror the captured preview to match the video */
  transform: scaleX(-1);
}

.face-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.face-frame {
  width: min(250px, 60%);
  height: min(300px, 70%);
  position: relative;
  border-radius: 50%;
}

.corner {
  position: absolute;
  width: 30px;
  height: 30px;
  border: 3px solid var(--accent-color);
  animation: cornerPulse 2s infinite;
}

.corner-tl { top: 0; left: 0; border-right: none; border-bottom: none; border-radius: 20px 0 0 0; }
.corner-tr { top: 0; right: 0; border-left: none; border-bottom: none; border-radius: 0 20px 0 0; }
.corner-bl { bottom: 0; left: 0; border-right: none; border-top: none; border-radius: 0 0 0 20px; }
.corner-br { bottom: 0; right: 0; border-left: none; border-top: none; border-radius: 0 0 20px 0; }

@keyframes cornerPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.scan-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
  animation: scan 2s linear infinite;
}

@keyframes scan {
  0% { top: 0; }
  100% { top: 100%; }
}

.face-guide {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  padding: 10px 20px;
  border-radius: 20px;
  color: white;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  animation: guideBounce 2s infinite;
  max-width: 90%;
  text-align: center;
}

@keyframes guideBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-5px); }
}

.face-guide i {
  color: var(--success-color);
  font-size: 18px;
  flex-shrink: 0;
}

/* Instructions */
.face-instructions {
  display: flex;
  justify-content: space-around;
  margin: 20px 0;
  flex-wrap: wrap;
  gap: 10px;
}

.instruction-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 15px;
  background: rgba(102, 126, 234, 0.1);
  border-radius: 20px;
  font-size: 13px;
  color: var(--text-dark);
}

.instruction-item i {
  color: var(--success-color);
  font-size: 16px;
  flex-shrink: 0;
}

/* Modal Actions */
.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.modal-actions .btn {
  flex: 1;
}

/* Attempts Counter */
.attempts-counter {
  margin: 15px 0;
  padding: 12px 20px;
  background: rgba(238, 90, 111, 0.1);
  border-radius: 12px;
  border: 2px solid rgba(238, 90, 111, 0.3);
  color: var(--error-color);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
  body {
    padding: 10px;
    padding-top: calc(10px + var(--safe-area-top));
    padding-bottom: calc(10px + var(--safe-area-bottom));
  }

  .auth-container,
  .face-modal-content {
    padding: clamp(20px, 5vw, 25px);
    max-width: 100%;
    border-radius: 15px;
  }

  .logo-circle {
    width: 60px;
    height: 60px;
    font-size: 28px;
    margin-bottom: 10px;
  }
  
  .logo-circle img {
    width: 32px;
    height: 32px;
  }
  
  .brand-name {
    font-size: 24px;
  }
  
  .form-header h2 {
    font-size: 20px;
  }
  
  .input-wrapper {
    margin-bottom: 12px;
  }
  
  .btn {
    padding: 14px 20px;
  }
}

@media (max-width: 375px) {
  .auth-container {
    padding: 15px;
  }
  
  .logo-circle {
    width: 50px;
    height: 50px;
    font-size: 24px;
  }
  
  .brand-name {
    font-size: 20px;
  }
  
  .btn {
    font-size: 14px;
  }

  .brand-name {
    font-size: 20px;
  }

  .tagline {
    font-size: 11px;
  }

  .form-header h2 {
    font-size: 18px;
  }

  .form-header p {
    font-size: 12px;
  }

  .input-wrapper {
    margin-bottom: 12px;
  }

  .input-wrapper input,
  .input-wrapper select {
    padding: 11px 11px 11px 38px;
    font-size: 13px;
  }

  .input-icon {
    left: 12px;
    font-size: 15px;
  }

  .btn {
    padding: 11px 18px;
    font-size: 13px;
  }

  .form-options {
    flex-direction: column;
    align-items: flex-start;
  }

  .camera-wrapper {
    aspect-ratio: 3 / 4;
  }

  .face-instructions {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .auth-wrapper {
    max-width: 100%;
    padding: 8px;
  }

  .auth-container,
  .face-modal-content {
    padding: 18px 14px;
    border-radius: 16px;
  }

  .logo-circle {
    width: 50px;
    height: 50px;
    font-size: 24px;
    margin-bottom: 8px;
  }

  .brand-name {
    font-size: 18px;
    margin-bottom: 3px;
  }

  .tagline {
    font-size: 10px;
  }

  .form-header {
    margin-bottom: 16px;
  }

  .form-header h2 {
    font-size: 17px;
    margin-bottom: 4px;
  }

  .form-header p {
    font-size: 11px;
  }

  .input-wrapper {
    margin-bottom: 11px;
  }

  .input-wrapper input,
  .input-wrapper select {
    padding: 10px 10px 10px 36px;
    font-size: 13px;
    border-radius: 9px;
  }

  .input-icon {
    left: 11px;
    font-size: 14px;
  }

  .floating-label {
    left: 36px;
    font-size: 11px;
  }

  .btn {
    padding: 10px 16px;
    font-size: 13px;
    border-radius: 9px;
  }

  .modal-icon {
    width: 50px;
    height: 50px;
    font-size: 24px;
  }

  .password-strength {
    margin: -8px 0 14px 0;
  }

  .strength-text {
    font-size: 11px;
  }
}

@media (max-width: 380px) {
  .auth-container,
  .face-modal-content {
    padding: 16px 12px;
  }

  .logo-circle {
    width: 45px;
    height: 45px;
    font-size: 22px;
  }

  .brand-name {
    font-size: 16px;
  }

  .form-header h2 {
    font-size: 16px;
  }

  .input-wrapper input,
  .input-wrapper select {
    padding: 9px 9px 9px 34px;
    font-size: 12px;
  }

  .attempts-counter {
    font-size: 10px;
    padding: 7px 10px;
  }

  .btn {
    padding: 9px 14px;
    font-size: 12px;
  }
}

/* Landscape Mode */
@media (max-height: 600px) and (orientation: landscape) {
  body {
    padding: 10px;
  }

  .auth-container,
  .face-modal-content {
    padding: 20px;
  }

  .logo-section {
    margin-bottom: 15px;
  }

  .logo-circle {
    width: 50px;
    height: 50px;
    font-size: 24px;
    margin-bottom: 10px;
  }

  .form-header {
    margin-bottom: 15px;
  }

  .input-wrapper {
    margin-bottom: 12px;
  }

  .camera-wrapper {
    aspect-ratio: 16 / 9;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  :root {
    --text-dark: #e1e8ed;
    --text-light: #a0aab5;
    --white: #1a1d23;
    --bg-light: #2d3748;
  }

  .auth-container,
  .face-modal-content {
    background: rgba(26, 29, 35, 0.95);
    box-shadow: 
      0 20px 60px rgba(0, 0, 0, 0.6),
      0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  }

  .input-wrapper input,
  .input-wrapper select {
    background: #2d3748;
    color: #e1e8ed;
    border-color: #4a5568;
  }
}

/* Print Styles */
@media print {
  .animated-bg,
  .floating-elements {
    display: none !important;
  }
}
