:root {
  --primary-color: #11A84E; /* 主色调 */
  --secondary-color: #22C768; /* 辅助色 */
  --button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%); /* 按钮 */
  --card-bg: #11271B; /* Card BG */
  --background: #08160F; /* 背景 */
  --text-main: #F2FFF6; /* Text Main */
  --text-secondary: #A7D9B8; /* Text Secondary */
  --border: #2E7A4E; /* 边框 */
  --glow: #57E38D; /* Glow */
  --gold: #F2C14E; /* Gold */
  --divider: #1E3A2A; /* Divider */
  --deep-green: #0A4B2C; /* Deep Green */
}

/* style/register.css */

/* --- General Page Styling --- */
.page-register {
  color: var(--text-main); /* Default text color for the page, light text on dark body */
  background-color: var(--background); /* Overall page background */
}

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

.page-register__section-title {
  font-size: clamp(28px, 4vw, 48px); /* Responsive H2, not too large */
  font-weight: 700;
  color: var(--text-main);
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-register__section-description {
  font-size: 18px;
  color: var(--text-secondary);
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

/* --- Hero Section --- */
.page-register__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px; /* Base padding */
  padding-top: 10px; /* Small top padding, body handles header offset */
  background-color: var(--background);
}

.page-register__hero-section .page-register__container {
  display: flex;
  flex-direction: column; /* Default vertical stack */
  align-items: center;
  gap: 40px;
}

.page-register__hero-content {
  text-align: center;
  flex: 1;
}

.page-register__main-title {
  font-size: clamp(36px, 5vw, 60px); /* Responsive H1 */
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 20px;
  line-height: 1.1;
  max-width: 900px;
}

.page-register__hero-description {
  font-size: 20px;
  color: var(--text-secondary);
  margin-bottom: 30px;
  line-height: 1.6;
  max-width: 700px;
}

.page-register__btn-primary,
.page-register__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  box-sizing: border-box;
  text-align: center;
  white-space: normal; /* Allow text wrap for buttons */
  word-wrap: break-word;
}

.page-register__btn-primary {
  background: var(--button-gradient);
  color: #ffffff;
  border: none;
}

.page-register__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.page-register__hero-image {
  width: 100%;
  max-width: 800px; /* HTML width 800, height 450 (16:9) */
  height: auto;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* --- Registration Form Section --- */
.page-register__form-section {
  background-color: var(--background);
  padding: 80px 20px;
}

.page-register__form-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: center;
  align-items: center;
  margin-top: 40px;
}

.page-register__registration-form {
  background-color: var(--card-bg);
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  flex: 1;
  min-width: 300px;
  max-width: 600px;
  box-sizing: border-box;
}

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

.page-register__form-label {
  display: block;
  font-size: 16px;
  color: var(--text-main);
  margin-bottom: 8px;
  font-weight: 600;
}

.page-register__form-input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background-color: var(--deep-green);
  color: var(--text-main);
  font-size: 16px;
  box-sizing: border-box;
}

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

.page-register__form-input:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(17, 168, 78, 0.3);
}

.page-register__checkbox-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-register__form-checkbox {
  width: 20px;
  height: 20px;
  accent-color: var(--primary-color); /* Checkbox color */
}

.page-register__link {
  color: var(--gold);
  text-decoration: underline;
}

.page-register__link:hover {
  color: var(--glow);
}

.page-register__submit-button {
  width: 100%;
  margin-top: 20px;
}

.page-register__form-image {
  width: 100%;
  max-width: 400px; /* HTML width 400, height 300 */
  height: auto;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* --- Benefits Section --- */
.page-register__benefits-section {
  padding: 80px 20px;
  background-color: var(--background);
}

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

.page-register__benefit-card {
  background-color: var(--card-bg);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
  text-align: center;
}

.page-register__card-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 15px;
}

.page-register__card-text {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --- Security Section --- */
.page-register__security-section {
  padding: 80px 20px;
  background-color: var(--background);
}

.page-register__security-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
  justify-content: center;
}

