/* ==========================================================================
   888p game - Shared stylesheet (prefix: g405-)
   Palette: #6F4E37 | #BAE1FF | #0D1117 | #EE82EE | #FFE4B5
   Mobile-first, max 430px viewport, rem units (root 62.5%).
   ========================================================================== */

:root {
  --g405-primary: #6F4E37;     /* coffee brown - brand */
  --g405-sky: #BAE1FF;         /* light sky blue */
  --g405-bg: #0D1117;          /* deep dark - background */
  --g405-magenta: #EE82EE;     /* magenta accent */
  --g405-cream: #FFE4B5;       /* warm cream highlight */
  --g405-bg-soft: #161b22;
  --g405-card: #1b2230;
  --g405-border: #2a3344;
  --g405-text: #FFE4B5;
  --g405-text-soft: #c9d3e2;
  --g405-text-muted: #8a93a5;
  --g405-success: #2ecc71;
}

* { box-sizing: border-box; }

html { font-size: 62.5%; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--g405-bg);
  color: var(--g405-text);
  font-family: "Segoe UI", "Be Vietnam Pro", Roboto, system-ui, sans-serif;
  line-height: 1.5rem;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

a { color: var(--g405-sky); text-decoration: none; }
a:hover { color: var(--g405-magenta); }
img { max-width: 100%; display: block; }

.g405-wrapper {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1.2rem;
}

/* ----------------------------- Header ----------------------------- */
.g405-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: linear-gradient(135deg, #0D1117 0%, #1b2230 60%, #2a1f1a 100%);
  border-bottom: 1px solid var(--g405-border);
  box-shadow: 0 2px 10px rgba(0,0,0,.4);
}
.g405-header-inner {
  max-width: 430px;
  margin: 0 auto;
  padding: .6rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
}
.g405-brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  min-width: 0;
}
.g405-brand img { width: 28px; height: 28px; border-radius: 6px; }
.g405-brand-name {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--g405-cream);
  white-space: nowrap;
}
.g405-brand-name span { color: var(--g405-magenta); }

.g405-header-actions {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.g405-menu-btn {
  background: transparent;
  border: 1px solid var(--g405-border);
  color: var(--g405-cream);
  width: 36px; height: 36px;
  border-radius: 8px;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.g405-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .55rem 1rem;
  border-radius: 999px;
  font-size: 1.25rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  white-space: nowrap;
  transition: transform .15s ease, box-shadow .15s ease;
  min-height: 36px;
}
.g405-btn:active { transform: scale(.96); }
.g405-btn-login {
  background: transparent;
  color: var(--g405-cream);
  border: 1px solid var(--g405-cream);
}
.g405-btn-register {
  background: linear-gradient(135deg, var(--g405-magenta), #b347b3);
  color: #fff;
  box-shadow: 0 3px 10px rgba(238,130,238,.4);
}
.g405-btn-promo {
  background: linear-gradient(135deg, var(--g405-cream), var(--g405-primary));
  color: #0D1117;
  font-weight: 800;
}

/* Expandable mobile menu */
.g405-mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
  background: #11161f;
  border-top: 1px solid var(--g405-border);
}
.g405-mobile-menu.g405-menu-open { max-height: 480px; }
.g405-mobile-menu-inner {
  max-width: 430px;
  margin: 0 auto;
  padding: .6rem 1rem 1rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem;
}
.g405-mobile-menu-inner a {
  display: block;
  padding: .7rem .8rem;
  font-size: 1.2rem;
  color: var(--g405-text-soft);
  background: var(--g405-card);
  border: 1px solid var(--g405-border);
  border-radius: 8px;
}

/* ----------------------------- Layout ----------------------------- */
.g405-main {
  padding-top: 64px; /* header clearance */
}
@media (max-width: 768px) {
  .g405-main { padding-bottom: 80px; }
}

.g405-section {
  padding: 2rem 0 1rem;
}
.g405-section-title {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--g405-cream);
  margin: 0 0 1rem;
  display: flex; align-items: center; gap: .6rem;
}
.g405-section-title i { color: var(--g405-magenta); }

