:root {
  --bg-deep: #0b0114;
  --bg-primary: #160324;
  --bg-card: #210635;
  --bg-surface: rgba(31, 6, 49, 0.92);
  --gold-light: #fef08a;
  --gold-main: #fbbf24;
  --gold-dark: #d97706;
  --gold-border: rgba(251, 191, 36, 0.36);
  --ruby-main: #e11d48;
  --text-white: #f8fafc;
  --text-muted: #cbd5e1;
  --text-dim: #94a3b8;
  --shadow-card: 0 14px 32px rgba(0, 0, 0, 0.6);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans Thai", "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-deep);
  color: var(--text-white);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

body {
  background:
    radial-gradient(circle at 50% 0%, rgba(225, 29, 72, 0.26) 0%, rgba(126, 34, 206, 0.2) 38%, rgba(11, 1, 20, 0) 70%),
    linear-gradient(180deg, #1d0430 0%, #10021c 45%, #090110 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: var(--gold-main);
  text-decoration: none;
  transition: all 0.18s ease;
}

a:hover {
  color: var(--gold-light);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Clean Sticky Header with Compact Flag Switcher */
.site-header {
  padding: 11px 0;
  border-bottom: 1px solid rgba(251, 191, 36, 0.22);
  background: rgba(13, 2, 23, 0.92);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 60;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.brand-link > div {
  min-width: 0;
  overflow: hidden;
}

.brand-logo-sm {
  width: 38px;
  height: 38px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 6px rgba(251, 191, 36, 0.4));
}

.brand-title {
  font-size: clamp(0.86rem, 3.6vw, 1.08rem);
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.2px;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-title span {
  color: var(--gold-main);
}

.brand-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Simple Flag Switcher */
.flag-switcher {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.flag-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 30px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(251, 191, 36, 0.28);
  color: var(--text-white);
  font-size: 1.05rem;
  line-height: 1;
}

.flag-pill:hover,
.flag-pill.active {
  background: rgba(251, 191, 36, 0.24);
  border-color: var(--gold-main);
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
}

/* b1.918kiss.com Style Launchpad Hero */
.b1-launchpad {
  padding: 22px 0 16px;
}

.b1-hub-card {
  background:
    radial-gradient(circle at 50% 0%, rgba(225, 29, 72, 0.24) 0%, rgba(45, 9, 69, 0) 60%),
    linear-gradient(180deg, rgba(42, 8, 64, 0.96) 0%, rgba(18, 3, 31, 0.98) 100%);
  border: 1.5px solid var(--gold-border);
  border-radius: 22px;
  padding: 24px 20px;
  box-shadow: var(--shadow-card);
  text-align: center;
}

.b1-app-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 18px;
}

.b1-main-icon {
  width: 112px;
  height: 112px;
  object-fit: contain;
  margin-bottom: 10px;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.75)) drop-shadow(0 0 18px rgba(251, 191, 36, 0.42));
}

.b1-version-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(11, 1, 20, 0.75);
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: var(--gold-light);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
  display: inline-block;
}

.b1-hero-h1 {
  font-size: clamp(1.38rem, 3.4vw, 2.05rem);
  font-weight: 900;
  line-height: 1.22;
  margin-bottom: 6px;
  background: linear-gradient(180deg, #ffffff 0%, #fef08a 60%, #fbbf24 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.b1-hero-sub {
  max-width: 640px;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* b1.918kiss.com Direct Action Buttons Grid (All Visible Above the Fold on Mobile!) */
.b1-actions-wrap {
  max-width: 680px;
  margin: 0 auto 18px;
}

.b1-dl-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 11px;
  margin-bottom: 12px;
}

.b1-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 16px;
  border-radius: 14px;
  font-weight: 800;
  text-align: left;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  transition: transform 0.16s ease, filter 0.16s ease, box-shadow 0.16s ease;
}

.b1-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.b1-btn.os-detected {
  border-color: #ffffff;
  box-shadow: 0 0 0 2px var(--gold-main), 0 8px 22px rgba(251, 191, 36, 0.35);
}

