/**
 * PH789 Casino - Core CSS Module
 * All classes use w89bb- prefix for namespace isolation
 * Color palette: #2E4057 | #CC99FF | #9370DB | #EEEEEE
 */

/* === CSS Variables === */
:root {
  --w89bb-primary: #9370DB;
  --w89bb-secondary: #CC99FF;
  --w89bb-dark: #2E4057;
  --w89bb-light: #EEEEEE;
  --w89bb-accent: #CC99FF;
  --w89bb-bg: #1a2744;
  --w89bb-bg-card: #243352;
  --w89bb-bg-dark: #141e33;
  --w89bb-text: #EEEEEE;
  --w89bb-text-muted: #a8b5cc;
  --w89bb-border: #2d3f5e;
  --w89bb-gold: #FFD700;
  --w89bb-success: #4ade80;
  --w89bb-danger: #f87171;
  --w89bb-radius: 0.8rem;
  --w89bb-radius-sm: 0.4rem;
  --w89bb-shadow: 0 0.2rem 1.2rem rgba(0, 0, 0, 0.3);
}

/* === Reset & Base === */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 62.5%; scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--w89bb-bg);
  color: var(--w89bb-text);
  line-height: 1.5rem;
  font-size: 1.4rem;
  overflow-x: hidden;
  max-width: 430px;
  margin: 0 auto;
}
a { color: var(--w89bb-secondary); text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* === Header === */
.w89bb-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: 5.6rem;
  background: var(--w89bb-bg-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.2rem;
  z-index: 1000;
  border-bottom: 0.1rem solid var(--w89bb-border);
}
.w89bb-logo-area {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.w89bb-logo-area img {
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 0.4rem;
}
.w89bb-logo-area span {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--w89bb-secondary);
  white-space: nowrap;
}
.w89bb-header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.w89bb-btn-register {
  background: var(--w89bb-primary);
  color: #fff;
  border: none;
  padding: 0.6rem 1.4rem;
  border-radius: var(--w89bb-radius-sm);
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}
.w89bb-btn-register:hover {
  background: var(--w89bb-secondary);
  transform: scale(1.05);
}
.w89bb-btn-login {
  background: transparent;
  color: var(--w89bb-secondary);
  border: 0.1rem solid var(--w89bb-secondary);
  padding: 0.6rem 1.4rem;
  border-radius: var(--w89bb-radius-sm);
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}
.w89bb-btn-login:hover {
  background: var(--w89bb-secondary);
  color: var(--w89bb-bg-dark);
}
.w89bb-menu-toggle {
  background: none;
  border: none;
  color: var(--w89bb-text);
  font-size: 2rem;
  cursor: pointer;
  padding: 0.4rem;
  display: flex;
  align-items: center;
}

/* === Mobile Menu === */
.w89bb-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}
.w89bb-overlay-active {
  opacity: 1;
  visibility: visible;
}
.w89bb-mobile-menu {
  position: fixed;
  top: 0;
  right: -280px;
  width: 280px;
  height: 100%;
  background: var(--w89bb-bg-dark);
  z-index: 9999;
  transition: right 0.3s ease;
  padding: 6rem 2rem 2rem;
  overflow-y: auto;
}
.w89bb-menu-active {
  right: 0;
}
.w89bb-mobile-menu a {
  display: block;
  padding: 1.2rem 0;
  color: var(--w89bb-text);
  font-size: 1.4rem;
  border-bottom: 0.1rem solid var(--w89bb-border);
  transition: color 0.2s;
}
.w89bb-mobile-menu a:hover {
  color: var(--w89bb-secondary);
}
.w89bb-menu-close {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  background: none;
  border: none;
  color: var(--w89bb-text);
  font-size: 2rem;
  cursor: pointer;
}

/* === Main Content === */
.w89bb-main {
  padding-top: 5.6rem;
  min-height: 100vh;
}
@media (max-width: 768px) {
  .w89bb-main { padding-bottom: 7rem; }
}

