:root {
  --primary-color: #FFD700; /* Gold */
  --secondary-color: #B22222; /* Red */
  --text-light: #ffffff;
  --text-dark: #333333;
  --bg-dark: #0d0d0d;
  --card-bg-light: #ffffff;
  --card-bg-dark-transparent: rgba(255, 255, 255, 0.1);
  --border-color: #e0e0e0;
  --shadow-light: 0 4px 12px rgba(0, 0, 0, 0.15);
  --shadow-dark: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.page-login {
  font-family: 'Arial', sans-serif;
  color: var(--text-light); /* Default text color for dark body background */
  background-color: var(--bg-dark); /* Inherited from shared.css body, but explicit here for clarity */
  line-height: 1.6;
}

.page-login__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.page-login__section-title {
  font-size: 36px;
  font-weight: bold;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 40px;
  line-height: 1.2;
}

.page-login__section-description {
  font-size: 18px;
  color: var(--text-light);
  text-align: center;
  margin-bottom: 50px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Buttons */
.page-login__btn-primary,
.page-login__cta-button {
  display: inline-block;
  padding: 15px 30px;
  background: var(--primary-color);
  color: var(--text-dark); /* Ensure contrast with gold background */
  text-decoration: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-light);
  border: none;
  cursor: pointer;
  white-space: normal;
  word-wrap: break-word;
}

.page-login__btn-primary:hover,
.page-login__cta-button:hover {
  background: #e6c200; /* Slightly darker gold */
  transform: translateY(-2px);
  box-shadow: var(--shadow-dark);
}

.page-login__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  text-decoration: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-light);
  cursor: pointer;
  white-space: normal;
  word-wrap: break-word;
}

.page-login__btn-secondary:hover {
  background: var(--primary-color);
  color: var(--text-dark); /* Ensure contrast */
  transform: translateY(-2px);
  box-shadow: var(--shadow-dark);
}

/* Card base style */
.page-login__card {
  background: var(--card-bg-dark-transparent); /* Semi-transparent white for dark background */
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  color: var(--text-light);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-login__card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

/* Hero Section */
.page-login__hero-section {
  position: relative;
  padding: 120px 0 80px; /* Desktop padding-top for fixed header */
  text-align: center;
  background-image: url('[GALLERY:bg:lucky88 club,login,hero_background]'); /* Background image for hero */
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: var(--text-light);
}

.page-login__hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7); /* Dark overlay for text readability */
  z-index: 1;
}

.page-login__hero-section > .page-login__container {
  position: relative;
  z-index: 2;
}

.page-login__main-title {
  font-size: 48px;
  font-weight: 900;
  margin-bottom: 20px;
  color: var(--primary-color);
  line-height: 1.2;
}

.page-login__subtitle {
  font-size: 22px;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-light);
}

.page-login__login-card {
  background: rgba(255, 255, 255, 0.08); /* Slightly more transparent for a lighter feel */
  border-radius: 12px;
  padding: 40px;
  max-width: 500px;
  margin: 40px auto 0;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: left;
}

.page-login__card-title {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 30px;
}

.page-login__form-group {
  margin-bottom: 20px;
}

.page-login__form-label {
  display: block;
  font-size: 16px;
  color: var(--text-light);
  margin-bottom: 8px;
  font-weight: 600;
}

.page-login__form-input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.4);
  color: var(--text-light);
  font-size: 16px;
  box-sizing: border-box;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.page-login__form-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.page-login__form-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(var(--primary-color), 0.3);
  outline: none;
}

.page-login__form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  font-size: 15px;
}

.page-login__remember-me {
  display: flex;
  align-items: center;
}

.page-login__checkbox {
  margin-right: 8px;
  accent-color: var(--primary-color); /* Style checkbox */
}

.page-login__checkbox-label {
  color: var(--text-light);
}

