:root {
  --primary-color: #017439;
  --secondary-color: #FFFFFF;
  --register-color: #C30808;
  --login-color: #C30808;
  --background-color: #FFFFFF;
  --register-login-font-color: #FFFF00;
}

.page-kufun-community {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #333333; /* Default dark text for light background */
  background-color: var(--background-color); /* Matches body background */
}

.page-kufun-community__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(--secondary-color) 100%);
}

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

.page-kufun-community__hero-image {
  width: 100%;
  margin-bottom: 30px;
}

.page-kufun-community__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 8px;
  object-fit: cover;
}

.page-kufun-community__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
  color: var(--secondary-color); /* Light text for hero section */
}

.page-kufun-community__hero-title {
  font-size: 48px;
  font-weight: bold;
  margin-bottom: 20px;
  color: var(--secondary-color);
}

.page-kufun-community__hero-description {
  font-size: 20px;
  line-height: 1.5;
  margin-bottom: 30px;
  color: var(--secondary-color);
}

.page-kufun-community__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--register-color); /* Custom color for CTA/Register */
  color: var(--register-login-font-color); /* Custom font color for CTA/Register */
  text-decoration: none;
  border-radius: 5px;
  font-size: 18px;
  font-weight: bold;
  margin-top: 30px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-kufun-community__cta-button:hover {
  background: #a30606;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

.page-kufun-community__section-title {
  font-size: 36px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
  color: var(--primary-color);
}

.page-kufun-community__section-title--light {
  color: var(--secondary-color);
}

.page-kufun-community__section-description {
  font-size: 18px;
  text-align: center;
  margin-bottom: 40px;
  color: #555555;
}

.page-kufun-community__section-description--light {
  color: #f0f0f0;
}

.page-kufun-community__intro-section {
  padding: 60px 0;
}

.page-kufun-community__intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.page-kufun-community__intro-content p {
  margin-bottom: 15px;
  font-size: 17px;
}

.page-kufun-community__intro-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  object-fit: cover;
}

.page-kufun-community__quick-access-section {
  padding: 60px 0;
  background-color: var(--primary-color);
  color: var(--secondary-color);
}

