/* =========================================================
   King Casino Ph - core stylesheet
   Brand palette:
     #FFF176 lemon  | #0F0F23 ink    | #ADFF2F lime
     #FF8000 orange | #2E8B57 emerald
   Every custom selector uses the g332- prefix.
   ========================================================= */

:root {
  --g332-primary: #FF8000;
  --g332-secondary: #ADFF2F;
  --g332-accent: #FFF176;
  --g332-bg: #0F0F23;
  --g332-bg-soft: #161638;
  --g332-bg-card: #1d1d45;
  --g332-text: #f5f5ff;
  --g332-text-dim: #b3b3d1;
  --g332-emerald: #2E8B57;
  --g332-radius: 14px;
  --g332-shadow: 0 8px 24px rgba(0,0,0,.45);
  --g332-header-h: 60px;
  --g332-bottomnav-h: 62px;
}

* { box-sizing: border-box; }

html {
  font-size: 62.5%;          /* 1rem = 10px baseline for rem scaling */
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  background: radial-gradient(1200px 600px at 50% -10%, #20205a 0%, var(--g332-bg) 60%);
  color: var(--g332-text);
  line-height: 1.5rem;
  font-size: 1.5rem;
  overflow-x: hidden;
}

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

a { color: var(--g332-secondary); text-decoration: none; }
a:hover { color: var(--g332-accent); }

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

main { padding-bottom: 90px; }

/* ---------- Header ---------- */
.g332-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--g332-header-h);
  z-index: 1000;
  background: linear-gradient(90deg, #14143a 0%, #1f1f54 100%);
  border-bottom: 1px solid rgba(255,241,118,.15);
  transition: box-shadow .25s ease, background .25s ease;
}
.g332-header-scrolled { box-shadow: 0 4px 18px rgba(0,0,0,.55); }

.g332-header-inner {
  max-width: 430px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: 0 1rem;
}

.g332-brand { display: flex; align-items: center; gap: .6rem; flex: 1; min-width: 0; }
.g332-brand img { width: 28px; height: 28px; border-radius: 6px; }
.g332-brand-name {
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--g332-accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.g332-brand-name span { color: var(--g332-primary); }

.g332-header-btns { display: flex; gap: .5rem; align-items: center; }

.g332-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  border: 0;
  border-radius: 999px;
  padding: .7rem 1.2rem;
  font-size: 1.25rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s ease, filter .15s ease, box-shadow .15s ease;
  min-height: 36px;
  text-decoration: none;
}
.g332-btn:active { transform: scale(.95); }
.g332-btn-primary {
  background: linear-gradient(135deg, var(--g332-primary), #ff9d2f);
  color: #1a1a2e;
  box-shadow: 0 4px 12px rgba(255,128,0,.35);
}
.g332-btn-secondary {
  background: linear-gradient(135deg, var(--g332-secondary), var(--g332-emerald));
  color: #0f1a05;
  box-shadow: 0 4px 12px rgba(173,255,47,.25);
}
.g332-btn-ghost {
  background: transparent;
  border: 1px solid rgba(255,241,118,.4);
  color: var(--g332-accent);
}
.g332-btn-block { width: 100%; }

.g332-icon-btn {
  background: transparent;
  border: 0;
  color: var(--g332-accent);
  font-size: 2rem;
  cursor: pointer;
  padding: .3rem .5rem;
  border-radius: 8px;
}

/* ---------- Mobile slide menu ---------- */
.g332-mobile-menu {
  position: fixed;
  top: var(--g332-header-h);
  left: 0; right: 0;
  z-index: 9999;
  background: #12122e;
  border-bottom: 1px solid rgba(255,241,118,.18);
  max-height: 0;
  overflow: hidden;
  transition: max-height .28s ease;
}
.g332-mobile-menu.g332-menu-open { max-height: 420px; }
.g332-mobile-menu-inner {
  max-width: 430px;
  margin: 0 auto;
  padding: 1rem 1.2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .6rem;
}
.g332-mobile-menu-inner a {
  display: block;
  padding: .9rem 1rem;
  background: var(--g332-bg-card);
  border-radius: 10px;
  color: var(--g332-text);
  font-size: 1.3rem;
  font-weight: 600;
  border-left: 3px solid var(--g332-primary);
}
.g332-mobile-menu-inner a:hover { background: #26265a; color: var(--g332-accent); }

/* ---------- Hero carousel ---------- */
.g332-hero {
  margin-top: calc(var(--g332-header-h) + 1rem);
  border-radius: var(--g332-radius);
  overflow: hidden;
  box-shadow: var(--g332-shadow);
}
.g332-hero-track {
  display: flex;
  transition: transform .5s ease;
  width: 100%;
}
.g332-hero-slide {
  flex: 0 0 100%;
  position: relative;
  cursor: pointer;
}
.g332-hero-slide img { width: 100%; height: 180px; object-fit: cover; }
.g332-hero-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: .8rem 1rem;
  background: linear-gradient(to top, rgba(15,15,35,.92), transparent);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--g332-accent);
}

