/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Montserrat:wght@300;400;600;700&display=swap');

:root {
  --primary-blue: #1a237e;
  --primary-purple: #c2185b;
  --light-blue: #7986cb;
  --light-purple: #e91e63;
  --teal-gradient: linear-gradient(135deg, #a8e6cf 0%, #88d8c0 50%, #7fcdcd 100%);
  --purple-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --success-color: #4caf50;
  --error-color: #f44336;
  --warning-color: #ff9800;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body, html {
  height: 100%;
  font-family: 'Montserrat', sans-serif;
  overflow-x: hidden;
}

.auth-container {
  position: relative;
  min-height: 100vh;
  width: 100%;
}

/* Background */
.background-gradient {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, 
    rgba(168, 230, 207, 0.8) 0%, 
    rgba(136, 216, 192, 0.8) 25%,
    rgba(127, 205, 205, 0.8) 50%,
    rgba(102, 126, 234, 0.6) 75%,
    rgba(118, 75, 162, 0.6) 100%);
  z-index: -2;
}

.floating-circles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.circle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  animation: float 6s ease-in-out infinite;
}

.circle-1 {
  width: 200px;
  height: 200px;
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.circle-2 {
  width: 150px;
  height: 150px;
  top: 60%;
  right: 15%;
  animation-delay: 2s;
}

.circle-3 {
  width: 100px;
  height: 100px;
  bottom: 20%;
  left: 20%;
  animation-delay: 4s;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(180deg); }
}

/* Auth Card */
.auth-card {
  background: rgba(168, 230, 207, 0.9);
  backdrop-filter: blur(20px);
  border-radius: 30px;
  padding: 2rem;
  margin: 2rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  max-width: 500px;
  margin: 2rem auto;
}

/* Header */
.auth-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.brand-section {
  flex: 1;
}

.brand-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.5rem;
  line-height: 0.9;
  color: var(--primary-blue);
  margin-bottom: 0.5rem;
}

.chain-icon {
  font-size: 1.8rem;
  margin-left: 0.5rem;
}

.brand-tagline {
  font-size: 1rem;
  color: var(--primary-blue);
  font-weight: 600;
  margin-bottom: 0;
}

.learn-more-btn {
  background: rgba(26, 35, 126, 0.8);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
}

.learn-more-btn:hover {
  background: var(--primary-blue);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Form */
.form-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2rem;
  color: var(--primary-blue);
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--primary-blue);
  font-weight: 600;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 1rem;
  color: var(--primary-blue);
  z-index: 2;
  font-size: 1.1rem;
}

.auth-input {
  width: 100%;
  padding: 1rem 1rem 1rem 3rem;
  border: none;
  border-radius: 25px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
}

.auth-input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 3px rgba(121, 134, 203, 0.3);
  transform: translateY(-2px);
}

.password-toggle {
  position: absolute;
  right: 1rem;
  color: var(--primary-blue);
  cursor: pointer;
  z-index: 2;
}

.password-toggle:hover {
  color: var(--light-blue);
}

/* Form Options */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.form-check-label {
  color: var(--primary-blue);
  font-size: 0.9rem;
}

.forgot-password {
  color: var(--primary-purple);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}

.forgot-password:hover {
  color: var(--light-purple);
  text-decoration: underline;
}

/* Auth Button */
.auth-btn {
  width: 100%;
  padding: 1rem;
  background: var(--purple-gradient);
  color: white;
  border: none;
  border-radius: 25px;
  font-size: 1.1rem;
  font-weight: 700;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.auth-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.auth-btn:active {
  transform: translateY(-1px);
}

.btn-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Auth Switch */
.auth-switch {
  text-align: center;
  margin-top: 1.5rem;
}

.auth-switch p {
  color: var(--primary-blue);
  margin: 0;
}

.auth-switch a {
  color: var(--primary-purple);
  text-decoration: none;
  font-weight: 600;
}

.auth-switch a:hover {
  color: var(--light-purple);
  text-decoration: underline;
}

/* Fingerprint Section */
.fingerprint-section {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  position: relative;
}

.fingerprint-container {
  position: relative;
  width: 500px;
  height: 500px;
}

.africa-fingerprint {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(102, 126, 234, 0.3);
  animation: pulse 4s ease-in-out infinite;
}

.fingerprint-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.2) brightness(1.1);
}

