/* style/login.css */

/* Base styles for the page-login scope */
.page-login {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-main, #F2FFF6); /* Default text color for dark background */
  background-color: var(--background, #08160F); /* Body background */
  padding-bottom: 60px; /* Space for footer */
}

/* Ensure all images are responsive by default */
.page-login img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Section general styling */
.page-login__section-title {
  font-size: 3em;
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
  color: var(--text-main, #F2FFF6);
  line-height: 1.2;
}

.page-login__section-description {
  font-size: 1.1em;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px auto;
  color: var(--text-secondary, #A7D9B8);
}

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

/* Card styling */
.page-login__card {
  background: var(--card-bg, #11271B);
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  color: var(--text-main, #F2FFF6); /* Text on card should be light */
  border: 1px solid var(--border, #2E7A4E);
}

/* Button general styling */
.page-login__btn-primary,
.page-login__btn-secondary,
.page-login a[class*="button"],
.page-login a[class*="btn"] {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  max-width: 100%; /* Ensure buttons adapt to container */
  box-sizing: border-box; /* Include padding/border in width */
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Break long words */
}

.page-login__btn-primary {
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  color: #ffffff; /* White text for primary button */
  border: none;
}

.page-login__btn-primary:hover {
  background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%);
  box-shadow: 0 6px 20px rgba(42, 209, 111, 0.4);
}

.page-login__btn-secondary {
  background: transparent;
  color: var(--text-main, #F2FFF6); /* Light text for secondary button */
  border: 2px solid var(--border, #2E7A4E);
}

.page-login__btn-secondary:hover {
  background: rgba(46, 122, 78, 0.2);
  border-color: var(--glow, #57E38D);
  color: var(--glow, #57E38D);
}

/* Hero Section */
.page-login__hero-section {
  position: relative;
  padding-top: 10px; /* Small top padding, assuming shared.css handles body padding-top */
  margin-bottom: 60px;
  overflow: hidden;
}

.page-login__hero-image-wrapper {
  position: relative;
  width: 100%;
  height: 600px; /* Fixed height for desktop */
  overflow: hidden;
}

.page-login__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Desktop: cover to fill */
  filter: brightness(0.7); /* Darken image slightly for text contrast */
}

.page-login__hero-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 20px;
  box-sizing: border-box;
  z-index: 1;
}

.page-login__main-title {
  font-size: clamp(2.5em, 5vw, 4.5em); /* Responsive font size */
  color: var(--text-main, #F2FFF6);
  margin-bottom: 15px;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  max-width: 900px;
}

.page-login__intro-text {
  font-size: clamp(1em, 2vw, 1.4em);
  color: var(--text-secondary, #A7D9B8);
  margin-bottom: 30px;
  max-width: 700px;
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

.page-login__login-form-container {
  max-width: 450px;
  width: 100%;
  padding: 30px;
  background: var(--card-bg, #11271B);
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  margin-top: 20px;
  border: 1px solid var(--border, #2E7A4E);
}

.page-login__form-title {
  font-size: 2em;
  color: var(--text-main, #F2FFF6);
  margin-bottom: 25px;
  text-align: center;
}

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

.page-login__form-label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-secondary, #A7D9B8);
  font-size: 0.95em;
}

.page-login__form-input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--border, #2E7A4E);
  border-radius: 6px;
  background-color: var(--deep-green, #0A4B2C);
  color: var(--text-main, #F2FFF6);
  font-size: 1em;
  box-sizing: border-box;
}

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

.page-login__form-input:focus {
  outline: none;
  border-color: var(--glow, #57E38D);
  box-shadow: 0 0 0 3px rgba(87, 227, 141, 0.3);
}

.page-login__form-options {
  display: flex;
  justify-content: space-between;
  margin-bottom: 25px;
  font-size: 0.9em;
}

.page-login__forgot-password-link,
.page-login__register-link {
  color: var(--glow, #57E38D);
  text-decoration: none;
}

.page-login__forgot-password-link:hover,
.page-login__register-link:hover {
  text-decoration: underline;
}

.page-login__login-form .page-login__btn-primary {
  width: 100%;
  padding: 15px;
}

/* Benefits Section */
.page-login__benefits-section {
  padding: 60px 0;
  margin-bottom: 40px;
}

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

.page-login__benefit-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-login__benefit-icon {
  width: 100%; /* Ensure image fills card width */
  height: 200px; /* Fixed height for consistent card appearance */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
}

.page-login__benefit-title {
  font-size: 1.8em;
  color: var(--text-main, #F2FFF6);
  margin-bottom: 15px;
}

.page-login__benefit-text {
  color: var(--text-secondary, #A7D9B8);
  font-size: 1em;
}

/* How-to-Login Section */
.page-login__how-to-login-section {
  padding: 60px 0;
  margin-bottom: 40px;
}

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

.page-login__step-card {
  text-align: center;
  position: relative;
  padding-top: 50px;
  min-height: 220px;
}

.page-login__step-number {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 60px;
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2em;
  font-weight: bold;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.page-login__step-title {
  font-size: 1.8em;
  color: var(--text-main, #F2FFF6);
  margin-bottom: 15px;
}

.page-login__step-text {
  color: var(--text-secondary, #A7D9B8);
  font-size: 1em;
}

.page-login__notes {
  padding: 30px;
  background: var(--card-bg, #11271B);
  border-radius: 12px;
}

.page-login__notes-title {
  font-size: 1.8em;
  color: var(--gold, #F2C14E);
  margin-bottom: 20px;
  text-align: center;
}

.page-login__notes-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.page-login__notes-list li {
  margin-bottom: 10px;
  color: var(--text-secondary, #A7D9B8);
  font-size: 1em;
  position: relative;
  padding-left: 25px;
}

.page-login__notes-list li:before {
  content: "•";
  color: var(--glow, #57E38D);
  position: absolute;
  left: 0;
  font-size: 1.2em;
  line-height: 1;
}

/* Common Issues Section */
.page-login__common-issues-section {
  padding: 60px 0;
  margin-bottom: 40px;
}

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

.page-login__issue-card {
  text-align: left;
}

.page-login__issue-title {
  font-size: 1.8em;
  color: var(--text-main, #F2FFF6);
  margin-bottom: 15px;
}

.page-login__issue-text {
  color: var(--text-secondary, #A7D9B8);
  font-size: 1em;
}

/* Member Benefits Section */
.page-login__member-benefits-section {
  padding: 60px 0;
  margin-bottom: 40px;
}

.page-login__benefits-list-wrapper {
  padding: 40px;
  text-align: center;
}

.page-login__benefits-list {
  list-style: none;
  padding: 0;
  margin-bottom: 40px;
  text-align: left;
}

.page-login__benefits-list li {
  margin-bottom: 15px;
  color: var(--text-secondary, #A7D9B8);
  font-size: 1.1em;
  position: relative;
  padding-left: 30px;
}

.page-login__benefits-list li strong {
  color: var(--text-main, #F2FFF6);
}

.page-login__benefits-list li:before {
  content: "✓";
  color: var(--glow, #57E38D);
  position: absolute;
  left: 0;
  font-size: 1.4em;
  line-height: 1;
}

.page-login__cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
}

/* App Download Section */
.page-login__app-download-section {
  padding: 60px 0;
  margin-bottom: 40px;
}

.page-login__app-content-wrapper {
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 50px;
}

.page-login__app-text-content {
  flex: 1;
  text-align: left;
}

.page-login__app-features-list {
  list-style: none;
  padding: 0;
  margin: 30px 0;
}

.page-login__app-features-list li {
  color: var(--text-secondary, #A7D9B8);
  font-size: 1.1em;
  margin-bottom: 10px;
  position: relative;
  padding-left: 25px;
}

.page-login__app-features-list li:before {
  content: "•";
  color: var(--glow, #57E38D);
  position: absolute;
  left: 0;
  font-size: 1.2em;
  line-height: 1;
}

.page-login__app-image-wrapper {
  flex-shrink: 0;
  width: 450px; /* Fixed width for desktop */
  height: auto;
  text-align: center;
}

.page-login__app-screenshot {
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  width: 100%;
  height: auto;
}

/* FAQ Section */
.page-login__faq-section {
  padding: 60px 0;
  margin-bottom: 60px;
}

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

details.page-login__faq-item {
  margin-bottom: 15px;
  border-radius: 12px; /* Increased border-radius for modern look */
  border: 1px solid var(--border, #2E7A4E);
  overflow: hidden;
  background: var(--card-bg, #11271B);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
details.page-login__faq-item summary.page-login__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px; /* Increased padding */
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
  color: var(--text-main, #F2FFF6);
  font-size: 1.1em; /* Increased font size */
  font-weight: 600;
}
details.page-login__faq-item summary.page-login__faq-question::-webkit-details-marker {
  display: none;
}
details.page-login__faq-item summary.page-login__faq-question:hover {
  background: var(--deep-green, #0A4B2C); /* Darker hover for contrast */
}
.page-login__faq-qtext {
  flex: 1;
  font-size: 1em; /* Relative to summary font-size */
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: inherit; /* Inherit from summary */
}
.page-login__faq-toggle {
  font-size: 28px; /* Larger toggle icon */
  font-weight: bold;
  color: var(--glow, #57E38D); /* Brand color for toggle */
  flex-shrink: 0;
  margin-left: 20px; /* Increased margin */
  width: 32px; /* Larger toggle area */
  text-align: center;
}
details.page-login__faq-item .page-login__faq-answer {
  padding: 0 25px 25px; /* Increased padding */
  background: var(--deep-green, #0A4B2C); /* Slightly different background for answer */
  border-radius: 0 0 12px 12px;
  color: var(--text-secondary, #A7D9B8);
  font-size: 1em;
}

/* Contact CTA Section */
.page-login__contact-cta-section {
  padding: 60px 0;
  text-align: center;
}

.page-login__contact-cta-section .page-login__card {
  max-width: 800px;
  margin: 0 auto;
  padding: 50px;
}

/* ==============================================
   Responsive Styles
   ============================================== */

/* Desktop to Tablet breakpoint */
@media (max-width: 1024px) {
  .page-login__main-title {
    font-size: clamp(2em, 4vw, 3.5em);
  }
  .page-login__intro-text {
    font-size: clamp(0.9em, 1.8vw, 1.2em);
  }
  .page-login__hero-image-wrapper {
    height: 500px;
  }
  .page-login__app-content-wrapper {
    flex-direction: column;
    text-align: center;
    padding: 30px;
  }
  .page-login__app-text-content {
    text-align: center;
  }
  .page-login__app-image-wrapper {
    width: 100%;
    max-width: 400px;
    margin-top: 30px;
  }
  .page-login__app-features-list {
    text-align: center;
    padding-left: 0;
  }
  .page-login__app-features-list li {
    padding-left: 0;
  }
  .page-login__app-features-list li:before {
    display: none;
  }
}

/* Mobile breakpoint */
@media (max-width: 768px) {
  /* General mobile adaptations */
  .page-login {
    font-size: 16px;
    line-height: 1.6;
  }
  .page-login__container {
    padding: 0 15px;
  }
  .page-login__section-title {
    font-size: 2.2em;
    margin-bottom: 15px;
  }
  .page-login__section-description {
    font-size: 1em;
    margin-bottom: 30px;
  }
  .page-login__card {
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  /* HERO 主图区域 - Mobile */
  .page-login__hero-image-wrapper {
    height: 300px; /* Smaller height for mobile hero */
  }
  .page-login__hero-image {
    object-fit: contain !important; /* Ensure image is fully visible, no cropping */
    aspect-ratio: unset !important; /* Remove aspect ratio constraint */
    background-color: var(--deep-green, #0A4B2C); /* Background for contain */
  }
  .page-login__hero-section {
    padding-top: 10px; /* Small top padding, not var(--header-offset) */
    margin-bottom: 30px;
  }
  .page-login__main-title {
    font-size: clamp(1.8em, 8vw, 2.5em); /* Smaller clamp for mobile */
    margin-bottom: 10px;
  }
  .page-login__intro-text {
    font-size: clamp(0.9em, 3vw, 1.1em);
    margin-bottom: 20px;
  }
  .page-login__login-form-container {
    padding: 20px;
    margin-top: 10px;
  }
  .page-login__form-title {
    font-size: 1.5em;
    margin-bottom: 20px;
  }
  .page-login__form-options {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
  }

  /* 通用图片与容器 - Mobile */
  .page-login img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !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;
  }

  /* 按钮与按钮容器 - Mobile */
  .page-login__btn-primary,
  .page-login__btn-secondary,
  .page-login a[class*="button"],
  .page-login a[class*="btn"] {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding: 12px 15px; /* Adjust padding for smaller buttons */
    font-size: 1em;
  }
  .page-login__cta-buttons,
  .page-login__button-group,
  .page-login__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-direction: column !important; /* Stack buttons vertically */
    gap: 15px; /* Space between stacked buttons */
  }
}