/* 智能文字颜色选择器 - 必须实现（使用BEM命名规则） */
.page-casino__card,
.page-casino__section,
.page-casino__box {
  /* Hệ thống sẽ tự động phân tích độ sáng màu nền và chọn màu văn bản tốt nhất */
}

/* Độ sáng tính toán và nguyên tắc chọn màu (sử dụng quy tắc đặt tên BEM) */
.page-casino__dark-bg {
  color: #ffffff; /* Nền tối với văn bản màu sáng */
  background: #11A84E; /* Sử dụng màu thương hiệu nhưng đảm bảo độ tương phản */
}

.page-casino__light-bg {
  color: #333333; /* Nền sáng với văn bản màu tối */
  background: #ffffff;
}

.page-casino__medium-bg {
  /* Nền có độ sáng trung bình cần phân tích thông minh */
  color: #000000; /* Mặc định sử dụng văn bản màu tối */
  background: #22C768;
}

/* Chính văn bản nội dung - ưu tiên cao nhất (sử dụng quy tắc đặt tên BEM) */
.page-casino__content-area,
.page-casino__text-block {
  color: #F2FFF6; /* Đảm bảo dễ đọc trên hầu hết các nền */
  background: #08160F; /* Nền mặc định */
}

/* Các đoạn văn và mục danh sách trong khu vực nội dung trang */
.page-casino p,
.page-casino li {
  color: #A7D9B8; /* Đảm bảo dễ đọc trên hầu hết các nền */
}

/* Thẻ và container - lựa chọn nền thông minh (sử dụng quy tắc đặt tên BEM) */
.page-casino__card {
  background: #11271B; /* Ưu tiên sử dụng nền tối đảm bảo dễ đọc */
  color: #F2FFF6;
  border: 1px solid #2E7A4E; /* Thêm đường viền tăng cường khả năng đọc */
}

/* Xử lý đặc biệt khu vực tối (sử dụng quy tắc đặt tên BEM) */
.page-casino__dark-section {
  background: #11A84E;
  color: #ffffff; /* Buộc văn bản màu trắng */
}

/* Đảm bảo độ tương phản văn bản nút (sử dụng quy tắc đặt tên BEM) */
.page-casino__btn-primary {
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  color: #ffffff; /* Văn bản nút luôn sử dụng màu trắng */
  border: 2px solid transparent;
  padding: 12px 25px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
}

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

.page-casino__btn-secondary {
  background: transparent;
  color: #F2FFF6; /* Sử dụng màu thương hiệu đảm bảo độ tương phản */
  border: 2px solid #2E7A4E;
  padding: 12px 25px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
  margin-left: 15px;
}

.page-casino__btn-secondary:hover {
  background: rgba(46, 122, 78, 0.2);
  transform: translateY(-2px);
}

/* Độ tương phản tăng cường khả năng đọc trên thiết bị di động (sử dụng quy tắc đặt tên BEM) */
@media (max-width: 768px) {
  .page-casino {
    /* Tăng kích thước phông chữ và chiều cao dòng trên thiết bị di động */
    font-size: 16px;
    line-height: 1.6;
  }
  
  .page-casino__card {
    /* Thẻ trên thiết bị di động tăng khoảng đệm và bóng để tăng khả năng đọc */
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }
}

/* Đối tượng khẩn cấp sửa chữa độ tương phản (sử dụng quy tắc đặt tên BEM) */
.page-casino__contrast-fix {
  background: #ffffff !important;
  color: #333333 !important;
  border: 1px solid #e0e0e0 !important;
}

.page-casino__text-contrast-fix {
  color: #333333 !important;
  text-shadow: none !important;
}

/* Global styles for page-casino */
.page-casino {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #F2FFF6; /* Main text color */
  background-color: #08160F; /* Background color */
}

.page-casino__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.page-casino__section-title {
  font-size: 2.5em;
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  color: #F2FFF6; /* Main text color */
}

.page-casino__subsection-title {
  font-size: 1.8em;
  font-weight: 600;
  margin-top: 30px;
  margin-bottom: 15px;
  color: #F2FFF6; /* Main text color */
}

