/* BoardBoost Authentication Pages Styling */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&display=swap");

/* Base styles */
body {
  background-color: #1e1e2e;
  color: #efefef;
  font-family: "Inter", sans-serif;
  line-height: 1.5;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* Fixed positioning for background effects to ensure they cover the entire viewport */
body::before {
  content: "";
  position: fixed;
  width: 300%;
  height: 300%;
  top: -100%;
  left: -100%;
  background: radial-gradient(
      circle at 30% 50%,
      rgba(108, 127, 232, 0.08) 0%,
      rgba(108, 127, 232, 0) 35%
    ),
    radial-gradient(
      circle at 70% 80%,
      rgba(38, 192, 211, 0.08) 0%,
      rgba(38, 192, 211, 0) 35%
    ),
    radial-gradient(
      circle at 50% 30%,
      rgba(240, 97, 109, 0.08) 0%,
      rgba(240, 97, 109, 0) 40%
    );
  z-index: -2;
  /* Lower z-index to ensure it's behind everything */
  animation: gentleGradient 25s ease infinite;
  pointer-events: none;
  /* Ensure it doesn't interfere with clicks */
}

body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(
      90deg,
      rgba(108, 127, 232, 0.04) 1px,
      transparent 1px
    ),
    linear-gradient(0deg, rgba(108, 127, 232, 0.04) 1px, transparent 1px);
  background-size: 20px 20px;
  z-index: -1;
  /* Higher than the gradient but still behind content */
  animation: gentleWave 30s linear infinite;
  pointer-events: none;
  /* Ensure it doesn't interfere with clicks */
}

@keyframes gentleGradient {
  0% {
    transform: translate(0%, 0%) rotate(0deg);
  }

  50% {
    transform: translate(-3%, 3%) rotate(1deg);
  }

  100% {
    transform: translate(0%, 0%) rotate(0deg);
  }
}

@keyframes gentleWave {
  0% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-8px) rotate(0.3deg);
  }

  100% {
    transform: translateY(0) rotate(0deg);
  }
}

/* Header styling */
.header {
  background-color: #282838;
  padding: 0 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
  position: relative;
  z-index: 10;
}

.header::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #6c7fe8, #26c0d3, #f0616d);
}

.logo {
  display: flex;
  align-items: center;
}

.logo h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #efefef;
}

.logo-img {
  height: 24px;
  width: 24px;
  margin-right: 10px;
}

/* Header navigation */
.header-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-welcome {
  color: #b8b8c0;
  font-size: 14px;
}

#tokens-remaining {
  color: #8c8c98;
  font-size: 13px;
  background-color: rgba(30, 30, 46, 0.5);
  padding: 4px 8px;
  border-radius: 4px;
}

.logout-button,
.login-button,
.signup-button,
.settings-button {
  background-color: #1e1e2e;
  color: #efefef;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 14px;
  transition: all 0.2s ease-in-out;
}

.login-button {
  background-color: transparent;
  border: 1px solid #6c7fe8;
}

.signup-button {
  background-color: #6c7fe8;
}

.logout-button:hover,
.login-button:hover,
.signup-button:hover,
.settings-button:hover {
  background-color: #6c7fe8;
  color: white;
  transform: translateY(-1px);
}

