/* TH77 Casino - Core Stylesheet */
/* All classes use g137- prefix for namespace isolation */

:root {
  --g137-primary: #00FF7F;
  --g137-bg: #1C2833;
  --g137-bg-light: #243342;
  --g137-text: #CCCCCC;
  --g137-text-light: #E8E8E8;
  --g137-secondary: #8FBC8F;
  --g137-accent: #00FF7F;
  --g137-cta: #00FF7F;
  --g137-dark: #0D1B26;
  --g137-border: #2C3E50;
  --g137-shadow: rgba(0,255,127,0.15);
  --g137-radius: 10px;
  --g137-font: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--g137-font);
  background: var(--g137-bg);
  color: var(--g137-text);
  line-height: 1.6;
  font-size: 14px;
  max-width: 430px;
  margin: 0 auto;
  overflow-x: hidden;
}
a { color: var(--g137-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

/* Header */
.g137-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: 56px;
  background: var(--g137-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  z-index: 1000;
  border-bottom: 1px solid var(--g137-border);
}
.g137-logo {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--g137-primary);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 1px;
}
.g137-logo img { width: 32px; height: 32px; border-radius: 6px; }
.g137-header-actions { display: flex; align-items: center; gap: 8px; }
.g137-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 16px;
  border: none;
  border-radius: var(--g137-radius);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}
.g137-btn-primary { background: var(--g137-cta); color: var(--g137-dark); }
.g137-btn-primary:hover { background: #33ff99; transform: scale(1.03); }
.g137-btn-secondary { background: transparent; color: var(--g137-primary); border: 1.5px solid var(--g137-primary); }
.g137-btn-secondary:hover { background: rgba(0,255,127,0.1); }
.g137-hamburger {
  background: none;
  border: none;
  color: var(--g137-text);
  font-size: 22px;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
}

/* Mobile Menu */
.g137-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 ease;
}
.g137-overlay-active { opacity: 1; visibility: visible; }
.g137-mobile-menu {
  position: fixed;
  top: 0;
  right: -280px;
  width: 270px;
  height: 100%;
  background: var(--g137-dark);
  z-index: 9999;
  transition: right 0.35s ease;
  padding: 20px 16px;
  overflow-y: auto;
}
.g137-menu-active { right: 0; }
.g137-menu-close {
  background: none;
  border: none;
  color: var(--g137-text);
  font-size: 24px;
  cursor: pointer;
  float: right;
  margin-bottom: 16px;
}
.g137-menu-links { clear: both; padding-top: 10px; }
.g137-menu-links a {
  display: block;
  padding: 12px 0;
  color: var(--g137-text);
  border-bottom: 1px solid var(--g137-border);
  font-size: 15px;
  transition: color 0.2s;
}
.g137-menu-links a:hover { color: var(--g137-primary); text-decoration: none; }

/* Main Content */
.g137-main { padding-top: 56px; }
@media (max-width: 768px) {
  .g137-main { padding-bottom: 80px; }
}

/* Carousel */
.g137-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  aspect-ratio: 430/200;
}
.g137-carousel-track { position: relative; width: 100%; height: 100%; }
.g137-carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.g137-slide-active { opacity: 1; }
.g137-carousel-slide img { width: 100%; height: 100%; object-fit: cover; }
.g137-carousel-dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}
.g137-carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: background 0.3s;
}
.g137-dot-active { background: var(--g137-primary); }

/* Section */
.g137-section { padding: 20px 14px; }
.g137-section-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--g137-text-light);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.g137-section-title i { color: var(--g137-primary); font-size: 20px; }