.purple-orb {
  position: absolute;
  top: 20%;
  left: -10%;
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, #9c27b0, #6a1b9a);
  border-radius: 50%;
  animation: orbit 8s linear infinite;
  box-shadow: 0 0 30px rgba(156, 39, 176, 0.5);
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes orbit {
  0% { transform: rotate(0deg) translateX(250px) rotate(0deg); }
  100% { transform: rotate(360deg) translateX(250px) rotate(-360deg); }
}

/* Verification Styles */
.verification-header {
  text-align: center;
  margin-bottom: 2rem;
}

.verification-icon {
  font-size: 3rem;
  color: var(--primary-blue);
  margin-bottom: 1rem;
}

.verification-header h3 {
  color: var(--primary-blue);
  margin-bottom: 1rem;
}

.verification-header p {
  color: #666;
  margin-bottom: 0;
}

.verification-status {
  text-align: center;
  padding: 2rem;
}

.verification-status p {
  margin-top: 1rem;
  color: var(--primary-blue);
}

.verification-result {
  text-align: center;
  padding: 1rem;
  border-radius: 15px;
  margin-bottom: 1rem;
}

.verification-result.success {
  background: rgba(76, 175, 80, 0.1);
  border: 2px solid var(--success-color);
  color: var(--success-color);
}

.verification-result.error {
  background: rgba(244, 67, 54, 0.1);
  border: 2px solid var(--error-color);
  color: var(--error-color);
}

.success-message {
  text-align: center;
  padding: 2rem;
}

.success-icon {
  font-size: 4rem;
  color: var(--success-color);
  margin-bottom: 1rem;
}

.success-message h3 {
  color: var(--primary-blue);
  margin-bottom: 1rem;
}

.success-message p {
  color: #666;
  margin-bottom: 2rem;
}

.resend-section {
  text-align: center;
  margin-top: 1rem;
}

.btn-link {
  background: none;
  border: none;
  color: var(--primary-purple);
  text-decoration: underline;
  cursor: pointer;
  font-weight: 600;
}

.btn-link:hover {
  color: var(--light-purple);
}

/* Responsive Design */
@media (max-width: 992px) {
  .fingerprint-section {
    display: none;
  }
  
  .auth-card {
    margin: 1rem;
    padding: 1.5rem;
  }
}

@media (max-width: 768px) {
  .auth-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
  }
  
  .brand-name {
    font-size: 2rem;
  }
  
  .form-options {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .fingerprint-container {
    width: 300px;
    height: 300px;
  }
}

@media (max-width: 576px) {
  .auth-card {
    margin: 0.5rem;
    padding: 1rem;
    border-radius: 20px;
  }
  
  .brand-name {
    font-size: 1.8rem;
  }
  
  .form-title {
    font-size: 1.5rem;
  }
  
  .auth-input {
    padding: 0.8rem 0.8rem 0.8rem 2.5rem;
  }
  
  .input-icon {
    left: 0.8rem;
    font-size: 1rem;
  }
}

/* Custom Modal Styles */
.modal-content {
  border-radius: 15px;
  border: none;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
  background: var(--teal-gradient);
  color: var(--primary-blue);
  border-radius: 15px 15px 0 0;
  border-bottom: none;
}

.modal-title {
  font-weight: 700;
}

.btn-close {
  filter: invert(1);
}

/* Validation Feedback Styles */
.auth-input.is-valid {
  border: 2px solid var(--success-color);
  background: rgba(76, 175, 80, 0.1);
}

.auth-input.is-invalid {
  border: 2px solid var(--error-color);
  background: rgba(244, 67, 54, 0.1);
}

.valid-feedback {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--success-color);
  font-weight: 600;
}

