/* style/login.css */
/* 页面完整样式代码 - 注意：所有选择器必须使用BEM命名规则（双下划线__连接） */

:root {
  --primary-color: #017439; /* 主色调 */
  --secondary-color: #FFFFFF; /* 辅助色 */
  --button-login-bg: #C30808; /* 登录按钮背景 */
  --button-register-bg: #C30808; /* 注册按钮背景 */
  --text-login-register-color: #FFFFFF; /* 登录/注册按钮文字颜色 (已修正为白色以确保对比度) */
  --text-dark: #333333; /* 深色文字 */
  --text-light: #f0f0f0; /* 浅色文字 */
  --border-color: #e0e0e0;
}

.page-login {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-dark); /* 页面主体文字颜色，与白色背景形成对比 */
  background-color: var(--secondary-color); /* 确保与 body 背景色一致 */
}

/* Hero Section */
.page-login__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  padding-top: var(--header-offset, 120px); /* 顶部间距以公用片段约定为准 */
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-color) 50%, #005f2e 100%); /* 渐变背景 */
  color: var(--text-light);
  overflow: hidden; /* Prevent image overflow */
}

.page-login__hero-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.page-login__hero-image {
  width: 100%;
  margin-bottom: 30px;
  max-width: 800px; /* Limit hero image width within container */
}

.page-login__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.page-login__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
  max-width: 900px;
}

.page-login__hero-title {
  font-size: 3em;
  margin-bottom: 20px;
  color: var(--secondary-color);
  line-height: 1.2;
}

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

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

.page-login__cta-button {
  display: inline-block;
  padding: 15px 40px;
  text-decoration: none;
  border-radius: 5px;
  font-size: 18px;
  font-weight: bold;
  transition: all 0.3s ease;
  min-width: 180px; /* Ensure buttons are not too small */
  text-align: center;
  box-sizing: border-box;
  white-space: normal; /* Allow text wrap */
  word-wrap: break-word; /* Allow text wrap */
}

.page-login__btn-login {
  background: var(--button-login-bg);
  color: var(--text-login-register-color); /* Corrected for contrast */
  border: 2px solid var(--button-login-bg);
}

.page-login__btn-login:hover {
  background: #b00707; /* Darker shade of #C30808 */
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-login__btn-register {
  background: var(--button-register-bg); /* Use the same red for register button */
  color: var(--text-login-register-color); /* Corrected for contrast */
  border: 2px solid var(--button-register-bg);
}

.page-login__btn-register:hover {
  background: #b00707; /* Darker shade of #C30808 */
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}


/* General container styles */
.page-login__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  box-sizing: border-box;
}

/* Form Section */
.page-login__form-section {
  padding: 60px 0;
  background-color: var(--secondary-color);
  color: var(--text-dark);
}

.page-login__form-main-title {
  font-size: 2.5em;
  text-align: center;
  margin-bottom: 20px;
  color: var(--primary-color);
}

.page-login__form-intro-text {
  text-align: center;
  margin-bottom: 40px;
  font-size: 1.1em;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-login__login-form {
  max-width: 500px;
  margin: 0 auto;
  padding: 30px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-color);
}

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

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

.page-login__form-input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  font-size: 1em;
  box-sizing: border-box;
  transition: border-color 0.3s ease;
}

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

.page-login__form-options {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 25px;
}

.page-login__forgot-password {
  color: var(--primary-color);
  text-decoration: none;
  font-size: 0.95em;
}

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

.page-login__btn-submit {
  width: 100%;
  padding: 15px;
  background: var(--button-login-bg);
  color: var(--text-login-register-color); /* Corrected for contrast */
  border: none;
  border-radius: 5px;
  font-size: 1.1em;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  display: block; /* Ensure it behaves like a block for full width */
  text-align: center; /* Center text for the link button */
}

.page-login__btn-submit:hover {
  background: #b00707;
  transform: translateY(-1px);
}

.page-login__register-text {
  text-align: center;
  margin-top: 25px;
  font-size: 1em;
  color: var(--text-dark);
}

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

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

/* Benefits Section */
.page-login__benefits-section {
  padding: 80px 0;
  background-color: var(--primary-color); /* Dark background */
  color: var(--text-light); /* Light text for dark background */
}

.page-login__benefits-title {
  font-size: 2.8em;
  text-align: center;
  margin-bottom: 30px;
  color: var(--secondary-color);
}

.page-login__benefits-intro {
  text-align: center;
  margin-bottom: 60px;
  font-size: 1.15em;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-light);
}

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

