/* ==========================================================================
   Patokbet (patokbet.io) Mobile App-Shell Design System
   Conforming to: casino-design-system & ace58-ui-guidance
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&display=swap');

:root {
  /* Dark Luxury Casino Palette */
  --bg: #2b2b2b;
  --surface: #383838;
  --surface-elevated: #444444;
  --surface-card: #343434;
  --text: #f0f0f0;
  --text-muted: #a0a0aa;
  --text-inverse: #0f172a;
  
  /* Primary & Accent Golds */
  --gold: #FFD700;
  --gold2: #FDB931;
  --gold-grad: linear-gradient(135deg, #FFD700 0%, #FDB931 100%);
  --gold-glow: rgba(255, 215, 0, 0.18);
  --gold-border: rgba(255, 215, 0, 0.35);

  /* Accents & Trust */
  --emerald: #00C853;
  --emerald-subtle: rgba(0, 200, 83, 0.15);
  --azure: #1E88E5;
  --azure-subtle: rgba(30, 136, 229, 0.15);

  /* Borders & Dividers */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.15);

  /* Typography Scale */
  --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-xs: 0.75rem;    /* 12px */
  --font-sm: 0.85rem;    /* 13.6px */
  --font-base: 0.95rem;  /* 15.2px */
  --font-md: 1.05rem;    /* 16.8px */
  --font-lg: 1.25rem;    /* 20px */
  --font-xl: 1.5rem;     /* 24px */
  --font-2xl: 1.85rem;   /* 29.6px */

  /* Radii */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Elevation */
  --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 20px rgba(255, 215, 0, 0.25);
}

/* Base Reset & Mobile Container */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: #1a1a1a;
  display: flex;
  justify-content: center;
  font-family: var(--font-family);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* Mobile App Shell Container (max-width: 430px) */
.app-shell {
  width: 100%;
  max-width: 430px;
  background: var(--bg);
  min-height: 100vh;
  padding-bottom: 85px;
  position: relative;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.95);
  display: flex;
  flex-direction: column;
}

/* Sticky Top Header */
.hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: rgba(43, 43, 43, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border-subtle);
}

.hdr .brand-link {
  display: flex;
  align-items: center;
}

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

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

/* Button Component Hierarchy */
.btn {
  background: var(--gold-grad);
  color: #000;
  padding: 9px 18px;
  border-radius: var(--radius-full);
  font-weight: 800;
  font-size: var(--font-sm);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  text-decoration: none;
  min-height: 38px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
  color: #000;
}

.btn-login {
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
}

.btn-login:hover {
  background: rgba(255, 215, 0, 0.12);
  color: #fff;
  border-color: #fff;
}

.btn-lg {
  padding: 14px 28px;
  font-size: var(--font-base);
  min-height: 48px;
  box-shadow: var(--shadow-glow);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(255, 255, 255, 0.04);
}

/* Top Notification / Ticker */
.top-notice {
  background: rgba(0, 0, 0, 0.4);
  padding: 6px 14px;
  font-size: var(--font-xs);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--border-subtle);
}

.top-notice .notice-pill {
  background: var(--emerald-subtle);
  color: var(--emerald);
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 10px;
  letter-spacing: 0.5px;
}

/* First Container: Immersive Hero with Dark Gradient Overlay */
.hero {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #1f1f1f;
}

.hero img {
  width: 100%;
  height: auto;
  aspect-ratio: 430 / 225;
  object-fit: cover;
  display: block;
}

.hero-grad {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg) 0%, rgba(43, 43, 43, 0.5) 45%, rgba(0, 0, 0, 0.25) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px 14px;
  pointer-events: none;
}

/* Main Content Area */
.main {
  padding: 0 14px;
  flex: 1;
}

/* Page Title Wrapper - Ensuring H1 is DOM First */
.page-title-wrap {
  margin: 14px 0 16px;
  text-align: center;
}

.page-title-wrap h1 {
  font-size: var(--font-xl);
  font-weight: 900;
  color: #ffffff;
  line-height: 1.25;
  margin-bottom: 6px;
}

