.page-login {
  background-color: var(--bg-color, #140C0C); /* Fallback to custom background color if --bg-color is not set */
  color: #FFF1E8; /* Main text color for dark background */
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
}

.page-login__hero-section {
  display: flex;
  flex-direction: column; /* Ensure image is above content */
  align-items: center;
  text-align: center;
  padding-top: 10px; /* Small top padding as body handles header offset */
  padding-bottom: 40px;
  background-color: #140C0C; /* Using custom background color */
  position: relative;
  overflow: hidden;
}

.page-login__hero-image-wrapper {
  width: 100%;
  max-width: 100%;
  position: relative;
  margin-bottom: 20px;
}

.page-login__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.page-login__hero-content {
  max-width: 800px;
  padding: 0 20px;
  z-index: 1;
}

.page-login__main-title {
  font-size: 3.2em; /* Using em for flexibility */
  font-weight: 700;
  color: #F3C54D; /* Gold for main title */
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-login__intro-text {
  font-size: 1.1em;
  margin-bottom: 30px;
  color: #FFF1E8;
}

.page-login__cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
  width: 100%; /* Ensure container takes full width */
  max-width: 500px; /* Limit overall width for desktop */
  margin: 0 auto;
  box-sizing: border-box;
  padding: 0 15px; /* Add padding to prevent overflow */
}

.page-login__btn-primary,
.page-login__btn-secondary,
.page-login__game-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Allow text to break words */
  box-sizing: border-box;
  max-width: 100%; /* Ensure buttons don't exceed container width */
}

.page-login__btn-primary {
  background: linear-gradient(180deg, #FFB04A 0%, #D86A14 100%);
  color: #FFF1E8;
  border: none;
  box-shadow: 0 4px 15px rgba(255, 176, 74, 0.4);
}

.page-login__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 176, 74, 0.6);
}

.page-login__btn-secondary {
  background: transparent;
  color: #F3C54D; /* Gold text */
  border: 2px solid #F3C54D; /* Gold border */
}

.page-login__btn-secondary:hover {
  background: rgba(243, 197, 77, 0.1); /* Light gold background on hover */
  transform: translateY(-2px);
}

.page-login__btn-large {
  min-width: 250px;
}

.page-login__section-title {
  font-size: 2.5em;
  font-weight: 700;
  color: #F3C54D; /* Gold for section titles */
  text-align: center;
  margin-bottom: 40px;
  padding: 0 15px;
}

.page-login__features-section,
.page-login__process-section,
.page-login__games-showcase-section,
.page-login__faq-section,
.page-login__cta-bottom-section {
  padding: 60px 20px;
  max-width: 1200px;
  margin: 0 auto;
  box-sizing: border-box;
}

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

.page-login__feature-card {
  background-color: #2A1212; /* Card BG color */
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid #6A1E1E; /* Border color */
}

.page-login__feature-icon {
  width: 100%;
  max-width: 200px; /* Adjust size for feature icons */
  height: auto;
  margin-bottom: 20px;
  border-radius: 8px;
  object-fit: cover;
}

.page-login__feature-title {
  font-size: 1.8em;
  font-weight: 600;
  color: #F3C54D; /* Gold for feature titles */
  margin-bottom: 15px;
}

.page-login__feature-description {
  font-size: 1em;
  color: #FFF1E8;
}

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

.page-login__step-item {
  background-color: #2A1212; /* Card BG color */
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  border: 1px solid #6A1E1E; /* Border color */
}

.page-login__step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(180deg, #FFB04A 0%, #D86A14 100%);
  color: #FFF1E8;
  font-size: 1.8em;
  font-weight: 700;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(255, 176, 74, 0.4);
}

.page-login__step-title {
  font-size: 1.5em;
  font-weight: 600;
  color: #F3C54D; /* Gold for step titles */
  margin-bottom: 15px;
}

.page-login__step-description {
  font-size: 1em;
  color: #FFF1E8;
}

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

.page-login__game-card {
  background-color: #2A1212; /* Card BG color */
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid #6A1E1E; /* Border color */
}

.page-login__game-image {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 15px;
  display: block; /* Ensure it behaves as a block element for max-width */
}

.page-login__game-title {
  font-size: 1.6em;
  font-weight: 600;
  color: #F3C54D; /* Gold for game titles */
  margin-bottom: 10px;
}