/* Game Tabs */
.g137-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 14px;
  -webkit-overflow-scrolling: touch;
}
.g137-tab-btn {
  padding: 8px 14px;
  border: 1.5px solid var(--g137-border);
  border-radius: 20px;
  background: transparent;
  color: var(--g137-text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s;
}
.g137-tab-active {
  background: var(--g137-primary);
  color: var(--g137-dark);
  border-color: var(--g137-primary);
}

/* Game Grid */
.g137-game-panel { display: none; }
.g137-panel-active { display: block; }
.g137-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.g137-game-card {
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s;
}
.g137-game-card:hover { transform: translateY(-3px); }
.g137-game-card img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 12px;
  margin-bottom: 4px;
  border: 2px solid var(--g137-border);
  transition: border-color 0.2s;
}
.g137-game-card:hover img { border-color: var(--g137-primary); }
.g137-game-card span {
  font-size: 10px;
  color: var(--g137-text);
  display: block;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Promo Banner */
.g137-promo-banner {
  background: linear-gradient(135deg, var(--g137-bg-light), var(--g137-dark));
  border: 1px solid var(--g137-border);
  border-radius: var(--g137-radius);
  padding: 16px;
  text-align: center;
  margin: 14px 0;
}
.g137-promo-banner h3 { color: var(--g137-primary); font-size: 16px; margin-bottom: 8px; }
.g137-promo-banner p { color: var(--g137-text); font-size: 13px; margin-bottom: 12px; }

/* Why Choose */
.g137-features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.g137-feature-card {
  background: var(--g137-bg-light);
  border: 1px solid var(--g137-border);
  border-radius: var(--g137-radius);
  padding: 14px 10px;
  text-align: center;
}
.g137-feature-card i { font-size: 28px; color: var(--g137-primary); margin-bottom: 8px; display: block; }
.g137-feature-card h4 { color: var(--g137-text-light); font-size: 13px; margin-bottom: 4px; }
.g137-feature-card p { color: var(--g137-text); font-size: 11px; line-height: 1.4; }

/* Content Blocks */
.g137-content-block {
  background: var(--g137-bg-light);
  border: 1px solid var(--g137-border);
  border-radius: var(--g137-radius);
  padding: 18px 14px;
  margin-bottom: 14px;
}
.g137-content-block h2 {
  color: var(--g137-primary);
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 10px;
}
.g137-content-block h3 {
  color: var(--g137-text-light);
  font-size: 15px;
  font-weight: 600;
  margin: 12px 0 6px;
}
.g137-content-block p { color: var(--g137-text); font-size: 13px; margin-bottom: 8px; line-height: 1.6; }
.g137-content-block ul { padding-left: 16px; }
.g137-content-block li { color: var(--g137-text); font-size: 13px; margin-bottom: 4px; list-style: disc; }

/* Footer */
.g137-footer {
  background: var(--g137-dark);
  padding: 24px 14px;
  border-top: 1px solid var(--g137-border);
  text-align: center;
}
.g137-footer-brand { color: var(--g137-primary); font-size: 20px; font-weight: 800; margin-bottom: 12px; }
.g137-footer-promos { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 14px; }
.g137-footer-promos .g137-btn { font-size: 11px; padding: 6px 12px; }
.g137-footer-links { display: flex; flex-wrap: wrap; gap: 8px 14px; justify-content: center; margin-bottom: 12px; }
.g137-footer-links a { color: var(--g137-text); font-size: 12px; }
.g137-footer-links a:hover { color: var(--g137-primary); }
.g137-footer-copy { color: #666; font-size: 11px; margin-top: 8px; }
.g137-partner-logos { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 14px; }
.g137-partner-logos img { width: 48px; height: 48px; border-radius: 8px; opacity: 0.7; }

/* Bottom Nav */
.g137-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: 60px;
  background: var(--g137-dark);
  border-top: 1.5px solid var(--g137-primary);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 1000;
  padding: 0 4px;
}
.g137-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  min-height: 56px;
  background: none;
  border: none;
  color: var(--g137-text);
  cursor: pointer;
  gap: 2px;
  transition: all 0.2s;
  padding: 4px;
}
.g137-nav-btn i, .g137-nav-btn .material-icons { font-size: 22px; }
.g137-nav-btn span { font-size: 10px; }
.g137-nav-btn:hover, .g137-nav-btn.g137-nav-active { color: var(--g137-primary); }
.g137-nav-btn:hover i, .g137-nav-btn.g137-nav-active i,
.g137-nav-btn:hover .material-icons, .g137-nav-btn.g137-nav-active .material-icons {
  color: var(--g137-primary);
  transform: scale(1.1);
}

/* Desktop: hide bottom nav */
@media (min-width: 769px) {
  .g137-bottom-nav { display: none; }
}

/* Help page styles */
.g137-help-hero {
  background: linear-gradient(135deg, var(--g137-bg-light), var(--g137-dark));
  padding: 24px 14px 20px;
  text-align: center;
}
.g137-help-hero h1 { color: var(--g137-primary); font-size: 22px; margin-bottom: 6px; }
.g137-help-hero p { color: var(--g137-text); font-size: 13px; }
.g137-step-list { counter-reset: step-counter; }
.g137-step-item {
  counter-increment: step-counter;
  padding: 12px 14px 12px 48px;
  position: relative;
  margin-bottom: 10px;
  background: var(--g137-bg-light);
  border-radius: var(--g137-radius);
  border-left: 3px solid var(--g137-primary);
}
.g137-step-item::before {
  content: counter(step-counter);
  position: absolute;
  left: 12px;
  top: 12px;
  width: 26px;
  height: 26px;
  background: var(--g137-primary);
  color: var(--g137-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
}
.g137-step-item h4 { color: var(--g137-text-light); font-size: 14px; margin-bottom: 4px; }
.g137-step-item p { color: var(--g137-text); font-size: 12px; }

/* FAQ Accordion */
.g137-faq-item { margin-bottom: 8px; border: 1px solid var(--g137-border); border-radius: var(--g137-radius); overflow: hidden; }
.g137-faq-q {
  padding: 12px 14px;
  background: var(--g137-bg-light);
  color: var(--g137-text-light);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.g137-faq-a { padding: 0 14px; max-height: 0; overflow: hidden; transition: all 0.3s ease; }
.g137-faq-a p { color: var(--g137-text); font-size: 12px; padding: 10px 0; }

/* Utility */
.g137-text-center { text-align: center; }
.g137-mt-10 { margin-top: 10px; }
.g137-mb-10 { margin-bottom: 10px; }
.g137-hidden { display: none; }
