/* Reset and basic styles */
:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --secondary-color: #f3f4f6;
    --text-color: #1f2937;
    --light-text: #6b7280;
    --border-color: #e5e7eb;
    --error-color: #ef4444;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --background-color: #ffffff;
    --box-shadow: 0 10px 20px rgba(0, 0, 0, 0.06), 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition-speed: 0.3s;
}

@media (prefers-color-scheme: dark) {
    :root {
        --primary-color: #8b5cf6;
        --primary-hover: #7c3aed;
        --secondary-color: #374151;
        --text-color: #f9fafb;
        --light-text: #9ca3af;
        --border-color: #4b5563;
        --error-color: #f87171;
        --success-color: #34d399;
        --warning-color: #fbbf24;
        --background-color: #1f2937;
        --box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    }
}


* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Ensure the page uses the full height */
html, body {
    height: 100%;
    display: flex;
    flex-direction: column;
}

body {
  font-family: 'Arial', sans-serif;
  background: linear-gradient(135deg, #6a11cb, #2575fc);
  color: var(--text-color);
  line-height: 1.6;
}

#buttonDiv {
    height: 60px; /* Set your desired height */
    display: flex;
    align-items: center; /* Center the button vertically */
    justify-content: center; /* Center the button horizontally */
}
#buttonDiv {
    transform: scale(1.2); /* Scale the button */
    transform-origin: center;
}


/* Popup Notification Style */
.popup-notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #ff5555;
  color: white;
  padding: 10px 20px;
  border-radius: 5px;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  width: 300px; /* Set a fixed width for the popup */
  z-index:2000;
  margin-bottom: -60px;
}

.popup-notification.show {
  opacity: 1;
  transform: translateY(0);
}

/* Progress bar above the popup */
.popup-notification .progress-bar-wrapper {
  position: relative;
  height: 5px;
  background-color: rgba(0, 0, 0, 0.1);
  margin-bottom: 10px;
  border-radius: 5px;
}

.popup-notification .progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background-color: orange;
  width: 0%;
  border-radius: 5px;
  transition: width 0.3s ease;
}
/* Spinner Style */
.spinner-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px; /* Space between spinner and text */
}
.spinner {
	border: 3px solid #f3f3f3;
	border-top: 3px solid blue;
	border-radius: 50%;
	width: 20px;
	height: 20px;
	animation: spin 1s linear infinite;
            
}
.loading-text {
  font-size: 14px;
  color: #fff;
  font-weight:700;
}

.loader-container {
    inset: 0;
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    gap: 50px; /* Space between loader and text */
    font-size: 18px;
    font-weight: bold;
    color: #fff; 
    z-index:9999;
    position:fixed;
}
.loader {
    display: block;
    position: ;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 8px solid transparent;
    border-top: 8px solid #4285F4;  /* Google Blue */
    border-right: 8px solid #EA4335; /* Google Red */
    border-bottom: 8px solid #34A853; /* Google Green */
    border-left: 8px solid #FBBC05;  /* Google Yellow */
    animation: spin 1s linear infinite;
}

/* Spinner Animation */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Hyperlink for Sign Up / Login */
.modal a {
  text-decoration: none;
  color: #3498db; /* A nice blue shade */
  font-weight: bold;
  font-size: 1rem;
  padding: 0.2em 0.4em;
  border: 2px solid transparent;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.modal a:hover {
  color: #ffffff; /* White text on hover */
  background-color: #3498db; /* Background matches the link color */
  border-color: #3498db; /* Add border on hover */
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.3); /* Slight text glow effect */
}

/* Modal container styles, currently occupies whole display*/
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.3); /* Darker overlay for a more sophisticated look */
  justify-content: center;
  align-items: center;
  z-index: 10;
  animation: fadeIn 30s ease-out;
}

