/* Base styles for the page-index content */
.page-index {
  background: #F4F7FB; /* Body background is light, so default text should be dark */
  color: #1F2D3D; /* Text Main */
  font-family: Arial, sans-serif;
  line-height: 1.6;
}

/* General responsive image styles */
.page-index img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* General button responsive styles */
.page-index__cta-button,
.page-index__btn-primary,
.page-index__btn-secondary,
.page-index a[class*="button"],
.page-index a[class*="btn"],
.page-index__promo-card-btn,
.page-index__hero-jackpot-claim,
.page-index__game-trial-top-promo,
.page-index__game-trial-start,
.page-index__reward-modal-claim,
.page-index__reward-modal-retry {
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-index__cta-buttons,
.page-index__button-group,
.page-index__btn-container {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* Reward Modal base styles */
.page-index__reward-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none; /* Initially not interactive */
}
.page-index__reward-modal[hidden] {
  display: none;
}
.page-index__reward-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.72);
  pointer-events: auto; /* Backdrop can be clicked if needed, but here only close button works */
}
.page-index__reward-modal-card {
  position: relative;
  z-index: 1;
  width: 90vw;
  max-width: 360px;
  padding: 28px 20px;
  border-radius: 20px;
  border: 2px solid #d4af37; /* Gold border */
  background: #1a1208; /* Dark background */
  text-align: center;
  color: #fff;
  pointer-events: auto; /* Card content is interactive */
}
.page-index__reward-modal-close {
  position: absolute;
  top: 8px;
  right: 10px;
  z-index: 2;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
  display: flex;
  align-items: center;
  justify-content: center;
}
.page-index__reward-modal-close:hover {
  background: rgba(255,255,255,.22);
}
.page-index__reward-modal-brand {
  font-size: 1.8rem;
  font-weight: 800;
  background: linear-gradient(180deg, #ffe082, #ff9800);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 0 0 8px;
}
.page-index__reward-modal-subtitle {
  font-size: 1.1rem;
  color: #ffd54f;
  margin-bottom: 20px;
}
.page-index__reward-modal-claim,
.page-index__reward-modal-retry {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 14px;
  border-radius: 999px;
  text-align: center;
  text-decoration: none;
  box-sizing: border-box;
  font-weight: 700;
  font-size: 1rem;
}
.page-index__reward-modal-claim {
  background: linear-gradient(180deg, #ffe082, #ffb300); /* Gold gradient */
  color: #1a1a1a;
}
.page-index__reward-modal-retry {
  background: #2a2218; /* Darker background */
  color: #fff;
  border: 1px solid #d4af37; /* Gold border */
}

/* Winner Ticker base styles */
.page-index__winner-ticker {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100; /* Must be below reward modal (10000) */
  background: #c62828; /* Red background */
  color: #fff;
  padding: 8px 0;
  overflow: hidden;
  white-space: nowrap;
  font-size: 0.85rem;
  box-shadow: 0 -2px 10px rgba(0,0,0,.3);
  display: flex; /* For horizontal scrolling */
}
.page-index__winner-ticker-track {
  display: flex;
  animation: ticker-scroll 20s linear infinite; /* Example animation */
}
.page-index__winner-ticker-item {
  padding: 0 15px;
  min-width: 100%; /* Ensure items take full width for smooth scroll */
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}
.page-index__winner-ticker-item.is-active {
  opacity: 1;
}

@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* For reduced motion users */
@media (prefers-reduced-motion: reduce) {
  .page-index__winner-ticker-track {
    animation: none;
  }
}

/* Body/Main padding to prevent ticker overlap */
body {
  padding-bottom: 48px; /* For the winner ticker */
}
.page-content {
  padding-bottom: 48px; /* Ensure main content respects ticker */
}

/* ==========================================================================
   Homepage Specific Styles (index.css) - Desktop First
   ========================================================================== */

/* __home-hero section (PC: 3 columns) */
.page-index__home-hero {
  padding: 10px 12px 16px; /* Base padding for mobile, PC will override */
  box-sizing: border-box;
}

/* __game-trial shell base styles */
.page-index__game-trial-shell {
  border: 1px solid rgba(212,175,55,.45);
  border-radius: 10px;
  overflow: hidden;
  background: #0a1628; /* Dark shell background */
  color: rgba(255,255,255,.8);
}
.page-index__game-trial-topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 10px; font-size: 0.75rem; background: rgba(0,0,0,.35);
}
.page-index__game-trial-top-promo {
  padding: 4px 10px; border-radius: 6px;
  background: linear-gradient(90deg, #7b1fa2, #9c27b0); /* Purple gradient */
  color: #fff; text-decoration: none; font-size: 0.7rem; white-space: nowrap;
}
.page-index__game-trial-viewport {
  position: relative;
  width: 100%;
  isolation: isolate; /* To ensure z-index context for overlay */
  /* Height will be defined in media queries */
}
.page-index__game-trial-frame {
  display: block;
  width: 100%;
  border: none;
  background: #1a1a2e; /* Dark iframe background */
  position: relative;
  z-index: 1;
  /* Height will be defined in media queries */
}
.page-index__game-trial-bottombar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px; font-size: 0.7rem; background: rgba(0,0,0,.4); color: rgba(255,255,255,.75);
}
.page-index__game-trial {
  max-width: 720px; /* Mobile max width */
  margin: 0 auto;
  padding: 0 0 16px;
  box-sizing: border-box;
}
.page-index__game-trial-overlay {
  position: absolute;
  inset: 0;
  z-index: 5; /* Above iframe */
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.55);
  pointer-events: auto; /* Interactive */
}
.page-index__game-trial-overlay.is-hidden {
  display: none !important;
  visibility: hidden;
  pointer-events: none;
}
.page-index__game-trial-start {
  position: relative;
  z-index: 6; /* Above overlay */
  padding: 14px 32px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  background: linear-gradient(180deg, #ffd54f, #ff9800); /* Gold gradient */
  color: #1a1a1a;
  font-weight: 700;
  box-shadow: 0 0 20px rgba(255,193,7,.45);
}

/* __promo-strip section */
.page-index__promo-strip {
  position: relative;
  z-index: 1; /* Above any potential overlaps from hero */
  margin-top: 16px; /* Minimum margin, no negative values */
  margin-bottom: 0;
  box-sizing: border-box;
}
.page-index__promo-strip-track {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* Mobile 4 columns */
  gap: 6px;
  overflow-x: hidden; /* Prevent horizontal scroll */
  padding: 0 8px 12px;
  box-sizing: border-box;
  max-width: 720px; /* Mobile max width */
  margin: 0 auto;
}
.page-index__promo-card {
  display: flex;
  flex-direction: column; /* Mobile top image, bottom text */
  align-items: center;
  text-align: center;
  min-width: 0;
  border: 1px solid rgba(212,175,55,.45); /* Gold border */
  border-radius: 10px;
  padding: 8px 4px;
  background: #1a1208; /* Dark background */
  box-sizing: border-box;
  color: #fff;
}
.page-index__promo-card-media {
  width: 100%;
  margin-bottom: 6px;
}
.page-index__promo-card-media img {
  width: 100%;
  max-width: 100%;
   /* Mobile image height constraint */
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}
.page-index__promo-card-title {
  margin: 0 0 4px;
  font-size: clamp(0.55rem, 2.8vw, 0.72rem); /* Responsive font size */
  line-height: 1.2;
  font-weight: 700;
  color: #ffd54f; /* Gold text */
}
.page-index__promo-card-line {
  margin: 0 0 2px;
  font-size: clamp(0.5rem, 2.2vw, 0.62rem); /* Responsive font size */
  color: rgba(255,255,255,.82);
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2; /* Limit to 2 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.page-index__promo-card-btn {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 5px 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffe082, #ffb300); /* Gold gradient */
  color: #1a1a1a;
  text-decoration: none;
  font-weight: 700;
  font-size: clamp(0.5rem, 2.2vw, 0.65rem); /* Responsive font size */
  text-align: center;
  box-sizing: border-box;
}

/* __hot-games section */
.page-index__section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 12px 10px;
  max-width: 720px; /* Mobile max width */
  margin: 0 auto;
  box-sizing: border-box;
}
.page-index__section-title {
  font-size: 1.2rem;
  color: #1F2D3D; /* Text Main */
  margin: 0;
}
.page-index__view-more {
  font-size: 0.9rem;
  color: #2F6BFF; /* Primary color */
  text-decoration: none;
  font-weight: 600;
}
.page-index__hot-games-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* Mobile 2 columns */
  gap: 12px;
  max-width: 720px; /* Mobile max width */
  margin: 0 auto;
  padding: 0 12px 24px;
  box-sizing: border-box;
}
.page-index__hot-games-item {
  display: block; /* Ensure the whole card is clickable */
  text-decoration: none;
  color: inherit;
}

/* __brand-intro section (Mobile only) */
.page-index__brand-intro {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px 24px;
  box-sizing: border-box;
  color: #1F2D3D; /* Text Main */
}
.page-index__brand-intro-title {
  font-size: 1.5rem;
  color: #1F2D3D;
  margin-top: 0;
  margin-bottom: 15px;
  text-align: center;
}
.page-index__brand-intro p {
  margin-bottom: 1em;
  font-size: 0.95rem;
  line-height: 1.6;
}
.page-index__brand-intro-trust-list {
  list-style: none;
  padding: 0;
  margin-top: 20px;
}
.page-index__brand-intro-trust-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  margin-bottom: 8px;
  color: #1F2D3D;
}
.page-index__brand-intro-trust-icon {
  color: #4CAF50; /* Green checkmark */
  font-weight: bold;
}