.page-login__benefit-item {
  background: rgba(255, 255, 255, 0.1); /* Slightly transparent white for cards */
  padding: 30px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  color: var(--text-light);
}

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

.page-login__benefit-image {
  width: 100%;
  max-width: 250px; /* Smaller images within cards */
  height: auto;
  object-fit: cover;
  border-radius: 5px;
  margin-bottom: 20px;
}

.page-login__benefit-heading {
  font-size: 1.6em;
  margin-bottom: 15px;
  color: var(--secondary-color);
}

.page-login__benefit-description {
  font-size: 1em;
  color: var(--text-light);
}

.page-login__cta-section {
  text-align: center;
}

/* Guide Section */
.page-login__guide-section {
  padding: 80px 0;
  background-color: var(--secondary-color);
  color: var(--text-dark);
}

.page-login__guide-title {
  font-size: 2.8em;
  text-align: center;
  margin-bottom: 30px;
  color: var(--primary-color);
}

.page-login__guide-intro {
  text-align: center;
  margin-bottom: 50px;
  font-size: 1.15em;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-login__guide-list {
  list-style: none;
  padding: 0;
  counter-reset: guide-step;
}

.page-login__guide-list-item {
  position: relative;
  padding-left: 70px;
  margin-bottom: 40px;
}

.page-login__guide-list-item::before {
  counter-increment: guide-step;
  content: counter(guide-step);
  position: absolute;
  left: 0;
  top: 0;
  width: 50px;
  height: 50px;
  background-color: var(--primary-color);
  color: var(--secondary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8em;
  font-weight: bold;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.page-login__guide-step-title {
  font-size: 1.8em;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.page-login__security-tip {
  margin-top: 50px;
  padding: 20px;
  background-color: #f0f8f0;
  border-left: 5px solid var(--primary-color);
  border-radius: 5px;
  font-size: 1.05em;
  color: var(--text-dark);
}

/* Recovery Section */
.page-login__recovery-section {
  padding: 80px 0;
  background-color: var(--primary-color);
  color: var(--text-light);
}

.page-login__recovery-title {
  font-size: 2.8em;
  text-align: center;
  margin-bottom: 30px;
  color: var(--secondary-color);
}

.page-login__recovery-intro {
  text-align: center;
  margin-bottom: 60px;
  font-size: 1.15em;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-light);
}

.page-login__recovery-content {
  display: flex;
  gap: 30px;
  justify-content: center;
  flex-wrap: wrap;
}

.page-login__recovery-card {
  background: rgba(255, 255, 255, 0.1);
  padding: 30px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  flex: 1;
  min-width: 300px;
  max-width: 45%;
  color: var(--text-light);
}

.page-login__recovery-card-title {
  font-size: 1.6em;
  margin-bottom: 15px;
  color: var(--secondary-color);
}

.page-login__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  background: var(--secondary-color);
  color: var(--primary-color);
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  margin-top: 20px;
  transition: all 0.3s ease;
  border: 2px solid var(--secondary-color);
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-login__btn-secondary:hover {
  background: #e0e0e0; /* Slightly darker white */
  color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}


/* FAQ Section */
.page-login__faq-section {
  padding: 80px 0;
  background-color: var(--secondary-color);
  color: var(--text-dark);
}

.page-login__faq-title {
  font-size: 2.8em;
  text-align: center;
  margin-bottom: 30px;
  color: var(--primary-color);
}

.page-login__faq-intro {
  text-align: center;
  margin-bottom: 50px;
  font-size: 1.15em;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

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

/* FAQ容器样式 */
.page-login__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

/* FAQ默认状态 - 答案隐藏 */
.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;
  padding: 0 15px;
  opacity: 0;
  background: #f9f9f9;
  color: var(--text-dark);
}

/* FAQ展开状态 - \u26A0\uFE0F 使用!important和足够大的max-height确保一定能展开 */
.page-login__faq-item.active .page-login__faq-answer {
  max-height: 2000px !important; /* \u26A0\uFE0F 使用!important确保优先级，值足够大以容纳任何内容 */
  padding: 20px 15px !important;
  opacity: 1;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
}

/* 问题样式 */
.page-login__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: #fff;
  border-bottom: 1px solid var(--border-color); /* Add border for separation */
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-login__faq-item.active .page-login__faq-question {
  border-radius: 5px 5px 0 0; /* Adjust border radius when active */
  border-bottom: none;
}

.page-login__faq-question:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
}

.page-login__faq-question:active {
  background: #eeeeee;
}

/* 问题标题样式 */
.page-login__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.1em;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* 防止h3标签阻止点击事件 */
  color: var(--text-dark);
}

/* 切换图标 */
.page-login__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: var(--primary-color);
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* 防止图标阻止点击事件 */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.page-login__faq-item.active .page-login__faq-toggle {
  color: var(--primary-color);
  transform: rotate(45deg); /* Rotate for 'x' effect */
}


/* Responsible Gaming Section */
.page-login__responsible-gaming-section {
  padding: 80px 0;
  background-color: var(--primary-color);
  color: var(--text-light);
}

.page-login__responsible-gaming-title {
  font-size: 2.8em;
  text-align: center;
  margin-bottom: 30px;
  color: var(--secondary-color);
}

.page-login__responsible-gaming-description {
  text-align: center;
  margin-bottom: 60px;
  font-size: 1.15em;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-light);
}

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

