/* ==========================================================================
   LAKIWIN (lakiwin88.ph) - Authentic Grey Mobile App-Shell UI Design System
   Reverse-engineered from JL-Bet / Ace58 architecture with Casino Design System
   ========================================================================== */

:root {
  /* Signature Grey Casino Palette */
  --bg-backdrop: #1a1a1a;
  --bg-shell: #2b2b2b;
  --surface: #383838;
  --surface2: #444444;
  --surface-elevated: #4e4e4e;
  --border-subtle: #4a4a4a;
  --border-strong: #5a5a5a;

  /* Brand Accents & Gradients */
  --brand-gold: #FFD200;
  --brand-amber: #F59E0B;
  --gold-gradient: linear-gradient(135deg, #FFD200 0%, #F59E0B 100%);
  --cta-red: #E53E3E;
  --cta-gradient: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);

  /* Multi-Studio Badge Colorways */
  --badge-jili-bg: #E11D48;
  --badge-jili-text: #FFF1F2;
  --badge-fc-bg: #D97706;
  --badge-fc-text: #FEF3C7;
  --badge-pp-bg: #EA580C;
  --badge-pp-text: #FFEDD5;
  --badge-pg-bg: #8B5CF6;
  --badge-pg-text: #F5F3FF;
  --badge-live-bg: #2563EB;
  --badge-live-text: #EFF6FF;

  /* Typography & Contrast */
  --text-primary: #f0f0f0;
  --text-muted: #a0a0aa;
  --text-subtle: #71717a;
  --text-gold: #FFD200;
  --font-stack: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Dimensions & Radius */
  --shell-max-width: 430px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 14px;
  --radius-full: 9999px;
  --shadow-shell: 0 0 30px rgba(0, 0, 0, 0.9);
  --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 16px rgba(255, 210, 0, 0.25);
}

/* Base Reset & Desktop Backdrop */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-backdrop);
  color: var(--text-primary);
  font-family: var(--font-stack);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 0;
  margin: 0;
}

/* Centered Mobile App Shell */
.app-shell {
  width: 100%;
  max-width: var(--shell-max-width);
  min-height: 100vh;
  background-color: var(--bg-shell);
  box-shadow: var(--shadow-shell);
  position: relative;
  display: flex;
  flex-direction: column;
  padding-bottom: 75px; /* Clearance for fixed bottom-nav */
}

/* ==========================================================================
   Header & Top Announcement
   (Strictly uses <div class="hdr"> and <p>, NEVER headings)
   ========================================================================== */
.announcement-bar {
  background: #202020;
  color: var(--brand-gold);
  font-size: 11px;
  font-weight: 600;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #333333;
}

