:root {
  --primary-color: #6a4cac;
  --secondary-color: #4a2e8a;
  --background: #435165;
  --card-background: #fff;
  --text-color: #333;
  --muted-text: #666;
  /* etc. */
}
* {
  box-sizing: border-box;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  /* The global background will be provided by your site's variables.
     Fallback is kept as-is, but ideally your --background (set by your main CSS)
     will be used so it reflects the overall site style. */
    background: linear-gradient(180deg, #321b66 0%, #6a4cac 100%);
  margin: 0;
}

/* Container for login and register forms */
.login, .register {
  width: 400px;
  background: var(--card-background, #ffffff);
  box-shadow: 0 0 9px rgba(0, 0, 0, 0.3);
  margin: 100px auto;
}

.login h1, .register h1 {
  text-align: center;
  color: var(--muted-text, #5b6574);
  font-size: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-color, #dee0e4);
}

/* Navigation links for switching between Login and Register */
.login .links, .register .links {
  display: flex;
  padding: 0 15px;
}

.login .links a, .register .links a {
  color: var(--muted-text, #adb2ba);
  text-decoration: none;
  display: inline-flex;
  padding: 0 10px 10px 10px;
  font-weight: bold;
}

.login .links a:hover, .register .links a:hover {
  color: var(--secondary-hover, #9da3ac);
}

.login .links a.active, .register .links a.active {
  border-bottom: 3px solid var(--primary-color, #6a4cac);
  color: var(--primary-color, #6a4cac);
}
/* Login Hero Container – Centers the login form and hero text */
.login-hero-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 40px 20px;
  text-align: center;
  color: #fff; /* Assuming a dark overlay background behind this container */
}

/* Styling for the hero title and description */
.login-hero-container h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.login-hero-container p {
  font-size: 1rem;
  max-width: 600px;
  margin: 0 auto 2rem auto;
  line-height: 1.5;
}

/* If you are using a hero background image on the body, 
   you might also want to add an overlay for better contrast */
.login-hero-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5); /* dark overlay */
  z-index: -1; /* place behind container content */
}

/* Form layout */
.login form, .register form {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  padding-top: 20px;
}

/* Form label styled as a fixed-width block with purple background */
.login form label, .register form label {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 12%;
  height: 50px;
  background: var(--primary-color, #6a4cac);
  color: var(--invert-text, #ffffff);
}

/* Input fields */
.login form input[type="text"],
.login form input[type="password"],
.login form input[type="email"],
.register form input[type="text"],
.register form input[type="password"],
.register form input[type="email"] {
  width: 80%;
  height: 50px;
  border: 1px solid var(--border-color, #dee0e4);
  margin-bottom: 20px;
  padding: 0 15px;
}

/* Submit Button */
.login form input[type="submit"],
.register form input[type="submit"] {
  width: 100%;
  padding: 15px;
  margin-top: 20px;
  background: var(--primary-color, #6a4cac);
  border: 0;
  cursor: pointer;
  font-weight: bold;
  color: var(--invert-text, #ffffff);
  transition: background-color 0.2s;
  border-radius: 0;
  appearance: none;
}

.login form input[type="submit"]:hover,
.register form input[type="submit"]:hover {
  background: var(--primary-hover, #543d8e);
}

/* "Remember me" styling */
.login form #rememberme,
.register form #rememberme {
  width: 100%;
  height: auto;
  padding: 5px 20px;
  background: transparent;
  color: var(--text-color, #000);
  justify-content: flex-start;
}

.login form #rememberme input,
.register form #rememberme input {
  transform: scale(1.3);
  margin-right: 7px;
}

/* Message area */
.login form .msg,
.register form .msg {
  padding: 0 20px;
  width: 100%;
}

/* Additional link below the form */
.login form > a,
.register form > a {
  text-decoration: none;
  color: var(--muted-text, #5b6574);
  width: 100%;
  padding: 5px 20px;
}

.login form > a:hover,
.register form > a:hover {
  color: var(--text-color, #394049);
}
.fas.fa-user {
  font-size: 1.2em;
  color: var(--primary-color, #6a4cac);
  /* Optionally, adjust vertical alignment if needed */
  vertical-align: middle;
  margin-right: 4px;
}

/* Navigation bar (if present on these pages) */
.navtop {
  background: var(--secondary-color);
  height: 60px;
  /* ... */
}
.navtop .wrapper {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  /* ... */
}


.navtop div {
  display: flex;
  margin: 0 auto;
  width: 1000px;
  height: 100%;
}

.navtop div h1, .navtop div a {
  display: inline-flex;
  align-items: center;
}

.navtop div h1 {
  flex: 1;
  font-size: 24px;
  padding: 0;
  margin: 0;
  color: var(--invert-text, #eaebed);
  font-weight: normal;
}

.navtop div a {
  padding: 0 20px;
  text-decoration: none;
  color: var(--muted-text, #c1c4c8);
  font-weight: bold;
}

.navtop div a i {
  padding: 2px 8px 0 0;
}

.navtop div a:hover {
  color: var(--invert-text, #eaebed);
}

.nav-icon {
  height: 1em; /* Matches the text height */
  width: auto; /* Maintain aspect ratio */
  vertical-align: middle;
}

/* Background changes when user is logged in (if applicable) */
body.loggedin {
  background: var(--background, #f3f4f7);
}

/* Responsive adjustments */
@media screen and (max-width: 400px) {
  .login, .register {
    width: 95%;
  }
}

/* Basic Popup Styling */
.alpha-popup {
  position: fixed; /* Keeps it in view even when scrolling */
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%); /* Centers the popup */
  width: 80%; /* Adjust width as needed */
  max-width: 500px; /* Maximum width */
  background-color: #fefefe;
  padding: 25px;
  border: 1px solid #ccc;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  z-index: 1000; /* Ensures it's on top of other content */
  text-align: center;
  border-radius: 8px;
  transition: opacity 0.3s ease, visibility 0.3s ease; /* Smooth fade */
  opacity: 1;
  visibility: visible;
}

/* Style for when the popup should be hidden */
.alpha-popup.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none; /* Prevent interaction when hidden */
}

.alpha-popup-content h2 {
  margin-top: 0;
  color: #d9534f; /* A warning-like color */
}

.alpha-popup-content p {
  margin-bottom: 15px;
  line-height: 1.5;
  color: #333;
}

.alpha-popup-content button {
  background-color: #5cb85c; /* A green 'accept' color */
  color: white;
  border: none;
  padding: 12px 25px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.alpha-popup-content button:hover {
  background-color: #4cae4c;
}


body.alpha-popup-active::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

/* Experience/Progress Bar Styles */
.exp-bar {
  margin: 15px 0;
  padding: 10px;
  background: #f5f5f5;
  border-radius: 8px;
}
.progress-bar {
  height: 20px;
  background: #ddd;
  border-radius: 10px;
  margin: 5px 0;
}
.progress-fill {
  height: 100%;
  background: #4CAF50;
  border-radius: 10px;
  transition: width 0.3s;
}
.exp-label, .exp-to-next {
  font-size: 0.9em;
  color: #666;
}
