/* style/index.css */

:root {
    --primary-color: #26A9E0;
    --secondary-color: #FFFFFF;
    --login-color: #EA7C07;
    --text-dark: #333333;
    --text-light: #FFFFFF;
    --background-light: #F8F9FA;
    --border-color: #e0e0e0;
}

.page-index {
    font-family: 'Arial', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--secondary-color); /* Body background is white, so text is dark */
}

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

.page-index__section {
    padding: 60px 0;
    text-align: center;
}

.page-index__section-title {
    font-size: 36px;
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.page-index__section-description {
    font-size: 18px;
    color: #555;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Buttons */
.page-index__btn-primary, 
.page-index__btn-secondary,
.page-index__cta-button {
    display: inline-block;
    padding: 15px 40px;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    text-align: center;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-index__btn-primary, .page-index__cta-button {
    background: var(--primary-color);
    color: var(--text-light);
    border: 2px solid var(--primary-color);
}

.page-index__btn-primary:hover, .page-index__cta-button:hover {
    background: darken(var(--primary-color), 10%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

.page-index__btn-secondary:hover {
    background: var(--primary-color);
    color: var(--text-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Images */
.page-index img {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    border-radius: 8px;
}

/* Hero Section */
.page-index__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); /* Ensure space for fixed header */
    background: linear-gradient(135deg, var(--primary-color) 0%, #36C0F0 100%); /* Light blue gradient */
    color: var(--text-light);
}

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

.page-index__hero-image {
    width: 100%;
    margin-bottom: 30px;
    max-height: 675px; /* Limit height for aesthetic */
    overflow: hidden;
}

.page-index__hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.page-index__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    padding: 0 15px;
}

.page-index__hero-title {
    font-size: 52px;
    font-weight: 900;
    margin-bottom: 20px;
    color: var(--text-light);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
    line-height: 1.2;
}

.page-index__hero-description {
    font-size: 22px;
    margin-bottom: 40px;
    color: var(--text-light);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

/* Module 1: Introduction */
.page-index__introduction-section {
    background-color: var(--secondary-color);
    color: var(--text-dark);
}

.page-index__content-wrapper {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-top: 40px;
    text-align: left;
}

.page-index__content-wrapper--reverse {
    flex-direction: row-reverse;
}

.page-index__image {
    flex: 1;
    min-width: 200px; /* Min image size */
    max-width: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-index__text-block {
    flex: 1;
    min-width: 200px; /* Min text block size */
    font-size: 17px;
}

.page-index__text-block h3 {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.page-index__text-block p {
    margin-bottom: 15px;
    color: #444;
}

/* Module 2: Quick Access Links */
.page-index__quick-access-section {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding-bottom: 80px;
}

.page-index__quick-access-section .page-index__section-title {
    color: var(--text-light);
}

.page-index__quick-access-section .page-index__section-description {
    color: rgba(255, 255, 255, 0.9);
}

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

.page-index__quick-link {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 30px 25px;
    text-decoration: none;
    color: var(--text-light);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-index__quick-link:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.page-index__quick-link-icon {
    font-size: 48px;
    margin-bottom: 15px;
    color: var(--text-light);
}

.page-index__quick-link-title {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--text-light);
}

.page-index__quick-link-description {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.8);
}

/* Module 3: Games Section */
.page-index__games-section {
    background-color: var(--background-light);
    color: var(--text-dark);
}

.page-index__game-category {
    margin-bottom: 80px;
    padding-bottom: 40px;
    border-bottom: 1px dashed var(--border-color);
}

.page-index__game-category:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.page-index__game-title {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 30px;
    font-weight: bold;
    text-align: center;
}

/* Module 4: Promotions Section */
.page-index__promotions-section {
    background-color: var(--secondary-color);
    color: var(--text-dark);
    padding-bottom: 80px;
}

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

.page-index__card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    padding: 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
    color: var(--text-dark);
}

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

.page-index__promo-card img, .page-index__news-card img, .page-index__feature-card img {
    width: 100%;
    height: 250px; /* Consistent image height for cards */
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
}

.page-index__card-title {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: bold;
    line-height: 1.3;
}

.page-index__card-description {
    font-size: 16px;
    color: #555;
    margin-bottom: 25px;
    flex-grow: 1;
}

.page-index__promo-card .page-index__btn-primary {
    margin-top: auto; /* Push button to bottom */
}

/* Module 5: Security & Support Section */
.page-index__security-support-section {
    background-color: var(--background-light);
    color: var(--text-dark);
    padding-bottom: 80px;
}

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

.page-index__feature-card {
    padding: 30px;
}

.page-index__feature-card img {
    height: 200px; /* Consistent image height for features */
}

.page-index__contact-cta {
    margin-top: 60px;
    padding: 40px;
    background: var(--primary-color);
    color: var(--text-light);
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    font-size: 20px;
}

.page-index__contact-cta p {
    margin-bottom: 25px;
    font-weight: 500;
}

.page-index__contact-cta .page-index__btn-primary {
    background: var(--login-color);
    border-color: var(--login-color);
}

.page-index__contact-cta .page-index__btn-primary:hover {
    background: darken(var(--login-color), 10%);
    border-color: darken(var(--login-color), 10%);
}

/* Module 6: FAQ Section */
.page-index__faq-section {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding-bottom: 80px;
}

.page-index__faq-section .page-index__section-title {
    color: var(--text-light);
}

.page-index__faq-section .page-index__section-description {
    color: rgba(255, 255, 255, 0.9);
}

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

/* FAQ容器样式 */
.page-index__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

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

/* 问题样式 */
.page-index__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: var(--secondary-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
  color: var(--text-dark);
}

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

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

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

/* 切换图标 */
.page-index__faq-toggle {
  font-size: 28px;
  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: 32px;
  height: 32px;
}

.page-index__faq-item.active .page-index__faq-toggle {
  color: var(--login-color);
}

.page-index__faq-answer p {
    margin-bottom: 10px;
    font-size: 16px;
    color: #444;
}

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

.page-index__faq-answer a:hover {
    color: darken(var(--primary-color), 10%);
}

/* Module 7: News Section */
.page-index__news-section {
    background-color: var(--secondary-color);
    color: var(--text-dark);
    padding-bottom: 80px;
}

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

.page-index__news-card {
    padding: 0;
    text-align: left;
    overflow: hidden;
}

.page-index__news-card img {
    border-radius: 12px 12px 0 0;
    height: 220px; /* Consistent image height for news cards */
    margin-bottom: 0;
}

.page-index__news-card .page-index__card-title {
    font-size: 20px;
    padding: 15px 20px 0;
    margin-bottom: 10px;
    line-height: 1.4;
}

.page-index__news-card .page-index__card-title a {
    color: var(--primary-color);
    text-decoration: none;
}

.page-index__news-card .page-index__card-title a:hover {
    text-decoration: underline;
}

.page-index__news-card .page-index__card-description {
    font-size: 15px;
    padding: 0 20px;
    margin-bottom: 15px;
}

.page-index__news-date {
    display: block;
    font-size: 14px;
    color: #888;
    padding: 0 20px 20px;
}

.page-index__view-all-news {
    margin-top: 50px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-index__hero-title {
        font-size: 44px;
    }
    .page-index__hero-description {
        font-size: 20px;
    }
    .page-index__section-title {
        font-size: 32px;
    }
    .page-index__text-block {
        font-size: 16px;
    }
    .page-index__game-title {
        font-size: 28px;
    }
}

@media (max-width: 768px) {
    .page-index {
        font-size: 16px;
        line-height: 1.6;
    }

    .page-index__hero-section {
        padding-top: var(--header-offset, 120px) !important;
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-index__hero-title {
        font-size: 36px;
        margin-bottom: 15px;
    }

    .page-index__hero-description {
        font-size: 17px;
        margin-bottom: 30px;
    }

    .page-index__cta-button {
        padding: 12px 30px;
        font-size: 16px;
    }

    .page-index__section {
        padding: 40px 0;
    }

    .page-index__section-title {
        font-size: 28px;
        margin-bottom: 15px;
    }

    .page-index__section-description {
        font-size: 16px;
        margin-bottom: 30px;
        padding: 0 15px;
    }

    .page-index__content-wrapper {
        flex-direction: column;
        gap: 20px;
        margin-top: 30px;
    }

    .page-index__content-wrapper--reverse {
        flex-direction: column;
    }

    .page-index__image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        margin-bottom: 20px;
        order: -1; /* Image always on top for mobile */
    }

    .page-index__text-block {
        width: 100%;
        padding: 0 15px;
    }

    .page-index__links-grid, 
    .page-index__promo-grid, 
    .page-index__feature-grid, 
    .page-index__news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 15px;
    }

    .page-index__quick-link {
        padding: 25px 20px;
    }

    .page-index__quick-link-title {
        font-size: 20px;
    }

    .page-index__game-category {
        margin-bottom: 50px;
        padding-bottom: 25px;
    }

    .page-index__game-title {
        font-size: 26px;
        margin-bottom: 20px;
    }

    .page-index__card {
        padding: 25px;
    }

    .page-index__promo-card img, 
    .page-index__news-card img, 
    .page-index__feature-card img {
         /* Adjust height for mobile cards */
        margin-bottom: 15px;
    }

    .page-index__card-title {
        font-size: 20px;
        margin-bottom: 10px;
    }

    .page-index__card-description {
        font-size: 15px;
        margin-bottom: 20px;
    }

    .page-index__contact-cta {
        margin-top: 40px;
        padding: 30px;
        font-size: 18px;
    }

    .page-index__faq-list {
        padding: 0 15px;
    }

    .page-index__faq-question {
        padding: 15px;
    }

    .page-index__faq-question h3 {
        font-size: 16px;
    }

    .page-index__faq-toggle {
        font-size: 24px;
        width: 28px;
        height: 28px;
    }

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

    .page-index__news-card .page-index__card-title {
        font-size: 18px;
        padding: 10px 15px 0;
    }

    .page-index__news-card .page-index__card-description {
        padding: 0 15px;
    }

    .page-index__news-date {
        padding: 0 15px 15px;
    }
    
    /* Mobile specific image and button general rules */
    .page-index img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-index__section,
    .page-index__card,
    .page-index__container,
    .page-index__cta-buttons,
    .page-index__button-group,
    .page-index__btn-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-index__cta-button,
    .page-index__btn-primary,
    .page-index__btn-secondary,
    .page-index a[class*="button"],
    .page-index 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-index__cta-buttons {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
}