:root {
    --primary-color: #11A84E;
    --secondary-color: #22C768;
    --button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
    --card-bg: #11271B;
    --bg-color: #08160F;
    --text-main: #F2FFF6;
    --text-secondary: #A7D9B8;
    --border-color: #2E7A4E;
    --glow: #57E38D;
    --gold: #F2C14E;
    --divider: #1E3A2A;
    --deep-green: #0A4B2C;
}

.page-game-rules {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--bg-color);
    padding-top: 10px; /* Small top padding, shared.css handles body padding-top */
}

.page-game-rules__hero-section {
    position: relative;
    padding-bottom: 50px;
    color: var(--text-main);
    background-color: var(--bg-color);
}

.page-game-rules__hero-image {
    width: 100%;
    height: 600px; /* Fixed height for desktop */
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
}

.page-game-rules__hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cover for desktop */
    display: block;
    border-radius: 8px;
}

.page-game-rules__hero-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    padding: 0 15px;
}

.page-game-rules__main-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem); /* clamp for h1 */
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 20px;
    line-height: 1.2;
}

.page-game-rules__description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-game-rules__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    width: 100%; /* Ensure container takes full width for flex-wrap */
    max-width: 100%;
    box-sizing: border-box;
}

.page-game-rules__btn-primary,
.page-game-rules__btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text wrapping */
    box-sizing: border-box;
    max-width: 100%; /* Ensure buttons don't overflow */
}

.page-game-rules__btn-primary {
    background: var(--button-gradient);
    color: #ffffff;
    border: 2px solid transparent;
    box-shadow: 0 4px 15px rgba(17, 168, 78, 0.4);
}

.page-game-rules__btn-primary:hover {
    background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%);
    box-shadow: 0 6px 20px rgba(17, 168, 78, 0.6);
}

.page-game-rules__btn-secondary {
    background: transparent;
    color: var(--gold);
    border: 2px solid var(--gold);
}

.page-game-rules__btn-secondary:hover {
    background: var(--gold);
    color: var(--bg-color);
}

.page-game-rules__section {
    padding: 60px 0;
    background-color: var(--bg-color);
    color: var(--text-main);
}

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

.page-game-rules__section-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    color: var(--gold);
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.page-game-rules__section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--glow);
    margin: 15px auto 0;
    border-radius: 2px;
}

.page-game-rules__article-body {
    font-size: 1rem;
    color: var(--text-main);
    max-width: 900px;
    margin: 0 auto;
}

.page-game-rules__article-body p {
    margin-bottom: 20px;
    color: var(--text-main);
}

.page-game-rules__article-body h3.page-game-rules__sub-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    color: var(--glow);
    margin-top: 40px;
    margin-bottom: 20px;
}

.page-game-rules__content-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    margin: 30px 0;
    object-fit: cover;
}

.page-game-rules__list {
    list-style-type: disc;
    padding-left: 25px;
    margin-bottom: 20px;
    color: var(--text-main);
}

.page-game-rules__list li {
    margin-bottom: 10px;
    color: var(--text-secondary);
}

.page-game-rules__faq-section {
    background-color: var(--card-bg);
    padding: 60px 0;
}

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

details.page-game-rules__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  background: var(--bg-color);
  color: var(--text-main);
}
details.page-game-rules__faq-item summary.page-game-rules__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;
  color: var(--text-main);
}
details.page-game-rules__faq-item summary.page-game-rules__faq-question::-webkit-details-marker {
  display: none;
}
details.page-game-rules__faq-item summary.page-game-rules__faq-question:hover {
  background: var(--divider);
}
.page-game-rules__faq-qtext {
  flex: 1;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: var(--text-main);
}
.page-game-rules__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: var(--glow);
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}
details.page-game-rules__faq-item .page-game-rules__faq-answer {
  padding: 0 20px 20px;
  background: var(--deep-green);
  border-radius: 0 0 8px 8px;
  color: var(--text-secondary);
}
details.page-game-rules__faq-item .page-game-rules__faq-answer p {
    margin: 0;
}

.page-game-rules__contact-cta {
    padding: 80px 0;
    text-align: center;
}

.page-game-rules__contact-cta .page-game-rules__container {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 50px 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.page-game-rules__section-title--light {
    color: var(--gold);
}

.page-game-rules__description--light {
    color: var(--text-secondary);
    margin-bottom: 40px;
}

/* --- Responsive Styles --- */
@media (max-width: 1024px) {
    .page-game-rules__hero-image {
        height: 500px;
    }
    .page-game-rules__main-title {
        font-size: clamp(2rem, 4.5vw, 3rem);
    }
    .page-game-rules__section {
        padding: 50px 0;
    }
    .page-game-rules__section-title {
        font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    }
    .page-game-rules__faq-qtext {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    /* HERO 主图区域 */
    .page-game-rules {
        padding-top: 10px; /* Small top padding for mobile, shared.css handles body padding-top */
    }
    .page-game-rules__hero-image {
        height: auto;
        margin-bottom: 20px;
    }
    .page-game-rules__hero-image img {
        object-fit: contain !important; /* Force contain for mobile hero */
        aspect-ratio: unset !important; /* Remove fixed aspect ratio */
        width: 100% !important;
        height: auto !important;
    }
    .page-game-rules__hero-content {
        padding: 0 15px;
    }
    .page-game-rules__main-title {
        font-size: clamp(1.8rem, 8vw, 2.5rem);
        margin-bottom: 15px;
    }
    .page-game-rules__description {
        font-size: 0.95rem;
        margin-bottom: 25px;
    }
    
    /* 按钮与按钮容器 */
    .page-game-rules__cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px;
        padding: 0 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .page-game-rules__btn-primary,
    .page-game-rules__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
        padding: 12px 20px;
        font-size: 0.9rem;
        white-space: normal !important;
        word-wrap: break-word !important;
        box-sizing: border-box !important;
    }

    /* 通用图片与容器 */
    .page-game-rules__container {
        padding: 0 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .page-game-rules__article-body {
        max-width: 100% !important;
        padding: 0 15px;
        box-sizing: border-box;
    }
    .page-game-rules__article-body p,
    .page-game-rules__article-body li {
        font-size: 0.95rem;
    }
    .page-game-rules__content-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        margin: 20px auto;
        display: block;
        box-sizing: border-box;
    }
    .page-game-rules__section-title {
        font-size: clamp(1.5rem, 6vw, 2.2rem);
        margin-bottom: 30px;
    }
    .page-game-rules__sub-title {
        font-size: clamp(1.2rem, 5vw, 1.8rem);
        margin-top: 30px;
        margin-bottom: 15px;
    }
    .page-game-rules__section {
        padding: 40px 0;
    }

    /* FAQ 区域 */
    details.page-game-rules__faq-item summary.page-game-rules__faq-question {
        padding: 15px;
    }
    .page-game-rules__faq-qtext {
        font-size: 0.95rem;
    }
    .page-game-rules__faq-toggle {
        font-size: 20px;
        width: 24px;
        margin-left: 10px;
    }
    details.page-game-rules__faq-item .page-game-rules__faq-answer {
        padding: 0 15px 15px;
    }
    details.page-game-rules__faq-item .page-game-rules__faq-answer p {
        font-size: 0.9rem;
    }

    /* Contact CTA */
    .page-game-rules__contact-cta .page-game-rules__container {
        padding: 40px 20px;
    }
    .page-game-rules__contact-cta .page-game-rules__description--light {
        font-size: 0.95rem;
        margin-bottom: 30px;
    }
}