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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: #f9fafb;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.container {
  width: 100%;
  max-width: 420px;
}

/* Toast Notifications */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-radius: 8px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  animation: slideIn 0.3s ease;
}

.toast.hidden {
  display: none;
}

.toast.success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.toast.error {
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.toast-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.toast.success .toast-icon {
  color: #22c55e;
}

.toast.error .toast-icon {
  color: #ef4444;
}

.toast-message {
  font-size: 14px;
  font-weight: 500;
}

.toast.success .toast-message {
  color: #166534;
}

.toast.error .toast-message {
  color: #991b1b;
}

/* Help Text */
.help-text {
  margin-bottom: 16px;
}

.help-label {
  display: block;
  font-size: 14px;
  color: #3b4fe6;
}

/* Back Button */
.back-btn {
  display: block;
  width: 100%;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 500;
  color: white;
  background: #6b7280;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 12px;
  transition: all 0.2s;
}

.back-btn:hover {
  background: #4b5563;
}

.back-btn.hidden {
  display: none;
}

/* Loading State */
#btn-loading {
  display: none;
}

.submit-btn.loading #btn-text {
  display: none;
}

.submit-btn.loading #btn-loading {
  display: inline;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  body {
    background: #111827;
  }

  .help-label {
    color: #818cf8;
  }

  .bypass-btn {
    background: #374151;
  }

  .bypass-btn:hover {
    background: #4b5563;
  }

  .bypass-dropdown {
    background: #1f2937;
    border-color: #374151;
  }

  .demo-user {
    color: #d1d5db;
  }

  .demo-user:hover {
    background: #374151;
  }

  .otp-input {
    background: #374151;
    border-color: #4f46e5;
    color: #f9fafb;
  }

  .otp-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
  }

  .back-btn {
    background: #4b5563;
  }

  .back-btn:hover {
    background: #6b7280;
  }

  .resend-btn:not(:disabled) {
    background: #4f46e5;
  }

  .resend-btn:not(:disabled):hover {
    background: #4338ca;
  }
}

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

/* OAuth Buttons */
.oauth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 600;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  background: white;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 12px;
}

.oauth-btn:hover {
  border-color: #d1d5db;
  background: #f9fafb;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

.oauth-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.oauth-icon {
  flex-shrink: 0;
}

/* Google Button Specific */
.google-btn:hover {
  border-color: #fbbc05;
  background: #fef8e7;
}

.google-btn:active {
  background: #fef3c7;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  body {
    background: #111827;
  }

  .login-title {
    background: #1f2937;
  }

  .oauth-btn {
    background: #374151;
    border-color: #4b5563;
    color: #f9fafb;
  }

  .oauth-btn:hover {
    border-color: #6b7280;
    background: #4b5563;
  }

  .google-btn:hover {
    border-color: #f59e0b;
    background: #451a03;
  }
}

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