.page-register__security-image {
  width: 100%;
  max-width: 400px; /* HTML width 400, height 300 */
  height: auto;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.page-register__security-text {
  flex: 1;
  min-width: 300px;
  max-width: 600px;
}

.page-register__security-text .page-register__section-title,
.page-register__security-text .page-register__section-description {
  text-align: left;
  margin-left: 0;
  margin-right: 0;
}

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

.page-register__list-item {
  font-size: 17px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  position: relative;
  padding-left: 25px;
}

.page-register__list-item::before {
  content: '✓';
  color: var(--primary-color);
  position: absolute;
  left: 0;
  top: 0;
  font-weight: bold;
}

.page-register__btn-secondary {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.page-register__btn-secondary:hover {
  background-color: var(--primary-color);
  color: #ffffff;
}

/* --- FAQ Section --- */
.page-register__faq-section {
  padding: 80px 20px;
  background-color: var(--background);
}

.page-register__faq-list {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-register__faq-item {
  background-color: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.page-register__faq-item summary {
  list-style: none; /* Hide default marker */
}

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

.page-register__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  background-color: var(--deep-green);
  border-radius: 12px;
  transition: background-color 0.3s ease;
}

.page-register__faq-question:hover {
  background-color: var(--divider);
}

.page-register__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
}

.page-register__faq-answer {
  padding: 0 25px 20px;
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.page-register__faq-answer p {
  margin-top: 15px;
  margin-bottom: 0;
}

/* For browsers that don't fully support details/summary styling or for JS fallback */
.page-register__faq-item:not(details) .page-register__faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.page-register__faq-item:not(details).active .page-register__faq-answer {
  max-height: 2000px; /* Sufficiently large value */
  transition: max-height 0.5s ease-in;
}

.page-register__faq-image {
  width: 100%;
  max-width: 400px; /* HTML width 400, height 300 */
  height: auto;
  border-radius: 12px;
  object-fit: cover;
  margin-top: 40px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* --- CTA Section --- */
.page-register__cta-section {
  padding: 80px 20px;
  text-align: center;
  background-color: var(--background);
}

.page-register__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.page-register__cta-image {
  width: 100%;
  max-width: 600px; /* HTML width 600, height 338 */
  height: auto;
  border-radius: 12px;
  object-fit: cover;
  margin-top: 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* --- Responsive Design --- */
@media (min-width: 769px) {
  .page-register__hero-section .page-register__container {
    flex-direction: row; /* Desktop: row layout for hero */
    text-align: left;
  }

  .page-register__hero-content {
    text-align: left;
  }

  .page-register__hero-image {
    order: 2; /* Image on right */
    max-width: 800px;
  }

  .page-register__hero-content {
    order: 1; /* Content on left */
  }

  .page-register__security-content {
    flex-direction: row;
    text-align: left;
  }

  .page-register__security-image {
    order: 1;
  }

  .page-register__security-text {
    order: 2;
  }
}

@media (max-width: 768px) {
  .page-register__hero-section {
    padding: 40px 15px;
    padding-top: 10px !important; /* Small top padding for mobile */
  }

  .page-register__main-title {
    font-size: 32px;
    margin-bottom: 15px;
  }

  .page-register__hero-description {
    font-size: 16px;
    margin-bottom: 25px;
  }

  .page-register__section-title {
    font-size: 24px;
    margin-bottom: 15px;
  }

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

  .page-register__btn-primary,
  .page-register__btn-secondary {
    width: 100% !important; /* Buttons full width on mobile */
    max-width: 100% !important;
    padding: 12px 20px;
    font-size: 16px;
    margin-bottom: 10px; /* Stack buttons vertically */
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-register__cta-buttons {
    flex-direction: column;
    gap: 10px;
  }

  .page-register__container {
    padding: 0 15px;
  }

  /* Images responsive on mobile */
  .page-register img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    box-sizing: border-box !important;
  }

  .page-register__form-section,
  .page-register__benefits-section,
  .page-register__security-section,
  .page-register__faq-section,
  .page-register__cta-section {
    padding: 40px 15px;
  }

  .page-register__form-wrapper {
    flex-direction: column;
    gap: 30px;
  }

  .page-register__registration-form,
  .page-register__form-image {
    max-width: 100%;
  }

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

  .page-register__security-content {
    flex-direction: column;
    gap: 30px;
  }

  .page-register__security-text .page-register__section-title,
  .page-register__security-text .page-register__section-description {
    text-align: center;
  }

  .page-register__security-list {
    padding-left: 20px;
  }
  
  /* Ensure all containers containing images/buttons are responsive */
  .page-register__section,
  .page-register__card,
  .page-register__container,
  .page-register__form-wrapper,
  .page-register__benefits-grid,
  .page-register__security-content,
  .page-register__faq-list,
  .page-register__cta-buttons {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important; /* Ensure no overflow */
  }

  .page-register__faq-question {
    font-size: 16px;
    padding: 15px 20px;
  }

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