/* General styles for page-game-rules */
.page-game-rules {
  font-family: 'Arial', sans-serif;
  color: var(--text-main); /* Light text for dark body background */
  background-color: var(--deep-navy); /* From shared.css */
  line-height: 1.6;
}

.page-game-rules__container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
  box-sizing: border-box;
}

.page-game-rules__section {
  padding: 40px 0;
}

.page-game-rules__hero-section {
  padding-top: 10px; /* Small top padding, body handles --header-offset */
  padding-bottom: 40px;
  background: linear-gradient(180deg, var(--deep-navy) 0%, #113B7A 100%);
  text-align: center;
}

.page-game-rules__hero-section .page-game-rules__container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-game-rules__main-title {
  font-size: clamp(28px, 4vw, 48px);
  color: var(--gold);
  margin-bottom: 15px;
  font-weight: 700;
  line-height: 1.2;
}

.page-game-rules__hero-description {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 800px;
  margin: 0 auto 30px;
}

.page-game-rules__hero-image-wrapper {
  width: 100%;
  max-width: 1000px;
  margin-top: 20px;
}

.page-game-rules__hero-image {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.page-game-rules__section-title {
  font-size: clamp(24px, 3vw, 40px);
  color: var(--gold);
  text-align: center;
  margin-bottom: 30px;
  font-weight: 700;
}

.page-game-rules__section-intro {
  font-size: 17px;
  color: var(--text-secondary);
  text-align: center;
  max-width: 900px;
  margin: 0 auto 30px;
}

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

.page-game-rules__card {
  background-color: var(--card-bg); /* #10233F */
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  color: var(--text-main);
  display: flex;
  flex-direction: column;
}

.page-game-rules__card-title {
  font-size: 22px;
  color: var(--gold);
  margin-bottom: 10px;
  font-weight: 600;
}

.page-game-rules__card-text {
  font-size: 16px;
  color: var(--text-secondary);
}

.page-game-rules__content-image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 40px auto 0;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.page-game-rules__rules-list,
.page-game-rules__resolution-steps,
.page-game-rules__responsible-list {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 900px;
}

.page-game-rules__list-item {
  background-color: var(--card-bg);
  padding: 20px 25px;
  margin-bottom: 15px;
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.page-game-rules__list-title {
  font-size: 20px;
  color: var(--gold);
  margin-bottom: 8px;
  font-weight: 600;
}

.page-game-rules__list-item p {
  font-size: 16px;
  color: var(--text-secondary);
  margin: 0;
}

.page-game-rules__button {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 17px;
  transition: all 0.3s ease;
  margin-top: 30px;
  cursor: pointer;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
}

.page-game-rules__button--primary {
  background: linear-gradient(180deg, #2B73F6 0%, #1144A6 100%);
  color: #ffffff;
  border: none;
}

.page-game-rules__button--primary:hover {
  background: linear-gradient(180deg, #1144A6 0%, #2B73F6 100%);
  box-shadow: 0 5px 15px rgba(43, 115, 246, 0.4);
}

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

.page-game-rules__button--secondary:hover {
  background: var(--gold);
  color: var(--deep-navy);
  box-shadow: 0 5px 15px rgba(242, 193, 78, 0.4);
}

/* FAQ styles */
details.page-game-rules__faq-item {
  margin-bottom: 15px;
  border-radius: 10px;
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--card-bg);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
details.page-game-rules__faq-item summary.page-game-rules__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
}
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: rgba(var(--primary-rgb), 0.1);
}
.page-game-rules__faq-qtext {
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: var(--text-main);
}
.page-game-rules__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  color: var(--gold);
  flex-shrink: 0;
  margin-left: 15px;
  width: 32px;
  text-align: center;
}
details.page-game-rules__faq-item[open] .page-game-rules__faq-toggle {
  transform: rotate(45deg);
}
details.page-game-rules__faq-item .page-game-rules__faq-answer {
  padding: 0 25px 20px;
  background: rgba(var(--deep-navy-rgb), 0.5);
  border-radius: 0 0 10px 10px;
  color: var(--text-secondary);
  font-size: 16px;
}

/* Home page specific CSS from prompt - MUST BE INCLUDED */
@media (max-width: 1023px) {
  .page-game-rules__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-game-rules__hero-brand,
  .page-game-rules__hero-jackpot {
    display: none !important;
  }
  .page-game-rules__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-game-rules__game-trial-shell {
    height: auto !important;
    max-height: none !important;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
  }
  .page-game-rules__game-trial-topbar,
  .page-game-rules__game-trial-bottombar {
    display: none !important;
  }
  .page-game-rules__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-game-rules__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-game-rules__game-trial-overlay {
    z-index: 5 !important;
    pointer-events: auto !important;
  }
  .page-game-rules__game-trial-start {
    z-index: 6 !important;
    pointer-events: auto !important;
    touch-action: manipulation;
  }
}

@media (min-width: 1024px) {
  .page-game-rules__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-game-rules__hero-brand,
  .page-game-rules__hero-jackpot,
  .page-game-rules__game-trial {
    height: 300px;
    max-height: 300px;
    overflow: hidden;
    box-sizing: border-box;
  }
  .page-game-rules__game-trial {
    max-width: none !important;
    width: 100%;
    margin: 0;
    padding: 0;
  }
  .page-game-rules__game-trial-shell {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 300px;
    box-sizing: border-box;
  }
  .page-game-rules__game-trial-viewport {
    flex: 1;
    min-height: 0;
    position: relative;
    width: 100%;
  }
  .page-game-rules__game-trial-frame {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    border: none;
  }
  .page-game-rules__hero-jackpot-claim {
    background: #c62828 !important;
    color: #fff !important;
  }
}

/* Mobile responsiveness for game-rules page */
@media (max-width: 768px) {
  .page-game-rules__hero-section .page-game-rules__container {
    padding-top: 20px;
  }
  .page-game-rules__main-title {
    font-size: 28px;
  }
  .page-game-rules__hero-description {
    font-size: 16px;
  }
  .page-game-rules__section {
    padding: 30px 0;
  }
  .page-game-rules__section-title {
    font-size: 26px;
    margin-bottom: 20px;
  }
  .page-game-rules__section-intro {
    font-size: 15px;
    margin-bottom: 20px;
  }
  .page-game-rules__grid-2-columns {
    grid-template-columns: 1fr;
  }
  .page-game-rules__card {
    padding: 20px;
  }
  .page-game-rules__card-title {
    font-size: 20px;
  }
  .page-game-rules__card-text {
    font-size: 15px;
  }
  .page-game-rules__list-item {
    padding: 18px 20px;
  }
  .page-game-rules__list-title {
    font-size: 18px;
  }
  .page-game-rules__list-item p {
    font-size: 15px;
  }
  .page-game-rules__button {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 15px;
    font-size: 16px;
    margin-top: 20px;
  }
  .page-game-rules__button-group {
    flex-direction: column;
    gap: 15px;
  }
  .page-game-rules img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-game-rules__container {
    padding-left: 15px;
    padding-right: 15px;
  }
  details.page-game-rules__faq-item summary.page-game-rules__faq-question { padding: 15px; }
  .page-game-rules__faq-qtext { font-size: 16px; }
  .page-game-rules__faq-toggle { font-size: 24px; width: 28px; }
  details.page-game-rules__faq-item .page-game-rules__faq-answer { padding: 0 15px 15px; }

  /* Homepage specific media queries for 768px - MUST BE INCLUDED */
  .page-game-rules__promo-strip-track {
    grid-template-columns: repeat(4, 1fr);
    overflow-x: hidden;
  }
  .page-game-rules__hot-games-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Global colors and variables (assuming from shared.css, defining here for clarity) */
:root {
  --primary: #113B7A;
  --primary-rgb: 17, 59, 122;
  --secondary: #1D5FD1;
  --secondary-rgb: 29, 95, 209;
  --text-main: #F3F8FF;
  --text-secondary: #AFC4E8;
  --card-bg: #10233F;
  --border: #244D84;
  --glow: #4FA8FF;
  --gold: #F2C14E;
  --divider: #1B3357;
  --deep-navy: #08162B;
  --deep-navy-rgb: 8, 22, 43;
  --button-gradient: linear-gradient(180deg, #2B73F6 0%, #1144A6 100%);
}

/* Ensure images maintain aspect ratio and don't overflow */
.page-game-rules img {
  max-width: 100%;
  height: auto;
  display: block;
}

.page-game-rules__section,
.page-game-rules__card,
.page-game-rules__container {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden; /* Prevent content overflow */
}

/* Reward Modal styles (from homepage specific, for full CSS output) */
.page-game-rules__reward-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.page-game-rules__reward-modal[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
}
.page-game-rules__reward-modal-content {
  background: var(--card-bg);
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  position: relative;
}
.page-game-rules__reward-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-secondary);
  cursor: pointer;
}
.page-game-rules__reward-modal-title {
  color: var(--gold);
  font-size: 28px;
  margin-bottom: 15px;
}
.page-game-rules__reward-modal-text {
  color: var(--text-main);
  font-size: 16px;
  margin-bottom: 25px;
}
.page-game-rules__reward-modal-button {
  background: var(--button-gradient);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
}
.page-game-rules__reward-modal-button:hover {
  opacity: 0.9;
}
/* is-hidden for overlay/modal */
.is-hidden {
  display: none !important;
  pointer-events: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}