/* === Carousel === */
.w89bb-carousel {
  position: relative;
  overflow: hidden;
  border-radius: 0;
}
.w89bb-carousel-track {
  display: flex;
  transition: transform 0.5s ease;
}
.w89bb-carousel-slide {
  min-width: 100%;
  position: relative;
}
.w89bb-carousel-slide img {
  width: 100%;
  height: 20rem;
  object-fit: cover;
}
.w89bb-carousel-dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.6rem;
}
.w89bb-carousel-dot {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  border: none;
  cursor: pointer;
  transition: all 0.3s;
}
.w89bb-dot-active {
  background: var(--w89bb-secondary);
  transform: scale(1.3);
}

/* === Sections === */
.w89bb-section {
  padding: 2rem 1.2rem;
}
.w89bb-section-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--w89bb-secondary);
  margin-bottom: 1.2rem;
  padding-bottom: 0.6rem;
  border-bottom: 0.2rem solid var(--w89bb-primary);
}
.w89bb-section-title i {
  margin-right: 0.6rem;
}
.w89bb-section p {
  color: var(--w89bb-text-muted);
  line-height: 2rem;
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

/* === Game Grid === */
.w89bb-category-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--w89bb-text);
  margin: 1.6rem 0 1rem;
  padding-left: 0.8rem;
  border-left: 0.3rem solid var(--w89bb-primary);
}
.w89bb-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
}
.w89bb-game-item {
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s;
}
.w89bb-game-item:hover {
  transform: scale(1.05);
}
.w89bb-game-item img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--w89bb-radius-sm);
  object-fit: cover;
  border: 0.1rem solid var(--w89bb-border);
}
.w89bb-game-item span {
  display: block;
  font-size: 1.1rem;
  color: var(--w89bb-text-muted);
  margin-top: 0.3rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* === Cards === */
.w89bb-card {
  background: var(--w89bb-bg-card);
  border-radius: var(--w89bb-radius);
  padding: 1.6rem;
  margin-bottom: 1.2rem;
  border: 0.1rem solid var(--w89bb-border);
}
.w89bb-card h3 {
  font-size: 1.5rem;
  color: var(--w89bb-secondary);
  margin-bottom: 0.8rem;
}
.w89bb-card p {
  font-size: 1.3rem;
  color: var(--w89bb-text-muted);
  line-height: 2rem;
}

/* === Promo Button === */
.w89bb-promo-btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--w89bb-primary), var(--w89bb-secondary));
  color: #fff;
  padding: 1rem 2.4rem;
  border-radius: 3rem;
  font-size: 1.4rem;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
  text-decoration: none;
}
.w89bb-promo-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0.4rem 1.6rem rgba(147, 112, 219, 0.5);
}
.w89bb-promo-text {
  color: var(--w89bb-secondary);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}
.w89bb-promo-text:hover {
  color: var(--w89bb-gold);
}

/* === FAQ Accordion === */
.w89bb-faq-item {
  background: var(--w89bb-bg-card);
  border-radius: var(--w89bb-radius);
  margin-bottom: 0.8rem;
  overflow: hidden;
  border: 0.1rem solid var(--w89bb-border);
}
.w89bb-faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 1.6rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--w89bb-text);
}
.w89bb-faq-icon {
  font-size: 1.6rem;
  color: var(--w89bb-primary);
  transition: transform 0.3s;
}
.w89bb-faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 1.6rem;
  color: var(--w89bb-text-muted);
  font-size: 1.3rem;
  line-height: 2rem;
}

/* === Features Grid === */
.w89bb-features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.w89bb-feature-item {
  background: var(--w89bb-bg-card);
  border-radius: var(--w89bb-radius);
  padding: 1.4rem;
  text-align: center;
  border: 0.1rem solid var(--w89bb-border);
}
.w89bb-feature-item i {
  font-size: 2.4rem;
  color: var(--w89bb-secondary);
  margin-bottom: 0.6rem;
}
.w89bb-feature-item h4 {
  font-size: 1.3rem;
  color: var(--w89bb-text);
  margin-bottom: 0.4rem;
}
.w89bb-feature-item p {
  font-size: 1.1rem;
  color: var(--w89bb-text-muted);
}

