/* style/register.css */
.page-register {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #f0f0f0; /* Light text for dark body background */
  background-color: transparent; /* Body background is handled by shared.css */
}

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

.page-register__hero-section {
  position: relative;
  padding-top: var(--header-offset, 120px); /* Adjust based on shared.css body padding */
  padding-bottom: 60px;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(30, 144, 255, 0.2)), url('[GALLERY:register_bg:1920x1080:typhu88,register,abstract_background,gaming_platform]') no-repeat center center/cover;
  text-align: center;
  color: #ffffff;
  overflow: hidden;
}

.page-register__main-title {
  font-size: 3.5em;
  font-weight: bold;
  margin-bottom: 20px;
  color: #FFD700;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  padding: 0 15px;
}

.page-register__subtitle {
  font-size: 1.4em;
  margin-bottom: 40px;
  color: #f0f0f0;
  padding: 0 15px;
}

.page-register__hero-image-wrapper {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 40px auto 0;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

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

.page-register__form-section {
  background-color: #1a1a1a;
  padding: 80px 0;
}

.page-register__section-title {
  font-size: 2.5em;
  color: #FFD700;
  text-align: center;
  margin-bottom: 20px;
  font-weight: bold;
}

.page-register__section-description {
  font-size: 1.1em;
  color: #cccccc;
  text-align: center;
  margin-bottom: 50px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 15px;
}

.page-register__registration-form {
  background-color: #2a2a2a;
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  max-width: 600px;
  margin: 0 auto;
}

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

.page-register__form-label {
  display: block;
  margin-bottom: 10px;
  color: #f0f0f0;
  font-weight: bold;
  font-size: 1.1em;
}

.page-register__form-input {
  width: 100%;
  padding: 15px;
  border: 1px solid #444;
  border-radius: 5px;
  background-color: #333;
  color: #ffffff;
  font-size: 1em;
  box-sizing: border-box;
}

.page-register__form-input::placeholder {
  color: #888;
}

.page-register__form-captcha {
  display: flex;
  align-items: center;
  gap: 15px;
}

.page-register__form-captcha .page-register__form-input {
  flex-grow: 1;
}

.page-register__captcha-image {
  width: 120px;
  height: 40px;
  border-radius: 5px;
  object-fit: cover;
  border: 1px solid #444;
}

.page-register__form-checkbox {
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  color: #cccccc;
  font-size: 0.95em;
}

.page-register__form-checkbox input[type="checkbox"] {
  margin-right: 10px;
  width: 18px;
  height: 18px;
  accent-color: #FFD700;
}

.page-register__link {
  color: #1E90FF;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-register__link:hover {
  color: #FFD700;
  text-decoration: underline;
}

.page-register__submit-button {
  width: 100%;
  padding: 18px;
  background-color: #FFD700;
  color: #1a1a1a;
  border: none;
  border-radius: 5px;
  font-size: 1.2em;
  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;
}

.page-register__submit-button:hover {
  background-color: #e0b800;
  transform: translateY(-2px);
}

.page-register__login-prompt {
  text-align: center;
  margin-top: 30px;
  color: #cccccc;
  font-size: 1em;
}

.page-register__benefits-section {
  background-color: #0a0a0a;
  padding: 80px 0;
  border-top: 1px solid #333;
}

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

.page-register__benefit-card {
  background-color: #2a2a2a;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #333;
}

.page-register__benefit-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
}

.page-register__benefit-card img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 20px;
  display: block;
  margin-left: auto;
  margin-right: auto;
  object-fit: cover;
  min-width: 200px; /* Min image size requirement */
  min-height: 200px; /* Min image size requirement */
}

.page-register__card-title {
  font-size: 1.5em;
  color: #FFD700;
  margin-bottom: 15px;
  font-weight: bold;
}

.page-register__card-text {
  color: #cccccc;
  font-size: 1em;
}

.page-register__cta-section {
  background-color: #1a1a1a;
  padding: 80px 0;
  text-align: center;
  border-top: 1px solid #333;
}

.page-register__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.page-register__btn-primary,
.page-register__btn-secondary {
  padding: 18px 30px;
  border-radius: 5px;
  font-size: 1.1em;
  font-weight: bold;
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
  display: inline-block;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  max-width: 100%;
}

.page-register__btn-primary {
  background-color: #FFD700;
  color: #1a1a1a;
  border: 2px solid #FFD700;
}

