/* style/index-top-games.css */
:root {
    --primary-color: #FFD700;
    --secondary-color: #8B0000;
    --text-light: #ffffff;
    --text-dark: #333333;
    --bg-dark: #0d0d0d;
    --bg-light: #f9f9f9;
    --border-color: #e0e0e0;
}

.page-index-top-games {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-light); /* Body background is dark, so text is light */
    background-color: var(--bg-dark); /* Ensure consistency with body background */
}

.page-index-top-games__section {
    padding: 60px 20px;
    text-align: center;
}

.page-index-top-games__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    box-sizing: border-box;
}

.page-index-top-games__heading {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 20px;
    color: var(--primary-color);
    text-transform: uppercase;
}

.page-index-top-games__paragraph {
    font-size: 18px;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: var(--text-light);
}

.page-index-top-games__cta-center {
    margin-top: 40px;
}

.page-index-top-games__cta-button,
.page-index-top-games__btn-primary,
.page-index-top-games__btn-secondary {
    display: inline-block;
    padding: 15px 40px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    margin: 0 10px;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
    border: 2px solid transparent;
}

.page-index-top-games__btn-primary {
    background: var(--primary-color);
    color: var(--text-light);
    border-color: var(--primary-color);
}

.page-index-top-games__btn-primary:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-index-top-games__btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.page-index-top-games__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);
}

.page-index-top-games__btn-link {
    display: inline-block;
    margin-top: 15px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-index-top-games__btn-link:hover {
    color: var(--secondary-color);
}

.page-index-top-games__btn-link--disabled {
    color: #666;
    cursor: not-allowed;
    text-decoration: none;
}

/* HERO Section */
.page-index-top-games__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);
    overflow: hidden;
}

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

.page-index-top-games__hero-image {
    width: 100%;
    margin-bottom: 30px;
}

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

.page-index-top-games__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
}

.page-index-top-games__hero-title {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 20px;
    line-height: 1.2;
}

.page-index-top-games__hero-description {
    font-size: 20px;
    color: var(--text-light);
    margin-bottom: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-index-top-games__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* Section Intro */
.page-index-top-games__section--intro {
    background-color: var(--bg-light);
    color: var(--text-dark);
}

.page-index-top-games__section--intro .page-index-top-games__heading,
.page-index-top-games__section--intro .page-index-top-games__paragraph {
    color: var(--text-dark);
}

/* Game Grid Section */
.page-index-top-games__section--games {
    background-color: var(--bg-dark);
    color: var(--text-light);
}

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

.page-index-top-games__game-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    text-align: left;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.page-index-top-games__game-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.page-index-top-games__game-card-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.page-index-top-games__game-card-title {
    font-size: 24px;
    margin: 20px 20px 10px;
    color: var(--primary-color);
}

.page-index-top-games__game-card-title a {
    color: inherit;
    text-decoration: none;
}

.page-index-top-games__game-card-title a:hover {
    text-decoration: underline;
}

.page-index-top-games__game-card-description {
    font-size: 16px;
    color: #cccccc;
    margin: 0 20px 20px;
    flex-grow: 1;
}

/* Promotions Section */
.page-index-top-games__section--promotions {
    background-color: var(--bg-light);
    color: var(--text-dark);
}

.page-index-top-games__section--promotions .page-index-top-games__heading,
.page-index-top-games__section--promotions .page-index-top-games__paragraph {
    color: var(--text-dark);
}

.page-index-top-games__promo-list {
    list-style: none;
    padding: 0;
    margin-top: 40px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 30px;
    text-align: left;
}

.page-index-top-games__promo-item {
    background: #ffffff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.page-index-top-games__promo-item:hover {
    transform: translateY(-5px);
}

.page-index-top-games__promo-title {
    font-size: 22px;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.page-index-top-games__promo-description {
    font-size: 16px;
    color: var(--text-dark);
    margin-bottom: 0;
}

/* Security Section */
.page-index-top-games__section--security {
    background-color: var(--bg-dark);
    color: var(--text-light);
}

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

.page-index-top-games__feature-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.page-index-top-games__feature-icon {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 20px;
}

.page-index-top-games__feature-title {
    font-size: 22px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.page-index-top-games__feature-description {
    font-size: 16px;
    color: #cccccc;
}

/* Guide Section */
.page-index-top-games__section--guide {
    background-color: var(--bg-light);
    color: var(--text-dark);
}

.page-index-top-games__section--guide .page-index-top-games__heading,
.page-index-top-games__section--guide .page-index-top-games__paragraph {
    color: var(--text-dark);
}

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

.page-index-top-games__step-item {
    background: #ffffff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    position: relative;
}

.page-index-top-games__step-number {
    background: var(--primary-color);
    color: var(--text-light);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    margin: -55px auto 20px;
    border: 3px solid var(--secondary-color);
}

.page-index-top-games__step-item:first-child .page-index-top-games__step-number {
    margin-top: -55px;
}

.page-index-top-games__step-title {
    font-size: 22px;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.page-index-top-games__step-description {
    font-size: 16px;
    color: var(--text-dark);
}

/* FAQ Section */
.page-index-top-games__section--faq {
    background-color: var(--bg-dark);
    color: var(--text-light);
}

.page-index-top-games__faq-list {
    max-width: 900px;
    margin: 40px auto 0;
    text-align: left;
}

/* FAQ容器样式 */
.page-index-top-games__faq-item {
    margin-bottom: 15px;
    border-radius: 5px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
}

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

/* FAQ展开状态 - 🚨 Sử dụng!important và đủ lớn max-height để đảm bảo có thể mở rộng */
.page-index-top-games__faq-item.active .page-index-top-games__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: rgba(255, 255, 255, 0.1);
    border-radius: 0 0 5px 5px;
}

/* Vấn đề phong cách */
.page-index-top-games__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 5px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    position: relative;
}

.page-index-top-games__faq-question:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--primary-color);
}

