:root {
  --primary-color: #2F6BFF;
  --secondary-color: #6FA3FF;
  --card-bg-color: #FFFFFF;
  --page-bg-color: #F4F7FB;
  --text-main-color: #1F2D3D;
  --text-dark-color: #000000;
  --border-color: #D6E2FF;
  --glow-color: #A5C4FF;
  --btn-gradient: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
}

.page-game-bai {
  font-family: Arial, sans-serif;
  color: var(--text-main-color); /* Default text color, assumes light body bg */
  background-color: var(--page-bg-color);
  line-height: 1.6;
}

.page-game-bai__section-padding {
  padding: 60px 0;
}

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

.page-game-bai__section-title {
  font-size: 36px;
  font-weight: bold;
  color: var(--text-dark-color);
  text-align: center;
  margin-bottom: 40px;
  position: relative;
}

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

.page-game-bai__section-title--light {
  color: #ffffff;
}

.page-game-bai__section-title--light::after {
  background: #ffffff;
}

.page-game-bai__text-block {
  font-size: 17px;
  line-height: 1.7;
  margin-bottom: 20px;
  text-align: center;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-game-bai__text-block--light {
  color: #f0f0f0;
}

.page-game-bai__keyword {
  color: var(--primary-color);
  font-weight: bold;
}

/* HERO Section */
.page-game-bai__hero-section {
  position: relative;
  width: 100%;
  padding-top: 10px; /* Small top padding, body has --header-offset */
  padding-bottom: 60px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-color: var(--primary-color);
}

.page-game-bai__hero-image {
  width: 100%;
  max-height: 500px;
  overflow: hidden;
  margin-bottom: 30px;
}

.page-game-bai__hero-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.page-game-bai__hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  padding: 0 15px;
}

.page-game-bai__hero-title {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-game-bai__hero-description {
  font-size: 19px;
  color: #f0f0f0;
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

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

/* Buttons */
.page-game-bai__btn-primary,
.page-game-bai__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 30px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border: none;
  cursor: pointer;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-game-bai__btn-primary {
  background: var(--btn-gradient);
  color: #ffffff;
}

.page-game-bai__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-game-bai__btn-secondary {
  background-color: #ffffff;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.page-game-bai__btn-secondary:hover {
  background-color: var(--primary-color);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-game-bai__btn-large {
  padding: 16px 35px;
  font-size: 20px;
}

.page-game-bai__btn-play {
  margin-top: 15px;
}

.page-game-bai__btn-full {
  width: 100%;
  max-width: 300px;
  margin-top: 25px;
}

.page-game-bai__button-center {
  text-align: center;
  margin-top: 30px;
}

/* Cards */
.page-game-bai__card {
  background-color: var(--card-bg-color);
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  padding: 30px;
  text-align: left;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: var(--text-main-color);
  box-sizing: border-box;
}

.page-game-bai__card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Dark Section */
.page-game-bai__dark-section {
  background-color: var(--primary-color);
  color: #ffffff;
}

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

.page-game-bai__feature-title {
  font-size: 22px;
  font-weight: bold;
  color: var(--text-dark-color);
  margin-bottom: 15px;
}

.page-game-bai__dark-section .page-game-bai__feature-title {
  color: #ffffff;
}

.page-game-bai__feature-description {
  font-size: 16px;
  line-height: 1.6;
}

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

.page-game-bai__game-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}

.page-game-bai__game-image {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  overflow: hidden;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

.page-game-bai__game-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.page-game-bai__game-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-game-bai__game-title {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 10px;
}

.page-game-bai__game-title a {
  color: var(--text-dark-color);
  text-decoration: none;
}

.page-game-bai__game-title a:hover {
  color: var(--primary-color);
}

.page-game-bai__game-description {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 15px;
}

/* How to Play Steps */
.page-game-bai__steps-list {
  list-style: none;
  padding: 0;
  margin-top: 40px;
  counter-reset: step-counter;
}

.page-game-bai__step-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 30px;
}

.page-game-bai__step-item::before {
  counter-increment: step-counter;
  content: counter(step-counter);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  min-width: 45px;
  border-radius: 50%;
  background: var(--btn-gradient);
  color: #ffffff;
  font-size: 22px;
  font-weight: bold;
  margin-right: 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.page-game-bai__step-title {
  font-size: 22px;
  font-weight: bold;
  color: var(--text-dark-color);
  margin-bottom: 5px;
}

.page-game-bai__step-item p {
  font-size: 16px;
  line-height: 1.6;
  margin-top: 0;
  text-align: left;
}