/* 智能文字颜色选择器 - 必须实现 */
.page-slot-games {
  color: var(--text-main, #333333); /* Mặc định dùng màu tối cho nền sáng */
}

.page-slot-games__dark-bg {
  background: var(--primary-color, #E53935);
  color: #ffffff; /* Nền tối dùng chữ sáng */
}

.page-slot-games__light-text {
  color: #ffffff;
}

.page-slot-games__card {
  background: var(--card-bg, #FFFFFF);
  color: var(--text-main, #333333);
  border: 1px solid var(--border-color, #E0E0E0);
}

.page-slot-games__btn-primary {
  background: linear-gradient(180deg, var(--secondary-color, #FF5A4F) 0%, var(--primary-color, #E53935) 100%);
  color: #ffffff;
  border: 2px solid transparent;
}

.page-slot-games__btn-secondary {
  background: #ffffff;
  color: var(--primary-color, #E53935);
  border: 2px solid var(--primary-color, #E53935);
}

/* Base styles */
.page-slot-games {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  padding-top: 10px; /* Small top padding, body handles --header-offset */
}

.page-slot-games__container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 16px;
  box-sizing: border-box;
}

.page-slot-games__section-title {
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  color: var(--primary-color, #E53935);
  font-size: clamp(24px, 4vw, 36px);
}

.page-slot-games__text-block {
  font-size: 16px;
  margin-bottom: 20px;
  text-align: justify;
}

/* Hero Section */
.page-slot-games__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-bottom: 40px;
}

.page-slot-games__hero-image-wrapper {
  width: 100%;
  max-height: 600px;
  overflow: hidden;
  position: relative;
}

.page-slot-games__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.page-slot-games__hero-content {
  position: relative;
  z-index: 2;
  padding: 20px 16px;
  max-width: 800px;
  margin-top: -100px; /* Adjust to slightly overlap, but not cover image */
  background: rgba(0, 0, 0, 0.6); /* Semi-transparent background for readability */
  border-radius: 8px;
}

.page-slot-games__hero-title {
  font-weight: 800;
  margin-bottom: 15px;
  font-size: clamp(28px, 5vw, 48px);
  line-height: 1.2;
}

.page-slot-games__hero-description {
  font-size: 18px;
  margin-bottom: 30px;
}

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

.page-slot-games__btn-primary,
.page-slot-games__btn-secondary {
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s ease;
  white-space: nowrap;
  cursor: pointer;
}

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

.page-slot-games__btn-secondary:hover {
  background: var(--primary-color, #E53935);
  color: #ffffff;
}

/* Game Types Section */
.page-slot-games__game-types-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
}

.page-slot-games__game-type-card {
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-slot-games__game-type-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.page-slot-games__card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 5px;
  margin-bottom: 15px;
}

.page-slot-games__card-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--primary-color, #E53935);
}

.page-slot-games__card-description {
  font-size: 15px;
  color: var(--text-main, #333333);
}

/* Guide Section */
.page-slot-games__guide-content {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  align-items: center;
}

.page-slot-games__guide-steps {
  flex: 2;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.page-slot-games__guide-image-wrapper {
  flex: 1;
  min-width: 300px;
  text-align: center;
}

.page-slot-games__guide-image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.page-slot-games__step-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.page-slot-games__step-number {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-color, #E53935);
  color: #ffffff;
  font-weight: 700;
  font-size: 20px;
  margin-bottom: 15px;
}

.page-slot-games__step-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--primary-color, #E53935);
}

/* Tips Section */
.page-slot-games__tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
}

.page-slot-games__tip-item {
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Promo Section */
.page-slot-games__promo-section {
  padding: 60px 0;
  text-align: center;
}

.page-slot-games__promo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-top: 40px;
  margin-bottom: 40px;
}

.page-slot-games__promo-card {
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.page-slot-games__promo-cta {
  margin-top: 30px;
  display: inline-block;
}

/* FAQ Section */
.page-slot-games__faq-list {
  max-width: 900px;
  margin: 0 auto;
}

details.page-slot-games__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid var(--border-color, #e0e0e0);
  overflow: hidden;
  background: var(--card-bg, #fff);
}
details.page-slot-games__faq-item summary.page-slot-games__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-slot-games__faq-item summary.page-slot-games__faq-question::-webkit-details-marker {
  display: none;
}
details.page-slot-games__faq-item summary.page-slot-games__faq-question:hover {
  background: #f5f5f5;
}
.page-slot-games__faq-qtext {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: var(--text-main, #333333);
}
.page-slot-games__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #666;
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}
details.page-slot-games__faq-item .page-slot-games__faq-answer {
  padding: 0 20px 20px;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
  color: var(--text-main, #333333);
}

/* Final CTA Section */
.page-slot-games__cta-final {
  padding: 60px 0;
  text-align: center;
}

.page-slot-games__cta-final .page-slot-games__section-title {
  color: #ffffff;
}

.page-slot-games__cta-final .page-slot-games__text-block {
  color: #ffffff;
}

.page-slot-games__cta-final .page-slot-games__cta-buttons {
  margin-top: 40px;
}

/* --- General Responsive Styles --- */
.page-slot-games img {
  max-width: 100%;
  height: auto;
  display: block;
}

.page-slot-games__btn-primary,
.page-slot-games__btn-secondary,
.page-slot-games a[class*="button"],
.page-slot-games a[class*="btn"] {
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-slot-games__hero-cta-buttons,
.page-slot-games__cta-buttons {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* --- Homepage Specific CSS Snippets (required to be present in the output CSS) --- */
@media (max-width: 1023px) {
  .page-slot-games__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-slot-games__hero-brand,
  .page-slot-games__hero-jackpot {
    display: none !important;
  }
  .page-slot-games__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-slot-games__game-trial-shell {
    height: auto !important;
    max-height: none !important;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
  }
  .page-slot-games__game-trial-topbar,
  .page-slot-games__game-trial-bottombar {
    display: none !important;
  }
  .page-slot-games__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-slot-games__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-slot-games__game-trial-overlay {
    z-index: 5 !important;
    pointer-events: auto !important;
  }
  .page-slot-games__game-trial-start {
    z-index: 6 !important;
    pointer-events: auto !important;
    touch-action: manipulation;
  }
}

@media (min-width: 1024px) {
  .page-slot-games__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-slot-games__hero-brand,
  .page-slot-games__hero-jackpot,
  .page-slot-games__game-trial {
    height: 300px;
    max-height: 300px;
    overflow: hidden;
    box-sizing: border-box;
  }
  .page-slot-games__game-trial {
    max-width: none !important;
    width: 100%;
    margin: 0;
    padding: 0;
  }
  .page-slot-games__game-trial-shell {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 300px;
    box-sizing: border-box;
  }
  .page-slot-games__game-trial-viewport {
    flex: 1;
    min-height: 0;
    position: relative;
    width: 100%;
  }
  .page-slot-games__game-trial-frame {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    border: none;
  }
  .page-slot-games__hero-jackpot-claim {
    background: #c62828 !important;
    color: #fff !important;
  }
  /* Additional desktop styles for homepage components */
  .page-slot-games__promo-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1280px;
    margin: 16px auto;
    padding: 0 16px;
  }
  .page-slot-games__promo-card-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }
  .page-slot-games__hot-games-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    max-width: 1280px;
    margin: 40px auto;
    padding: 0 16px;
  }
  .page-slot-games__hot-games-item-name,
  .page-slot-games__hot-games-item-rtp,
  .page-slot-games__hot-games-item-desc {
    display: block;
    text-align: center;
  }
}

/* --- Mobile Responsive Styles (max-width: 768px) --- */
@media (max-width: 768px) {
  .page-slot-games {
    font-size: 15px;
    line-height: 1.5;
  }
  .page-slot-games__container {
    padding: 15px 15px;
  }
  .page-slot-games__section-title {
    margin-bottom: 25px;
    font-size: clamp(20px, 6vw, 28px);
  }
  .page-slot-games__hero-section {
    padding-bottom: 20px;
  }
  .page-slot-games__hero-image-wrapper {
    max-height: 300px;
  }
  .page-slot-games__hero-content {
    margin-top: -60px;
    padding: 15px;
  }
  .page-slot-games__hero-title {
    font-size: clamp(24px, 7vw, 36px);
  }
  .page-slot-games__hero-description {
    font-size: 16px;
    margin-bottom: 20px;
  }
  .page-slot-games__hero-cta-buttons {
    flex-direction: column;
    gap: 10px;
    padding: 0 15px;
  }
  .page-slot-games__btn-primary,
  .page-slot-games__btn-secondary,
  .page-slot-games a[class*="button"],
  .page-slot-games 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-slot-games__game-types-grid {
    grid-template-columns: 1fr;
  }
  .page-slot-games__card-image {
    height: 180px;
  }
  .page-slot-games__guide-content {
    flex-direction: column;
  }
  .page-slot-games__guide-steps {
    grid-template-columns: 1fr;
    width: 100%;
  }
  .page-slot-games__guide-image-wrapper {
    min-width: unset;
    width: 100%;
  }
  .page-slot-games__tips-grid {
    grid-template-columns: 1fr;
  }
  .page-slot-games__promo-section {
    padding: 40px 0;
  }
  .page-slot-games__promo-grid {
    grid-template-columns: 1fr;
    margin-top: 25px;
    margin-bottom: 25px;
  }
  details.page-slot-games__faq-item summary.page-slot-games__faq-question {
    padding: 15px;
  }
  .page-slot-games__faq-qtext {
    font-size: 15px;
  }
  details.page-slot-games__faq-item .page-slot-games__faq-answer {
    padding: 0 15px 15px;
  }
  .page-slot-games__cta-final {
    padding: 40px 0;
  }
  .page-slot-games__cta-final .page-slot-games__cta-buttons {
    margin-top: 25px;
    flex-direction: column;
    gap: 10px;
    padding: 0 15px;
  }
  /* Homepage specific for 768px */
  .page-slot-games__promo-strip-track {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Example: 2 columns for smaller screens */
    gap: 15px;
    overflow-x: hidden;
    padding: 0 10px;
  }
  .page-slot-games__promo-card-content {
    flex-direction: column;
    text-align: center;
  }
  .page-slot-games__hot-games-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 0 10px;
  }
  .page-slot-games__hot-games-item-name,
  .page-slot-games__hot-games-item-rtp,
  .page-slot-games__hot-games-item-desc {
    display: none; /* Hide for mobile to save space */
  }
  .page-slot-games__brand-intro {
    display: block; /* Ensure it shows if hidden on desktop */
    padding: 20px 15px;
  }
  .page-slot-games__winner-ticker {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 999;
    background: rgba(0, 0, 0, 0.8);
    padding: 10px 0;
  }
  body {
    padding-bottom: 50px; /* Adjust body padding for fixed ticker */
  }
}