/* ---------- Sections ---------- */
.g332-section { margin: 2rem 0; }
.g332-section-title {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: 1.8rem;
  font-weight: 800;
  margin: 0 0 1rem;
  color: var(--g332-accent);
}
.g332-section-title i { color: var(--g332-primary); }
.g332-section-title small {
  margin-left: auto;
  font-size: 1.15rem;
  color: var(--g332-secondary);
  font-weight: 600;
}

.g332-card {
  background: var(--g332-bg-card);
  border-radius: var(--g332-radius);
  padding: 1.2rem;
  box-shadow: var(--g332-shadow);
  border: 1px solid rgba(255,255,255,.04);
}

/* ---------- Game grid ---------- */
.g332-game-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .8rem;
}
.g332-game-card {
  background: var(--g332-bg-soft);
  border-radius: 12px;
  padding: .6rem;
  text-align: center;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
  border: 1px solid rgba(173,255,47,.08);
}
.g332-game-card:active { transform: scale(.94); }
.g332-game-card img {
  width: 100%;
  height: 78px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: .4rem;
}
.g332-game-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--g332-text);
  line-height: 1.3rem;
  min-height: 2.6rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Category pills ---------- */
.g332-cat-bar {
  display: flex;
  gap: .5rem;
  overflow-x: auto;
  padding-bottom: .4rem;
  margin-bottom: .8rem;
  scrollbar-width: none;
}
.g332-cat-bar::-webkit-scrollbar { display: none; }
.g332-cat-pill {
  flex: 0 0 auto;
  padding: .5rem 1rem;
  background: var(--g332-bg-card);
  border-radius: 999px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--g332-text-dim);
  border: 1px solid rgba(255,255,255,.06);
}

/* ---------- Feature / stat tiles ---------- */
.g332-tile-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .8rem;
}
.g332-tile {
  background: var(--g332-bg-card);
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
}
.g332-tile-icon { font-size: 2.2rem; color: var(--g332-primary); margin-bottom: .4rem; }
.g332-tile-num { font-size: 1.8rem; font-weight: 800; color: var(--g332-secondary); }
.g332-tile-label { font-size: 1.1rem; color: var(--g332-text-dim); }

.g332-text-lead { color: var(--g332-text); font-size: 1.35rem; line-height: 1.7rem; }
.g332-text-dim { color: var(--g332-text-dim); }

.g332-list { padding-left: 1.2rem; color: var(--g332-text); }
.g332-list li { margin-bottom: .5rem; }

/* ---------- Testimonials ---------- */
.g332-testimonial {
  background: var(--g332-bg-soft);
  border-left: 3px solid var(--g332-secondary);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: .8rem;
}
.g332-testimonial p { margin: 0 0 .4rem; font-size: 1.2rem; }
.g332-testimonial strong { color: var(--g332-accent); }

