/* Global Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: 'Inter', sans-serif;
  background-color: #1d1d1d;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  padding: 20px;
  font-size: 14px;
}
.top-button-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}
.container {
  background-color: #2d2d2d;
  border-radius: 12px;
  padding: 40px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
  text-align: center;
  max-width: 400px;
  width: 100%;
}
/* Typography */
h1 {
  color: white;
  margin-bottom: 30px;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 700;
}
h2 {
  color: white;
  margin-bottom: 20px;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 600;
}
/* Logo */
.logo {
  width: 120px;
  margin-bottom: 20px;
}
/* Buttons */
.button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 20px;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin-bottom: 15px;
}
.button.primary {
  background-color: #9575cd;
  color: white;
}
.button.primary:hover {
  background-color: #7e57c2;
}
/* Form Elements */
input[type="email"],
input[type="password"],
input[type="text"] {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border: 1px solid #424242;
  border-radius: 4px;
  font-size: 16px;
  background-color: #1d1d1d;
  color: white;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
input:focus {
  outline: none;
  border-color: #9575cd;
  box-shadow: 0 0 0 2px rgba(149, 117, 205, 0.2);
}
/* Autofill styles */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-text-fill-color: white !important;
  -webkit-box-shadow: 0 0 0 30px #2d2d2d inset !important;
  transition: background-color 5000s ease-in-out 0s;
}
/* Password Strength */
#passwordStrength,
#passwordStrengthNew,
#tempPasswordStrength {
  height: 5px;
  margin-bottom: 15px;
  border-radius: 2px;
  transition: width 0.3s ease, background-color 0.3s ease;
}
/* Policy Text */
.policy {
  font-size: 12px;
  color: #858585;
  margin-top: 20px;
}
.policy a {
  color: #9575cd;
  text-decoration: none;
}
.policy a:hover {
  text-decoration: underline;
}
/* Password Match Message */
#passwordMatch,
#passwordMatchNew,
#tempPasswordMatch {
  color: #ff4d4d;
  font-size: 14px;
  margin-bottom: 15px;
}
#passwordMatch.match,
#passwordMatchNew.match,
#tempPasswordMatch.match {
  color: #4CAF50;
}
/* Google Sign-In Button */
#googleSignInWrapper {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Divider */
.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 20px 0;
}
.divider::before,
.divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #424242;
}
.divider span {
  padding: 0 10px;
  color: #a0a0a0;
  font-size: 14px;
}
/* Email Verification Section */
#emailVerificationSection {
  text-align: center;
}
#emailVerificationSection p {
  margin-bottom: 20px;
  font-size: 14px;
}
#verificationEmail {
  font-weight: 600;
}
#resendCodeButton {
  background: none;
  border: none;
  color: #9575cd;
  cursor: pointer;
  font-size: 14px;
  margin-top: 10px;
  text-decoration: underline;
}
#resendCodeButton:hover {
  color: #7e57c2;
}
/* Loading Overlay */
#loadingOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
#loadingOverlay.hidden {
  display: none;
}
.loader {
  border: 5px solid #f3f3f3;
  border-top: 5px solid #9575cd;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
/* Password Reset Sections */
#resetPasswordRequestSection,
#resetPasswordSection {
  text-align: left;
}
#resetPasswordRequestSection h2,
#resetPasswordSection h2 {
  margin-bottom: 15px;
}
#resetPasswordRequestSection p,
#resetPasswordSection p {
  margin-bottom: 20px;
  font-size: 14px;
  color: #a0a0a0;
}
#forgotPasswordLink {
  display: block;
  text-align: right;
  color: #9575cd;
  text-decoration: none;
  font-size: 14px;
  margin-top: 10px;
}
#forgotPasswordLink:hover {
  text-decoration: underline;
}
/* New Tier Selection and Payment Sections */
#tierSelectionSection,
#paymentInfoSection,
#paymentSuccessSection {
  text-align: center;
  margin-top: 20px;
}
#tierSelectionSection label {
  display: block;
  margin-bottom: 10px;
  font-size: 16px;
  cursor: pointer;
}
#card-element {
  background-color: #1d1d1d;
  padding: 12px;
  border: 1px solid #424242;
  border-radius: 4px;
  margin-bottom: 15px;
  color: white;
}
/* Utility Classes */
.hidden {
  display: none;
}
/* Responsive Design */
@media (max-width: 480px) {
  .container {
    padding: 30px 20px;
  }
  h1 {
    font-size: 24px;
  }
  h2 {
    font-size: 20px;
  }
}
/* Selection style */
::selection {
  background-color: #33006eff;
}
#signupEmailField {
  cursor: pointer;
}
/* Buy Credits Page Specific Styles */
.container header p {
  margin-top: 10px;
  font-size: 14px;
  color: #a0a0a0;
}

#table-container {
  margin-top: 20px;
}

/* Top Bar for Back Button & Wallet Balance */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0px;
}

/* Remove absolute positioning from back button */
.back-button {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: #9575cd;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
}

.back-button:hover {
  text-decoration: underline;
}

.wallet-balance {
  font-size: 16px;
  font-weight: 600;
  color: #a0a0a0;
}

/* Local loader for the pricing table */
.table-loading-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}
.table-loading-indicator p {
  margin-top: 10px;
  color: #a0a0a0;
  font-size: 14px;
}

/* Hide the existing #table-container until ready to display */
#table-container {
  margin-top: 30px;
}

#tempPasswordSection p {
    margin-bottom: 30px;
    font-size: 14px;
    color: #a0a0a0;
}

#tempPasswordSection input {
    margin-top: 15px;
}

#tempPasswordSection input:first-of-type {
    margin-top: 0;
}