/* Base styles for the cockfighting page */
.page-cockfighting {
  font-family: 'Arial', sans-serif;
  color: #FFF1E8; /* Text Main */
  background-color: #140C0C; /* Background */
  line-height: 1.6;
}

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

.page-cockfighting__section-title {
  font-size: 36px;
  font-weight: 700;
  text-align: center;
  color: #F3C54D; /* Gold */
  margin-bottom: 40px;
  text-transform: uppercase;
}

.page-cockfighting__content-area {
  max-width: 900px;
  margin: 0 auto;
}

.page-cockfighting p {
  margin-bottom: 20px;
  font-size: 17px;
}

.page-cockfighting strong {
  color: #F3C54D; /* Gold */
}

/* Hero Section */
.page-cockfighting__hero-section {
  padding-top: 10px; /* Small top padding, relying on body for header offset */
  padding-bottom: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-cockfighting__hero-image-wrapper {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  margin-bottom: 20px;
}

.page-cockfighting__hero-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  object-fit: cover;
}

.page-cockfighting__hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 0 15px;
}

.page-cockfighting__main-title {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800;
  color: #FFF1E8;
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-cockfighting__lead-paragraph {
  font-size: 18px;
  color: #FFF1E8;
  margin-bottom: 30px;
}

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

.page-cockfighting__btn-primary,
.page-cockfighting__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
  transition: all 0.3s ease;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
}

.page-cockfighting__btn-primary {
  background: linear-gradient(180deg, #FFB04A 0%, #D86A14 100%); /* Button */
  color: #140C0C;
  border: none;
}

.page-cockfighting__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.page-cockfighting__btn-secondary {
  background: #2A1212; /* Card BG */
  color: #F3C54D; /* Gold */
  border: 2px solid #F3C54D;
}

.page-cockfighting__btn-secondary:hover {
  background: #F3C54D;
  color: #140C0C;
  transform: translateY(-2px);
}

/* Grid Layout for Cards */
.page-cockfighting__grid-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

/* Card Styles */
.page-cockfighting__card {
  background: #2A1212; /* Card BG */
  border: 1px solid #6A1E1E; /* Border */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  color: #FFF1E8;
  text-align: center;
}

.page-cockfighting__card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.page-cockfighting__card-title {
  font-size: 22px;
  font-weight: 700;
  color: #F3C54D; /* Gold */
  margin: 20px 15px 10px;
}

.page-cockfighting__card-description {
  font-size: 15px;
  margin: 0 15px 20px;
  flex-grow: 1;
}

/* Dark Section Specific Styles */
.page-cockfighting__dark-section {
  background: #0d0d0d;
}

.page-cockfighting__dark-section .page-cockfighting__card {
  background: #2A1212;
  border-color: #7E0D0D; /* Deep Red */
}

/* Guide Section */
.page-cockfighting__guide-list {
  list-style: none;
  padding: 0;
  margin-bottom: 40px;
}

.page-cockfighting__guide-item {
  background: #2A1212;
  border: 1px solid #6A1E1E;
  border-radius: 10px;
  padding: 25px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.page-cockfighting__guide-step-title {
  font-size: 24px;
  color: #F3C54D;
  margin-bottom: 15px;
}

.page-cockfighting__guide-item p {
  font-size: 16px;
  margin-bottom: 15px;
}

.page-cockfighting__guide-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  margin-top: 20px;
}

/* FAQ Section */
details.page-cockfighting__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid #6A1E1E; /* Border */
  overflow: hidden;
  background: #2A1212; /* Card BG */
  color: #FFF1E8;
}
details.page-cockfighting__faq-item summary.page-cockfighting__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-cockfighting__faq-item summary.page-cockfighting__faq-question::-webkit-details-marker {
  display: none;
}
details.page-cockfighting__faq-item summary.page-cockfighting__faq-question:hover {
  background: #3a1a1a;
}
.page-cockfighting__faq-qtext {
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #F3C54D;
}
.page-cockfighting__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #F3C54D;
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}
details.page-cockfighting__faq-item .page-cockfighting__faq-answer {
  padding: 0 20px 20px;
  background: #1e0e0e;
  border-radius: 0 0 5px 5px;
  font-size: 16px;
}
.page-cockfighting__faq-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  margin-top: 40px;
}

