:root {
    --primary-color: #017439;
    --secondary-color: #FFFFFF;
    --text-dark: #333333;
    --text-light: #FFFFFF;
    --bg-light: #FFFFFF;
    --bg-dark: #017439;
    --border-color: #e0e0e0;
    --register-btn-bg: #C30808;
    --login-btn-bg: #C30808;
    --register-login-text: #FFFF00;
}

.page-casino {
    font-family: 'Arial', sans-serif;
    color: var(--text-dark); /* Default text color for light backgrounds */
    line-height: 1.6;
}

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

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

.page-casino__section-title {
    font-size: 38px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.page-casino__section-title--white {
    color: var(--text-light);
}

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

.page-casino__section-description--white {
    color: var(--text-light);
}

.page-casino__light-bg {
    background-color: var(--bg-light);
    color: var(--text-dark);
}

.page-casino__dark-bg {
    background-color: var(--bg-dark);
    color: var(--text-light);
}

/* Hero Section */
.page-casino__hero-section {
    position: relative;
    overflow: hidden;
    padding-top: 10px; /* Small top padding, body handles --header-offset */
    padding-bottom: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 600px;
    background-color: var(--bg-dark); /* Fallback background color */
}

.page-casino__hero-image-wrapper {
    width: 100%;
    max-height: 600px; /* Limit height for hero image */
    overflow: hidden;
    margin-bottom: 30px; /* Space between image and content */
}

.page-casino__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover; /* Cover the container, might crop */
}

.page-casino__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    padding: 0 15px;
    color: var(--text-light);
}

.page-casino__main-title {
    font-size: clamp(32px, 5vw, 48px); /* Responsive font size */
    font-weight: 800;
    margin-bottom: 15px;
    line-height: 1.2;
    color: var(--text-light);
}

.page-casino__hero-description {
    font-size: 18px;
    margin-bottom: 30px;
    color: var(--text-light);
}

.page-casino__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.page-casino__btn-primary,
.page-casino__btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    max-width: 100%; /* Ensure buttons adapt */
    box-sizing: border-box;
    white-space: normal; /* Allow text wrap */
    word-wrap: break-word; /* Allow text wrap */
}

.page-casino__btn-primary {
    background-color: var(--register-btn-bg); /* Custom color for register */
    color: var(--register-login-text); /* Custom font color */
    border-color: var(--register-btn-bg);
}

.page-casino__btn-primary:hover {
    background-color: #a30606; /* Darker red */
    border-color: #a30606;
}

.page-casino__btn-secondary {
    background-color: transparent;
    color: var(--register-login-text); /* Custom font color */
    border-color: var(--login-btn-bg); /* Custom color for login */
}

.page-casino__btn-secondary:hover {
    background-color: var(--login-btn-bg);
    color: var(--text-light);
}

/* About Section */
.page-casino__about-section .page-casino__container {
    display: flex;
    align-items: center;
    gap: 40px;
    text-align: left;
}

.page-casino__content-block {
    flex: 1;
}

.page-casino__content-block p {
    margin-bottom: 15px;
    font-size: 16px;
}

.page-casino__image-content {
    flex-shrink: 0;
    width: 500px;
    height: auto;
    border-radius: 10px;
    object-fit: cover;
    display: block;
}

.page-casino__content-block--reversed {
    flex-direction: row-reverse;
}

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

/* Games Section */
.page-casino__games-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto 40px;
}

.page-casino__game-card {
    background-color: var(--bg-light);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-casino__game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.page-casino__game-image {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
}

.page-casino__game-title {
    font-size: 22px;
    font-weight: 700;
    margin: 15px 15px 10px;
    line-height: 1.3;
}

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

.page-casino__game-title a:hover {
    text-decoration: underline;
}

.page-casino__game-description {
    font-size: 15px;
    color: var(--text-dark);
    padding: 0 15px 15px;
    min-height: 75px; /* Ensure consistent height for descriptions */
}

.page-casino__btn-text {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    padding: 0 15px 15px;
}

.page-casino__btn-text:hover {
    text-decoration: underline;
}

.page-casino__button-group {
    margin-top: 30px;
}

/* Live Casino Section */
.page-casino__live-casino-section .page-casino__container {
    display: flex;
    align-items: center;
    gap: 40px;
    text-align: left;
}

/* Promotions Section */
.page-casino__promotions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto 40px;
}

.page-casino__promo-card {
    background-color: var(--bg-light);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 25px;
    text-align: left;
    min-height: 220px; /* Ensure consistent card height */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.page-casino__promo-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.3;
}

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

.page-casino__promo-title a:hover {
    text-decoration: underline;
}

.page-casino__promo-description {
    font-size: 15px;
    color: var(--text-dark);
    margin-bottom: 15px;
    flex-grow: 1;
}