.page-login__forgot-password-link {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-login__forgot-password-link:hover {
  color: #e6c200;
  text-decoration: underline;
}

.page-login__submit-button {
  width: 100%;
  padding: 15px;
  font-size: 20px;
  margin-bottom: 20px;
}

.page-login__register-prompt {
  text-align: center;
  color: var(--text-light);
  font-size: 16px;
}

.page-login__register-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-login__register-link:hover {
  color: #e6c200;
  text-decoration: underline;
}

/* Why Choose Section */
.page-login__why-choose-section {
  background-color: var(--bg-dark);
  padding: 80px 0;
  color: var(--text-light);
}

.page-login__features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.page-login__feature-item {
  text-align: center;
  padding: 30px;
  background: var(--card-bg-dark-transparent);
}

.page-login__feature-icon {
  width: 120px; /* Base size, actual image will be >200px */
  height: auto;
  margin-bottom: 20px;
  max-width: 100%; /* Responsive image */
  height: auto;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.page-login__feature-title {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.page-login__feature-description {
  font-size: 16px;
  color: var(--text-light);
}

/* Game Overview Section */
.page-login__game-overview-section {
  background-color: #1a1a1a; /* Slightly lighter dark background */
  padding: 80px 0;
  color: var(--text-light);
}

.page-login__game-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.page-login__game-category {
  text-align: center;
  background: var(--card-bg-dark-transparent);
  padding: 25px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-login__game-image {
  width: 100%;
  height: 200px; /* Fixed height for consistency, object-fit will ensure aspect ratio */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  max-width: 100%; /* Responsive image */
  height: auto;
  display: block;
}

.page-login__game-title {
  font-size: 22px;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.page-login__game-description {
  font-size: 15px;
  color: var(--text-light);
  margin-bottom: 20px;
  flex-grow: 1; /* Push button to bottom */
}

/* Promotions Section */
.page-login__promotions-section {
  background-color: var(--bg-dark);
  padding: 80px 0;
  color: var(--text-light);
}

.page-login__promo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.page-login__promo-card {
  background: var(--card-bg-dark-transparent);
  display: flex;
  flex-direction: column;
  padding: 0; /* Remove padding from card, content inside will have padding */
  overflow: hidden;
}

.page-login__promo-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 10px 10px 0 0;
  max-width: 100%; /* Responsive image */
  height: auto;
  display: block;
}

.page-login__promo-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-login__promo-title {
  font-size: 22px;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.page-login__promo-description {
  font-size: 15px;
  color: var(--text-light);
  margin-bottom: 20px;
  flex-grow: 1;
}

/* FAQ Section */
.page-login__faq-section {
  background-color: #1a1a1a;
  padding: 80px 0;
  color: var(--text-light);
}

.page-login__faq-list {
  max-width: 900px;
  margin: 0 auto;
}

.page-login__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
  background: var(--card-bg-dark-transparent); /* Ensure background for contrast */
}

/* FAQ default state - answer hidden */
.page-login__faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.4s ease;
  padding: 0 20px; /* Adjusted padding */
  opacity: 0;
  color: var(--text-light);
}

/* FAQ expanded state - ⚠️ Use!important and sufficiently large max-height */
.page-login__faq-item.active .page-login__faq-answer {
  max-height: 2000px !important; /* ⚠️ Use!important ensure priority, value large enough to accommodate any content */
  padding: 20px !important; /* Adjusted padding */
  opacity: 1;
  background: rgba(255, 255, 255, 0.05); /* Slightly different background for expanded answer */
  border-radius: 0 0 5px 5px;
}

/* Question style */
.page-login__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.1); /* Lighter background for question */
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-login__faq-question:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.page-login__faq-question:active {
  background: rgba(255, 255, 255, 0.1);
}

/* Question title style */
.page-login__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Prevent h3 from blocking click event */
  color: var(--primary-color); /* Question title in primary color */
}

/* Toggle icon */
.page-login__faq-toggle {
  font-size: 28px; /* Increased size for better visibility */
  font-weight: bold;
  line-height: 1;
  color: var(--primary-color); /* Icon in primary color */
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Prevent icon from blocking click event */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; /* Increased size */
  height: 32px;
}

.page-login__faq-item.active .page-login__faq-toggle {
  color: var(--text-light); /* White when active */
  transform: rotate(45deg); /* Optional: rotate for 'x' effect */
}

/* Call to Action Section */
.page-login__cta-section {
  background-color: var(--bg-dark);
  padding: 80px 0;
  text-align: center;
  color: var(--text-light);
}

.page-login__cta-content {
  max-width: 800px;
}

.page-login__cta-description {
  font-size: 20px;
  margin-bottom: 40px;
  color: var(--text-light);
}

.page-login__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-login__main-title {
    font-size: 42px;
  }
  .page-login__section-title {
    font-size: 32px;
  }
  .page-login__subtitle {
    font-size: 20px;
  }
  .page-login__login-card {
    padding: 30px;
  }
}

@media (max-width: 768px) {
  .page-login__hero-section {
    padding-top: 100px !important; /* Mobile padding-top for fixed header */
    padding-bottom: 60px;
  }
  .page-login__main-title {
    font-size: 36px;
  }
  .page-login__subtitle {
    font-size: 18px;
  }
  .page-login__login-card {
    max-width: 100%;
    padding: 25px;
  }
  .page-login__section-title {
    font-size: 28px;
    margin-bottom: 30px;
  }
  .page-login__section-description {
    font-size: 16px;
    margin-bottom: 30px;
    padding: 0 15px;
  }
  .page-login__features-grid,
  .page-login__game-categories,
  .page-login__promo-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 15px; /* Add padding to grids to prevent content touching edges */
  }

  /* Image responsiveness */
  .page-login img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-login__feature-icon,
  .page-login__game-image,
  .page-login__promo-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important; /* Allow height to adjust */
    object-fit: contain !important; /* Ensure full image is visible */
  }

  /* Video responsiveness (if any, though not for login page here) */
  .page-login video,
  .page-login__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  .page-login__video-section,
  .page-login__video-container,
  .page-login__video-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }

  /* Button responsiveness */
  .page-login__btn-primary,
  .page-login__btn-secondary,
  .page-login__cta-button,
  .page-login__submit-button {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 20px !important;
    font-size: 16px !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-login__cta-buttons {
    flex-direction: column; /* Stack buttons vertically */
    gap: 15px;
    padding: 0 15px;
  }

  .page-login__faq-question h3 {
    font-size: 16px;
  }
  .page-login__faq-toggle {
    font-size: 24px;
    width: 28px;
    height: 28px;
  }
  .page-login__faq-answer {
    padding: 0 15px;
  }
  .page-login__faq-item.active .page-login__faq-answer {
    padding: 15px !important;
  }
  .page-login__card {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .page-login__main-title {
    font-size: 30px;
  }
  .page-login__section-title {
    font-size: 24px;
  }
  .page-login__subtitle {
    font-size: 16px;
  }
  .page-login__login-card {
    padding: 20px;
  }
  .page-login__form-input {
    font-size: 14px;
  }
  .page-login__submit-button {
    font-size: 18px;
  }
  .page-login__register-prompt,
  .page-login__forgot-password-link,
  .page-login__checkbox-label {
    font-size: 14px;
  }
  .page-login__feature-title,
  .page-login__game-title,
  .page-login__promo-title {
    font-size: 20px;
  }
  .page-login__feature-description,
  .page-login__game-description,
  .page-login__promo-description {
    font-size: 14px;
  }
  .page-login__btn-primary,
  .page-login__btn-secondary,
  .page-login__cta-button {
    font-size: 15px !important;
    padding: 10px 15px !important;
  }
}