/* style/index.css */

:root {
    --page-index-primary-color: #E53935;
    --page-index-secondary-color: #FF5A4F;
    --page-index-text-main-color: #333333;
    --page-index-card-bg-color: #FFFFFF;
    --page-index-bg-color: #F5F7FA;
    --page-index-border-color: #E0E0E0;
    --page-index-button-gradient: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%);
}

.page-index {
    font-family: Arial, sans-serif;
    color: var(--page-index-text-main-color);
    background-color: var(--page-index-bg-color);
}

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

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

.page-index__section-description {
    font-size: 18px;
    text-align: center;
    margin-bottom: 40px;
    color: var(--page-index-text-main-color);
}

.page-index__btn-primary,
.page-index__btn-secondary,
.page-index a[class*="button"],
.page-index a[class*="btn"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: normal;
    word-wrap: break-word;
    box-sizing: border-box;
    max-width: 100%;
}

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

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

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

.page-index__btn-secondary:hover {
    background: var(--page-index-primary-color);
    color: #ffffff;
    transform: translateY(-2px);
}

/* HERO Section */
.page-index__hero-section {
    position: relative;
    padding-bottom: 0;
    padding-left: 0;
    padding-right: 0;
    padding-top: 10px; /* shared 已给 body 留白 */
    margin-top: 0;
    background-color: var(--page-index-bg-color);
}

.page-index__hero-container {
    position: relative;
    margin: 0 auto;
    max-width: 100%;
}

.page-index__hero-image {
    width: 100%;
    margin: 0;
}

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

/* Products Section */
.page-index__products-section {
    width: 100%;
    padding: 60px 20px;
    background-color: var(--page-index-bg-color);
    box-sizing: border-box;
}

.page-index__products-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 4fr 2fr; 
    gap: 20px;
}

.page-index__products-grid {
    display: grid;
    gap: 20px;
}

.page-index__products-grid--small {
    grid-template-columns: repeat(4, 1fr);
}

.page-index__products-grid--large {
    grid-template-columns: repeat(2, 1fr);
}

.page-index__product-card {
    width: 100%;
    max-width: 300px; /* 最宽不超过300px */
    border-radius: 0; /* 禁止圆角 */
    overflow: hidden;
    background: transparent;
    box-shadow: none; /* 禁止投影/阴影 */
    transition: transform 0.3s ease;
}

.page-index__product-card:hover {
    transform: translateY(-3px); /* 仅允许轻微上移 */
}

.page-index__product-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.page-index__product-card-image {
    width: 100%;
    max-width: 300px; /* 最宽不超过300px */
    overflow: hidden;
}

.page-index__product-card-image img {
    max-width: 100%;
    width: 100%;
    height: auto; /* 保持图片原始宽高比 */
    display: block;
}

/* Module 1: Intro Section */
.page-index__intro-section {
    padding: 80px 20px;
    background-color: var(--page-index-card-bg-color);
    text-align: center;
    color: var(--page-index-text-main-color);
}

.page-index__main-title {
    font-size: 42px;
    font-weight: bold;
    margin-bottom: 25px;
    color: var(--page-index-primary-color);
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.page-index__intro-text {
    font-size: 18px;
    line-height: 1.7;
    max-width: 900px;
    margin: 0 auto 40px;
}

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

/* Module 2: Quick Links Section */
.page-index__quick-links-section {
    padding: 80px 20px;
    background-color: var(--page-index-primary-color);
    color: #ffffff;
}

.page-index__quick-links-section .page-index__section-title {
    color: #ffffff;
}

.page-index__quick-links-section .page-index__section-description {
    color: #f0f0f0;
}

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

.page-index__link-item {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    text-decoration: none;
    color: #ffffff;
    transition: transform 0.3s ease, background-color 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-index__link-item:hover {
    transform: translateY(-5px);
    background-color: rgba(255, 255, 255, 0.2);
}

.page-index__link-item img {
    
    
    margin-bottom: 15px;
    object-fit: contain;
    max-width: 100%;
}

.page-index__link-item h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #ffffff;
}

.page-index__link-item p {
    font-size: 15px;
    color: #f0f0f0;
}

/* Module 3: Games Section */
.page-index__games-section {
    padding: 80px 20px;
    background-color: var(--page-index-bg-color);
    color: var(--page-index-text-main-color);
}

.page-index__game-category {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-bottom: 60px;
    background-color: var(--page-index-card-bg-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    padding: 30px;
}

.page-index__game-category--reverse {
    flex-direction: row-reverse;
}

.page-index__game-category img {
    flex: 1;
    max-width: 50%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
    max-width: 100%;
}

.page-index__game-content {
    flex: 1;
}

.page-index__game-content h3 {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--page-index-primary-color);
}

.page-index__game-content p {
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 20px;
}

/* Module 4: Promotions Section */
.page-index__promotions-section {
    padding: 80px 20px;
    background-color: var(--page-index-primary-color);
    color: #ffffff;
}

.page-index__promotions-section .page-index__section-title {
    color: #ffffff;
}

.page-index__promotions-section .page-index__section-description {
    color: #f0f0f0;
}

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

.page-index__promo-card {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    transition: transform 0.3s ease, background-color 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #ffffff;
}

.page-index__promo-card:hover {
    transform: translateY(-5px);
    background-color: rgba(255, 255, 255, 0.2);
}

.page-index__promo-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
    max-width: 100%;
}