.page-register__btn-primary:hover {
  background-color: #e0b800;
  transform: translateY(-2px);
}

.page-register__btn-secondary {
  background-color: transparent;
  color: #FFD700;
  border: 2px solid #1E90FF;
}

.page-register__btn-secondary:hover {
  background-color: #1E90FF;
  color: #ffffff;
  transform: translateY(-2px);
}

.page-register__faq-section {
  background-color: #0a0a0a;
  padding: 80px 0;
  border-top: 1px solid #333;
}

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

/* FAQ容器样式 */
.page-register__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
  background-color: #2a2a2a;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* FAQ默认状态 - 答案隐藏 */
.page-register__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 20px;
  opacity: 0;
  color: #cccccc;
}

/* FAQ展开状态 - 🚨 使用!important和足够大的max-height确保一定能展开 */
.page-register__faq-item.active .page-register__faq-answer {
  max-height: 2000px !important; /* 🚨 Sử dụng !important để đảm bảo ưu tiên, giá trị đủ lớn để chứa mọi nội dung */
  padding: 20px !important;
  opacity: 1;
  background: #1e1e1e;
  border-radius: 0 0 5px 5px;
  border-top: 1px solid #333;
}

/* 问题样式 */
.page-register__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: #2a2a2a;
  border: 1px solid #333;
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
  color: #f0f0f0;
}

.page-register__faq-item.active .page-register__faq-question {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-color: #FFD700;
}

.page-register__faq-question:hover {
  background: #3a3a3a;
  border-color: #FFD700;
}

.page-register__faq-question:active {
  background: #4a4a4a;
}

/* 问题标题样式 */
.page-register__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.2em;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* 防止h3标签阻止点击事件 */
  color: #f0f0f0;
}

/* 切换图标 */
.page-register__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: #FFD700;
  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;
  background-color: #333;
  border-radius: 50%;
}

.page-register__faq-item.active .page-register__faq-toggle {
  color: #1a1a1a;
  background-color: #FFD700;
  transform: rotate(45deg); /* Change to X or rotate */
}

/* ------------------ Responsive Styles ------------------ */
@media (max-width: 1024px) {
  .page-register__main-title {
    font-size: 3em;
  }

  .page-register__subtitle {
    font-size: 1.2em;
  }

  .page-register__section-title {
    font-size: 2em;
  }

  .page-register__benefits-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }

  .page-register__btn-primary, .page-register__btn-secondary {
    padding: 15px 25px;
    font-size: 1em;
  }
}

@media (max-width: 768px) {
  .page-register__hero-section {
    padding-top: var(--header-offset-mobile, 80px); /* Mobile specific offset */
    padding-bottom: 40px;
  }

  .page-register__main-title {
    font-size: 2.2em;
  }

  .page-register__subtitle {
    font-size: 1em;
  }

  .page-register__section-title {
    font-size: 1.8em;
  }

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

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

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

  .page-register__form-label {
    font-size: 1em;
  }

  .page-register__form-input {
    padding: 12px;
    font-size: 0.9em;
  }

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

  .page-register__form-captcha .page-register__form-input {
    width: 100%;
  }

  .page-register__captcha-image {
    width: 100%;
    max-width: 120px; /* Keep captcha image readable */
    height: auto;
  }

  .page-register__form-checkbox {
    font-size: 0.85em;
  }

  .page-register__submit-button {
    padding: 15px;
    font-size: 1.1em;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-register__benefits-section, .page-register__form-section, .page-register__cta-section, .page-register__faq-section {
    padding: 50px 0;
  }

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

  .page-register__benefit-card img {
    min-width: unset; /* Allow smaller images on mobile if needed for layout */
    min-height: unset;
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-register__cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

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

  .page-register__faq-question {
    padding: 15px;
    flex-wrap: wrap;
  }

  .page-register__faq-question h3 {
    font-size: 1em;
    margin-bottom: 0;
    width: calc(100% - 40px);
  }

  .page-register__faq-toggle {
    margin-left: 10px;
    width: 24px;
    height: 24px;
    font-size: 20px;
  }

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

  .page-register__faq-item.active .page-register__faq-answer {
    padding: 15px !important;
  }

  /* General image responsive styles */
  .page-register img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-register__section,
  .page-register__card,
  .page-register__container,
  .page-register__form-section,
  .page-register__benefits-section,
  .page-register__cta-section,
  .page-register__faq-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-register__hero-section {
    padding-left: 0;
    padding-right: 0;
  }
}