.page-title-wrap .gold-text {
  background: var(--gold-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.page-title-wrap .eeat {
  font-size: var(--font-xs);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.page-title-wrap .tag-pill {
  display: inline-block;
  background: var(--gold-glow);
  border: 1px solid var(--gold-border);
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  margin-top: 8px;
}

/* TLDR Summary Box */
.tldr {
  background: rgba(255, 215, 0, 0.08);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-md);
  padding: 14px 14px;
  margin: 14px 0;
  font-size: var(--font-sm);
  line-height: 1.55;
  color: #e4e4e7;
}

.tldr b {
  color: var(--gold);
}

/* Sections & Typography Hierarchy */
.section {
  margin: 24px 0;
}

.section h2 {
  font-size: var(--font-lg);
  font-weight: 800;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section h3 {
  font-size: var(--font-md);
  font-weight: 700;
  margin: 16px 0 8px;
  color: #f4f4f5;
}

.section p {
  color: #d1d1d6;
  font-size: var(--font-sm);
  margin-bottom: 12px;
  line-height: 1.6;
}

/* Highlight Features List */
.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 16px 0;
}

.feat {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  gap: 12px;
  align-items: center;
  transition: border-color 0.2s;
}

.feat:hover {
  border-color: var(--gold-border);
}

.feat-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gold-glow);
  border-radius: var(--radius-sm);
  border: 1px solid var(--gold-border);
}

.feat h4 {
  font-size: var(--font-sm);
  font-weight: 700;
  color: #fff;
  margin-bottom: 2px;
}

.feat p {
  font-size: var(--font-xs);
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

/* Interactive 3x2 Grid Boxes (3 rows x 2 cols = 6 cards) */
.grid-3x2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 14px 0;
}

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

.game-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold-border);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

.game-card .badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  color: var(--gold);
  border: 1px solid var(--gold-border);
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  z-index: 2;
  letter-spacing: 0.3px;
}

.game-card .card-thumb-wrap {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #202020;
}

.game-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.game-card:hover img {
  transform: scale(1.04);
}

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

.game-card .game-title {
  font-weight: 700;
  font-size: var(--font-sm);
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.game-card .game-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

/* Dual Button Action Row on Every Placecard */
.card-actions {
  display: flex;
  gap: 6px;
}

.btn-play {
  flex: 1;
  background: var(--gold-grad);
  color: #000;
  font-size: 11px;
  font-weight: 800;
  padding: 6px 4px;
  border-radius: var(--radius-sm);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  transition: all 0.2s;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-play:hover {
  box-shadow: 0 2px 10px rgba(255, 215, 0, 0.4);
  color: #000;
}

.btn-guide {
  flex: 1;
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 4px;
  border-radius: var(--radius-sm);
  text-align: center;
  letter-spacing: 0.3px;
  transition: all 0.2s;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-guide:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(255, 215, 0, 0.08);
}

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

.pg-btn {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  color: var(--text);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-sm);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.pg-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.pg-btn.active {
  background: var(--gold-grad);
  color: #000;
  border-color: var(--gold);
  font-weight: 900;
  box-shadow: var(--shadow-glow);
}

/* Category Filter Tabs */
.cat-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.cat-tabs::-webkit-scrollbar {
  display: none;
}

.cat-tab {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: var(--font-xs);
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
}

.cat-tab.active,
.cat-tab:hover {
  background: var(--gold-glow);
  color: var(--gold);
  border-color: var(--gold-border);
}

/* Interactive Image Showcase / Inline Asset */
.img-showcase {
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: 16px 0;
  border: 1px solid var(--border-subtle);
  position: relative;
  background: #202020;
}

.img-showcase img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.img-caption {
  padding: 8px 12px;
  background: var(--surface);
  font-size: var(--font-xs);
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Conversion CTA Card */
.cta-box {
  text-align: center;
  padding: 24px 16px;
  margin: 24px 0;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(43, 43, 43, 0.9) 100%);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.cta-box h3 {
  font-size: var(--font-lg);
  color: #fff;
  margin-bottom: 6px;
}

.cta-box p {
  color: var(--text-muted);
  font-size: var(--font-xs);
  margin-bottom: 14px;
}

.cta-box .dual-cta {
  display: flex;
  gap: 8px;
  justify-content: center;
}

/* Step-by-Step Onboarding Workflow */
.steps {
  counter-reset: step-counter;
  margin: 16px 0;
}

.step {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.step::before {
  counter-increment: step-counter;
  content: counter(step-counter);
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: var(--gold-glow);
  border: 1px solid var(--gold-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: var(--font-sm);
  color: var(--gold);
}

.step-content h4 {
  font-size: var(--font-sm);
  font-weight: 700;
  color: #fff;
  margin-bottom: 2px;
}

.step-content p {
  font-size: var(--font-xs);
  color: var(--text-muted);
  margin: 0;
  line-height: 1.45;
}

/* Responsive Table */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 16px 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-xs);
  text-align: left;
  background: var(--surface);
}

th {
  background: #252525;
  color: var(--gold);
  font-weight: 800;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-subtle);
  color: #d1d1d6;
}

tr:last-child td {
  border-bottom: none;
}

/* Provider Badges Strip */
.providers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
  justify-content: center;
}

.prov-logo {
  width: 48px;
  height: 48px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-subtle);
}