.page-index__promo-card h3 {
    font-size: 22px;
    margin-bottom: 10px;
    color: #ffffff;
}

.page-index__promo-card p {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
    color: #f0f0f0;
}

/* Module 5: Security & Support Section */
.page-index__security-support-section {
    padding: 80px 20px;
    background-color: var(--page-index-card-bg-color);
    color: var(--page-index-text-main-color);
}

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

.page-index__info-block {
    text-align: center;
    padding: 25px;
    background-color: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.page-index__info-block img {
    
    
    margin-bottom: 20px;
    object-fit: contain;
    max-width: 100%;
}

.page-index__info-block h3 {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--page-index-primary-color);
}

.page-index__info-block p {
    font-size: 15px;
    line-height: 1.6;
}

/* Module 6: FAQ Section */
.page-index__faq-section {
    padding: 80px 20px;
    background-color: var(--page-index-bg-color);
    color: var(--page-index-text-main-color);
}

.page-index__faq-list {
    margin-top: 40px;
}

details.page-index__faq-item {
    margin-bottom: 15px;
    border-radius: 5px;
    border: 1px solid var(--page-index-border-color);
    overflow: hidden;
    background: var(--page-index-card-bg-color);
}
details.page-index__faq-item summary.page-index__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    cursor: pointer;
    user-select: none;
    list-style: none;
    transition: background-color 0.3s ease;
}
details.page-index__faq-item summary.page-index__faq-question::-webkit-details-marker {
    display: none;
}
details.page-index__faq-item summary.page-index__faq-question:hover {
    background: #f5f5f5;
}
.page-index__faq-qtext {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    text-align: left;
    color: var(--page-index-text-main-color);
}
.page-index__faq-toggle {
    font-size: 24px;
    font-weight: bold;
    color: #666;
    flex-shrink: 0;
    margin-left: 15px;
    width: 28px;
    text-align: center;
}
details.page-index__faq-item .page-index__faq-answer {
    padding: 0 20px 20px;
    background: #f9f9f9;
    border-radius: 0 0 5px 5px;
}

/* Module 7: Blog Section */
.page-index__blog-section {
    padding: 80px 20px;
    background-color: var(--page-index-primary-color);
    color: #ffffff;
}

.page-index__blog-section .page-index__section-title {
    color: #ffffff;
}

.page-index__blog-section .page-index__section-description {
    color: #f0f0f0;
}

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

.page-index__blog-card {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease, background-color 0.3s ease;
    display: flex;
    flex-direction: column;
    color: #ffffff;
}

.page-index__blog-card:hover {
    transform: translateY(-5px);
    background-color: rgba(255, 255, 255, 0.2);
}

.page-index__blog-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    max-width: 100%;
}

.page-index__blog-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.page-index__blog-content h3 {
    font-size: 20px;
    margin-bottom: 10px;
    line-height: 1.4;
}

.page-index__blog-content h3 a {
    color: #ffffff;
    text-decoration: none;
}

.page-index__blog-content h3 a:hover {
    text-decoration: underline;
}

.page-index__blog-content p {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 15px;
    flex-grow: 1;
    color: #f0f0f0;
}