/* Responsive adjustments for header */
@media (max-width: 600px) {
  .header {
    padding: 0 12px;
    height: auto;
    flex-wrap: wrap;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .header-nav {
    gap: 8px;
    margin-left: auto;
  }

  .user-welcome {
    display: none;
  }
}

/* More compact styling specifically for signup form */
.auth-container.signup {
  max-width: 340px;
  padding: 20px;
}

.auth-container.signup h2 {
  margin-bottom: 16px;
  font-size: 18px;
}

.auth-container.signup form p {
  margin-bottom: 10px;
}

.auth-container.signup label {
  font-size: 13px;
  margin-bottom: 4px;
}

.auth-container.signup input {
  padding: 8px 12px;
  margin-bottom: 4px;
  font-size: 13px;
}

.auth-container.signup small {
  font-size: 11px;
  opacity: 0.8;
  line-height: 1.3;
  margin-top: 1px;
}

.auth-container.signup button {
  padding: 8px 12px;
  margin-top: 4px;
}

.auth-container.signup p {
  margin-top: 14px;
  font-size: 13px;
}

/* Make the help text more compact and readable */
.auth-container.signup .helptext {
  display: block;
  font-size: 11px;
  color: #8c8c98;
  margin-top: 1px;
  line-height: 1.3;
}

/* Remove excess margin on specific fields that might have help text */
.auth-container.signup input + small + .helptext {
  margin-top: -2px;
}

/* Ensure error messages are compact as well */
.auth-container.signup .errorlist {
  margin-bottom: 10px;
  font-size: 12px;
}

.auth-container.signup .errorlist li {
  padding: 6px 8px;
}

/* Condensed authentication container */
.auth-container {
  position: relative;
  z-index: 1;
  /* Ensure it's above the background effects */
  max-width: 360px;
  margin: 32px auto;
  padding: 24px;
  background-color: #282838;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  background-color: rgba(40, 40, 56, 0.9);
  border: 1px solid rgba(108, 127, 232, 0.1);
}

/* Styled top border for container */
.auth-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #6c7fe8, #26c0d3, #f0616d);
}

.auth-container h2 {
  text-align: center;
  color: #efefef;
  margin-bottom: 20px;
  font-size: 20px;
  font-weight: 600;
}

/* Compact form styling */
.auth-container form {
  display: flex;
  flex-direction: column;
}

.auth-container form p {
  margin-bottom: 14px;
}

.auth-container label {
  color: #b8b8c0;
  margin-bottom: 6px;
  font-weight: 500;
  display: block;
  font-size: 14px;
}

.auth-container input[type="text"],
.auth-container input[type="password"],
.auth-container input[type="email"] {
  width: 100%;
  padding: 10px 14px;
  margin-bottom: 6px;
  background-color: #1e1e2e;
  border: 1px solid #3d3d4d;
  border-radius: 6px;
  color: #efefef;
  transition: all 0.2s ease-in-out;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  box-sizing: border-box;
}

.auth-container input[type="text"]:focus,
.auth-container input[type="password"]:focus,
.auth-container input[type="email"]:focus {
  outline: none;
  border-color: #6c7fe8;
  box-shadow: 0 0 0 2px rgba(108, 127, 232, 0.25);
}

.auth-container small {
  color: #8c8c98;
  font-size: 12px;
  margin-top: 2px;
  display: block;
}

.auth-container button {
  width: 100%;
  padding: 10px 14px;
  background-color: #6c7fe8;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s ease-in-out;
  margin-top: 6px;
  font-family: "Inter", sans-serif;
}

.auth-container button:hover {
  background-color: #5b6ed7;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(108, 127, 232, 0.25);
}

.auth-container button:active {
  transform: translateY(0);
  box-shadow: none;
}

.auth-container p {
  text-align: center;
  margin-top: 18px;
  color: #b8b8c0;
  font-size: 14px;
}

.auth-container a {
  color: #26c0d3;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
  font-weight: 500;
}

.auth-container a:hover {
  color: #6c7fe8;
  text-decoration: underline;
}

/* Error messages */
.auth-container .errorlist {
  color: #e84a5f;
  list-style-type: none;
  padding: 0;
  margin-bottom: 14px;
  font-size: 13px;
}

.auth-container .errorlist li {
  background-color: rgba(232, 74, 95, 0.1);
  padding: 8px 10px;
  border-radius: 4px;
  border-left: 3px solid #e84a5f;
  margin-bottom: 3px;
}

.g-recaptcha {
  margin: 0px 0px;
}

/* Center the captcha */
.g-recaptcha > div {
  margin: 0 auto;
}

.user-welcome {
  color: #b8b8c0;
  margin-right: auto;
}

#tokens-remaining {
  color: #8c8c98;
  font-size: 13px;
}

.logout-button,
.login-button,
.signup-button,
.settings-button {
  background-color: #1e1e2e;
  color: #efefef;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 14px;
  transition: all 0.2s ease-in-out;
}

.logout-button:hover,
.login-button:hover,
.signup-button:hover,
.settings-button:hover {
  background-color: #6c7fe8;
  color: white;
}

/* Content area */
.content {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .auth-container {
    margin: 16px;
    padding: 20px;
    width: auto;
  }
}
