:root {
  --primary-color: #4285f4;
  --primary-hover: #5c9aff;
  --secondary-color: #2c3e50;
  --text-color: #202124;
  --text-muted: #5f6368;
  --light-bg: #f8f9fa;
  --white-bg: #ffffff;
  --border-color: #dadce0;
  --success-color: #34a853;
  --error-color: #ea4335;
  --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  --transition-speed: 0.3s;
  --border-radius: 8px;
  --logo-font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --heading-color: #ffffff;
  --footer-link-color: #4285f4;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  margin: 0;
  padding: 0;
  color: var(--text-color);
  background-color: var(--light-bg);
  line-height: 1.6;
  letter-spacing: -0.01em;
}

/* Login Container */
.login-container {
  display: flex;
  min-height: 100vh;
  position: relative;
}

.login-left {
  width: 55%;
  /* background-image: url('images/bg.jpg'); */
  background-size: cover;
  background-position: center;
  position: relative;
}

.logo-link {
  position: absolute;
  top: 24px;
  left: 40px;
  z-index: 5;
  color: white;
  font-family: var(--logo-font);
  font-size: 32px;
  font-weight: 500;
  text-decoration: none;
}

.login-title {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 0;
  width: 100%;
  z-index: 2;
  color: rgb(255, 255, 255);
  text-align: center;
}

.login-title h1 {
  font-size: 42px;
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.2);
}

.login-title p {
  font-size: 18px;
  max-width: 500px;
  opacity: 0.95;
  margin: 0 auto;
  font-weight: 300;
  text-shadow: 0 1px 2px rgba(255,255,255,0.2);
  padding: 0 20px;
}

.login-right {
  width: 45%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px;
  background-color: var(--white-bg);
}

.login-form-container {
  width: 100%;
  max-width: 380px;
}

.login-heading {
  margin-bottom: 30px;
}

.login-heading h2 {
  font-size: 28px;
  font-weight: 500;
  color: var(--heading-color);
  margin-bottom: 10px;
  letter-spacing: -0.02em;
  margin-top: 0;
}

.login-heading p {
  color: var(--text-muted);
  font-size: 16px;
  margin-top: 0;
  margin-bottom: 0;
  font-weight: 400;
}

/* Form Styling */
.signup-form {
  margin-bottom: 30px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-color);
  font-size: 14px;
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  background-color: var(--white-bg);
  color: var(--text-color);
  font-size: 16px;
  transition: border-color var(--transition-speed);
  box-sizing: border-box;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.2);
}

.submit-btn {
  width: 100%;
  padding: 16px;
  border-radius: var(--border-radius);
  border: none;
  background-color: var(--primary-color);
  color: white;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-speed);
  letter-spacing: 0.01em;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-top: 10px;
  text-decoration: none;
}

.submit-btn:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

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

.divider {
  display: flex;
  align-items: center;
  margin: 30px 0;
  color: var(--text-muted);
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-color);
}

.divider span {
  padding: 0 15px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

.signin-btn {
  width: 100%;
  padding: 16px;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  background-color: #f2f2f2;
  color: var(--text-color);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-speed);
  letter-spacing: 0.01em;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  text-align: center;
  text-decoration: none;
  display: inline-block;
}

.signin-btn:hover {
  background-color: #e6e6e6;
  border-color: var(--text-muted);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  text-decoration: none;
}

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

/* Footer */
.login-footer {
  margin-top: 40px;
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
}

.login-footer p {
  margin: 8px 0;
}

.login-footer a {
  color: var(--footer-link-color);
  text-decoration: none;
  transition: color var(--transition-speed);
}

.login-footer a:hover {
  color: var(--primary-hover);
  text-decoration: none;
}

/* Loading state */
.ac-login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(5px);
}

.hidden {
  display: none;
}

/* Spinner */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s ease-in-out infinite;
}

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

/* Responsive Styles */
@media (max-width: 992px) {
  .login-left {
      width: 45%;
  }
  .login-right {
      width: 55%;
      padding: 40px 30px;
  }
  .login-title h1 {
      font-size: 36px;
  }
}

@media (max-width: 768px) {
  .login-container {
      flex-direction: column;
  }
  .login-left {
      width: 100%;
      height: 280px;
  }
  .login-right {
      width: 100%;
      padding: 30px 24px;
  }
  .logo-link {
      top: 16px;
      left: 16px;
      font-size: 30px;
  }
  .login-title h1 {
      font-size: 30px;
      margin-bottom: 12px;
  }
  .login-title p {
      font-size: 16px;
      max-width: 400px;
  }
  .login-heading h2 {
      font-size: 24px;
  }
  .login-heading {
      margin-bottom: 24px;
  }
  .login-footer {
      margin-top: 30px;
  }
}