.page-kufun-community__quick-access-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.page-kufun-community__access-item {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-kufun-community__access-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.page-kufun-community__access-title {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 15px;
  color: var(--secondary-color);
}

.page-kufun-community__access-item p {
  font-size: 16px;
  margin-bottom: 20px;
  color: #f0f0f0;
}

.page-kufun-community__btn-primary,
.page-kufun-community__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  text-decoration: none;
  border-radius: 5px;
  font-size: 16px;
  font-weight: bold;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  cursor: pointer;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-kufun-community__btn-primary {
  background: var(--primary-color);
  color: var(--secondary-color);
  border-color: var(--primary-color);
}

.page-kufun-community__btn-primary:hover {
  background: #005a2e;
  border-color: #005a2e;
}

.page-kufun-community__btn-secondary {
  background: var(--secondary-color);
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.page-kufun-community__btn-secondary:hover {
  background: #f0f0f0;
  color: #005a2e;
  border-color: #005a2e;
}

.page-kufun-community__btn-register {
  background: var(--register-color);
  color: var(--register-login-font-color);
  border-color: var(--register-color);
}

.page-kufun-community__btn-register:hover {
  background: #a30606;
  border-color: #a30606;
}

.page-kufun-community__btn-login {
  background: var(--login-color);
  color: var(--register-login-font-color);
  border-color: var(--login-color);
}

.page-kufun-community__btn-login:hover {
  background: #a30606;
  border-color: #a30606;
}

.page-kufun-community__games-section {
  padding: 60px 0;
}

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

.page-kufun-community__game-card {
  background: var(--secondary-color);
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-kufun-community__game-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.page-kufun-community__game-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
}

.page-kufun-community__game-title {
  font-size: 24px;
  font-weight: bold;
  margin: 20px 15px 10px;
  color: var(--primary-color);
}

.page-kufun-community__game-card p {
  font-size: 16px;
  margin: 0 15px 20px;
  color: #555555;
}

.page-kufun-community__game-card .page-kufun-community__btn-secondary {
  margin-bottom: 20px;
}

.page-kufun-community__promotions-section {
  padding: 60px 0;
}

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

.page-kufun-community__promo-card {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: var(--secondary-color);
}

.page-kufun-community__promo-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.page-kufun-community__promo-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.page-kufun-community__promo-title {
  font-size: 22px;
  font-weight: bold;
  margin: 20px 15px 10px;
  color: var(--secondary-color);
}

.page-kufun-community__promo-card p {
  font-size: 16px;
  margin: 0 15px 20px;
  color: #f0f0f0;
}

.page-kufun-community__promo-card .page-kufun-community__btn-primary {
  margin-bottom: 20px;
}

.page-kufun-community__security-support-section {
  padding: 60px 0;
}

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

.page-kufun-community__info-item {
  background: var(--secondary-color);
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.page-kufun-community__info-title {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.page-kufun-community__info-item p {
  font-size: 16px;
  color: #555555;
}

.page-kufun-community__support-cta {
  text-align: center;
  margin-top: 40px;
}

.page-kufun-community__support-cta img {
  max-width: 800px;
  width: 100%;
  height: auto;
  display: block;
  margin: 30px auto 0;
  border-radius: 8px;
  object-fit: cover;
}

.page-kufun-community__faq-section {
  padding: 60px 0;
}

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

/* FAQ容器样式 */
.page-kufun-community__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
}

/* FAQ默认状态 - 答案隐藏 */
.page-kufun-community__faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.4s ease;
  padding: 0 15px;
  opacity: 0;
}

/* FAQ展开状态 - 🚨 使用!important和足够大的max-height确保一定能展开 */
.page-kufun-community__faq-item.active .page-kufun-community__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 15px !important;
  opacity: 1;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
}

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

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

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

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

/* 切换图标 */
.page-kufun-community__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: #666;
  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-kufun-community__faq-item.active .page-kufun-community__faq-toggle {
  color: #333;
  transform: rotate(180deg);
}

.page-kufun-community__blog-section {
  padding: 60px 0;
}

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

.page-kufun-community__blog-card {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: var(--secondary-color);
}

.page-kufun-community__blog-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.page-kufun-community__blog-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.page-kufun-community__blog-title {
  font-size: 20px;
  font-weight: bold;
  margin: 20px 15px 10px;
  color: var(--secondary-color);
}

.page-kufun-community__blog-title a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-kufun-community__blog-title a:hover {
  color: #f0f0f0;
}

.page-kufun-community__blog-summary {
  font-size: 15px;
  margin: 0 15px 20px;
  color: #f0f0f0;
}

.page-kufun-community__read-more {
  display: inline-block;
  padding: 8px 15px;
  margin-bottom: 20px;
  margin-left: 15px;
  background: var(--secondary-color);
  color: var(--primary-color);
  text-decoration: none;
  border-radius: 5px;
  font-size: 14px;
  font-weight: bold;
  transition: all 0.3s ease;
}

.page-kufun-community__read-more:hover {
  background: #f0f0f0;
  color: #005a2e;
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
  .page-kufun-community__hero-title {
    font-size: 40px;
  }
  .page-kufun-community__hero-description {
    font-size: 18px;
  }
  .page-kufun-community__section-title {
    font-size: 32px;
  }
  .page-kufun-community__intro-grid {
    grid-template-columns: 1fr;
  }
  .page-kufun-community__intro-image {
    order: -1;
  }
}

@media (max-width: 768px) {
  .page-kufun-community__hero-section {
    padding-top: var(--header-offset, 120px) !important;
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-kufun-community__hero-title {
    font-size: 32px;
    margin-bottom: 15px;
  }
  .page-kufun-community__hero-description {
    font-size: 16px;
    margin-bottom: 20px;
  }
  .page-kufun-community__cta-button {
    padding: 12px 30px;
    font-size: 16px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    margin-top: 20px;
  }
  .page-kufun-community__container {
    padding: 30px 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .page-kufun-community__section-title {
    font-size: 28px;
    margin-bottom: 15px;
  }
  .page-kufun-community__section-description {
    font-size: 16px;
    margin-bottom: 30px;
  }
  .page-kufun-community__intro-content p {
    font-size: 15px;
  }
  .page-kufun-community__quick-access-grid,
  .page-kufun-community__games-grid,
  .page-kufun-community__promotions-grid,
  .page-kufun-community__security-support-grid,
  .page-kufun-community__blog-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-kufun-community__access-item,
  .page-kufun-community__game-card,
  .page-kufun-community__promo-card,
  .page-kufun-community__info-item,
  .page-kufun-community__blog-card {
    padding: 20px;
  }
  .page-kufun-community__access-title,
  .page-kufun-community__game-title,
  .page-kufun-community__promo-title,
  .page-kufun-community__info-title,
  .page-kufun-community__blog-title {
    font-size: 20px;
  }
  .page-kufun-community__access-item p,
  .page-kufun-community__game-card p,
  .page-kufun-community__promo-card p,
  .page-kufun-community__info-item p,
  .page-kufun-community__blog-summary {
    font-size: 15px;
  }
  .page-kufun-community__btn-primary,
  .page-kufun-community__btn-secondary,
  .page-kufun-community a[class*="button"],
  .page-kufun-community 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-kufun-community__quick-access-grid .page-kufun-community__btn-primary,
  .page-kufun-community__quick-access-grid .page-kufun-community__btn-secondary {
    margin-top: 15px;
  }
  .page-kufun-community__support-cta img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-kufun-community__faq-question {
    padding: 15px;
    flex-wrap: wrap;
  }
  .page-kufun-community__faq-question h3 {
    font-size: 15px;
    margin-bottom: 0;
    width: calc(100% - 40px);
  }
  .page-kufun-community__faq-toggle {
    margin-left: 10px;
    width: 24px;
    height: 24px;
    font-size: 20px;
  }
  .page-kufun-community__faq-answer {
    padding: 0 15px;
  }
  .page-kufun-community__faq-item.active .page-kufun-community__faq-answer {
    padding: 15px !important;
  }
  .page-kufun-community__blog-card img {
    
  }
  .page-kufun-community__blog-title {
    font-size: 18px;
  }
  .page-kufun-community__blog-summary {
    font-size: 14px;
  }
}