.page-casino__description {
  font-size: 1.1em;
  text-align: center;
  margin-bottom: 30px;
  color: #A7D9B8; /* Secondary text color */
}

/* Hero Section */
.page-casino__hero-section {
  position: relative;
  padding-top: 10px; /* Small top padding, body handles header offset */
  margin-bottom: 40px;
  overflow: hidden;
  background-color: #08160F; /* Background color */
}

.page-casino__hero-content-wrapper {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
}

.page-casino__hero-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  object-fit: cover;
}

.page-casino__hero-text-container {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 30px;
  background: linear-gradient(to top, rgba(8, 22, 15, 0.9) 0%, rgba(8, 22, 15, 0) 100%);
  border-radius: 0 0 10px 10px;
  text-align: center;
}

.page-casino__main-title {
  font-size: clamp(2em, 4vw, 3.5em);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 15px;
  color: #F2FFF6;
}

.page-casino__cta-buttons {
  margin-top: 25px;
  display: flex;
  justify-content: center;
  gap: 20px;
}

/* About Section */
.page-casino__about-section .page-casino__content-area {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-casino__image-left {
  width: 100%;
  max-width: 600px;
  height: auto;
  border-radius: 10px;
  margin-bottom: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Game Categories Section */
.page-casino__game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.page-casino__game-card {
  background-color: #11271B; /* Card B G */
  border: 1px solid #2E7A4E; /* Border color */
  border-radius: 10px;
  overflow: hidden;
  text-align: center;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-casino__game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

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

.page-casino__card-title {
  font-size: 1.5em;
  font-weight: 700;
  margin-bottom: 10px;
  color: #F2FFF6; /* Text Main */
}

.page-casino__card-title a {
  text-decoration: none;
  color: #F2FFF6;
}

.page-casino__card-title a:hover {
  color: #2AD16F;
}

.page-casino__card-text {
  font-size: 0.95em;
  color: #A7D9B8; /* Text Secondary */
  margin-bottom: 20px;
  flex-grow: 1;
}

/* Promotions Section */
.page-casino__promo-image {
  width: 100%;
  height: auto;
  border-radius: 10px;
  margin-top: 30px;
  margin-bottom: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* FAQ Section */
details.page-casino__faq-item {
  margin-bottom: 15px;
  border-radius: 10px;
  border: 1px solid #2E7A4E;
  overflow: hidden;
  background: #11271B; /* Card B G */
}
details.page-casino__faq-item summary.page-casino__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;
  color: #F2FFF6; /* Text Main */
  font-weight: 600;
}
details.page-casino__faq-item summary.page-casino__faq-question::-webkit-details-marker {
  display: none;
}
details.page-casino__faq-item summary.page-casino__faq-question:hover {
  background: #1E3A2A; /* Divider color */
}
.page-casino__faq-qtext {
  flex: 1;
  font-size: 1.1em;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
}
.page-casino__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #57E38D; /* Glow color */
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}
details.page-casino__faq-item .page-casino__faq-answer {
  padding: 0 20px 20px;
  background: #0A4B2C; /* Deep Green */
  border-radius: 0 0 10px 10px;
  color: #A7D9B8; /* Text Secondary */
}

/* Final CTA Section */
.page-casino__cta-final-section {
  text-align: center;
  padding: 60px 20px;
  margin-top: 40px;
  border-radius: 10px;
  background-color: #0A4B2C; /* Deep Green */
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
}

/* Copyright Section */
.page-casino__copyright {
  text-align: center;
  padding: 20px;
  margin-top: 40px;
  font-size: 0.9em;
  background-color: #08160F; /* Background color */
  color: #A7D9B8; /* Secondary text color */
}

/* Responsive Design */
/* Mobile/Tablet specific styles for homepage game trial (as per global instructions) */
@media (max-width: 1023px) {
  .page-casino__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-casino__hero-brand,
  .page-casino__hero-jackpot {
    display: none !important;
  }
  .page-casino__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-casino__game-trial-shell {
    height: auto !important;
    max-height: none !important;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
  }
  .page-casino__game-trial-topbar,
  .page-casino__game-trial-bottombar {
    display: none !important;
  }
  .page-casino__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-casino__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-casino__game-trial-overlay {
    z-index: 5 !important;
    pointer-events: auto !important;
  }
  .page-casino__game-trial-start {
    z-index: 6 !important;
    pointer-events: auto !important;
    touch-action: manipulation;
  }
}

/* Desktop specific styles for homepage game trial (as per global instructions) */
@media (min-width: 1024px) {
  .page-casino__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-casino__hero-brand,
  .page-casino__hero-jackpot,
  .page-casino__game-trial {
    height: 300px;
    max-height: 300px;
    overflow: hidden;
    box-sizing: border-box;
  }
  .page-casino__game-trial {
    max-width: none !important;
    width: 100%;
    margin: 0;
    padding: 0;
  }
  .page-casino__game-trial-shell {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 300px;
    box-sizing: border-box;
  }
  .page-casino__game-trial-viewport {
    flex: 1;
    min-height: 0;
    position: relative;
    width: 100%;
  }
  .page-casino__game-trial-frame {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    border: none;
  }
  .page-casino__hero-jackpot-claim {
    background: #c62828 !important;
    color: #fff !important;
  }
}

/* Mobile specific styles (general for casino page) */
@media (max-width: 768px) {
  .page-casino__container {
    padding: 15px;
  }

  .page-casino__hero-section {
    padding-top: 0;
  }

  .page-casino__hero-text-container {
    position: relative;
    padding: 20px;
    background: #08160F;
    border-radius: 0 0 10px 10px;
  }

  .page-casino__main-title {
    font-size: 2em;
    margin-bottom: 10px;
  }

  .page-casino__description {
    font-size: 1em;
    margin-bottom: 20px;
  }

  .page-casino__cta-buttons {
    flex-direction: column;
    gap: 10px;
  }

  .page-casino__btn-primary,
  .page-casino__btn-secondary {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    margin-left: 0;
  }

  .page-casino__section-title {
    font-size: 2em;
    margin-bottom: 30px;
  }

  .page-casino__subsection-title {
    font-size: 1.5em;
  }

  .page-casino__image-left {
    margin-bottom: 20px;
  }

  .page-casino__game-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-casino__card-image {
    height: 180px;
  }

  .page-casino__card-title {
    font-size: 1.3em;
  }

  .page-casino__card-text {
    font-size: 0.9em;
  }

  .page-casino__promo-image {
    margin-top: 20px;
    margin-bottom: 20px;
  }

  details.page-casino__faq-item summary.page-casino__faq-question {
    padding: 15px;
  }

  .page-casino__faq-qtext {
    font-size: 1em;
  }

  .page-casino__faq-toggle {
    font-size: 20px;
  }

  details.page-casino__faq-item .page-casino__faq-answer {
    padding: 0 15px 15px;
  }

  .page-casino__cta-final-section {
    padding: 40px 15px;
  }

  /* Mobile image specific styles */
  .page-casino img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-casino__section,
  .page-casino__card,
  .page-casino__container,
  .page-casino__hero-content-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}

/* Emergency contrast fix (as per global instructions) */
.page-casino__contrast-fix {
  background: #ffffff !important;
  color: #333333 !important;
  border: 1px solid #e0e0e0 !important;
}

.page-casino__text-contrast-fix {
  color: #333333 !important;
  text-shadow: none !important;
}

/* Specific styles for game trial overlay and start button (from homepage template) */
.page-casino__game-trial-overlay{
  z-index:5;
  pointer-events:auto;
}
.page-casino__game-trial-overlay.is-hidden{
  display:none!important;
  pointer-events:none!important;
}
.page-casino__game-trial-start{
  z-index:6;
  pointer-events:auto;
  touch-action:manipulation;
}
.page-casino__game-trial-shell{
  border:1px solid rgba(212,175,55,.45);
  border-radius:10px;
  overflow:hidden;
}
.page-casino__reward-modal{
  position:fixed;
  inset:0;
  z-index:10000;
}
.page-casino__reward-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: #c62828;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 1.2em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
}
.page-casino--reward-open {
  overflow: hidden;
}