:root {
  --primary-color: #d4af37;
  --secondary-color: #333;
  --accent-color: #8b0000;
  --light-color: #f8f9fa;
  --dark-color: #212529;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: #f5f5f5;
  color: var(--dark-color);
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-container {
  width: 100%;
  max-width: 500px;
  padding: 2.5rem;
  background: white;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
  position: relative; /* Added for close button positioning */
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
  position: relative; /* Added for close button positioning */
  padding-top: 10px; /* Added space for close button */
}

.auth-header img {
  height: 80px;
  margin-bottom: 1.5rem;
  transition: transform 0.3s ease;
}

.auth-header img:hover {
  transform: scale(1.05);
}

.auth-header h2 {
  color: var(--accent-color);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.auth-header p {
  color: #666;
  font-size: 15px;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #666;
  cursor: pointer;
  transition: all 0.2s;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  z-index: 1;
}

.close-btn:hover {
  color: var(--accent-color);
  background-color: rgba(0,0,0,0.05);
}

.form-control {
  padding: 14px 18px;
  border-radius: 12px;
  margin-bottom: 1rem;
  border: 1px solid #e0e0e0;
  font-size: 15px;
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

.form-control::placeholder {
  color: #999;
}

.form-row {
  display: flex;
  gap: 15px;
}

.form-col {
  flex: 1;
}

.btn-primary {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
  padding: 12px;
  font-weight: 500;
  width: 100%;
  border-radius: 12px;
  font-size: 16px;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  margin-top: 0.5rem;
}

.btn-primary:hover {
  background-color: #6d0000;
  border-color: #6d0000;
  transform: translateY(-2px);
}

.password-toggle {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #6c757d;
  transition: color 0.2s ease;
}

.password-toggle:hover {
  color: var(--accent-color);
}

.password-input-group {
  position: relative;
}

/* Ensure password feedback is visible and clear */
.password-feedback {
  margin-top: 5px;
  font-size: 0.85rem;
  transition: all 0.3s ease;
}

.password-requirements {
  list-style-type: none;
  padding-left: 0;
  margin: 5px 0;
}

.password-requirements li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 5px;
  font-size: 0.85rem;
  color: #555;
}

.password-requirements li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #dc3545;
  font-weight: bold;
}

.password-requirements li.valid:before {
  color: #28a745;
}

.password-requirements li.valid {
  color: #28a745;
}

/* Increase specificity for password input borders */
.form-control.password-weak {
  border-color: #dc3545 !important;
  box-shadow: none !important;
}

.form-control.password-strong {
  border-color: #28a745 !important;
  box-shadow: none !important;
}

/* Prevent focus from overriding validation styles */
.form-control:focus.password-weak,
.form-control:focus.password-strong {
  box-shadow: none !important;
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  color: #666;
  font-size: 15px;
}

.auth-footer a {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

.auth-footer a:hover {
  text-decoration: underline;
  color: #6d0000;
}

.error-message {
  color: #dc3545;
  margin: 1rem 0;
  text-align: center;
  background: rgba(220, 53, 69, 0.1);
  padding: 10px;
  border-radius: 8px;
  font-size: 14px;
}

.terms-check {
  display: flex;
  align-items: center;
  margin: 1.5rem 0;
}

.terms-check label {
  margin-left: 10px;
  color: #555;
  cursor: pointer;
  user-select: none;
}

.terms-check a {
  color: var(--accent-color);
  font-weight: 500;
  text-decoration: none;
}

.terms-check a:hover {
  text-decoration: underline;
}

.form-check-input {
  border-radius: 4px;
  border: 1px solid #e0e0e0;
  cursor: pointer;
  width: 18px;
  height: 18px;
  margin-top: 0;
}

.form-check-input:checked {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
}

/* Modal styles */
.modal-content {
  border-radius: 12px;
  border: none;
}

.modal-header {
  border-bottom: 1px solid #eee;
}

.modal-title {
  color: var(--accent-color);
  font-weight: 600;
}

.modal-body ul {
  padding-left: 20px;
}

.modal-body li {
  margin-bottom: 8px;
}

@media (max-width: 576px) {
  .auth-container {
      padding: 2rem 1.5rem;
  }
  
  .form-row {
      flex-direction: column;
      gap: 0;
  }
  
  body {
      padding: 15px;
  }
  
  .auth-header img {
      height: 70px;
  }

  .close-btn {
      top: 5px;
      right: 5px;
      font-size: 1.3rem;
      width: 35px;
      height: 35px;
  }
}