/* Conclusion Section */
.page-cockfighting__conclusion-section {
  text-align: center;
}

.page-cockfighting__conclusion-section p {
  font-size: 18px;
  margin-bottom: 25px;
}

.page-cockfighting__conclusion-section a {
  color: #F3C54D;
  text-decoration: underline;
}

.page-cockfighting__conclusion-section a:hover {
  color: #FFB04A;
}

/* Global image and container responsive styles */
.page-cockfighting img {
  max-width: 100%;
  height: auto;
  display: block;
}

.page-cockfighting__section,
.page-cockfighting__card,
.page-cockfighting__container,
.page-cockfighting__hero-image-wrapper,
.page-cockfighting__cta-buttons,
.page-cockfighting__button-group,
.page-cockfighting__btn-container {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* Homepage specific CSS - MANDATORY INCLUSION as per prompt */
@media (max-width: 1023px) {
  .page-cockfighting__home-hero {
    display: block !important;
    grid-template-columns: none !important;
    height: auto !important;
    max-height: none !important;
    overflow-x: hidden;
    box-sizing: border-box;
  }
  .page-cockfighting__hero-brand,
  .page-cockfighting__hero-jackpot {
    display: none !important;
  }
  .page-cockfighting__game-trial {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    overflow: hidden !important;
    margin: 0 auto;
    padding: 0 0 12px !important;
    box-sizing: border-box;
  }
  .page-cockfighting__game-trial-shell {
    height: auto !important;
    max-height: none !important;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
  }
  .page-cockfighting__game-trial-topbar,
  .page-cockfighting__game-trial-bottombar {
    display: none !important;
  }
  .page-cockfighting__game-trial-viewport {
    position: relative;
    width: 100%;
    aspect-ratio: 1024 / 768;
    flex: none !important;
    min-height: 240px;
    max-height: none !important;
    overflow: hidden;
    box-sizing: border-box;
  }
  .page-cockfighting__game-trial-frame {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    max-width: 100%;
    border: none;
    z-index: 1;
    overflow: hidden;
  }
  .page-cockfighting__game-trial-overlay {
    z-index: 5 !important;
    pointer-events: auto !important;
  }
  .page-cockfighting__game-trial-start {
    z-index: 6 !important;
    pointer-events: auto !important;
    touch-action: manipulation;
  }
}

@media (min-width: 1024px) {
  .page-cockfighting__home-hero {
    display: grid;
    grid-template-columns: 26% 48% 26%;
    gap: 16px;
    align-items: stretch;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 10px 16px 24px;
    box-sizing: border-box;
  }
  .page-cockfighting__hero-brand,
  .page-cockfighting__hero-jackpot,
  .page-cockfighting__game-trial {
    height: 300px;
    max-height: 300px;
    overflow: hidden;
    box-sizing: border-box;
  }
  .page-cockfighting__game-trial {
    max-width: none !important;
    width: 100%;
    margin: 0;
    padding: 0;
  }
  .page-cockfighting__game-trial-shell {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 300px;
    box-sizing: border-box;
  }
  .page-cockfighting__game-trial-viewport {
    flex: 1;
    min-height: 0;
    position: relative;
    width: 100%;
  }
  .page-cockfighting__game-trial-frame {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    border: none;
  }
  .page-cockfighting__hero-jackpot-claim {
    background: #c62828 !important;
    color: #fff !important;
  }
}

/* Mobile responsive styles for 768px and below */
@media (max-width: 768px) {
  .page-cockfighting__section {
    padding: 20px 15px;
  }

  .page-cockfighting__section-title {
    font-size: 28px;
    margin-bottom: 25px;
  }

  .page-cockfighting__main-title {
    font-size: 26px;
  }

  .page-cockfighting__lead-paragraph {
    font-size: 16px;
  }

  .page-cockfighting__cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px;
  }

  .page-cockfighting__btn-primary,
  .page-cockfighting__btn-secondary {
    width: 100% !important;
    padding: 12px 20px;
    font-size: 16px;
  }

  /* 1. 首屏试玩 (Already covered by 1023px block above) */

  /* 2. 优惠 __promo-strip */
  .page-cockfighting__promo-strip-track {
    grid-template-columns: repeat(2, 1fr) !important; /* Changed from 4 to 2 for mobile */
    overflow-x: hidden !important;
    gap: 15px;
  }
  .page-cockfighting__promo-card {
    flex-direction: column !important;
    text-align: center;
    padding: 15px;
  }
  .page-cockfighting__promo-card-image {
    width: 100% !important;
    height: auto !important;
    margin-bottom: 10px;
  }
  .page-cockfighting__promo-card-content {
    padding: 0;
  }
  .page-cockfighting__promo-card-title {
    font-size: 18px;
    margin-bottom: 5px;
  }
  .page-cockfighting__promo-card-description {
    font-size: 14px;
  }

  /* 3. 热门 __hot-games */
  .page-cockfighting__hot-games-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 15px;
  }
  .page-cockfighting__hot-games-item-image {
    width: 100% !important;
    height: auto !important;
  }
  .page-cockfighting__hot-games-name,
  .page-cockfighting__hot-games-rtp,
  .page-cockfighting__hot-games-desc {
    display: none !important; /* Hide name/rtp/desc on mobile */
  }
  .page-cockfighting__hot-games-item {
    text-align: center;
  }

  /* 4. 品牌 __brand-intro */
  .page-cockfighting__brand-intro {
    padding: 20px 15px;
  }
  .page-cockfighting__brand-intro-content {
    flex-direction: column;
    text-align: center;
  }
  .page-cockfighting__brand-intro-image {
    margin-bottom: 20px;
  }

  /* 5. 中奖条 __winner-ticker */
  .page-cockfighting__winner-ticker {
    font-size: 14px;
    height: 40px;
  }

  /* 6. 通用图片与容器 */
  .page-cockfighting img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-cockfighting__section,
  .page-cockfighting__card,
  .page-cockfighting__container,
  .page-cockfighting__hero-image-wrapper,
  .page-cockfighting__cta-buttons,
  .page-cockfighting__button-group,
  .page-cockfighting__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* 7. 按钮与按钮容器 */
  .page-cockfighting__cta-button,
  .page-cockfighting__btn-primary,
  .page-cockfighting__btn-secondary,
  .page-cockfighting a[class*="button"],
  .page-cockfighting 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-cockfighting__cta-buttons,
  .page-cockfighting__button-group,
  .page-cockfighting__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; /* Ensure vertical stacking on mobile */
  }

  /* 8. 其他模块 (FAQ) 768px rules */
  details.page-cockfighting__faq-item summary.page-cockfighting__faq-question { padding: 15px; }
  .page-cockfighting__faq-qtext { font-size: 15px; }
  details.page-cockfighting__faq-item .page-cockfighting__faq-answer { padding: 0 15px 15px; }
}