/* ---------- Payment chips ---------- */
.g332-pay-row { display: flex; flex-wrap: wrap; gap: .6rem; }
.g332-pay-chip {
  flex: 0 0 auto;
  background: var(--g332-bg-card);
  border-radius: 10px;
  padding: .6rem 1rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--g332-text);
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}

/* ---------- Promo banner ---------- */
.g332-cta-banner {
  background: linear-gradient(135deg, var(--g332-primary) 0%, #d8550a 100%);
  color: #1a1a2e;
  border-radius: var(--g332-radius);
  padding: 1.4rem;
  text-align: center;
  box-shadow: 0 8px 20px rgba(255,128,0,.32);
}
.g332-cta-banner h3 { margin: 0 0 .4rem; font-size: 1.7rem; }
.g332-cta-banner p { margin: 0 0 1rem; font-size: 1.2rem; }

/* ---------- Footer ---------- */
.g332-footer {
  background: #0b0b1f;
  border-top: 1px solid rgba(255,241,118,.12);
  padding: 2rem 0 1rem;
  margin-top: 2.5rem;
}
.g332-footer-brand { font-size: 1.3rem; color: var(--g332-text-dim); margin-bottom: 1rem; line-height: 1.6rem; }
.g332-footer-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem;
  margin-bottom: 1rem;
}
.g332-footer-links a { font-size: 1.15rem; color: var(--g332-text); }
.g332-footer-promos {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: .8rem 0;
}
.g332-footer-promos .g332-btn { font-size: 1.1rem; padding: .5rem .9rem; }
.g332-footer-copy {
  font-size: 1.1rem;
  color: var(--g332-text-dim);
  text-align: center;
  border-top: 1px solid rgba(255,255,255,.06);
  padding-top: 1rem;
}

/* ---------- Bottom navigation ---------- */
.g332-bottomnav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--g332-bottomnav-h);
  background: linear-gradient(90deg, #0d0d24 0%, #1a1a44 100%);
  border-top: 1px solid rgba(255,241,118,.18);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 -4px 18px rgba(0,0,0,.5);
}
.g332-bottomnav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  min-height: 60px;
  color: var(--g332-text-dim);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: color .18s ease, transform .18s ease;
  position: relative;
}
.g332-bottomnav-item i,
.g332-bottomnav-item .material-icons,
.g332-bottomnav-item .ion {
  font-size: 24px;
  margin-bottom: 2px;
}
.g332-bottomnav-item:hover { color: var(--g332-accent); }
.g332-bottomnav-item:active { transform: scale(.92); }
.g332-bottomnav-active { color: var(--g332-secondary); }
.g332-bottomnav-active::after {
  content: "";
  position: absolute;
  bottom: 4px;
  width: 26px;
  height: 3px;
  border-radius: 3px;
  background: var(--g332-secondary);
}

/* ---------- Reveal animation ---------- */
.g332-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .5s ease, transform .5s ease;
}
.g332-reveal.g332-revealed { opacity: 1; transform: translateY(0); }

/* ---------- Back to top ---------- */
.g332-to-top {
  position: fixed;
  right: 1rem;
  bottom: calc(var(--g332-bottomnav-h) + 1rem);
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--g332-primary);
  color: #1a1a2e;
  border: 0;
  font-size: 1.8rem;
  font-weight: 800;
  cursor: pointer;
  z-index: 999;
  box-shadow: 0 4px 14px rgba(255,128,0,.45);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Desktop ---------- */
@media (min-width: 769px) {
  .g332-bottomnav { display: none; }
  .g332-wrapper { max-width: 760px; }
  main { padding-bottom: 2rem; }
  .g332-game-grid { grid-template-columns: repeat(6, 1fr); }
  .g332-hero-slide img { height: 320px; }
}