.prov-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Collapsible FAQ Section */
.faq {
  margin: 12px 0;
}

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

.faq details[open] {
  border-color: var(--gold-border);
}

.faq summary {
  padding: 12px 40px 12px 14px;
  font-weight: 700;
  font-size: var(--font-sm);
  cursor: pointer;
  list-style: none;
  position: relative;
  color: #fff;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--gold);
  transition: transform 0.2s;
}

.faq details[open] summary::after {
  content: '−';
  color: #fff;
}

.faq .ans {
  padding: 0 14px 14px;
  color: var(--text-muted);
  font-size: var(--font-xs);
  line-height: 1.55;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 10px;
}

/* E-E-A-T Author & Editorial Methodology */
.eeat-box {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  margin: 20px 0;
  display: flex;
  gap: 12px;
  align-items: center;
}

.eeat-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  flex-shrink: 0;
  object-fit: cover;
}

.eeat-info h4 {
  font-size: var(--font-sm);
  font-weight: 800;
  color: #fff;
  margin-bottom: 2px;
}

.eeat-info p {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
}

/* Trust Signals Row */
.trust-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 16px 0;
  text-align: center;
}

.trust-item {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 4px;
}

.trust-item .icon {
  font-size: 1.2rem;
  display: block;
  margin-bottom: 2px;
}

.trust-item span {
  font-size: 10px;
  color: var(--text-muted);
  display: block;
  font-weight: 700;
}

/* Mandatory Compliance & Responsible Gaming Footer */
footer {
  background: #1e1e1e;
  padding: 24px 14px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-top: 1px solid var(--border-subtle);
  font-size: var(--font-xs);
  color: var(--text-muted);
}

footer .footer-logo {
  display: block;
  height: 28px;
  width: auto;
  margin: 0 auto 12px auto;
  opacity: 0.85;
}

footer .compliance-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
  font-weight: 800;
  font-size: 11px;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  margin: 0 auto 12px auto;
  text-align: center;
}

footer p {
  width: 100%;
  margin: 0 auto 8px auto;
  line-height: 1.5;
  text-align: center;
}

footer .helpline-block {
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin: 12px auto;
  font-size: 11px;
  text-align: center;
  box-sizing: border-box;
}

footer .helpline-block b {
  color: var(--gold);
}

footer .footer-links {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

footer .footer-links a {
  color: var(--text-muted);
  font-size: 11px;
}

footer .footer-links a:hover {
  color: var(--gold);
}

/* Fixed Bottom Navigation (5 Tabs: Home, Games, Bonuses, GCash, App) */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  background: rgba(43, 43, 43, 0.98);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  justify-content: space-around;
  padding: 8px 0 12px;
  z-index: 100;
  border-top: 1px solid var(--border-subtle);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
}

.ni {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  transition: color 0.2s ease;
  gap: 2px;
  flex: 1;
}

.ni.on,
.ni:hover {
  color: var(--gold);
}

.ni em {
  font-size: 1.25rem;
  font-style: normal;
  display: block;
}

/* 21+ Age Gate Modal (Uses modal-title DIV, NEVER H1-H6) */
.age-gate-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 16px;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.age-gate-modal.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.modal-dialog {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 2px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), var(--shadow-glow);
}

.modal-badge-21 {
  width: 58px;
  height: 58px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: rgba(255, 215, 0, 0.15);
  border: 2px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--gold);
}

/* Strictly a DIV with class modal-title - Zero H1-H6 */
.modal-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}

.modal-desc {
  font-size: var(--font-xs);
  color: #d1d1d6;
  line-height: 1.5;
  margin-bottom: 18px;
}

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