.g405-card {
  background: var(--g405-card);
  border: 1px solid var(--g405-border);
  border-radius: 12px;
  padding: 1.2rem;
}

/* ----------------------------- Carousel ----------------------------- */
.g405-carousel {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  margin: 1.2rem 0 1.4rem;
  box-shadow: 0 6px 18px rgba(0,0,0,.5);
}
.g405-carousel-viewport { overflow: hidden; }
.g405-carousel-track {
  display: flex;
  transition: transform .45s ease;
}
.g405-slide {
  min-width: 100%;
  position: relative;
}
.g405-slide img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.g405-slide-cap {
  position: absolute;
  left: 1rem; right: 1rem; bottom: .8rem;
  background: rgba(13,17,23,.78);
  padding: .7rem .9rem;
  border-radius: 10px;
  font-size: 1.25rem;
  color: var(--g405-cream);
  font-weight: 700;
}
.g405-carousel-dots {
  display: flex;
  gap: .5rem;
  justify-content: center;
  padding: .5rem 0 .8rem;
}
.g405-carousel-dots span {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--g405-border);
  cursor: pointer;
}
.g405-carousel-dots span.g405-dot-active {
  background: var(--g405-magenta);
  width: 22px; border-radius: 6px;
}

/* ----------------------------- Category chips ----------------------------- */
.g405-cat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1rem;
}
.g405-cat-chips button {
  background: var(--g405-card);
  border: 1px solid var(--g405-border);
  color: var(--g405-text-soft);
  padding: .5rem .9rem;
  border-radius: 999px;
  font-size: 1.15rem;
  cursor: pointer;
}
.g405-cat-chips button i { color: var(--g405-magenta); margin-right: .3rem; }

/* ----------------------------- Game grid ----------------------------- */
.g405-game-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .7rem;
  margin-bottom: 1.6rem;
}
.g405-game-item {
  background: var(--g405-card);
  border: 1px solid var(--g405-border);
  border-radius: 10px;
  padding: .5rem;
  text-align: center;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease;
  display: block;
}
.g405-game-item:hover { border-color: var(--g405-magenta); transform: translateY(-2px); }
.g405-game-item img {
  width: 100%;
  height: 78px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: .4rem;
}
.g405-game-item span {
  display: block;
  font-size: 1.05rem;
  color: var(--g405-text-soft);
  line-height: 1.3;
  min-height: 2.6em;
  overflow: hidden;
}
.g405-flash { animation: g405-flash 1.2s ease; }
@keyframes g405-flash {
  0% { box-shadow: 0 0 0 0 rgba(238,130,238,.6); }
  50% { box-shadow: 0 0 0 8px rgba(238,130,238,0); }
  100% { box-shadow: 0 0 0 0 rgba(238,130,238,0); }
}

/* ----------------------------- Promo CTA ----------------------------- */
.g405-cta {
  background: linear-gradient(135deg, var(--g405-primary), #3a2718);
  border: 1px solid var(--g405-magenta);
  border-radius: 14px;
  padding: 1.3rem;
  text-align: center;
  margin: 1.4rem 0;
}
.g405-cta h3 { margin: 0 0 .4rem; font-size: 1.5rem; color: var(--g405-cream); }
.g405-cta p { margin: 0 0 .9rem; font-size: 1.15rem; color: var(--g405-text-soft); }

.g405-text-link {
  color: var(--g405-magenta);
  font-weight: 700;
  border-bottom: 1px dashed var(--g405-magenta);
  cursor: pointer;
}

/* ----------------------------- Info / FAQ / lists ----------------------------- */
.g405-info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: .8rem;
}
.g405-info-item {
  background: var(--g405-card);
  border-left: 4px solid var(--g405-magenta);
  border-radius: 8px;
  padding: 1rem;
}
.g405-info-item h3 { margin: 0 0 .4rem; font-size: 1.3rem; color: var(--g405-cream); }
.g405-info-item p { margin: 0; font-size: 1.15rem; color: var(--g405-text-soft); }

.g405-faq-item {
  background: var(--g405-card);
  border: 1px solid var(--g405-border);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: .7rem;
}
.g405-faq-item h3 { margin: 0 0 .4rem; font-size: 1.2rem; color: var(--g405-sky); }
.g405-faq-item p { margin: 0; font-size: 1.1rem; color: var(--g405-text-soft); }

