.page-lottery {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light backgrounds */
    background-color: var(--background-color, #F5F7FA); /* Use shared background variable, fallback to F5F7FA */
}

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

.page-lottery__hero-section {
    position: relative;
    padding-top: 10px; /* Specific top padding as per instruction */
    padding-bottom: 40px;
    text-align: center;
    overflow: hidden;
}

.page-lottery__hero-image-container {
    width: 100%;
    max-height: 675px;
    overflow: hidden;
}

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

.page-lottery__hero-text-block {
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    margin-top: -80px;
    position: relative;
    z-index: 1;
    border-radius: 10px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.page-lottery__main-title {
    font-size: clamp(2em, 4vw, 3.5em);
    color: #E53935;
    margin-bottom: 10px;
    font-weight: bold;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.page-lottery__hero-description {
    font-size: 1.2em;
    color: #333333;
    margin-bottom: 25px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

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

.page-lottery__btn-primary,
.page-lottery__btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    white-space: normal;
    word-wrap: break-word;
    box-sizing: border-box;
    max-width: 100%;
}

.page-lottery__btn-primary {
    background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%);
    color: #ffffff;
    border: 2px solid transparent;
}

.page-lottery__btn-primary:hover {
    background: linear-gradient(180deg, #E53935 0%, #FF5A4F 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(229, 57, 53, 0.4);
}

.page-lottery__btn-secondary {
    background: #ffffff;
    color: #E53935;
    border: 2px solid #E53935;
}

.page-lottery__btn-secondary:hover {
    background: #f0f0f0;
    color: #FF5A4F;
    border-color: #FF5A4F;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(229, 57, 53, 0.2);
}

.page-lottery__section-title {
    font-size: 2.5em;
    color: #E53935;
    text-align: center;
    margin-bottom: 30px;
    font-weight: bold;
}

.page-lottery__text-block {
    font-size: 1.1em;
    color: #333333;
    margin-bottom: 20px;
    text-align: justify;
}

.page-lottery__intro-section {
    padding: 60px 0;
    background-color: #F5F7FA;
    color: #333333;
}

.page-lottery__intro-content {
    display: flex;
    align-items: center;
    gap: 40px;
}

.page-lottery__intro-content .page-lottery__text-block {
    flex: 1;
}

.page-lottery__intro-image {
    flex-shrink: 0;
    width: 600px;
    height: 450px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    display: block;
    max-width: 100%;
}

.page-lottery__games-section {
    padding: 60px 0;
    background-color: #ffffff;
}

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

.page-lottery__game-card {
    background: #FFFFFF;
    border: 1px solid #E0E0E0;
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-lottery__game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.page-lottery__card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
    display: block;
    min-width: 200px;
    min-height: 200px;
}

.page-lottery__card-title {
    font-size: 1.5em;
    color: #E53935;
    margin-bottom: 10px;
    font-weight: bold;
}

.page-lottery__card-description {
    color: #333333;
    font-size: 0.95em;
    margin-bottom: 20px;
}

.page-lottery__card-button {
    display: inline-block;
    padding: 10px 20px;
    background: #E53935;
    color: #ffffff;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
    white-space: normal;
    word-wrap: break-word;
    box-sizing: border-box;
    max-width: 100%;
}

.page-lottery__card-button:hover {
    background: #FF5A4F;
}

.page-lottery__guide-section {
    padding: 60px 0;
    background-color: #E53935;
    color: #ffffff;
}

.page-lottery__guide-section .page-lottery__section-title,
.page-lottery__guide-section .page-lottery__text-block {
    color: #ffffff;
}

.page-lottery__guide-steps {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.page-lottery__step-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    flex: 1;
    min-width: 280px;
    max-width: 350px;
    box-sizing: border-box;
}

.page-lottery__step-number {
    display: inline-block;
    width: 50px;
    height: 50px;
    line-height: 50px;
    border-radius: 50%;
    background: #ffffff;
    color: #E53935;
    font-size: 1.8em;
    font-weight: bold;
    margin-bottom: 20px;
}

.page-lottery__step-title {
    font-size: 1.6em;
    color: #ffffff;
    margin-bottom: 15px;
}

.page-lottery__step-description {
    font-size: 1em;
    color: #f0f0f0;
    margin-bottom: 20px;
}

.page-lottery__step-button {
    display: inline-block;
    padding: 10px 20px;
    background: #FF5A4F;
    color: #ffffff;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
    white-space: normal;
    word-wrap: break-word;
    box-sizing: border-box;
    max-width: 100%;
}

.page-lottery__step-button:hover {
    background: #E53935;
}

.page-lottery__guide-image {
    width: 800px;
    height: 480px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    display: block;
    margin: 40px auto 0 auto;
    max-width: 100%;
    min-width: 200px;
    min-height: 200px;
}

.page-lottery__benefits-section {
    padding: 60px 0;
    background-color: #F5F7FA;
}

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

.page-lottery__benefit-card {
    background: #FFFFFF;
    border: 1px solid #E0E0E0;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.page-lottery__promo-section {
    padding: 60px 0;
    background-color: #E53935;
    color: #ffffff;
}

.page-lottery__promo-section .page-lottery__section-title,
.page-lottery__promo-section .page-lottery__text-block {
    color: #ffffff;
}

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

.page-lottery__promo-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    color: #ffffff;
}

.page-lottery__promo-card .page-lottery__card-title {
    color: #ffffff;
}

.page-lottery__promo-card .page-lottery__card-description {
    color: #f0f0f0;
}

.page-lottery__faq-section {
    padding: 60px 0;
    background-color: #ffffff;
}

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

.page-lottery__faq-item {
    background: #FFFFFF;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.page-lottery__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    font-size: 1.2em;
    font-weight: bold;
    color: #333333;
    cursor: pointer;
    background-color: #f9f9f9;
    border-bottom: 1px solid #E0E0E0;
    list-style: none; /* For details tag */
    -webkit-tap-highlight-color: transparent;
}

.page-lottery__faq-question::-webkit-details-marker {
    display: none;
}

.page-lottery__faq-item[open] .page-lottery__faq-question {
    border-bottom: 1px solid #E0E0E0;
}

.page-lottery__faq-qtext {
    flex-grow: 1;
}

.page-lottery__faq-toggle {
    font-size: 1.5em;
    margin-left: 15px;
    color: #E53935;
    transition: transform 0.3s ease;
}

.page-lottery__faq-item[open] .page-lottery__faq-toggle {
    transform: rotate(45deg);
}

.page-lottery__faq-answer {
    padding: 15px 25px 20px 25px;
    background-color: #ffffff;
    color: #333333;
    font-size: 1em;
    line-height: 1.7;
}

.page-lottery__responsible-gaming-section {
    padding: 60px 0;
    background-color: #333333; /* Dark background for emphasis */
    color: #ffffff;
    text-align: center;
}

.page-lottery__responsible-gaming-section .page-lottery__section-title,
.page-lottery__responsible-gaming-section .page-lottery__text-block {
    color: #ffffff;
}

.page-lottery__centered-cta {
    text-align: center;
    margin-top: 30px;
}

/* General image styling for content areas */
.page-lottery img {
    max-width: 100%;
    height: auto;
    display: block;
    filter: none; /* Ensure no CSS filter changes image color */
}

/* Mobile Responsive Styles */
@media (max-width: 1024px) {
    .page-lottery__hero-text-block {
        margin-top: -60px;
        padding: 15px;
    }
    .page-lottery__intro-content {
        flex-direction: column;
        text-align: center;
    }
    .page-lottery__intro-image {
        width: 100%;
        height: auto;
        max-width: 600px;
    }
    .page-lottery__section-title {
        font-size: 2em;
    }
    .page-lottery__guide-steps {
        flex-direction: column;
        align-items: center;
    }
    .page-lottery__step-item {
        max-width: 100%;
    }
}

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

    /* HERO 主图区域 */
    .page-lottery__hero-section {
        padding-top: 10px !important;
        padding-bottom: 20px;
    }
    .page-lottery__hero-text-block {
        margin-top: -40px;
        padding: 15px;
        border-radius: 5px;
    }
    .page-lottery__main-title {
        font-size: clamp(1.8em, 7vw, 2.5em);
        margin-bottom: 5px;
    }
    .page-lottery__hero-description {
        font-size: 1em;
        margin-bottom: 15px;
    }
    .page-lottery__cta-buttons {
        flex-direction: column;
        gap: 10px;
        padding: 0 15px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* 通用图片与容器 */
    .page-lottery img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        min-width: 200px !important; /* Enforce minimum size */
        min-height: 200px !important; /* Enforce minimum size */
    }
    .page-lottery__section,
    .page-lottery__card,
    .page-lottery__container,
    .page-lottery__intro-content,
    .page-lottery__games-grid,
    .page-lottery__guide-steps,
    .page-lottery__benefits-grid,
    .page-lottery__promo-cards {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden;
    }

    /* 按钮与按钮容器 */
    .page-lottery__btn-primary,
    .page-lottery__btn-secondary,
    .page-lottery__card-button,
    .page-lottery__step-button,
    .page-lottery a[class*="button"],
    .page-lottery 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-lottery__cta-buttons,
    .page-lottery__button-group,
    .page-lottery__btn-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        flex-wrap: wrap !important;
        gap: 10px;
        flex-direction: column;
    }

    /* 其他内容模块 */
    .page-lottery__section-title {
        font-size: 1.8em;
        margin-bottom: 20px;
    }
    .page-lottery__text-block {
        font-size: 1em;
    }
    .page-lottery__intro-content {
        gap: 20px;
    }
    .page-lottery__games-grid,
    .page-lottery__benefits-grid,
    .page-lottery__promo-cards {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .page-lottery__game-card,
    .page-lottery__benefit-card,
    .page-lottery__promo-card {
        padding: 20px;
    }
    .page-lottery__card-image {
        height: auto;
        min-height: 200px;
    }
    .page-lottery__guide-image {
        height: auto;
        min-height: 200px;
        margin-top: 20px;
    }
    .page-lottery__faq-question {
        font-size: 1em;
        padding: 15px 20px;
    }
    .page-lottery__faq-answer {
        padding: 10px 20px 15px 20px;
    }
}