.page-index-top-games__faq-question:active {
    background: rgba(255, 255, 255, 0.15);
}

/* Vấn đề tiêu đề phong cách */
.page-index-top-games__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
    pointer-events: none; /* Ngăn h3 tag chặn sự kiện click */
    color: var(--primary-color);
}

/* Chuyển đổi icon */
.page-index-top-games__faq-toggle {
    font-size: 24px;
    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; /* Ngăn icon chặn sự kiện click */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.page-index-top-games__faq-item.active .page-index-top-games__faq-toggle {
    color: var(--text-light);
    transform: rotate(45deg);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-index-top-games__heading {
        font-size: 32px;
    }
    .page-index-top-games__hero-title {
        font-size: 40px;
    }
    .page-index-top-games__promo-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .page-index-top-games__hero-section {
        padding-top: var(--header-offset, 120px) !important;
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-index-top-games__hero-title {
        font-size: 32px;
    }

    .page-index-top-games__hero-description {
        font-size: 18px;
    }

    .page-index-top-games__cta-button,
    .page-index-top-games__btn-primary,
    .page-index-top-games__btn-secondary,
    .page-index-top-games a[class*="button"],
    .page-index-top-games 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-top-games__cta-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .page-index-top-games__section {
        padding: 40px 15px;
    }

    .page-index-top-games__heading {
        font-size: 28px;
    }

    .page-index-top-games__paragraph {
        font-size: 16px;
    }

    .page-index-top-games__game-grid,
    .page-index-top-games__security-features,
    .page-index-top-games__guide-steps {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-index-top-games__game-card-image {
        height: 180px;
    }

    .page-index-top-games__game-card-title {
        font-size: 20px;
    }

    .page-index-top-games__promo-item {
        padding: 20px;
    }

    .page-index-top-games__promo-title {
        font-size: 20px;
    }

    .page-index-top-games__feature-title,
    .page-index-top-games__step-title {
        font-size: 20px;
    }

    .page-index-top-games__faq-question {
        padding: 15px;
        flex-wrap: wrap;
    }

    .page-index-top-games__faq-question h3 {
        font-size: 16px;
        margin-bottom: 0;
        width: calc(100% - 40px);
    }

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

    .page-index-top-games__faq-answer {
        padding: 0 15px;
    }

    .page-index-top-games__faq-item.active .page-index-top-games__faq-answer {
        padding: 15px !important;
    }

    /* All images responsive */
    .page-index-top-games img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    .page-index-top-games__section,
    .page-index-top-games__card,
    .page-index-top-games__container,
    .page-index-top-games__cta-buttons,
    .page-index-top-games__button-group,
    .page-index-top-games__btn-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-index-top-games__cta-buttons {
        display: flex;
        flex-direction: column;
    }
}