:root {
  --main-color: #113B7A;
  --secondary-color: #1D5FD1;
  --button-gradient: linear-gradient(180deg, #2B73F6 0%, #1144A6 100%);
  --card-bg: #10233F;
  --text-main: #F3F8FF;
  --text-secondary: #AFC4E8;
  --border-color: #244D84;
  --glow: #4FA8FF;
  --gold: #F2C14E;
  --divider: #1B3357;
  --deep-navy: #08162B; /* This is the body background from shared.css */
}

/* Base styles for the page content, ensuring light text on a dark base background */
.page-game-rules {
  color: var(--text-main); /* #F3F8FF */
  background-color: var(--deep-navy); /* From shared.css, dark background */
  font-family: Arial, sans-serif;
  line-height: 1.6;
}

/* Hero Section */
.page-game-rules__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column; /* Image above text */
  align-items: center;
  padding: 10px 0 60px 0; /* Minimal top padding, rely on body for header offset */
  background-color: var(--deep-navy); /* Ensure dark background for hero */
  overflow: hidden;
}

.page-game-rules__hero-image {
  width: 100%;
  max-width: 1920px; /* Max width for the source image */
  height: auto;
  object-fit: cover;
  display: block;
}

.page-game-rules__hero-content {
  max-width: 900px;
  width: 100%;
  text-align: center;
  padding: 40px 20px;
  box-sizing: border-box;
  z-index: 1; /* Ensure content is above any potential background layers */
}

.page-game-rules__main-title {
  font-size: clamp(2em, 4vw, 3.5em); /* Responsive font size for H1 */
  color: var(--gold); /* #F2C14E */
  font-weight: bold;
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-game-rules__description {
  font-size: 1.1em;
  color: var(--text-secondary); /* #AFC4E8 */
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

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

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

.page-game-rules__btn-primary {
  background: var(--button-gradient); /* linear-gradient(180deg, #2B73F6 0%, #1144A6 100%) */
  color: var(--text-main); /* #F3F8FF */
  border: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-game-rules__btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

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

.page-game-rules__btn-secondary:hover {
  background: rgba(242, 193, 78, 0.1);
  transform: translateY(-2px);
}

/* General Section Styles */
.page-game-rules__section {
  padding: 80px 0;
  background-color: var(--deep-navy); /* Default dark background */
}

.page-game-rules__dark-section {
  background-color: var(--main-color); /* #113B7A */
  color: var(--text-main); /* #F3F8FF */
}

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

.page-game-rules__section-title {
  font-size: 2.5em;
  color: var(--gold); /* #F2C14E */
  text-align: center;
  margin-bottom: 40px;
  font-weight: bold;
}

.page-game-rules p {
  font-size: 1.05em;
  color: var(--text-secondary); /* #AFC4E8 */
  margin-bottom: 20px;
}

.page-game-rules__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.page-game-rules__list-item {
  position: relative;
  font-size: 1.1em;
  color: var(--text-secondary); /* #AFC4E8 */
  margin-bottom: 15px;
  padding-left: 30px;
}

.page-game-rules__list-item::before {
  content: '✓'; /* Checkmark icon */
  position: absolute;
  left: 0;
  color: var(--gold); /* #F2C14E */
  font-weight: bold;
}

/* Game Cards Section */
.page-game-rules__game-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-game-rules__card {
  background-color: var(--card-bg); /* #10233F */
  border-radius: 12px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  color: var(--text-secondary); /* #AFC4E8 */
}

.page-game-rules__card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.4);
}

.page-game-rules__card-title {
  font-size: 1.8em;
  color: var(--gold); /* #F2C14E */
  margin-bottom: 15px;
  font-weight: bold;
}

.page-game-rules__card-image {
  width: 100%;
  height: auto; /* Let aspect-ratio define height */
  aspect-ratio: 3 / 2; /* Based on 600x400 aspect ratio */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 15px;
  display: block; /* Ensure it's not inline */
}

.page-game-rules__card p {
  flex-grow: 1; /* Allow paragraph to take available space */
  font-size: 0.95em;
  margin-bottom: 20px;
  color: var(--text-secondary); /* #AFC4E8 */
}

.page-game-rules__card-link {
  display: inline-block;
  padding: 10px 20px;
  background: var(--button-gradient); /* linear-gradient(180deg, #2B73F6 0%, #1144A6 100%) */
  color: var(--text-main); /* #F3F8FF */
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  font-size: 0.95em;
  transition: background 0.3s ease;
  margin-top: auto; /* Push to bottom of card */
}

.page-game-rules__card-link:hover {
  filter: brightness(1.1);
}

/* Transaction Rules Grid */
.page-game-rules__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-game-rules__box {
  background-color: var(--card-bg); /* #10233F */
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
  color: var(--text-secondary); /* #AFC4E8 */
}

.page-game-rules__box:hover {
  transform: translateY(-5px);
}

.page-game-rules__box-title {
  font-size: 1.6em;
  color: var(--gold); /* #F2C14E */
  margin-bottom: 15px;
  font-weight: bold;
}

.page-game-rules__box p {
  flex-grow: 1;
  font-size: 1em;
  margin-bottom: 20px;
  color: var(--text-secondary); /* #AFC4E8 */
}

.page-game-rules__text-link {
  color: var(--glow); /* #4FA8FF */
  text-decoration: none;
  font-weight: bold;
  margin-top: auto;
  transition: color 0.3s ease;
}

.page-game-rules__text-link:hover {
  color: var(--gold); /* #F2C14E */
}

/* Dispute Resolution */
.page-game-rules__flex-group {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 40px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-game-rules__main-title {
    font-size: clamp(2em, 5vw, 3em);
  }
  .page-game-rules__section-title {
    font-size: 2em;
  }
  .page-game-rules__game-cards,
  .page-game-rules__grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

@media (max-width: 768px) {
  .page-game-rules__hero-section {
    padding-bottom: 40px;
  }
  .page-game-rules__hero-content {
    padding: 30px 15px;
  }
  .page-game-rules__main-title {
    font-size: clamp(1.8em, 6vw, 2.5em);
  }
  .page-game-rules__description {
    font-size: 1em;
  }
  .page-game-rules__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }
  .page-game-rules__btn-primary,
  .page-game-rules__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

  .page-game-rules__section {
    padding: 40px 0;
  }
  .page-game-rules__container {
    padding: 0 15px;
  }
  .page-game-rules__section-title {
    font-size: 1.8em;
    margin-bottom: 30px;
  }
  .page-game-rules p,
  .page-game-rules__list-item {
    font-size: 0.95em;
  }
  .page-game-rules__game-cards,
  .page-game-rules__grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Mobile image and video responsiveness */
  .page-game-rules img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  .page-game-rules__section,
  .page-game-rules__card,
  .page-game-rules__container,
  .page-game-rules__box,
  .page-game-rules__game-cards,
  .page-game-rules__grid {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important; /* Prevent overflow */
  }
  .page-game-rules__hero-section {
    padding-top: 10px !important; /* body already handles header offset */
  }
}