/* Modal content box styling */
.modal-content {
  background-color: var(--background-color);  padding: 20px;
  border-radius: 12px;
  width: 90%;
  max-width: 500px; /* Limit the width for better responsiveness */
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15); /* Deeper shadow for a floating effect */
  text-align: center;
  transition: all 0.3s ease-in-out;
}


/* Modal heading styling */
.modal h2 {
  font-size: 1.5rem;
  margin: 0 0 10px;
  color: #333; /* Darker text for clarity */
  font-weight: 600; /* Bold heading */
}

button, .auth-btn {
    width: 100%;
    padding: 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

button:disabled {
    background: #ccc; /* Gray background */
    cursor: not-allowed; /* Show 'not-allowed' cursor */
    opacity: 0.6; /* Reduce opacity */
    transition: background 0.3s, opacity 0.3s;
}

button:hover {
    background: #5a67d8;
    animation: pulse 0.3s;
}

.auth-btn {
      margin: 0 auto;
      padding: 10px;
      margin-top: 5px;
	 background-color: #555; color: #fff;
    }
.auth-btn:hover {
background-color: #000;
}
    .auth-btn i {
      font-size: 18px;
    }

.google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #db4437; /* Google Red */
    color: white;
    font-size: 16px;
    font-weight: 600;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.google:hover {
    background: #c1351d;
    transform: translateY(-2px);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.2);
}
/* Input field styles */
/* Apply styles only to text inputs, not checkboxes */
input {
  font-size: 16px;
  letter-spacing: 1.5px; /* Adjust the value as needed */
}

input:not([type="checkbox"]) {
  width: 100%;
  padding: 12px;
  margin: 8px 0;
  border: 1px solid #ccc;
  border-radius: 8px; /* Rounded edges for a more modern look */
  
  transition: border-color 0.3s ease;
}

input[type="checkbox"] {
  width: auto;
  margin: 10px;
  transform: scale(1.5); /* Slightly bigger for better visibility */
}


.password-wrapper {
    position: relative;
    width: 100%;
}

.password-wrapper input {
    width: 100%;
    padding-right: 60px; /* Space for the eye icon */
    padding-left: 10px; /* Optional, for better alignment */
    font-size: 18px;
    background: ;
}

#show-password-icon, #show-confirm-password-icon  {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    cursor: pointer;
    color: var(--light-text);
    background:;
    padding: 10px;
    margin-right: -10px;
}

.password-wrapper input[type="password"]:focus + #show-password-icon {
    color: #007bff; /* Optional: change color when input is focused */
}

.password-wrapper input[type="password"]:focus + #show-confirm-password-icon {
    color: #007bff; /* Optional: change color when input is focused */
}


.error-message {
  color: red;
  font-size: 14px;
  margin-top: 10px;
  text-align: center;
}

.dropdown {
  position: relative;
  display: inline-block;
  margin-top: 0px;
  padding: 0px;
}


/* Main content area */
.main-content {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
  margin-top: 30px;
  padding: 30px;
}


@media (min-width: 768px) {
    body::before, body::after {
        content: ''; position: absolute; background: rgba(255, 255, 255, 0.1); z-index: -1;
        animation: rotate 15s linear infinite, morph 8s ease-in-out infinite;
    }
    body::before { top: 10%; left: 10%; width: 200px; height: 200px; }
    body::after { bottom: 10%; right: 10%; width: 300px; height: 300px; animation-direction: reverse; }

    @keyframes rotate { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

    @keyframes morph {
        0% { clip-path: circle(0% at 50% 50%); }  
        10% { clip-path: circle(50% at 50% 50%); }  
        20% { clip-path: polygon(50% 0%, 0% 100%, 100% 100%); }  
        35% { clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%); }  
        70% { clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%); }  
        85% { clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%); }  
        100% { clip-path: polygon(50% 50%, 50% 50%, 50% 50%, 50% 50%, 50% 50%, 50% 50%); }  
    }
}

