/* TG777 Signature Grey Mobile App-Shell Design System (Reverse-Engineered from jl-bet.ph) */
:root {
  --shell-max-width: 430px;
  --body-bg: #1a1a1a;
  --bg: #2b2b2b;
  --surface: #383838;
  --surface2: #444444;
  --surface-elevated: #4e4e4e;
  --border-subtle: #4a4a4a;
  --border-glow: rgba(255, 215, 0, 0.4);
  
  /* Brand Accent Tokens */
  --gold-start: #FFD700;
  --gold-end: #FDB931;
  --gold-gradient: linear-gradient(135deg, #FFD700 0%, #FDB931 100%);
  --cyan-accent: #00E5FF;
  --crimson-accent: #E53935;

  /* Text Tokens */
  --text: #f0f0f0;
  --text-muted: #a0a0aa;
  --text-dark: #121212;

  /* Provider Badge Colorways */
  --badge-jili-bg: #E11D48;
  --badge-jili-accent: #F59E0B;
  --badge-fc-bg: #D97706;
  --badge-fc-accent: #059669;
  --badge-pp-bg: #EA580C;
  --badge-pp-accent: #7C3AED;
  --badge-pg-bg: #8B5CF6;
  --badge-pg-accent: #FB923C;
  --badge-live-bg: #2563EB;
  --badge-live-accent: #E2E8F0;

  /* Metrics & Dimensions */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 14px;
  --radius-full: 9999px;
  --header-height: 60px;
  --nav-height: 65px;
  --font-family: -apple-system, BlinkMacSystemFont, "Plus Jakarta Sans", "Inter", "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--body-bg);
  font-family: var(--font-family);
  color: var(--text);
  line-height: 1.6;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  margin: 0;
}

/* 430px Mobile App Shell Container */
.app-shell {
  width: 100%;
  max-width: var(--shell-max-width);
  background-color: var(--bg);
  min-height: 100vh;
  position: relative;
  box-shadow: 0 0 35px rgba(0, 0, 0, 0.95);
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  padding-bottom: calc(var(--nav-height) + 20px);
}

/* Top Notification Marquee */
.top-notice-bar {
  background: #1e1e1e;
  border-bottom: 1px solid #333333;
  padding: 6px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #ffca28;
  overflow: hidden;
  white-space: nowrap;
}
.notice-tag {
  background: #e53935;
  color: #ffffff;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  text-transform: uppercase;
}
.marquee-text {
  display: inline-block;
  animation: marquee 22s linear infinite;
}
@keyframes marquee {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* Sticky App Header (.hdr) */
.hdr {
  position: sticky;
  top: 0;
  z-index: 90;
  height: var(--header-height);
  background: rgba(43, 43, 43, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
}
.hdr-logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  gap: 8px;
}
.hdr-logo-img {
  height: 42px;
  max-width: 140px;
  object-fit: contain;
  display: block;
}
.hdr-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn-hdr-login {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border-subtle);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}
.btn-hdr-login:hover {
  background: #555555;
  color: #ffffff;
}
.btn-hdr-register {
  background: var(--gold-gradient);
  color: var(--text-dark);
  border: none;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(253, 185, 49, 0.4);
  transition: transform 0.15s ease;
}
.btn-hdr-register:active {
  transform: scale(0.96);
}

/* Page Main Body */
.shell-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Page Primary Heading Rule: <h1> MUST BE FIRST HEADING IN DOM */
.content-h1 {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.35;
  color: #ffffff;
  padding: 16px 14px 10px 14px;
  margin: 0;
  border-bottom: 2px solid var(--gold-start);
  background: var(--surface);
}

/* Hero Banner Container */
.hero-banner-container {
  position: relative;
  width: 100%;
  height: 165px;
  overflow: hidden;
  background-color: #121212;
}
.hero-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.hero-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(43,43,43,0.7) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 10px 14px;
}
.hero-pill-badge {
  align-self: flex-start;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid var(--gold-start);
  color: var(--gold-start);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.hero-title-text {
  font-size: 17px;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
  line-height: 1.3;
}

/* Dual Primary CTA Action Row */
.cta-banner-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--border-subtle);
}
.btn-cta-gold {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--gold-gradient);
  color: var(--text-dark);
  font-weight: 800;
  font-size: 14px;
  min-height: 48px;
  border-radius: var(--radius-lg);
  text-decoration: none;
  box-shadow: 0 3px 10px rgba(253, 185, 49, 0.35);
  transition: transform 0.15s ease;
}
.btn-cta-gold:hover, .btn-cta-gold:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}
.btn-cta-ghost {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border-subtle);
  font-weight: 700;
  font-size: 14px;
  min-height: 48px;
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: background 0.2s ease;
}
.btn-cta-ghost:hover {
  background: #505050;
  color: #ffffff;
}