/* === Winners Table === */
.w89bb-winners-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.w89bb-winner-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--w89bb-bg-card);
  padding: 0.8rem 1.2rem;
  border-radius: var(--w89bb-radius-sm);
  border: 0.1rem solid var(--w89bb-border);
}
.w89bb-winner-name {
  font-size: 1.2rem;
  color: var(--w89bb-text);
  font-weight: 600;
}
.w89bb-winner-game {
  font-size: 1.1rem;
  color: var(--w89bb-text-muted);
}
.w89bb-winner-amount {
  font-size: 1.3rem;
  color: var(--w89bb-gold);
  font-weight: 700;
}

/* === Testimonials === */
.w89bb-testimonial {
  background: var(--w89bb-bg-card);
  border-radius: var(--w89bb-radius);
  padding: 1.4rem;
  margin-bottom: 1rem;
  border-left: 0.3rem solid var(--w89bb-primary);
}
.w89bb-testimonial-text {
  font-style: italic;
  color: var(--w89bb-text-muted);
  font-size: 1.3rem;
  margin-bottom: 0.6rem;
}
.w89bb-testimonial-author {
  font-size: 1.2rem;
  color: var(--w89bb-secondary);
  font-weight: 600;
}

/* === Payment Methods === */
.w89bb-payment-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
}
.w89bb-payment-item {
  background: var(--w89bb-bg-card);
  border-radius: var(--w89bb-radius-sm);
  padding: 0.6rem 1.2rem;
  font-size: 1.1rem;
  color: var(--w89bb-text-muted);
  border: 0.1rem solid var(--w89bb-border);
}

/* === Footer === */
.w89bb-footer {
  background: var(--w89bb-bg-dark);
  padding: 2rem 1.2rem;
  border-top: 0.1rem solid var(--w89bb-border);
}
.w89bb-footer-brand {
  text-align: center;
  margin-bottom: 1.6rem;
}
.w89bb-footer-brand p {
  font-size: 1.2rem;
  color: var(--w89bb-text-muted);
  line-height: 1.8rem;
}
.w89bb-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  margin-bottom: 1.6rem;
}
.w89bb-footer-link {
  background: var(--w89bb-bg-card);
  padding: 0.6rem 1.2rem;
  border-radius: var(--w89bb-radius-sm);
  font-size: 1.1rem;
  color: var(--w89bb-text-muted);
  cursor: pointer;
  transition: all 0.3s;
  border: 0.1rem solid var(--w89bb-border);
}
.w89bb-footer-link:hover {
  color: var(--w89bb-secondary);
  border-color: var(--w89bb-secondary);
}
.w89bb-footer-copyright {
  text-align: center;
  font-size: 1.1rem;
  color: var(--w89bb-text-muted);
  padding-top: 1rem;
  border-top: 0.1rem solid var(--w89bb-border);
}

/* === Bottom Navigation === */
.w89bb-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: 6rem;
  background: var(--w89bb-bg-dark);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  border-top: 0.1rem solid var(--w89bb-border);
  box-shadow: 0 -0.2rem 1rem rgba(0,0,0,0.3);
}
.w89bb-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 6rem;
  min-height: 5rem;
  background: none;
  border: none;
  color: var(--w89bb-text-muted);
  cursor: pointer;
  transition: all 0.3s;
  gap: 0.3rem;
  padding: 0.4rem;
}
.w89bb-nav-item i, .w89bb-nav-item .material-icons, .w89bb-nav-item ion-icon, .w89bb-nav-item bi {
  font-size: 2.2rem;
  transition: all 0.3s;
}
.w89bb-nav-item span {
  font-size: 1rem;
  font-weight: 500;
}
.w89bb-nav-item:hover, .w89bb-nav-item:focus {
  color: var(--w89bb-secondary);
  transform: scale(1.08);
}
.w89bb-nav-item-active {
  color: var(--w89bb-secondary) !important;
}
.w89bb-nav-item-active i, .w89bb-nav-item-active .material-icons, .w89bb-nav-item-active ion-icon {
  color: var(--w89bb-secondary);
  filter: drop-shadow(0 0 0.6rem rgba(147, 112, 219, 0.6));
}