.invalid-feedback {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--error-color);
  font-weight: 600;
}

/* ID Input specific styles */
#idNumber, #regIdNumber {
  font-family: 'Courier New', monospace;
  letter-spacing: 1px;
  font-weight: 600;
}

/* Validation animation */
.auth-input.is-valid,
.auth-input.is-invalid {
  animation: validationPulse 0.3s ease-in-out;
}

@keyframes validationPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

/* Enhanced input focus states */
.auth-input.is-valid:focus {
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.3);
}

.auth-input.is-invalid:focus {
  box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.3);
}

/* Reset specific styles */
.reset-header {
  text-align: center;
  margin-bottom: 2rem;
}

.reset-icon {
  font-size: 3rem;
  color: var(--primary-blue);
  margin-bottom: 1rem;
}

.reset-description {
  color: #666;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.reset-instructions {
  background: rgba(255, 255, 255, 0.1);
  padding: 1rem;
  border-radius: 10px;
  margin: 1rem 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

.reset-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 2rem 0;
}

.reset-actions .btn {
  width: 100%;
}

/* Password strength indicator */
.password-strength {
  margin-top: 0.5rem;
}

.strength-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.strength-fill {
  height: 100%;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.strength-text {
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.strength-feedback {
  font-size: 0.75rem;
  opacity: 0.8;
}

/* Strength level colors */
.strength-very-weak .strength-fill {
  background: #dc3545;
  width: 20%;
}

.strength-very-weak .strength-text {
  color: #dc3545;
}

.strength-weak .strength-fill {
  background: #fd7e14;
  width: 40%;
}

.strength-weak .strength-text {
  color: #fd7e14;
}

.strength-fair .strength-fill {
  background: #ffc107;
  width: 60%;
}

.strength-fair .strength-text {
  color: #ffc107;
}

.strength-good .strength-fill {
  background: #20c997;
  width: 80%;
}

.strength-good .strength-text {
  color: #20c997;
}

.strength-strong .strength-fill {
  background: #28a745;
  width: 100%;
}

.strength-strong .strength-text {
  color: #28a745;
}

/* Input feedback styles */
.input-feedback {
  margin-top: 0.25rem;
}

.input-feedback .valid-feedback {
  display: block;
  color: var(--success-color);
  font-size: 0.875rem;
  font-weight: 600;
}

.input-feedback .invalid-feedback {
  display: block;
  color: var(--error-color);
  font-size: 0.875rem;
  font-weight: 600;
}

/* Enhanced button styles for reset actions */
.btn-outline-primary {
  border: 2px solid var(--primary-blue);
  color: var(--primary-blue);
  background: transparent;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-outline-primary:hover {
  background: var(--primary-blue);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(26, 35, 126, 0.3);
}

/* Responsive adjustments for reset forms */
@media (max-width: 768px) {
  .reset-actions {
    gap: 0.75rem;
  }
  
  .reset-instructions {
    font-size: 0.85rem;
    padding: 0.75rem;
  }
  
  .reset-icon {
    font-size: 2.5rem;
  }
}

@media (max-width: 576px) {
  .reset-header {
    margin-bottom: 1.5rem;
  }
  
  .reset-description {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
  }
  
  .strength-bar {
    height: 3px;
  }
  
  .strength-text {
    font-size: 0.75rem;
  }
  
  .strength-feedback {
    font-size: 0.7rem;
  }
}

/* Animation for form transitions */
.auth-form-section {
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Loading state for resend button */
#resendResetBtn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Success message enhancements */
.success-message .success-icon {
  animation: successPulse 1s ease-in-out;
}

@keyframes successPulse {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}