/* style/login.css */
.page-login {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-main);
  background-color: var(--deep-navy); /* Body background from shared.css */
}

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

.page-login__dark-bg {
  background-color: var(--deep-navy);
  color: var(--text-main);
}

.page-login__light-bg {
  background-color: #ffffff;
  color: var(--text-secondary);
}

.page-login__dark-section {
  background-color: var(--card-bg);
  color: var(--text-main);
  padding: 60px 0;
}

.page-login__hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 10px; /* Small top padding, body handles --header-offset */
  padding-bottom: 60px;
  position: relative;
  overflow: hidden;
}

.page-login__hero-image-wrapper {
  width: 100%;
  max-height: 600px; /* Limit height for hero image */
  overflow: hidden;
  position: relative;
  z-index: 0;
}

.page-login__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  filter: brightness(0.7); /* Slightly dim the image for text readability */
}

.page-login__hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin-top: -200px; /* Pull content up over the image */
  padding: 0 20px;
}

.page-login__main-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-main);
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

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

.page-login__login-form-container {
  background: var(--card-bg);
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  max-width: 450px;
  width: 100%;
  margin: 40px auto 0;
  border: 1px solid var(--border);
}

.page-login__form-title {
  font-size: 2em;
  color: var(--gold);
  margin-bottom: 30px;
  text-align: center;
}

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

.page-login__form-label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-weight: bold;
}

.page-login__form-input {
  width: calc(100% - 20px);
  padding: 12px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background-color: var(--deep-navy);
  color: var(--text-main);
  font-size: 1em;
}

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

.page-login__login-button {
  display: block;
  width: 100%;
  padding: 15px 20px;
  background: linear-gradient(180deg, #2B73F6 0%, #1144A6 100%);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: bold;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background 0.3s ease, transform 0.2s ease;
  margin-top: 20px;
}

.page-login__login-button:hover {
  background: linear-gradient(180deg, #1144A6 0%, #2B73F6 100%);
  transform: translateY(-2px);
}

.page-login__form-links {
  margin-top: 25px;
  text-align: center;
}

.page-login__link {
  color: var(--auxiliary-color);
  text-decoration: none;
  font-size: 0.95em;
  margin: 0 10px;
  transition: color 0.3s ease;
}

.page-login__link:hover {
  color: var(--glow);
  text-decoration: underline;
}

.page-login__section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--text-main);
  text-align: center;
  margin-bottom: 25px;
}

.page-login__light-bg .page-login__section-title,
.page-login__light-bg .page-login__section-description {
  color: #333333;
}

.page-login__section-description {
  font-size: 1.1em;
  color: var(--text-secondary);
  text-align: center;
  max-width: 900px;
  margin: 0 auto 50px;
}

.page-login__benefits-section {
  padding: 80px 0;
}

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

.page-login__benefit-item {
  background: var(--card-bg);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-align: center;
  border: 1px solid var(--border);
  transition: transform 0.3s ease;
}

.page-login__benefit-item:hover {
  transform: translateY(-5px);
}

.page-login__benefit-icon {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  display: block;
}

.page-login__benefit-title {
  font-size: 1.5em;
  color: var(--gold);
  margin-bottom: 15px;
}

.page-login__benefit-text {
  color: var(--text-secondary);
  font-size: 0.95em;
}

.page-login__games-overview {
  padding: 80px 0;
}

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

.page-login__game-card {
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  transition: transform 0.3s ease;
}

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

.page-login__game-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.page-login__game-title {
  font-size: 1.4em;
  color: var(--gold);
  padding: 20px 20px 10px;
}

.page-login__game-text {
  color: var(--text-secondary);
  padding: 0 20px 20px;
  font-size: 0.95em;
  flex-grow: 1;
}

.page-login__security-section {
  padding: 80px 0;
}

.page-login__security-content {
  display: flex;
  gap: 40px;
  align-items: center;
  margin-top: 40px;
}

.page-login__security-text {
  flex: 1;
}

.page-login__security-subtitle {
  font-size: 1.8em;
  color: var(--primary-color);
  margin-top: 30px;
  margin-bottom: 15px;
}

.page-login__light-bg .page-login__security-subtitle {
  color: var(--primary-color);
}

.page-login__security-text p {
  color: #333333;
  margin-bottom: 20px;
}