/* === Responsive === */
@media (min-width: 769px) {
  .w89bb-bottom-nav { display: none; }
  body { max-width: 430px; }
}

/* === Utility Classes === */
.w89bb-text-center { text-align: center; }
.w89bb-mt-1 { margin-top: 1rem; }
.w89bb-mt-2 { margin-top: 2rem; }
.w89bb-mb-1 { margin-bottom: 1rem; }
.w89bb-mb-2 { margin-bottom: 2rem; }
.w89bb-py-2 { padding: 2rem 0; }
.w89bb-flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}
.w89bb-highlight {
  color: var(--w89bb-secondary);
  font-weight: 600;
}
.w89bb-gold-text {
  color: var(--w89bb-gold);
  font-weight: 700;
}

/* === RTP Table === */
.w89bb-rtp-table {
  width: 100%;
  border-collapse: collapse;
}
.w89bb-rtp-table th, .w89bb-rtp-table td {
  padding: 0.6rem 0.8rem;
  text-align: left;
  border-bottom: 0.1rem solid var(--w89bb-border);
  font-size: 1.2rem;
}
.w89bb-rtp-table th {
  color: var(--w89bb-secondary);
  font-weight: 600;
}
.w89bb-rtp-table td {
  color: var(--w89bb-text-muted);
}
.w89bb-rtp-high { color: var(--w89bb-success); font-weight: 600; }
.w89bb-rtp-mid { color: var(--w89bb-gold); font-weight: 600; }

/* === App Download CTA === */
.w89bb-app-cta {
  background: linear-gradient(135deg, var(--w89bb-dark), var(--w89bb-primary));
  border-radius: var(--w89bb-radius);
  padding: 2rem;
  text-align: center;
  margin: 1.6rem 0;
}
.w89bb-app-cta h3 {
  font-size: 1.6rem;
  color: #fff;
  margin-bottom: 0.8rem;
}
.w89bb-app-cta p {
  font-size: 1.3rem;
  color: var(--w89bb-light);
  margin-bottom: 1.2rem;
}

/* === Achievements === */
.w89bb-achievement {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--w89bb-bg-card);
  padding: 1rem;
  border-radius: var(--w89bb-radius-sm);
  margin-bottom: 0.6rem;
  border: 0.1rem solid var(--w89bb-border);
}
.w89bb-achievement-icon {
  font-size: 2rem;
  color: var(--w89bb-gold);
}
.w89bb-achievement-info h4 {
  font-size: 1.3rem;
  color: var(--w89bb-text);
}
.w89bb-achievement-info p {
  font-size: 1.1rem;
  color: var(--w89bb-text-muted);
}

/* === Internal Link === */
.w89bb-internal-link {
  color: var(--w89bb-secondary);
  text-decoration: underline;
  cursor: pointer;
}
.w89bb-internal-link:hover {
  color: var(--w89bb-gold);
}

/* === Help page specific === */
.w89bb-help-hero {
  background: linear-gradient(135deg, var(--w89bb-dark), #3d2d6b);
  padding: 2rem 1.2rem;
  text-align: center;
}
.w89bb-help-hero h2 {
  font-size: 2rem;
  color: var(--w89bb-secondary);
  margin-bottom: 0.8rem;
}
.w89bb-help-hero p {
  font-size: 1.3rem;
  color: var(--w89bb-text-muted);
}
.w89bb-step-list {
  counter-reset: w89bb-step-counter;
  list-style: none;
  padding: 0;
}
.w89bb-step-list li {
  counter-increment: w89bb-step-counter;
  padding: 1rem 1rem 1rem 4rem;
  position: relative;
  margin-bottom: 0.8rem;
  background: var(--w89bb-bg-card);
  border-radius: var(--w89bb-radius-sm);
  border: 0.1rem solid var(--w89bb-border);
  font-size: 1.3rem;
  color: var(--w89bb-text-muted);
  line-height: 1.8rem;
}
.w89bb-step-list li::before {
  content: counter(w89bb-step-counter);
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: var(--w89bb-primary);
  color: #fff;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
}