.b1-btn-left {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.b1-btn-left svg {
  flex-shrink: 0;
}

.b1-btn-title {
  display: block;
  font-size: 0.95rem;
  font-weight: 900;
  line-height: 1.15;
}

.b1-btn-meta {
  display: block;
  font-size: 0.73rem;
  font-weight: 600;
  opacity: 0.88;
}

.b1-btn-arrow {
  font-size: 0.82rem;
  font-weight: 900;
  padding: 4px 9px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  white-space: nowrap;
}

.btn-dl-android {
  background: linear-gradient(180deg, #22c55e 0%, #15803d 100%);
  color: #ffffff !important;
  box-shadow: 0 6px 16px rgba(21, 128, 61, 0.4);
}

.btn-dl-ios64 {
  background: linear-gradient(180deg, #fbbf24 0%, #d97706 100%);
  color: #180326 !important;
  box-shadow: 0 6px 16px rgba(217, 119, 6, 0.4);
}

.btn-dl-ios64 .b1-btn-arrow {
  background: rgba(24, 3, 38, 0.18);
  color: #180326;
}

.btn-dl-ios32 {
  background: linear-gradient(180deg, #38bdf8 0%, #0284c7 100%);
  color: #ffffff !important;
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.35);
}

.btn-dl-pc {
  background: linear-gradient(180deg, #a855f7 0%, #6b21a8 100%);
  color: #ffffff !important;
  box-shadow: 0 6px 16px rgba(107, 33, 168, 0.38);
}

/* Single Country-Matched Register / Create Account CTA */
.b1-register-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 15px 18px;
  border-radius: 14px;
  background: linear-gradient(180deg, #fb7185 0%, #e11d48 50%, #9f1239 100%);
  border: 1.5px solid var(--gold-light);
  color: #ffffff !important;
  font-size: 1rem;
  font-weight: 900;
  text-align: center;
  box-shadow: 0 8px 24px rgba(225, 29, 72, 0.48);
}

.b1-register-cta:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

.b1-register-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 7px;
}

/* Compact Free Test ID Bar */
.b1-testid-strip {
  max-width: 680px;
  margin: 0 auto;
  background: rgba(10, 1, 19, 0.85);
  border: 1px solid rgba(251, 191, 36, 0.32);
  border-radius: 14px;
  padding: 12px 15px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
}

.testid-label {
  font-size: 0.83rem;
  color: var(--gold-light);
  font-weight: 800;
}

.testid-label span {
  display: block;
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 500;
}

.testid-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.cred-chip {
  background: rgba(36, 8, 58, 0.95);
  border: 1px solid rgba(251, 191, 36, 0.38);
  border-radius: 9px;
  padding: 5px 10px;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cred-chip code {
  color: var(--gold-light);
  font-weight: 900;
  font-size: 0.88rem;
}

.copy-mini-btn {
  background: var(--gold-main);
  color: #160224;
  border: none;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.73rem;
  font-weight: 800;
  cursor: pointer;
}

.copy-mini-btn.btn-random-id {
  background: rgba(255, 255, 255, 0.12);
  color: var(--gold-light);
  border: 1px solid var(--gold-border);
}

/* Content Sections */
.section-block {
  margin-top: 22px;
  background: var(--bg-surface);
  border: 1px solid rgba(251, 191, 36, 0.26);
  border-radius: 20px;
  padding: 24px 20px;
  box-shadow: var(--shadow-card);
}

.section-eyebrow {
  display: inline-block;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: var(--gold-main);
  font-weight: 800;
  margin-bottom: 4px;
}

.section-title {
  font-size: clamp(1.22rem, 2.4vw, 1.62rem);
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 10px;
  line-height: 1.28;
}

.section-desc {
  color: var(--text-muted);
  margin-bottom: 18px;
  font-size: 0.92rem;
}

/* Installation Tabs & ENLARGED 4-Step Visual Cards */
.install-tabs-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(251, 191, 36, 0.2);
  padding-bottom: 12px;
}

.install-tab-btn {
  background: rgba(14, 2, 26, 0.85);
  border: 1px solid rgba(251, 191, 36, 0.32);
  color: var(--text-muted);
  padding: 9px 15px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 0.84rem;
  cursor: pointer;
  transition: all 0.16s ease;
}

.install-tab-btn.active,
.install-tab-btn:hover {
  background: linear-gradient(135deg, #fde047 0%, #f59e0b 100%);
  color: #140224;
  border-color: #fef08a;
}

.install-panel {
  display: none;
}

.install-panel.active {
  display: block;
}

.visual-steps-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 14px;
}

.visual-step-card {
  background: rgba(11, 2, 22, 0.9);
  border: 1.5px solid rgba(251, 191, 36, 0.32);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: left;
}

.visual-step-header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fde047, #f59e0b);
  color: #160429;
  font-weight: 900;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.visual-step-header h3 {
  font-size: 1rem;
  color: var(--gold-light);
  font-weight: 800;
  line-height: 1.25;
}

.step-img-frame {
  width: 100%;
  max-width: 290px;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid rgba(251, 191, 36, 0.42);
  background: #ffffff;
  margin: 0 auto 12px;
  cursor: zoom-in;
  position: relative;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

.step-img-frame img {
  width: 100%;
  height: auto;
  display: block;
}

.zoom-hint-pill {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(15, 3, 30, 0.88);
  border: 1px solid var(--gold-main);
  color: var(--gold-light);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  pointer-events: none;
}

.visual-step-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  width: 100%;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 14px;
}

.step-card {
  background: rgba(13, 3, 27, 0.85);
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: 14px;
  padding: 16px;
}

.step-card h3 {
  font-size: 0.98rem;
  color: var(--gold-light);
  margin: 8px 0 6px;
}

.step-card p {
  font-size: 0.86rem;
  color: var(--text-muted);
}

/* Lightbox Modal */
.img-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(5, 1, 12, 0.92);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.img-lightbox.open {
  display: flex;
}

.lightbox-inner {
  position: relative;
  max-width: 420px;
  width: 100%;
  max-height: 92vh;
  text-align: center;
}

.lightbox-inner img {
  max-height: 82vh;
  width: auto;
  margin: 0 auto;
  border-radius: 14px;
  border: 2px solid var(--gold-main);
}

.lightbox-close {
  margin-top: 10px;
  background: var(--gold-main);
  color: #140224;
  border: none;
  padding: 8px 20px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 0.86rem;
  cursor: pointer;
}

/* Popular Games Grid */
.games-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.game-card {
  background: rgba(13, 3, 26, 0.88);
  border: 1px solid rgba(251, 191, 36, 0.26);
  border-radius: 14px;
  padding: 14px;
}

.game-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 6px;
}

.game-card h3 {
  font-size: 0.94rem;
  color: #ffffff;
  font-weight: 800;
}

.rtp-pill {
  background: rgba(251, 191, 36, 0.16);
  border: 1px solid rgba(251, 191, 36, 0.38);
  color: var(--gold-light);
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  white-space: nowrap;
}

.game-card p {
  font-size: 0.81rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Info Cards & Tables */
.info-dual-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 14px;
}

.info-box {
  background: rgba(13, 3, 27, 0.85);
  border: 1px solid rgba(251, 191, 36, 0.28);
  border-radius: 16px;
  padding: 18px;
}

.info-box h3 {
  font-size: 1.06rem;
  color: var(--gold-light);
  margin-bottom: 8px;
}

.info-box p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.info-list {
  list-style: none;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.info-list li {
  padding: 6px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.info-list strong {
  color: #ffffff;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 14px;
  border-radius: 12px;
  border: 1px solid rgba(251, 191, 36, 0.26);
}

.portal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  text-align: left;
}

.portal-table th {
  background: rgba(251, 191, 36, 0.14);
  color: var(--gold-light);
  padding: 11px 14px;
  font-weight: 800;
  border-bottom: 1px solid rgba(251, 191, 36, 0.28);
}

.portal-table td {
  padding: 11px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  vertical-align: top;
}

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

.portal-table td strong {
  color: #ffffff;
}

/* FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  background: rgba(13, 3, 27, 0.85);
  border: 1px solid rgba(251, 191, 36, 0.26);
  border-radius: 13px;
  overflow: hidden;
}

.faq-item summary {
  padding: 14px 16px;
  font-weight: 800;
  font-size: 0.93rem;
  color: var(--gold-light);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

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

.faq-item summary::after {
  content: "+";
  font-size: 1.2rem;
  color: var(--gold-main);
  font-weight: 800;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-body {
  padding: 12px 16px 15px;
  color: var(--text-muted);
  font-size: 0.88rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Breadcrumb Bar for Supporting Silo Pages */
.breadcrumb-bar {
  padding: 12px 0 0;
  font-size: 0.82rem;
  color: var(--text-dim);
}

.breadcrumb-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.breadcrumb-list li + li::before {
  content: "›";
  margin-right: 6px;
  color: var(--gold-main);
}

.breadcrumb-list a {
  color: var(--gold-light);
  font-weight: 600;
}

/* Internal Link Hub Cards (Topic Cluster Navigation) */
.cluster-links-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 16px;
}

.cluster-card {
  background: rgba(12, 2, 23, 0.88);
  border: 1px solid rgba(251, 191, 36, 0.32);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.16s ease, border-color 0.16s ease;
}

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

.cluster-card h3 {
  font-size: 0.98rem;
  color: var(--gold-light);
  margin-bottom: 6px;
  font-weight: 800;
}

.cluster-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.cluster-card-link {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--gold-main);
}

/* Footer with Internal Link Silo */
.site-footer {
  margin-top: 36px;
  padding: 28px 0 22px;
  border-top: 1px solid rgba(251, 191, 36, 0.25);
  background: rgba(7, 1, 14, 0.96);
  font-size: 0.83rem;
  color: var(--text-dim);
}

.footer-silo-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 22px;
  margin-bottom: 20px;
  text-align: left;
}

.footer-col h4 {
  color: var(--gold-light);
  font-size: 0.9rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.footer-col p {
  font-size: 0.81rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 5px;
}

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

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

.footer-bottom {
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.79rem;
}

@media (max-width: 780px) {
  .b1-dl-buttons,
  .visual-steps-grid,
  .steps-grid,
  .info-dual-grid,
  .cluster-links-grid,
  .footer-silo-grid {
    grid-template-columns: 1fr;
  }
  .games-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .games-grid {
    grid-template-columns: 1fr;
  }
  .b1-hub-card {
    padding: 18px 14px;
  }
  .section-block {
    padding: 20px 14px;
  }
}