.announcement-ticker {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.hdr {
  position: sticky;
  top: 0;
  z-index: 90;
  background-color: #242424;
  border-bottom: 1px solid var(--border-subtle);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hdr-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.hdr-logo {
  height: 32px;
  width: auto;
  display: block;
}

.hdr-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-login {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-login:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: #777;
}

.btn-register {
  background: var(--gold-gradient);
  color: #12131A;
  border: none;
  padding: 7px 16px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.4);
  transition: transform 0.15s ease;
}

.btn-register:hover {
  transform: scale(1.02);
}

/* ==========================================================================
   Hero Section with Casino Ambient Layer & First DOM H1
   ========================================================================== */
.hero-container {
  position: relative;
  background-size: cover;
  background-position: center;
  padding: 24px 16px 20px;
  border-bottom: 2px solid var(--surface2);
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(43, 43, 43, 0.85) 0%, rgba(43, 43, 43, 0.98) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
}

/* STRICT DOM RULE: <h1> IS THE FIRST HEADING IN THE DOCUMENT */
h1.hero-h1 {
  font-size: 20px;
  font-weight: 900;
  line-height: 1.25;
  color: #FFFFFF;
  margin-bottom: 8px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

h1.hero-h1 span.highlight {
  color: var(--brand-gold);
}

.hero-tagline {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 16px;
}

.hero-quick-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.stat-pill {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 4px;
  text-align: center;
}

.stat-value {
  font-size: 13px;
  font-weight: 800;
  color: var(--brand-gold);
  display: block;
}

.stat-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.hero-cta-group {
  display: flex;
  gap: 10px;
}

.hero-btn-primary {
  flex: 1;
  background: var(--cta-gradient);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.hero-btn-secondary {
  flex: 1;
  background: var(--surface2);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* ==========================================================================
   Category Filter Chips
   ========================================================================== */
.filter-chips-wrapper {
  padding: 14px 14px 6px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-chips-wrapper::-webkit-scrollbar {
  display: none;
}

.chip-btn {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
}

.chip-btn.active, .chip-btn:hover {
  background: var(--gold-gradient);
  color: #12131A;
  border-color: var(--brand-gold);
}

/* ==========================================================================
   Interactive 3x2 Grid Box (3 columns x 2 rows = 6 items per page)
   ========================================================================== */
.game-section {
  padding: 10px 14px 20px;
}

.section-hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.section-title {
  font-size: 16px;
  font-weight: 800;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  gap: 6px;
}

.section-view-all {
  font-size: 11px;
  font-weight: 700;
  color: var(--brand-gold);
  text-decoration: none;
}

.grid-3x2 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.game-card {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s, border-color 0.2s;
}

.game-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand-gold);
}

.game-thumb-box {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #202020;
  overflow: hidden;
}

.game-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Multi-Studio Badge */
.studio-badge {
  position: absolute;
  top: 5px;
  left: 5px;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.badge-jili { background: var(--badge-jili-bg); color: var(--badge-jili-text); }
.badge-fc { background: var(--badge-fc-bg); color: var(--badge-fc-text); }
.badge-pp { background: var(--badge-pp-bg); color: var(--badge-pp-text); }
.badge-pg { background: var(--badge-pg-bg); color: var(--badge-pg-text); }
.badge-live { background: var(--badge-live-bg); color: var(--badge-live-text); }

.rtp-pill {
  position: absolute;
  bottom: 5px;
  right: 5px;
  background: rgba(0, 0, 0, 0.75);
  color: var(--brand-gold);
  font-size: 8px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 4px;
}

.game-info {
  padding: 6px 6px 8px;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}

.game-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 6px;
  text-align: center;
}

/* Dual Buttons per Game Tile */
.game-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.btn-play-now {
  background: var(--gold-gradient);
  color: #12131A;
  font-size: 10px;
  font-weight: 800;
  text-align: center;
  padding: 5px 0;
  border-radius: 6px;
  text-decoration: none;
  display: block;
}

.btn-read-guide {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-strong);
  font-size: 9px;
  font-weight: 600;
  text-align: center;
  padding: 4px 0;
  border-radius: 6px;
  text-decoration: none;
  display: block;
  transition: all 0.15s;
}

.btn-read-guide:hover {
  color: #FFFFFF;
  border-color: #888;
  background: rgba(255, 255, 255, 0.05);
}

/* Pagination for 3x2 Grid */
.grid-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
}

.page-btn {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.page-btn.active {
  background: var(--brand-gold);
  color: #12131A;
  border-color: var(--brand-gold);
}

/* ==========================================================================
   Deposit & Payment Bar
   ========================================================================== */
.payment-strip {
  background: var(--surface);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding: 14px;
  margin: 10px 0;
}

.payment-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  align-items: center;
}

.payment-card {
  background: var(--surface2);
  border-radius: var(--radius-sm);
  padding: 6px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.payment-logo {
  height: 22px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.payment-speed {
  font-size: 8px;
  color: var(--brand-gold);
  font-weight: 700;
  margin-top: 4px;
}

/* ==========================================================================
   Content Blocks (Articles, Guides, Tables)
   ========================================================================== */
.content-block {
  padding: 16px 14px;
}

.content-block h2 {
  font-size: 17px;
  font-weight: 800;
  color: #FFFFFF;
  margin-top: 20px;
  margin-bottom: 10px;
  border-left: 3px solid var(--brand-gold);
  padding-left: 8px;
}

.content-block h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-gold);
  margin-top: 14px;
  margin-bottom: 6px;
}

.content-block p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.content-block ul, .content-block ol {
  padding-left: 18px;
  margin-bottom: 14px;
}

.content-block li {
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.content-block a:not([style*="background-color"]) {
  color: var(--brand-gold);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 600;
}

.content-block a:not([style*="background-color"]):hover {
  color: #FFE047;
}

.content-table-wrapper {
  overflow-x: auto;
  margin: 14px 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.content-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  background: var(--surface);
}

.content-table th {
  background: #242424;
  color: var(--brand-gold);
  font-weight: 700;
  padding: 8px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.content-table td {
  padding: 8px;
  border-bottom: 1px solid #303030;
  color: var(--text-primary);
}

/* Localized Inline Image Card */
.inline-image-box {
  margin: 16px 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
}

.inline-image-box img {
  width: 100%;
  height: auto;
  display: block;
}

.inline-caption {
  font-size: 11px;
  color: var(--text-muted);
  padding: 8px 12px;
  text-align: center;
  background: #222222;
}

/* ==========================================================================
   FAQ Accordion
   ========================================================================== */
.faq-section {
  padding: 10px 14px 20px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  overflow: hidden;
}

.faq-header {
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: #FFFFFF;
}

.faq-icon {
  transition: transform 0.2s ease;
  font-size: 12px;
  color: var(--brand-gold);
}

.faq-item.open .faq-icon {
  transform: rotate(180deg);
}

.faq-body {
  display: none;
  padding: 0 14px 12px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-muted);
  border-top: 1px solid #303030;
  background: rgba(0, 0, 0, 0.15);
}

.faq-item.open .faq-body {
  display: block;
}

/* ==========================================================================
   Mandatory Responsible Gaming & Compliance Footer
   ========================================================================== */
.compliance-footer {
  background: #181818;
  border-top: 2px solid #333333;
  padding: 20px 14px 24px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-muted);
}

.age-warning-box {
  background: rgba(229, 62, 62, 0.15);
  border: 1px solid rgba(229, 62, 62, 0.4);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.age-icon {
  font-size: 24px;
  font-weight: 900;
  color: var(--cta-red);
}

.age-text {
  font-size: 11px;
  font-weight: 700;
  color: #FFFFFF;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.footer-links a {
  color: var(--brand-gold);
  text-decoration: none;
  font-weight: 600;
}

.footer-disclaimer {
  font-size: 10px;
  color: #777777;
  margin-top: 10px;
}

/* ==========================================================================
   Fixed Bottom Navigation (5 Sticky Tabs)
   ========================================================================== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--shell-max-width);
  height: 64px;
  background: rgba(30, 30, 30, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
}

.nav-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  gap: 3px;
  transition: color 0.15s;
}

.nav-tab .tab-icon {
  font-size: 18px;
}

.nav-tab.active, .nav-tab:hover {
  color: var(--brand-gold);
}

/* ==========================================================================
   21+ Age Gate Modal (No H1-H6 tags in modal)
   ========================================================================== */
.age-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.age-modal-overlay.hidden {
  display: none !important;
}

.age-modal-box {
  background: var(--bg-shell);
  border: 2px solid var(--brand-gold);
  border-radius: var(--radius-lg);
  max-width: 360px;
  width: 100%;
  padding: 24px 20px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.9);
}

.age-modal-badge {
  display: inline-block;
  background: var(--cta-red);
  color: #FFFFFF;
  font-size: 18px;
  font-weight: 900;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  margin-bottom: 12px;
}

/* Styled with <div class="modal-title">, strictly avoiding H1-H6 tags */
.modal-title {
  font-size: 18px;
  font-weight: 900;
  color: #FFFFFF;
  margin-bottom: 8px;
}

.modal-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 20px;
}

.modal-actions {
  display: flex;
  gap: 10px;
}

.btn-confirm-age {
  flex: 1;
  background: var(--gold-gradient);
  color: #12131A;
  border: none;
  font-size: 13px;
  font-weight: 800;
  padding: 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
}

.btn-exit-age {
  flex: 1;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-strong);
  font-size: 13px;
  font-weight: 700;
  padding: 12px;
  border-radius: var(--radius-md);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   Content CTA Box Styling (Dark Theme & Gold Accent)
   ========================================================================== */
.cta-box,
div[style*="background-color: #f7fafc"],
div[style*="background-color:#f7fafc"] {
  background: #383838 !important;
  background-color: #383838 !important;
  border: 1px solid rgba(255, 210, 0, 0.35) !important;
  border-radius: 12px !important;
  padding: 20px !important;
  margin: 20px 0 !important;
  text-align: center !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45) !important;
}

.cta-box p,
div[style*="background-color: #f7fafc"] p,
div[style*="background-color:#f7fafc"] p {
  color: #FFFFFF !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  margin-bottom: 14px !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7) !important;
}

/* Completely remove raw "---" horizontal rules and dividers */
hr,
.content-divider {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
}