/* In-Article Dual CTA Block & Action Buttons (Styled identically to Header Login & Register) */
.cta-dual-block {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 24px 0 20px 0;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
}
.cta-dual-block .btn-primary {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gold-gradient);
  color: var(--text-dark) !important;
  border: none;
  border-bottom: none !important;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none !important;
  box-shadow: 0 3px 10px rgba(253, 185, 49, 0.45);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  min-height: 42px;
  text-align: center;
}
.cta-dual-block .btn-primary:active {
  transform: scale(0.97);
}
.cta-dual-block .btn-secondary {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface2);
  color: #ffffff !important;
  border: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle) !important;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none !important;
  transition: all 0.2s ease;
  min-height: 42px;
  text-align: center;
}
.cta-dual-block .btn-secondary:hover {
  background: #555555;
  color: #ffffff !important;
}

/* Filter Chips (Hub Navigation) */
.filter-chips-scroll {
  display: flex;
  gap: 8px;
  overflow-x: scroll;
  overflow-y: hidden;
  padding: 12px 14px 10px 14px;
  background: #252525;
  border-bottom: 1px solid var(--border-subtle);
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  cursor: grab;
  user-select: none;
}
.filter-chips-scroll:active {
  cursor: grabbing;
}
.filter-chips-scroll::-webkit-scrollbar {
  height: 4px;
  display: block;
}
.filter-chips-scroll::-webkit-scrollbar-track {
  background: #1e1e1e;
  border-radius: 4px;
}
.filter-chips-scroll::-webkit-scrollbar-thumb {
  background: #555555;
  border-radius: 4px;
}
.filter-chips-scroll::-webkit-scrollbar-thumb:hover {
  background: var(--gold-start);
}
.filter-chip {
  padding: 7px 16px;
  border-radius: var(--radius-full);
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  flex-shrink: 0;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.filter-chip.active, .filter-chip:hover {
  background: var(--gold-start);
  color: var(--text-dark);
  border-color: var(--gold-start);
}

/* 3x2 Interactive Game Grid */
.game-grid-section {
  padding: 14px;
}
.section-subtitle-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.section-title {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 6px;
}
.badge-count {
  background: #444444;
  color: var(--gold-start);
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 10px;
}
.game-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-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.game-card:hover {
  transform: translateY(-2px);
  border-color: var(--gold-start);
}
.game-thumb-box {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #1f1f1f;
  overflow: hidden;
}
.game-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.studio-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.6);
}
.badge-jili { background: var(--badge-jili-bg); }
.badge-fc { background: var(--badge-fc-bg); }
.badge-pp { background: var(--badge-pp-bg); }
.badge-pg { background: var(--badge-pg-bg); }
.badge-live { background: var(--badge-live-bg); }

.game-info {
  padding: 6px;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}
.game-name {
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}
.game-rtp {
  font-size: 10px;
  color: #00E676;
  font-weight: 600;
  margin-bottom: 6px;
}
.game-card-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.btn-card-play {
  background: var(--gold-gradient);
  color: var(--text-dark);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  padding: 5px 0;
  border-radius: 6px;
  text-decoration: none;
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-card-guide {
  background: var(--surface2);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  font-size: 10px;
  font-weight: 600;
  text-align: center;
  padding: 4px 0;
  border-radius: 6px;
  text-decoration: none;
  min-height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-card-guide:hover {
  color: #ffffff;
  background: #505050;
}

/* Content Article Body Typography */
.article-container {
  padding: 14px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.article-container h2 {
  font-size: 17px;
  font-weight: 800;
  color: var(--gold-start);
  margin: 24px 0 12px 0;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-subtle);
  letter-spacing: -0.2px;
}
.article-container h3 {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  margin: 18px 0 8px 0;
  letter-spacing: -0.1px;
}
.article-container p {
  margin-bottom: 14px;
  color: #e2e8f0;
}
.article-container hr, .article-hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, #4a4a4a 20%, #4a4a4a 80%, transparent 100%);
  margin: 20px 0;
}
.article-container ul, .article-container ol {
  margin: 0 0 16px 20px;
  color: #e2e8f0;
}
.article-container li {
  margin-bottom: 8px;
}
.article-container a {
  color: var(--cyan-accent);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid rgba(0, 229, 255, 0.4);
  transition: all 0.15s ease;
}
.article-container a:hover {
  color: #ffffff;
  border-bottom-color: #ffffff;
}
.article-container strong {
  color: #ffffff;
  font-weight: 700;
}
.article-container table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 12px;
}
.article-container th, .article-container td {
  border: 1px solid var(--border-subtle);
  padding: 10px 8px;
  text-align: left;
}
.article-container th {
  background: var(--surface2);
  color: var(--gold-start);
  font-weight: 700;
}
.article-container td {
  background: var(--surface);
  color: #e2e8f0;
}