.page-index__blog-date {
    font-size: 13px;
    color: #cccccc;
    margin-bottom: 15px;
}

.page-index__read-more {
    display: inline-block;
    margin-top: auto;
    color: #ffffff;
    text-decoration: underline;
    font-weight: bold;
    font-size: 15px;
}

.page-index__read-more:hover {
    color: var(--page-index-secondary-color);
}

.page-index__view-all-button {
    text-align: center;
    margin-top: 20px;
}

/* Copyright Section */
.page-index__copyright-section {
    padding: 20px;
    background-color: #222222;
    color: #cccccc;
    text-align: center;
}

.page-index__copyright-text {
    font-size: 14px;
    margin: 0;
}

/* General image responsiveness */
.page-index img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --- Mobile Responsive Styles --- */
@media (max-width: 1024px) {
    .page-index__products-container {
        grid-template-columns: 1fr; /* 移动端：两个网格垂直排列 */
    }
    
    .page-index__products-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .page-index__main-title {
        font-size: 36px;
    }

    .page-index__game-category {
        flex-direction: column;
        text-align: center;
    }

    .page-index__game-category--reverse {
        flex-direction: column;
    }

    .page-index__game-category img {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    /* HERO 主图区域 */
    .page-index__hero-section {
        padding-top: 10px !important; /* shared 已给 body 留白：约 10px 级，禁止 var(--header-offset) */
    }

    /* 产品展示图区域 */
    .page-index__products-section {
        padding: 40px 15px;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }
    
    .page-index__products-container {
        grid-template-columns: 1fr;
        gap: 15px;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }
    
    /* 前面4张图 - 4宫格布局（2x2），保持图片原始宽高比，最宽300px */
    .page-index__products-grid--small {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .page-index__products-grid--small .page-index__product-card,
    .page-index__products-grid--small .page-index__product-card-image {
        max-width: 300px;
        margin: 0 auto; /* Center cards */
    }
    
    .page-index__products-grid--small .page-index__product-card-image img {
        max-width: 100%;
        width: 100%;
        height: auto; /* 保持图片原始宽高比 */
    }
    
    /* 后面2张大图 - 每个单独占一行，保持图片原始宽高比，最宽300px */
    .page-index__products-grid--large {
        grid-template-columns: 1fr;
        gap: 15px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .page-index__products-grid--large .page-index__product-card,
    .page-index__products-grid--large .page-index__product-card-image {
        max-width: 300px;
        margin: 0 auto; /* Center cards */
    }
    
    .page-index__products-grid--large .page-index__product-card-image img {
        max-width: 100%;
        width: 100%;
        height: auto; /* 保持图片原始宽高比 */
    }

    /* 通用图片与容器 */
    .page-index img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    
    .page-index__container,
    .page-index__intro-section,
    .page-index__quick-links-section,
    .page-index__games-section,
    .page-index__promotions-section,
    .page-index__security-support-section,
    .page-index__faq-section,
    .page-index__blog-section {
        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,
    .page-index__button-group,
    .page-index__btn-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 0;
        padding-right: 0;
        flex-direction: column !important;
        gap: 10px;
    }

    /* 其他内容模块 */
    .page-index__section-title {
        font-size: 28px;
    }

    .page-index__main-title {
        font-size: 32px;
    }

    .page-index__intro-text {
        font-size: 16px;
    }

    .page-index__links-grid,
    .page-index__promo-grid,
    .page-index__security-support-grid,
    .page-index__blog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-index__link-item,
    .page-index__promo-card,
    .page-index__info-block,
    .page-index__blog-card {
        padding: 20px;
    }

    .page-index__link-item h3,
    .page-index__promo-card h3,
    .page-index__info-block h3,
    .page-index__blog-content h3 {
        font-size: 18px;
    }

    details.page-index__faq-item summary.page-index__faq-question { padding: 15px; }
    .page-index__faq-qtext { font-size: 15px; }

    .page-index__game-category {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
    }
    .page-index__game-category--reverse {
        flex-direction: column;
    }
    .page-index__game-category img {
        max-width: 100%;
        width: 100%;
    }
    .page-index__game-content h3 {
        font-size: 24px;
    }
    .page-index__game-content p {
        font-size: 15px;
    }
}