.page-login__game-description {
  font-size: 0.95em;
  color: #FFF1E8;
  flex-grow: 1; /* Allow description to take available space */
  margin-bottom: 20px;
}

.page-login__game-link {
  margin-top: auto; /* Push link to the bottom */
  background: linear-gradient(180deg, #FFB04A 0%, #D86A14 100%);
  color: #FFF1E8;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  font-size: 0.9em;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.3s ease;
}

.page-login__game-link:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

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

.page-login__faq-item {
  background-color: #2A1212; /* Card BG color */
  border: 1px solid #6A1E1E; /* Border color */
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.page-login__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  cursor: pointer;
  font-size: 1.2em;
  font-weight: 600;
  color: #F3C54D; /* Gold for FAQ questions */
  background-color: #2A1212; /* Card BG color */
  border-bottom: 1px solid #6A1E1E; /* Border color */
}

.page-login__faq-item[open] .page-login__faq-question {
  border-bottom: none; /* Remove border when open to merge with answer */
}

.page-login__faq-item summary {
  list-style: none; /* Remove default marker */
}

.page-login__faq-item summary::-webkit-details-marker {
  display: none; /* Hide for webkit browsers */
}

.page-login__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 15px;
  color: #FFF1E8;
}

.page-login__faq-item[open] .page-login__faq-toggle {
  content: '−'; /* Change to minus when open */
}

.page-login__faq-answer {
  padding: 0 25px 20px;
  font-size: 1em;
  color: #FFF1E8;
}

.page-login__cta-bottom-section {
  text-align: center;
  padding-bottom: 80px;
}

.page-login__cta-description {
  font-size: 1.1em;
  margin-bottom: 40px;
  color: #FFF1E8;
}

/* --- General image and container responsiveness --- */
.page-login img {
  max-width: 100%;
  height: auto;
  display: block; /* Ensure images behave as blocks */
  box-sizing: border-box;
}

.page-login__section,
.page-login__container,
.page-login__card {
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

/* --- Responsive styles for tablet (max-width: 1024px) --- */
@media (max-width: 1024px) {
  .page-login__main-title {
    font-size: 2.8em;
  }
  .page-login__features-grid,
  .page-login__process-steps,
  .page-login__games-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  }
  .page-login__hero-content {
    padding: 0 30px;
  }
  .page-login__cta-buttons {
    gap: 15px;
  }
}

/* --- Responsive styles for mobile (max-width: 768px) --- */
@media (max-width: 768px) {
  .page-login {
    font-size: 16px;
    line-height: 1.6;
  }

  /* HERO 主图区域 */
  .page-login__hero-section {
    padding-top: 10px !important;
    padding-bottom: 30px;
  }

  .page-login__main-title {
    font-size: 2.2em;
    margin-bottom: 15px;
  }

  .page-login__intro-text {
    font-size: 1em;
    margin-bottom: 25px;
  }

  /* 按钮与按钮容器 */
  .page-login__cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  .page-login__btn-primary,
  .page-login__btn-secondary,
  .page-login__game-link {
    max-width: 100% !important;
    width: 100% !important;
    padding: 12px 20px !important;
    font-size: 1em !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    box-sizing: border-box !important;
  }

  .page-login__btn-large {
    min-width: unset;
  }

  /* 其他内容模块 */
  .page-login__section-title {
    font-size: 1.8em;
    margin-bottom: 30px;
    padding: 0 15px;
  }

  .page-login__features-section,
  .page-login__process-section,
  .page-login__games-showcase-section,
  .page-login__faq-section,
  .page-login__cta-bottom-section {
    padding: 40px 15px;
  }

  .page-login__feature-card,
  .page-login__step-item,
  .page-login__game-card {
    padding: 20px;
  }

  .page-login__feature-title {
    font-size: 1.5em;
  }

  .page-login__step-title {
    font-size: 1.3em;
  }

  .page-login__game-title {
    font-size: 1.4em;
  }

  .page-login__game-image {
    height: 180px;
  }

  .page-login__faq-question {
    font-size: 1.1em;
    padding: 15px 20px;
  }

  .page-login__faq-answer {
    padding: 0 20px 15px;
  }

  /* 通用图片与容器 */
  .page-login img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
  }
  
  .page-login__section,
  .page-login__card,
  .page-login__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  /* 产品展示图区域 */
  .page-login__games-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
  }
}