.page-login__security-image-wrapper {
  flex: 1;
  min-width: 300px;
}

.page-login__security-image {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  display: block;
}

.page-login__faq-section {
  padding: 80px 0;
}

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

.page-login__faq-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 15px;
  overflow: hidden;
}

.page-login__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  cursor: pointer;
  font-size: 1.2em;
  font-weight: bold;
  color: var(--text-main);
  position: relative;
  list-style: none;
}

.page-login__faq-question::-webkit-details-marker {
  display: none;
}

.page-login__faq-qtext {
  flex-grow: 1;
  padding-right: 10px;
}

.page-login__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  color: var(--gold);
  transition: transform 0.3s ease;
}

.page-login__faq-item[open] .page-login__faq-toggle {
  transform: rotate(45deg);
}

.page-login__faq-answer {
  padding: 0 20px 20px;
  color: var(--text-secondary);
  font-size: 1em;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.page-login__faq-item[open] .page-login__faq-answer {
  max-height: 500px; /* Adjust as needed for content length */
}

.page-login__faq-answer p {
  margin-top: 10px;
  margin-bottom: 0;
  color: var(--text-secondary);
}

.page-login__faq-answer a {
  color: var(--auxiliary-color);
  text-decoration: underline;
}

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

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

.page-login__btn-primary,
.page-login__btn-secondary {
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: bold;
  text-decoration: none;
  transition: background 0.3s ease, transform 0.2s ease;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  max-width: 300px; /* Limit button width on desktop */
  width: 100%;
}

.page-login__btn-primary {
  background: linear-gradient(180deg, #2B73F6 0%, #1144A6 100%);
  color: #ffffff;
  border: none;
}

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

.page-login__btn-secondary {
  background: #ffffff;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.page-login__btn-secondary:hover {
  background: var(--primary-color);
  color: #ffffff;
  transform: translateY(-2px);
}

.page-login__cta-image-wrapper {
  margin-top: 50px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-login__cta-image {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  display: block;
}

.page-login__copyright-section {
  padding: 30px 0;
  text-align: center;
  background-color: var(--deep-navy);
  border-top: 1px solid var(--divider);
}

.page-login__copyright-text {
  color: var(--text-secondary);
  font-size: 0.9em;
  margin: 0;
}

/* General image responsiveness */
.page-login img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

  .page-login__container {
    padding-left: 15px;
    padding-right: 15px;
  }

  /* HERO 主图区域 */
  .page-login__hero-section {
    padding-top: 10px !important; /* Small top padding, body handles --header-offset */
    padding-bottom: 40px;
  }

  .page-login__hero-content {
    margin-top: -100px; /* Adjust pull-up for mobile */
  }

  .page-login__main-title {
    font-size: 2rem;
    margin-bottom: 15px;
  }

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

  .page-login__login-form-container {
    padding: 25px;
    margin-top: 20px;
  }

  .page-login__form-title {
    font-size: 1.6em;
    margin-bottom: 20px;
  }

  .page-login__form-links {
    flex-direction: column;
    gap: 10px;
  }

  .page-login__link {
    margin: 5px 0;
  }

  .page-login__section-title {
    font-size: 1.8rem;
    margin-bottom: 20px;
  }

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

  /* 产品展示图区域 (Games Grid) */
  .page-login__games-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-login__game-card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* 通用图片与容器 */
  .page-login img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-login__benefit-icon,
  .page-login__game-image,
  .page-login__security-image,
  .page-login__cta-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-login__benefits-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-login__security-content {
    flex-direction: column;
    gap: 20px;
  }

  /* 按钮与按钮容器 */
  .page-login__login-button,
  .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-left: 15px;
    padding-right: 15px;
  }

  .page-login__cta-buttons {
    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;
  }

  /* 其他内容模块 */
  .page-login__faq-question {
    font-size: 1.1em;
  }

  .page-login__faq-answer {
    font-size: 0.95em;
  }

  .page-login__dark-section,
  .page-login__light-bg,
  .page-login__benefits-section,
  .page-login__games-overview,
  .page-login__security-section,
  .page-login__faq-section,
  .page-login__cta-section {
    padding: 40px 0;
  }

  .page-login__security-subtitle {
    font-size: 1.5em;
  }
}