.page-login__feature-item {
  background: rgba(255, 255, 255, 0.1);
  padding: 30px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  color: var(--text-light);
}

.page-login__feature-heading {
  font-size: 1.6em;
  margin-bottom: 15px;
  color: var(--secondary-color);
}

.page-login__feature-item p {
  color: var(--text-light);
}

.page-login__responsible-gaming-closing {
  text-align: center;
  font-size: 1.1em;
  color: var(--text-light);
}


/* Responsive Design */
@media (max-width: 1024px) {
  .page-login__hero-title {
    font-size: 2.5em;
  }
  .page-login__hero-description {
    font-size: 1.1em;
  }
  .page-login__benefits-title,
  .page-login__guide-title,
  .page-login__recovery-title,
  .page-login__faq-title,
  .page-login__responsible-gaming-title {
    font-size: 2.2em;
  }
}

@media (max-width: 768px) {
  .page-login__hero-section {
    padding-top: var(--header-offset, 120px) !important; /* 移动端必须重新设置padding-top */
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-login__hero-title {
    font-size: 2em;
    margin-bottom: 15px;
  }
  .page-login__hero-description {
    font-size: 1em;
    margin-bottom: 30px;
  }
  .page-login__hero-cta-buttons {
    flex-direction: column;
    gap: 15px;
    width: 100%;
  }
  .page-login__cta-button,
  .page-login__btn-login,
  .page-login__btn-register,
  .page-login__btn-submit,
  .page-login__btn-secondary {
    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__container {
    padding: 30px 15px;
  }

  .page-login__form-main-title,
  .page-login__benefits-title,
  .page-login__guide-title,
  .page-login__recovery-title,
  .page-login__faq-title,
  .page-login__responsible-gaming-title {
    font-size: 1.8em;
    margin-bottom: 20px;
  }

  .page-login__form-intro-text,
  .page-login__benefits-intro,
  .page-login__guide-intro,
  .page-login__recovery-intro,
  .page-login__faq-intro,
  .page-login__responsible-gaming-description {
    font-size: 0.95em;
    margin-bottom: 30px;
  }

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

  .page-login__benefits-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-login__recovery-content {
    flex-direction: column;
    gap: 20px;
  }
  .page-login__recovery-card {
    max-width: 100%;
  }
  .page-login__guide-list-item {
    padding-left: 60px;
  }
  .page-login__guide-list-item::before {
    width: 45px;
    height: 45px;
    font-size: 1.6em;
  }
  .page-login__guide-step-title {
    font-size: 1.4em;
  }

  /* FAQ mobile styles */
  .page-login__faq-question {
    padding: 15px;
    flex-wrap: wrap;
  }
  
  .page-login__faq-question h3 {
    font-size: 1em;
    margin-bottom: 0;
    width: calc(100% - 40px);
  }
  
  .page-login__faq-toggle {
    margin-left: 10px;
    width: 24px;
    height: 24px;
    font-size: 20px;
  }
  
  .page-login__faq-answer {
    padding: 0 15px;
  }
  
  .page-login__faq-item.active .page-login__faq-answer {
    padding: 15px !important;
  }

  .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;
  }
}

@media (max-width: 480px) {
  .page-login__hero-title {
    font-size: 1.6em;
  }
  .page-login__hero-description {
    font-size: 0.9em;
  }
  .page-login__benefits-title,
  .page-login__guide-title,
  .page-login__recovery-title,
  .page-login__faq-title,
  .page-login__responsible-gaming-title {
    font-size: 1.5em;
  }
  .page-login__form-main-title {
    font-size: 1.8em;
  }
  .page-login__cta-button {
    font-size: 16px;
    padding: 12px 25px;
  }
  .page-login__benefit-heading,
  .page-login__recovery-card-title,
  .page-login__feature-heading {
    font-size: 1.3em;
  }
}