:root {
    --primary-color: #017439;
    --secondary-color: #FFFFFF;
    --register-button-color: #C30808;
    --login-button-color: #C30808;
    --button-font-color: #FFFF00;
    --text-color-dark: #333333;
    --text-color-light: #ffffff;
    --background-color-light: #f9f9f9; /* Slightly off-white for contrast */
    --background-color-white: #ffffff;
    --border-color: #e0e0e0;
}

/* Base styles for the page content */
.page-cockfighting {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color-dark); /* Default text color for light background */
    background-color: var(--background-color-white); /* Default body background is white */
}

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

.page-cockfighting__section-title {
    font-size: 36px;
    font-weight: bold;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 15px;
}

.page-cockfighting__section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--register-button-color); /* Use a strong accent color */
    border-radius: 2px;
}

.page-cockfighting__section-title + p {
    text-align: center;
    max-width: 800px;
    margin: -20px auto 50px auto;
    font-size: 18px;
    color: #555;
}

.page-cockfighting__light-bg {
    background-color: var(--background-color-white);
    color: var(--text-color-dark);
}

.page-cockfighting__dark-bg {
    background-color: var(--primary-color);
    color: var(--text-color-light);
}

.page-cockfighting__dark-bg .page-cockfighting__section-title {
    color: var(--secondary-color);
}

.page-cockfighting__dark-bg .page-cockfighting__section-title::after {
    background-color: var(--secondary-color);
}

.page-cockfighting__dark-bg .page-cockfighting__section-title + p {
    color: var(--text-color-light);
}

.page-cockfighting__dark-bg a {
    color: var(--button-font-color); /* Yellow for links on dark background */
}

.page-cockfighting__dark-bg a:hover {
    text-decoration: underline;
}

.highlight {
    color: var(--register-button-color); /* Highlight text with strong accent */
    font-weight: bold;
}

/* --- HERO Section --- */
.page-cockfighting__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); /* Desktop offset */
    background: linear-gradient(135deg, var(--primary-color) 0%, #1a9c5b 100%); /* Green gradient */
    color: var(--text-color-light);
    overflow: hidden; /* Ensure no overflow */
}

.page-cockfighting__hero-container {
    position: relative;
    max-width: 1400px; /* Wider container for hero */
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.page-cockfighting__hero-image {
    width: 100%;
    margin-bottom: 30px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.page-cockfighting__hero-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.page-cockfighting__hero-image img:hover {
    transform: scale(1.03);
}

.page-cockfighting__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    max-width: 900px;
}

.page-cockfighting__main-title {
    font-size: 48px;
    font-weight: 900;
    margin-bottom: 20px;
    line-height: 1.2;
    color: var(--secondary-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-cockfighting__intro-text {
    font-size: 20px;
    margin-bottom: 40px;
    color: #e0e0e0;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.page-cockfighting__intro-text a {
    color: var(--button-font-color);
    text-decoration: underline;
}

.page-cockfighting__intro-text a:hover {
    color: var(--secondary-color);
}

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

.page-cockfighting__btn-register,
.page-cockfighting__btn-login {
    display: inline-block;
    padding: 15px 40px;
    text-decoration: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-cockfighting__btn-register {
    background: var(--register-button-color); /* Custom red for register */
    color: var(--button-font-color); /* Custom yellow for font */
    border: 2px solid var(--button-font-color);
}

.page-cockfighting__btn-register:hover {
    background: #a30606;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-cockfighting__btn-login {
    background: var(--login-button-color); /* Custom red for login */
    color: var(--button-font-color); /* Custom yellow for font */
    border: 2px solid var(--button-font-color);
}

.page-cockfighting__btn-login:hover {
    background: #a30606;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-cockfighting__cta-buttons--center {
    margin-top: 40px;
}

/* --- About Section (Features Grid) --- */
.page-cockfighting__about-section {
    padding: 80px 0;
}

.page-cockfighting__features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
    text-align: center;
}

.page-cockfighting__feature-item {
    background: var(--background-color-white);
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    padding: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-cockfighting__feature-item img {
    width: 200px; /* Minimum 200x200px */
    height: 200px; /* Minimum 200x200px */
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 25px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

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

.page-cockfighting__feature-item p {
    font-size: 16px;
    color: #666;
}

/* --- Game Types Section --- */
.page-cockfighting__game-types {
    padding: 80px 0;
}

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

.page-cockfighting__game-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.page-cockfighting__game-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

.page-cockfighting__game-card img {
    width: 100%;
    height: 250px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
}

.page-cockfighting__game-card .page-cockfighting__game-title {
    font-size: 22px;
    color: var(--secondary-color);
    padding: 20px 25px 10px;
    font-weight: 700;
}

.page-cockfighting__game-card p {
    font-size: 16px;
    color: #e0e0e0;
    padding: 0 25px 25px;
    flex-grow: 1;
}

/* --- Betting Guide Section --- */
.page-cockfighting__betting-guide {
    padding: 80px 0;
}

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

.page-cockfighting__step-item {
    background: var(--background-color-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

.page-cockfighting__step-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

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

.page-cockfighting__step-item p {
    font-size: 16px;
    color: #666;
}

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

/* --- Promotions Section --- */
.page-cockfighting__promotions {
    padding: 80px 0;
}

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

.page-cockfighting__promo-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.page-cockfighting__promo-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

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

.page-cockfighting__promo-title {
    font-size: 22px;
    color: var(--secondary-color);
    padding: 20px 25px 10px;
    font-weight: 700;
}

.page-cockfighting__promo-card p {
    font-size: 16px;
    color: #e0e0e0;
    padding: 0 25px 20px;
    flex-grow: 1;
}

.page-cockfighting__btn-details {
    display: inline-block;
    padding: 10px 20px;
    background: var(--register-button-color); /* Red accent for details */
    color: var(--button-font-color);
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    margin: 0 25px 25px;
    align-self: flex-start;
    transition: background-color 0.3s ease;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-cockfighting__btn-details:hover {
    background: #a30606;
}

/* --- Safety & Support Section --- */
.page-cockfighting__safety-support {
    padding: 80px 0;
}

.page-cockfighting__info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
    text-align: center;
}

.page-cockfighting__info-item {
    background: var(--background-color-white);
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    padding: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-cockfighting__info-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

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

.page-cockfighting__info-item p {
    font-size: 16px;
    color: #666;
}

.page-cockfighting__btn-contact {
    display: inline-block;
    padding: 15px 40px;
    background: var(--primary-color);
    color: var(--secondary-color);
    text-decoration: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    margin-top: 30px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-cockfighting__btn-contact:hover {
    background: #015c2f;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* --- FAQ Section --- */
.page-cockfighting__faq-section {
    padding: 80px 0;
}

.page-cockfighting__faq-list {
    max-width: 900px;
    margin: 50px auto 0;
}

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

/* FAQ默认状态 - 答案隐藏 */
.page-cockfighting__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;
}

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

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

.page-cockfighting__faq-question:hover {
    background: var(--background-color-light);
    border-color: #d0d0d0;
}

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

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

/* 切换图标 */
.page-cockfighting__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-cockfighting__faq-item.active .page-cockfighting__faq-toggle {
    color: var(--primary-color);
    transform: rotate(45deg); /* Rotate for 'x' effect */
}


/* --- News Section --- */
.page-cockfighting__news-section {
    padding: 80px 0;
}

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

.page-cockfighting__news-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}