/* style/login.css */
/* 
  Body background from shared.css is #08160F (dark).
  Therefore, all text on the main page content should be light.
  Colors:
  - Background: #08160F (body, shared)
  - Card BG: #11271B
  - Text Main: #F2FFF6
  - Text Secondary: #A7D9B8
  - Button: linear-gradient(180deg, #2AD16F 0%, #13994A 100%)
  - Border: #2E7A4E
  - Glow: #57E38D
  - Gold: #F2C14E
  - Divider: #1E3A2A
  - Deep Green: #0A4B2C
*/

.page-login {
  color: var(--text-main, #F2FFF6); /* Default text color for the page */
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
}

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

.page-login__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 10px; /* Small top padding, body handles --header-offset */
  background-color: var(--bg-card, #11271B); /* Fallback if image not loaded */
}

.page-login__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  max-height: 500px; /* Limit height for hero image */
}

.page-login__hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  text-align: center;
  padding: 80px 20px 40px; /* Adjust padding to ensure text is below image */
  background: linear-gradient(180deg, rgba(8, 22, 15, 0.8) 0%, rgba(8, 22, 15, 0.9) 100%); /* Semi-transparent overlay for readability */
  border-radius: 10px;
  margin-top: 200px; /* Push content below the image's top part */
}

.page-login__main-title {
  font-size: clamp(2em, 4vw, 3em);
  font-weight: bold;
  color: var(--text-main, #F2FFF6);
  margin-bottom: 20px;
  line-height: 1.2;
  letter-spacing: 0.05em;
}

.page-login__hero-description {
  font-size: 1.1em;
  color: var(--text-secondary, #A7D9B8);
  margin-bottom: 30px;
}

.page-login__section-title {
  font-size: clamp(1.8em, 3.5vw, 2.5em);
  font-weight: bold;
  color: var(--text-main, #F2FFF6);
  text-align: center;
  margin-bottom: 30px;
  line-height: 1.3;
}

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

.page-login__subtitle {
  font-size: clamp(1.4em, 2.5vw, 1.8em);
  font-weight: 600;
  color: var(--text-main, #F2FFF6);
  margin-top: 40px;
  margin-bottom: 20px;
  text-align: center;
}

.page-login__description-text {
  font-size: 1em;
  color: var(--text-secondary, #A7D9B8);
  margin-bottom: 20px;
  text-align: justify;
}

/* Form Section */
.page-login__form-section {
  background-color: var(--bg-card, #11271B);
  padding: 60px 0;
  color: var(--text-main, #F2FFF6);
}

.page-login__login-form {
  background-color: var(--deep-green, #0A4B2C); /* Darker green for form background */
  padding: 40px;
  border-radius: 10px;
  max-width: 500px;
  margin: 0 auto;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border, #2E7A4E);
}

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

.page-login__form-label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: var(--text-main, #F2FFF6);
}

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

.page-login__form-input::placeholder {
  color: var(--text-secondary, #A7D9B8);
  opacity: 0.7;
}

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

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

.page-login__checkbox {
  margin-right: 8px;
  accent-color: var(--main-color, #11A84E); /* Highlight checkbox with main color */
}

.page-login__checkbox-label {
  color: var(--text-secondary, #A7D9B8);
}

.page-login__forgot-password {
  color: var(--gold, #F2C14E);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-login__forgot-password:hover {
  color: var(--glow, #57E38D);
}

.page-login__btn-primary {
  display: block;
  width: 100%;
  padding: 15px 20px;
  border: none;
  border-radius: 5px;
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  color: #ffffff;
  font-size: 1.1em;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
  box-sizing: border-box;
}

.page-login__btn-primary:hover {
  background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%);
  transform: translateY(-2px);
}

.page-login__login-button {
  margin-bottom: 20px;
}

.page-login__register-text {
  text-align: center;
  color: var(--text-secondary, #A7D9B8);
  margin-top: 20px;
}

.page-login__register-link {
  color: var(--gold, #F2C14E);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.page-login__register-link:hover {
  color: var(--glow, #57E38D);
}

/* Benefits Section */
.page-login__benefits-section {
  padding: 80px 0;
  background-color: var(--background-color, #08160F); /* Light BG from body */
}

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

.page-login__benefit-card {
  background-color: var(--bg-card, #11271B);
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border, #2E7A4E);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%; /* Ensure cards have equal height */
  display: flex;
  flex-direction: column;
}

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

.page-login__card-image {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  display: block;
}

.page-login__card-title {
  font-size: 1.4em;
  font-weight: 700;
  color: var(--text-main, #F2FFF6);
  margin-bottom: 15px;
  flex-grow: 0; /* Don't grow */
}

.page-login__card-text {
  font-size: 0.95em;
  color: var(--text-secondary, #A7D9B8);
  text-align: justify;
  flex-grow: 1; /* Allow text to grow and push CTA to bottom */
}

.page-login__cta-area {
  text-align: center;
  margin-top: 60px;
}

/* How-to-login Section */
.page-login__how-to-login-section {
  padding: 80px 0;
  background-color: var(--deep-green, #0A4B2C); /* Darker green background */
}

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

.page-login__step-card {
  background-color: var(--bg-card, #11271B);
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border, #2E7A4E);
  transition: transform 0.3s ease;
}

.page-login__step-card:hover {
  transform: translateY(-5px);
}

.page-login__step-number {
  display: inline-block;
  width: 50px;
  height: 50px;
  line-height: 50px;
  border-radius: 50%;
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  color: #ffffff;
  font-size: 1.8em;
  font-weight: bold;
  margin-bottom: 20px;
  box-shadow: 0 0 10px rgba(42, 209, 111, 0.5);
}

/* Features After Login Section */
.page-login__features-after-login-section {
  padding: 80px 0;
  background-color: var(--background-color, #08160F);
}

.page-login__feature-list {
  list-style: none;
  padding: 0;
  margin-top: 40px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

.page-login__feature-item {
  background-color: var(--bg-card, #11271B);
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border, #2E7A4E);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-login__feature-title {
  font-size: 1.5em;
  font-weight: 700;
  color: var(--gold, #F2C14E);
  margin-bottom: 15px;
}

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

/* About VE88 Section */
.page-login__about-ve88-section {
  padding: 80px 0;
  background-color: var(--deep-green, #0A4B2C);
}

/* FAQ Section */
.page-login__faq-section {
  padding: 80px 0;
  background-color: var(--background-color, #08160F);
}

.page-login__faq-list {
  margin-top: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-login__faq-item {
  background-color: var(--bg-card, #11271B);
  border-radius: 10px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border, #2E7A4E);
  overflow: hidden; /* For details tag */
}

.page-login__faq-item summary {
  list-style: none; /* Hide default marker */
  cursor: pointer;
  padding: 20px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.1em;
  font-weight: 600;
  color: var(--text-main, #F2FFF6);
  background-color: var(--bg-card, #11271B);
  transition: background-color 0.3s ease;
}

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

.page-login__faq-item summary:hover {
  background-color: var(--divider, #1E3A2A);
}

.page-login__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  color: var(--gold, #F2C14E);
}

.page-login__faq-item[open] .page-login__faq-toggle {
  content: "−"; /* Change to minus when open, handled by JS if not details */
}

.page-login__faq-answer {
  padding: 0 25px 20px;
  font-size: 0.95em;
  color: var(--text-secondary, #A7D9B8);
  text-align: justify;
}

/* Final CTA Section */
.page-login__cta-final-section {
  padding: 60px 0;
  background-color: var(--deep-green, #0A4B2C);
  text-align: center;
}

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

.page-login__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border: 2px solid var(--gold, #F2C14E);
  border-radius: 5px;
  background-color: transparent;
  color: var(--gold, #F2C14E);
  font-size: 1.1em;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
  box-sizing: border-box;
}

.page-login__btn-secondary:hover {
  background-color: var(--gold, #F2C14E);
  color: var(--deep-green, #0A4B2C);
  transform: translateY(-2px);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .page-login__hero-content {
    padding: 60px 20px 30px;
    margin-top: 150px;
  }
}

@media (max-width: 768px) {
  .page-login__container {
    padding: 0 15px;
  }

  .page-login__hero-image {
    max-height: 400px;
  }

  .page-login__hero-content {
    padding: 40px 15px 20px;
    margin-top: 100px;
    border-radius: 0; /* Remove border-radius on small screens */
  }

  .page-login__main-title {
    font-size: clamp(1.8em, 7vw, 2.5em);
    margin-bottom: 15px;
  }

  .page-login__hero-description {
    font-size: 1em;
    margin-bottom: 20px;
  }

  .page-login__section-title {
    font-size: clamp(1.6em, 6vw, 2em);
    margin-bottom: 20px;
  }

  .page-login__section-description {
    font-size: 0.95em;
    margin-bottom: 30px;
  }

  .page-login__form-section,
  .page-login__benefits-section,
  .page-login__how-to-login-section,
  .page-login__features-after-login-section,
  .page-login__about-ve88-section,
  .page-login__faq-section,
  .page-login__cta-final-section {
    padding: 40px 0;
  }

  .page-login__login-form {
    padding: 30px 20px;
  }

  .page-login__form-options {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .page-login__benefits-grid,
  .page-login__steps-grid {
    grid-template-columns: 1fr;
  }

  .page-login__feature-list {
    gap: 20px;
  }

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

  .page-login__faq-item summary {
    font-size: 1em;
    padding: 15px 20px;
  }

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

  .page-login__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .page-login__btn-primary,
  .page-login__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Mobile image responsiveness */
  .page-login img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !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__hero-section {
    padding-top: 10px !important; /* body 已承担 --header-offset，此处禁止 var(--header-offset) */
  }

  /* Mobile video responsiveness (if any, though not used 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;
  }
  
  .page-login__video-section {
    padding-top: 10px !important;
  }
  
  .page-login__video-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
}

/* Color Contrast Safeguards */
/* Since body background is dark (#08160F), text must be light */
.page-login__dark-section {
  color: var(--text-main, #F2FFF6); /* Deep green background, light text */
}

.page-login__light-bg { /* These sections are actually on the main dark background */
  color: var(--text-main, #F2FFF6);
}

.page-login p,
.page-login li,
.page-login__hero-description,
.page-login__section-description,
.page-login__card-text,
.page-login__description-text,
.page-login__form-label,
.page-login__form-input,
.page-login__checkbox-label,
.page-login__register-text,
.page-login__feature-text,
.page-login__answer-text {
  color: var(--text-secondary, #A7D9B8); /* Ensure all body text is light */
}

.page-login__main-title,
.page-login__section-title,
.page-login__subtitle,
.page-login__card-title,
.page-login__form-input,
.page-login__faq-item summary,
.page-login__btn-primary,
.page-login__btn-secondary {
  color: var(--text-main, #F2FFF6); /* Titles and buttons use main light text */
}

.page-login__forgot-password,
.page-login__register-link,
.page-login__feature-title,
.page-login__faq-toggle {
  color: var(--gold, #F2C14E); /* Accent colors for links/icons */
}

.page-login__btn-primary {
  color: #ffffff; /* Button text is explicitly white */
}