.twofa-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.modal-2fa-content {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  padding: 2rem;
  border-radius: 1rem;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  text-align: center;
  color: #fff;
  font-family: "Segoe UI", sans-serif;
}

.modal-2fa-content h2 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.modal-2fa-content p {
  margin: 0.5rem 0;
  font-size: 0.95rem;
  color: #f0f0f0;
}

/* Code box style */
.code-input-container {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 1rem 0;
}

.code-box {
  width: 45px;
  height: 55px;
  font-size: 1.8rem;
  text-align: center;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.1);
  color: #fff;
  backdrop-filter: blur(5px);
  transition: all 0.3s ease;
}

.code-box:focus {
  border-color: #66b2ff;
  background: rgba(255, 255, 255, 0.2);
  outline: none;
}

/* Buttons */
.modal-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1rem;
}

.modal-actions button {
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background 0.3s ease;
}

#submit-2fa {
  background: rgba(0, 123, 255, 0.7);
  color: white;
}

#submit-2fa:hover {
  background: rgba(0, 123, 255, 0.9);
}

#cancel-2fa {
  background: rgba(200, 200, 200, 0.3);
  color: #fff;
}

#cancel-2fa:hover {
  background: rgba(200, 200, 200, 0.5);
}

/* Error and timer */
#twofa-attempts-left {
  color: #ff6666;
  font-weight: bold;
  margin-top: 10px;
}

#twofa-timer {
  color: #ccc;
  font-size: 0.9rem;
}

@keyframes popIn {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-2fa-content {
  animation: popIn 0.4s ease-out;
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(40px) scale(0.8);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.code-box {
  animation: fadeInUp 0.4s ease forwards;
  opacity: 0;
}

.code-box:nth-child(1) { animation-delay: 0.1s; }
.code-box:nth-child(2) { animation-delay: 0.2s; }
.code-box:nth-child(3) { animation-delay: 0.3s; }
.code-box:nth-child(4) { animation-delay: 0.4s; }
.code-box:nth-child(5) { animation-delay: 0.5s; }
.code-box:nth-child(6) { animation-delay: 0.6s; }

.twofa-modal.hidden {
  display: none;
  opacity: 0;
}

.twofa-modal.show {
  display: flex;
  animation: fadeInBackdrop 0.3s ease forwards;
}

@keyframes fadeInBackdrop {
  from { opacity: 0; }
  to { opacity: 1; }
}

.hidden {
    display:none;
}


.password-strength {
    margin-bottom: 15px;
}

.strength-meter {
    height: 5px;
    background-color: var(--secondary-color);
    border-radius: 3px;
    margin-bottom: 6px;
}

.strength-bar {
    height: 100%;
    width: 0;
    border-radius: 3px;
    transition: width var(--transition-speed) ease, background-color var(--transition-speed) ease;
}

.strength-text {
    font-size: 13px;
    color: var(--light-text);
}

.password-requirements {
    background-color: var(--secondary-color);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 15px;
}

.password-requirements p {
    font-size: 13px;
    margin-bottom: 8px;
    font-weight: 500;
}

.password-requirements ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
}

.password-requirements li {
    font-size: 13px;
    margin-bottom: 4px;
    color: var(--light-text);
    display: flex;
    align-items: center;
}

.password-requirements li i {
    margin-right: 8px;
    color: var(--error-color);
}

.password-requirements li i.fa-check-circle {
    color: var(--success-color);
}

input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 10px 40px 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    color: var(--text-color);
    background-color: var(--secondary-color);
    transition: border-color var(--transition-speed) ease;
}
input:focus {
    outline: none;
    border-color: var(--primary-color);
}
input::placeholder {
    color: var(--light-text);
}


.password-strength,
.password-requirements {
  opacity: 0;
  transform: translateY(-10px); /* start slightly above */
  display: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.visible {
  display: block;
  opacity: 1;
  transform: translateY(0); /* slide into place */
}




