/* style/casino.css */

/* Biến CSS */
:root {
  --page-casino-primary-color: #017439;
  --page-casino-secondary-color: #FFFFFF;
  --page-casino-register-color: #C30808;
  --page-casino-login-color: #C30808;
  --page-casino-background-color: #FFFFFF;
  --page-casino-register-login-font-color: #FFFF00;
  --page-casino-text-dark: #333333;
  --page-casino-text-light: #ffffff;
}

/* Reset và Typography cơ bản trong phạm vi .page-casino */
.page-casino {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--page-casino-text-light); /* Body background is dark, so text is light */
  background-color: #1a1a2e; /* Inherited from body, but explicitly set for safety */
}

.page-casino h1, .page-casino h2, .page-casino h3, .page-casino h4, .page-casino h5, .page-casino h6 {
  color: var(--page-casino-secondary-color);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.page-casino p {
  margin-bottom: 1rem;
}

.page-casino a {
  color: var(--page-casino-secondary-color);
  text-decoration: none;
}

.page-casino a:hover {
  text-decoration: underline;
}

/* Lớp nền tối và sáng để đảm bảo độ tương phản */
.page-casino__dark-bg {
  background-color: #1a1a2e;
  color: var(--page-casino-text-light);
}

.page-casino__light-bg {
  background-color: var(--page-casino-background-color);
  color: var(--page-casino-text-dark);
}

.page-casino__light-bg h1, .page-casino__light-bg h2, .page-casino__light-bg h3, .page-casino__light-bg h4, .page-casino__light-bg h5, .page-casino__light-bg h6 {
  color: var(--page-casino-primary-color);
}

.page-casino__light-bg p {
  color: var(--page-casino-text-dark);
}

.page-casino__light-bg a {
  color: var(--page-casino-primary-color);
}

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

/* Các Section */
.page-casino__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 600px;
  padding: 60px 20px;
  overflow: hidden;
  padding-top: var(--header-offset, 120px); /* Đảm bảo không bị che bởi header */
}

.page-casino__hero-video-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
}

.page-casino__hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.5); /* Giảm độ sáng video để chữ dễ đọc */
  cursor: pointer;
}

.page-casino__hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  color: var(--page-casino-secondary-color);
}

.page-casino__hero-title {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.page-casino__hero-description {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

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

.page-casino__section-title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 1.5rem;
}

.page-casino__section-description {
  font-size: 1.1rem;
  text-align: center;
  margin-bottom: 2rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* About Section */
.page-casino__about-section {
  padding: 80px 0;
}

.page-casino__about-content {
  display: flex;
  gap: 40px;
  align-items: center;
}

.page-casino__about-content .page-casino__text-block {
  flex: 1;
}

.page-casino__about-content .page-casino__image-wrapper {
  flex: 1;
  text-align: center;
}

.page-casino__about-content .page-casino__image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Games Section */
.page-casino__games-section {
  padding: 80px 0;
}

.page-casino__game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.page-casino__game-card {
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  overflow: hidden;
  text-align: center;
  padding-bottom: 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  color: var(--page-casino-text-light);
}

.page-casino__game-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  margin-bottom: 15px;
}

.page-casino__game-title {
  font-size: 1.75rem;
  margin-bottom: 10px;
  padding: 0 15px;
}

.page-casino__game-title a {
  color: var(--page-casino-secondary-color);
}

.page-casino__game-description {
  font-size: 1rem;
  margin-bottom: 20px;
  padding: 0 15px;
  flex-grow: 1;
}

/* Promotions Section */
.page-casino__promotions-section {
  padding: 80px 0;
}

.page-casino__promotion-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.page-casino__promotion-card {
  background-color: var(--page-casino-background-color);
  border-radius: 8px;
  overflow: hidden;
  text-align: center;
  padding-bottom: 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  color: var(--page-casino-text-dark);
}

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

.page-casino__promotion-title {
  font-size: 1.75rem;
  margin-bottom: 10px;
  color: var(--page-casino-primary-color);
  padding: 0 15px;
}

.page-casino__promotion-text {
  font-size: 1rem;
  margin-bottom: 20px;
  padding: 0 15px;
}

/* Why Choose Us Section */
.page-casino__why-choose-us {
  padding: 80px 0;
}

.page-casino__features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  text-align: center;
}

.page-casino__feature-item {
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  color: var(--page-casino-text-light);
}

.page-casino__feature-icon {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-bottom: 20px;
}

.page-casino__feature-title {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.page-casino__feature-text {
  font-size: 1rem;
}

/* How To Play Section */
.page-casino__how-to-play {
  padding: 80px 0;
}

.page-casino__steps-list {
  list-style: none;
  padding: 0;
  counter-reset: step-counter;
  max-width: 900px;
  margin: 0 auto 40px auto;
}

.page-casino__step-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 30px;
  padding: 20px;
  background-color: var(--page-casino-background-color);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  color: var(--page-casino-text-dark);
}

.page-casino__step-item::before {
  counter-increment: step-counter;
  content: counter(step-counter);
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--page-casino-primary-color);
  margin-right: 20px;
  min-width: 50px;
  text-align: center;
}

.page-casino__step-title {
  font-size: 1.5rem;
  color: var(--page-casino-primary-color);
  margin-top: 0;
}

.page-casino__step-description {
  font-size: 1rem;
}

/* FAQ Section */
.page-casino__faq-section {
  padding: 80px 0;
}