/* Player Testimonial & Review Card (Square Box Design) */
.review-card {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--gold-start);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin: 12px 0 16px 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.review-card:hover {
  transform: translateY(-2px);
  border-color: var(--gold-start);
}
.review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.review-stars {
  color: var(--gold-start);
  font-size: 13px;
  letter-spacing: 2px;
}
.review-author {
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
}
.review-body {
  font-size: 13px;
  color: #cbd5e1;
  line-height: 1.55;
  margin: 0 !important;
  font-style: italic;
}

/* Inline Contextual Image */
.inline-media-box {
  margin: 16px 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: #202020;
}
.inline-media-img {
  width: 100%;
  height: auto;
  display: block;
}
.inline-media-caption {
  font-size: 11px;
  color: var(--text-muted);
  padding: 6px 10px;
  background: var(--surface);
  text-align: center;
}

/* FAQ Accordion Section */
.faq-section {
  padding: 14px;
  background: var(--surface);
  margin-top: 14px;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}
.faq-item {
  border-bottom: 1px solid var(--border-subtle);
  padding: 10px 0;
}
.faq-item:last-child {
  border-bottom: none;
}
.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  cursor: pointer;
  padding: 4px 0;
}
.faq-answer {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* E-E-A-T Author & Verification Block */
.eeat-box {
  background: #252525;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  margin: 16px 14px;
  display: flex;
  gap: 12px;
  align-items: center;
}
.author-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  border: 2px solid var(--gold-start);
  background: #333333;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: var(--gold-start);
}
.author-info {
  font-size: 12px;
}
.author-name {
  font-weight: 700;
  color: #ffffff;
}
.author-role {
  color: var(--gold-start);
  font-size: 11px;
}

/* Compliance Responsible Gaming Footer */
.compliance-footer {
  background: #1c1c1c;
  padding: 16px 14px;
  font-size: 11px;
  color: #888888;
  line-height: 1.5;
  border-top: 1px solid #333333;
}
.compliance-badge-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.badge-21 {
  background: #d32f2f;
  color: #ffffff;
  font-weight: 800;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
}
.hotline-highlight {
  color: #ffb74d;
  font-weight: 700;
}
.footer-links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #2d2d2d;
}
.footer-links-row a {
  color: #aaaaaa;
  text-decoration: none;
}
.footer-links-row a:hover {
  color: #ffffff;
}

/* Fixed 5-Tab Bottom Navigation Bar (.bottom-nav) */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--shell-max-width);
  height: var(--nav-height);
  background: rgba(30, 30, 30, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid #444444;
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 100;
  box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.6);
}
.nav-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
  gap: 3px;
  flex: 1;
  height: 100%;
  transition: color 0.15s ease;
}
.nav-tab-icon {
  font-size: 18px;
  line-height: 1;
}
.nav-tab.active, .nav-tab:hover {
  color: var(--gold-start);
}
.nav-tab-promo {
  color: var(--gold-start);
  font-weight: 800;
}
.nav-tab-promo .nav-tab-icon {
  font-size: 20px;
}

/* Modal 21+ Age Gate (Crawler Safe semantic dialog / overlay) */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-overlay.active {
  display: flex;
}
.modal-card {
  background: var(--surface);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  max-width: 360px;
  width: 100%;
  padding: 20px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.8);
}
/* STRICT DOM RULE: Modal uses .modal-title, NEVER h1-h6 */
.modal-title {
  font-size: 17px;
  font-weight: 800;
  color: #ffffff;
  margin: 10px 0 6px 0;
}
.modal-text {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 18px;
  line-height: 1.5;
}
.modal-btn-row {
  display: flex;
  gap: 10px;
}
.modal-btn-confirm {
  flex: 1;
  background: var(--gold-gradient);
  color: var(--text-dark);
  font-weight: 800;
  font-size: 13px;
  padding: 10px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
}
.modal-btn-exit {
  flex: 1;
  background: var(--surface2);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  padding: 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
}