/* Mandatory inclusion of game trial related styles as per prompt */
.page-cockfighting__game-trial-overlay{
  z-index:5;
  pointer-events:auto;
}
.page-cockfighting__game-trial-overlay.is-hidden{
  display:none!important;
  pointer-events:none!important;
}
.page-cockfighting__game-trial-start{
  z-index:6;
  pointer-events:auto;
  touch-action:manipulation;
}
.page-cockfighting__game-trial-shell{
  border:1px solid rgba(212,175,55,.45);
  border-radius:10px;
  overflow:hidden;
}
.page-cockfighting__reward-modal{
  position:fixed;
  inset:0;
  z-index:10000;
}
.page-cockfighting__reward-modal-close {
  background: #C61F1F;
  color: #FFF1E8;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 20px;
  cursor: pointer;
  position: absolute;
  top: 10px;
  right: 10px;
}

.page-cockfighting__reward-modal[aria-hidden="false"] {
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.page-cockfighting__reward-modal[aria-hidden="true"] {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.page-cockfighting__reward-modal-content {
  background: #2A1212;
  color: #FFF1E8;
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  position: relative;
  max-width: 90%;
  box-shadow: 0 5px 20px rgba(0,0,0,0.5);
}

.page-cockfighting__reward-modal-content h3 {
  color: #F3C54D;
  font-size: 24px;
  margin-bottom: 15px;
}

.page-cockfighting__reward-modal-content p {
  font-size: 16px;
  margin-bottom: 20px;
}

.page-cockfighting__reward-modal-content .page-cockfighting__btn-primary {
  margin-top: 10px;
}