@media (max-width: 480px) {
  .login-form-container {
      max-width: 100%;
  }
  .login-left {
      height: 220px;
  }
  .logo-link {
      top: 16px;
      left: 16px;
      font-size: 26px;
  }
  .login-title h1 {
      font-size: 24px;
      margin-bottom: 8px;
  }
  .login-title p {
      font-size: 14px;
      max-width: 280px;
      padding: 0 16px;
  }
  .login-heading h2 {
      font-size: 22px;
      margin-bottom: 8px;
  }
  .login-heading p {
      font-size: 14px;
  }
  .submit-btn, .signin-btn {
      padding: 14px;
      font-size: 15px;
  }
  .login-footer {
      margin-top: 20px;
      font-size: 12px;
  }
  .login-footer p {
      margin: 6px 0;
  }
  .form-group {
      margin-bottom: 16px;
  }
  .form-control {
      padding: 10px 14px;
      font-size: 15px;
  }
  .divider {
      margin: 20px 0;
  }
  .login-right {
      padding: 24px 20px;
  }
}

/* Ultra small screens */
@media (max-width: 360px) {
  .login-left {
      height: 180px;
  }
  .login-title h1 {
      font-size: 22px;
  }
  .login-title p {
      font-size: 13px;
      max-width: 260px;
  }
  .login-heading h2 {
      font-size: 20px;
  }
  .login-heading p {
      font-size: 13px;
  }
  .submit-btn, .signin-btn {
      padding: 12px;
      font-size: 14px;
  }
  .login-right {
      padding: 20px 16px;
  }
  .form-control {
      padding: 9px 12px;
      font-size: 14px;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  :root {
      --primary-color: #4285f4;
      --primary-hover: #5c9aff;
      --secondary-color: #e8eaed;
      --text-color: #e8eaed;
      --text-muted: #9aa0a6;
      --light-bg: #202124;
      --white-bg: #2a2a2a;
      --border-color: #3c4043;
      --heading-color: #e8eaed;
      --footer-link-color: #8ab4f8;
  }
  
  body {
      background-color: #202124;
  }
  
  .login-right {
      background-color: #2a2a2a;
  }
  
  .signin-btn {
      background-color: #3c4043;
      color: #e8eaed;
      border-color: #5f6368;
  }
  
  .signin-btn:hover {
      background-color: #4d5156;
      border-color: #8e918f;
  }
  
  .form-control {
      background-color: #2a2a2a;
      border-color: #3c4043;
      color: #e8eaed;
  }
  
  .form-control:focus {
      border-color: var(--primary-color);
      box-shadow: 0 0 0 2px rgba(76, 143, 254, 0.3);
  }
  
  .ac-login-overlay {
      background-color: rgba(32, 33, 36, 0.7);
  }
  
  .spinner {
      border-color: rgba(232, 234, 237, 0.2);
      border-top-color: var(--primary-color);
  }
}

.login-main-title {
  color: white;
}
.login-sub-title {
  color: white;
}
.signin-header-title {
  color: black !important;
}

/* Better touch target sizes for mobile */
@media (max-width: 768px) {
  .submit-btn, .signin-btn {
      min-height: 48px;
  }
  
  /* Improve form control touch targets */
  .form-control {
      min-height: 44px;
  }
}

/* Improve mobile experience */
@media (max-width: 480px) {
  /* Prevent content shift when virtual keyboard appears */
  .login-container {
      min-height: calc(100vh - 60px);
  }
}
#create-new-passkey {
  text-decoration: none;
}
/* Fix for form text color */
.form-control {
  color: #202124 !important; /* Force black text in light mode */
}

/* Only use white text in dark mode */
@media (prefers-color-scheme: dark) {
  .form-control {
      color: #e8eaed !important; /* Force white text in dark mode */
  }
}

/* Make sure labels are also properly colored */
.form-group label {
  color: #202124 !important; /* Force black text for labels in light mode */
}

@media (prefers-color-scheme: dark) {
  .form-group label {
      color: #e8eaed !important; /* Force white text for labels in dark mode */
  }
}

/* Ensure header title is black in light mode */
.signin-header-title {
  color: #202124 !important;
}

@media (prefers-color-scheme: dark) {
  .signin-header-title {
      color: #e8eaed !important;
  }
}