.page-casino__faq-list {
  max-width: 900px;
  margin: 0 auto;
}

.page-casino__faq-item {
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  color: var(--page-casino-text-light);
}

.page-casino__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  font-size: 1.25rem;
  font-weight: bold;
  cursor: pointer;
  background-color: var(--page-casino-primary-color);
  color: var(--page-casino-secondary-color);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.page-casino__faq-question:hover {
  filter: brightness(1.1);
}

.page-casino__faq-toggle {
  font-size: 1.5rem;
  line-height: 1;
  transition: transform 0.3s ease;
}

.page-casino__faq-item.active .page-casino__faq-toggle {
  transform: rotate(45deg);
}

.page-casino__faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 20px;
  transition: max-height 0.3s ease, padding 0.3s ease;
  color: var(--page-casino-text-light);
}

.page-casino__faq-item.active .page-casino__faq-answer {
  max-height: 1000px !important; /* Đủ lớn để chứa nội dung */
  padding: 20px;
}

.page-casino__faq-answer p {
  margin: 0;
}

/* Conclusion Section */
.page-casino__conclusion-section {
  padding: 80px 0;
  text-align: center;
}

.page-casino__text-block--center {
  text-align: center;
}

/* Buttons */
.page-casino__btn-primary,
.page-casino__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 5px;
  font-size: 1.1rem;
  font-weight: bold;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  text-decoration: none;
  white-space: normal;
  word-wrap: break-word;
  box-sizing: border-box;
}

.page-casino__btn-primary {
  background-color: var(--page-casino-primary-color);
  color: var(--page-casino-secondary-color);
  border: 2px solid var(--page-casino-primary-color);
}

.page-casino__btn-primary:hover {
  background-color: darken(var(--page-casino-primary-color), 10%);
  border-color: darken(var(--page-casino-primary-color), 10%);
}

.page-casino__btn-secondary {
  background-color: transparent;
  color: var(--page-casino-secondary-color);
  border: 2px solid var(--page-casino-secondary-color);
}

.page-casino__btn-secondary:hover {
  background-color: var(--page-casino-secondary-color);
  color: var(--page-casino-primary-color);
}

.page-casino__hero-cta-buttons .page-casino__btn-primary {
  background-color: var(--page-casino-register-color);
  color: var(--page-casino-register-login-font-color);
  border-color: var(--page-casino-register-color);
}

.page-casino__hero-cta-buttons .page-casino__btn-primary:hover {
  background-color: darken(var(--page-casino-register-color), 10%);
  border-color: darken(var(--page-casino-register-color), 10%);
}

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

.page-casino__cta-buttons--center {
  justify-content: center;
}

/* Hình ảnh */
.page-casino img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

/* Contrast Fixes */
.page-casino__contrast-fix {
  background: var(--page-casino-background-color) !important;
  color: var(--page-casino-text-dark) !important;
  border: 1px solid #e0e0e0 !important;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-casino__hero-title {
    font-size: 2.8rem;
  }

  .page-casino__hero-description {
    font-size: 1.1rem;
  }

  .page-casino__section-title {
    font-size: 2rem;
  }

  .page-casino__about-content {
    flex-direction: column;
  }

  .page-casino__game-image,
  .page-casino__promotion-image {
    height: 200px;
  }

  .page-casino__feature-icon {
    width: 80px;
    height: 80px;
  }
}

@media (max-width: 768px) {
  .page-casino {
    font-size: 16px;
    line-height: 1.6;
  }

  .page-casino__hero-section {
    min-height: 400px;
    padding-top: var(--header-offset, 120px) !important;
  }

  .page-casino__hero-title {
    font-size: 2rem;
  }

  .page-casino__hero-description {
    font-size: 1rem;
  }

  .page-casino__hero-cta-buttons {
    flex-direction: column;
    gap: 15px;
    width: 100%;
    padding: 0 15px;
  }

  .page-casino__btn-primary,
  .page-casino__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 20px;
    font-size: 1rem;
  }

  .page-casino__section-title {
    font-size: 1.8rem;
  }

  .page-casino__section-description {
    font-size: 1rem;
  }

  .page-casino__container {
    padding: 15px;
  }

  .page-casino__about-section,
  .page-casino__games-section,
  .page-casino__promotions-section,
  .page-casino__why-choose-us,
  .page-casino__how-to-play,
  .page-casino__faq-section,
  .page-casino__conclusion-section {
    padding: 40px 0;
  }

  .page-casino img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-casino__image-wrapper,
  .page-casino__game-card,
  .page-casino__promotion-card,
  .page-casino__feature-item,
  .page-casino__step-item,
  .page-casino__faq-item,
  .page-casino__cta-buttons {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .page-casino__hero-video-wrapper,
  .page-casino__hero-video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

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

  .page-casino__step-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .page-casino__step-item::before {
    margin-bottom: 10px;
    margin-right: 0;
  }

  .page-casino__step-title {
    margin-top: 10px;
  }
}

/* Helper for darkening colors (Sass-like function) */
/* This is a placeholder. In a real scenario, a CSS preprocessor or JS would handle this. */
/* For pure CSS, direct color values are used. */
/* For example, darken(#017439, 10%) could be #00602f */

/* Example of direct color for hover */
.page-casino__btn-primary:hover {
  background-color: #00602f;
  border-color: #00602f;
}

.page-casino__hero-cta-buttons .page-casino__btn-primary:hover {
  background-color: #a30707;
  border-color: #a30707;
}