/* ----------------------------- RTP table ----------------------------- */
.g405-rtp-table { width: 100%; border-collapse: collapse; font-size: 1.1rem; }
.g405-rtp-table th, .g405-rtp-table td {
  padding: .6rem .5rem;
  border-bottom: 1px solid var(--g405-border);
  text-align: left;
}
.g405-rtp-table th { color: var(--g405-cream); }
.g405-rtp-table td { color: var(--g405-text-soft); }
.g405-rtp-bar {
  height: 6px;
  background: var(--g405-border);
  border-radius: 4px;
  overflow: hidden;
  margin-top: .3rem;
}
.g405-rtp-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--g405-magenta), var(--g405-cream)); }

/* ----------------------------- Testimonials / winners ----------------------------- */
.g405-hlist {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .6rem;
}
.g405-mini-card {
  background: var(--g405-card);
  border: 1px solid var(--g405-border);
  border-radius: 10px;
  padding: .8rem;
  font-size: 1.1rem;
  color: var(--g405-text-soft);
}
.g405-mini-card strong { color: var(--g405-cream); display: block; margin-bottom: .2rem; }
.g405-mini-card .g405-win { color: var(--g405-success); font-weight: 800; }

/* ----------------------------- Payment / app ----------------------------- */
.g405-pay-row {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.g405-pay-row span {
  background: var(--g405-card);
  border: 1px solid var(--g405-border);
  padding: .4rem .8rem;
  border-radius: 999px;
  font-size: 1.05rem;
  color: var(--g405-text-soft);
}

.g405-app-cta {
  background: linear-gradient(135deg, var(--g405-magenta), var(--g405-primary));
  border-radius: 14px;
  padding: 1.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.4rem 0;
}
.g405-app-cta i { font-size: 3rem; color: var(--g405-cream); }
.g405-app-cta div h3 { margin: 0 0 .2rem; font-size: 1.4rem; color: #fff; }
.g405-app-cta div p { margin: 0; font-size: 1.1rem; color: var(--g405-cream); }

/* ----------------------------- Footer ----------------------------- */
.g405-footer {
  background: #070a0f;
  border-top: 1px solid var(--g405-border);
  margin-top: 2rem;
  padding: 1.6rem 0 1rem;
}
.g405-footer-inner { max-width: 430px; margin: 0 auto; padding: 0 1.2rem; }
.g405-footer p { font-size: 1.1rem; color: var(--g405-text-muted); margin: 0 0 .8rem; }
.g405-footer-promos {
  display: flex; flex-wrap: wrap; gap: .5rem; margin: .8rem 0;
}
.g405-footer-links {
  display: grid; grid-template-columns: 1fr 1fr; gap: .4rem .8rem;
  margin: .8rem 0 1rem;
}
.g405-footer-links a { font-size: 1.1rem; color: var(--g405-text-soft); }
.g405-footer-copy { font-size: 1rem; color: var(--g405-text-muted); border-top: 1px solid var(--g405-border); padding-top: .8rem; }

/* ----------------------------- Bottom nav ----------------------------- */
.g405-bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 1000;
  height: 62px;
  background: linear-gradient(180deg, #11161f, #070a0f);
  border-top: 1px solid var(--g405-border);
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  box-shadow: 0 -2px 10px rgba(0,0,0,.4);
}
.g405-bottom-nav button {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--g405-text-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  font-size: 1rem;
  min-width: 60px;
  min-height: 60px;
  transition: color .15s ease, transform .15s ease;
}
.g405-bottom-nav button i,
.g405-bottom-nav button .material-icons-outlined,
.g405-bottom-nav button ion-icon { font-size: 22px; }
.g405-bottom-nav button:active { transform: scale(.92); color: var(--g405-magenta); }
.g405-bottom-nav button.g405-nav-active { color: var(--g405-magenta); }
.g405-bottom-nav .g405-nav-promo { color: var(--g405-cream); }
@media (min-width: 769px) {
  .g405-bottom-nav { display: none; }
}