/* Why Choose Us Section */
.page-casino__features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.page-casino__feature-item {
    background-color: var(--bg-light);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    padding: 30px 20px;
    text-align: center;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-casino__feature-icon {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.page-casino__feature-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.page-casino__feature-description {
    font-size: 15px;
    color: var(--text-dark);
}

/* Getting Started Section */
.page-casino__steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto 40px;
}

.page-casino__step-item {
    background-color: var(--bg-light);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 30px 20px;
    text-align: center;
    position: relative;
}

.page-casino__step-number {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: 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: 700;
    border: 3px solid var(--secondary-color);
}

.page-casino__step-title {
    font-size: 22px;
    font-weight: 700;
    margin-top: 20px;
    margin-bottom: 10px;
    color: var(--primary-color);
}

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

/* FAQ Section */
details.page-casino__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  background: var(--bg-light);
}
details.page-casino__faq-item summary.page-casino__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-casino__faq-item summary.page-casino__faq-question::-webkit-details-marker {
  display: none;
}
details.page-casino__faq-item summary.page-casino__faq-question:hover {
  background: #f5f5f5;
}
.page-casino__faq-qtext {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: var(--text-dark);
}
.page-casino__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #666;
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}
details.page-casino__faq-item .page-casino__faq-answer {
  padding: 0 20px 20px;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
  color: var(--text-dark);
}

/* Final CTA Section */
.page-casino__cta-final {
    padding-bottom: 80px;
}

.page-casino__text-center {
    text-align: center;
}

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

/* Media Queries for Responsive Design */
/* Tablet */
@media (max-width: 1024px) {
    .page-casino__hero-section {
        min-height: 500px;
    }
    .page-casino__main-title {
        font-size: clamp(30px, 4.5vw, 42px);
    }
    .page-casino__section-title {
        font-size: 32px;
    }
    .page-casino__about-section .page-casino__container,
    .page-casino__live-casino-section .page-casino__container {
        flex-direction: column;
        text-align: center;
    }
    .page-casino__image-content {
        width: 100%;
        max-width: 600px;
        margin-top: 30px;
    }
    .page-casino__content-block--reversed {
        flex-direction: column; /* Revert to column for smaller screens */
    }
    .page-casino__games-grid,
    .page-casino__promotions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .page-casino__features-grid,
    .page-casino__steps-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .page-casino__feature-item,
    .page-casino__step-item {
        min-height: unset;
    }
}

/* Mobile */
@media (max-width: 768px) {
    /* HERO 主图区域 */
    .page-casino__hero-section {
        padding-top: 10px; /* Small top padding for mobile */
        min-height: 450px;
    }
    .page-casino__hero-image-wrapper {
        max-height: 300px;
    }
    .page-casino__hero-image {
        object-fit: contain !important; /* Mobile hero image must contain, not cover */
        aspect-ratio: unset !important; /* Remove aspect ratio constraint */
        width: 100% !important;
        height: auto !important;
    }
    .page-casino__main-title {
        font-size: clamp(28px, 8vw, 36px) !important;
    }
    .page-casino__hero-description {
        font-size: 16px;
    }
    .page-casino__section {
        padding: 40px 0;
    }
    .page-casino__section-title {
        font-size: 28px;
    }
    .page-casino__section-description {
        font-size: 16px;
        margin-bottom: 20px;
    }

    /* 通用图片与容器 */
    .page-casino img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block;
    }
    .page-casino__section,
    .page-casino__card,
    .page-casino__container,
    .page-casino__content-block,
    .page-casino__text-content {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-casino__container {
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-casino__about-section .page-casino__container,
    .page-casino__live-casino-section .page-casino__container {
        gap: 20px;
    }
    .page-casino__image-content {
        width: 100%;
        margin-top: 20px;
    }

    /* 产品展示图区域 */
    .page-casino__games-grid,
    .page-casino__promotions-grid {
        grid-template-columns: 1fr; /* Single column for mobile */
        gap: 20px;
        margin-left: 0;
        margin-right: 0;
        padding: 0 15px;
        overflow-x: hidden !important; /* Prevent horizontal scroll */
    }
    .page-casino__game-card, .page-casino__promo-card {
        margin: 0;
    }
    .page-casino__game-image {
        height: 180px;
    }
    .page-casino__game-description {
        min-height: unset;
    }

    /* 装饰主标题 + 长文 SEO 区 */
    .page-casino__content-block p {
        font-size: 15px;
        text-align: left;
    }

    /* 按钮与按钮容器 */
    .page-casino__cta-buttons,
    .page-casino__button-group {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px;
        padding-left: 15px;
        padding-right: 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
}