/* ============================================================
   Sinag Philippines - Core stylesheet (basefiles)
   All custom classes use the g864- prefix for isolation.
   Palette: #0A0A0A / #00FA9A / #20B2AA / #008000 / #778899
   Mobile-first, max 430px primary layout.
   ============================================================ */

:root {
  --g864-bg: #0A0A0A;
  --g864-bg-alt: #121417;
  --g864-primary: #00FA9A;
  --g864-secondary: #20B2AA;
  --g864-accent: #008000;
  --g864-muted: #778899;
  --g864-text: #F2F4F0;
  --g864-text-dim: #B8BFC6;
  --g864-border: rgba(0, 250, 154, 0.18);
  --g864-shadow: 0 4px 24px rgba(0, 0, 0, 0.55);
  --g864-radius: 12px;
  --g864-radius-lg: 18px;
  --g864-max-w: 430px;
  --g864-font: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 62.5%; scroll-behavior: smooth; }

body {
  background: var(--g864-bg);
  color: var(--g864-text);
  font-family: var(--g864-font);
  font-size: 1.5rem;
  line-height: 1.5rem;
  min-height: 100vh;
  overflow-x: hidden;
}
body.g864-no-scroll { overflow: hidden; }

a { color: var(--g864-primary); text-decoration: none; }
a:hover { color: var(--g864-secondary); text-decoration: underline; }
img { max-width: 100%; display: block; }

.g864-wrapper { width: 100%; max-width: var(--g864-max-w); margin: 0 auto; padding: 0 1.2rem; }
.g864-container { width: 100%; padding: 1.2rem; }

/* ---------------- Header ---------------- */
.g864-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: linear-gradient(180deg, rgba(10,10,10,0.96) 0%, rgba(10,10,10,0.85) 100%);
  border-bottom: 1px solid var(--g864-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.g864-header-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.6rem 1rem; max-width: var(--g864-max-w); margin: 0 auto; gap: 0.8rem;
}
.g864-brand { display: flex; align-items: center; gap: 0.6rem; flex: 1; min-width: 0; }
.g864-brand img { width: 28px; height: 28px; border-radius: 6px; box-shadow: 0 0 8px rgba(0,250,154,0.4); }
.g864-brand-name {
  font-size: 1.5rem; font-weight: 700; color: var(--g864-primary);
  letter-spacing: 0.3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.g864-header-actions { display: flex; gap: 0.5rem; align-items: center; }

.g864-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  min-height: 36px; padding: 0 1rem; border-radius: 20px;
  font-size: 1.3rem; font-weight: 700; border: none; cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.g864-btn:active { transform: scale(0.96); }
.g864-btn-login { background: transparent; color: var(--g864-text); border: 1px solid var(--g864-border); }
.g864-btn-register {
  background: linear-gradient(135deg, var(--g864-primary), var(--g864-secondary));
  color: #06160F; box-shadow: 0 4px 14px rgba(0, 250, 154, 0.35);
}
.g864-btn-register:hover { color: #06160F; text-decoration: none; }

.g864-menu-toggle {
  background: transparent; border: 1px solid var(--g864-border); color: var(--g864-primary);
  width: 36px; height: 36px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}

/* Expandable mobile menu */
.g864-mobile-menu {
  max-height: 0; overflow: hidden; transition: max-height 0.32s ease;
  background: rgba(10,10,10,0.98); border-top: 1px solid var(--g864-border);
}
.g864-mobile-menu.g864-active { max-height: 520px; }
.g864-mobile-menu-inner {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem;
  padding: 1rem; max-width: var(--g864-max-w); margin: 0 auto;
}
.g864-mobile-menu a {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.8rem 1rem; border-radius: 10px;
  background: rgba(255,255,255,0.04); color: var(--g864-text);
  font-size: 1.3rem; border: 1px solid var(--g864-border);
}
.g864-mobile-menu a:hover { background: rgba(0,250,154,0.12); text-decoration: none; color: var(--g864-primary); }

/* ---------------- Main ---------------- */
.g864-main { padding-top: 64px; padding-bottom: 80px; }

/* ---------------- Carousel ---------------- */
.g864-carousel {
  position: relative; border-radius: var(--g864-radius-lg);
  overflow: hidden; margin: 1rem 0; box-shadow: var(--g864-shadow);
}
.g864-carousel-track { position: relative; height: 180px; }
.g864-carousel-slide {
  position: absolute; inset: 0; opacity: 0;
  transition: opacity 0.6s ease; cursor: pointer;
}
.g864-carousel-slide.g864-active { opacity: 1; }
.g864-carousel-slide img { width: 100%; height: 100%; object-fit: cover; }
.g864-carousel-slide::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,10,10,0) 50%, rgba(10,10,10,0.65) 100%);
}
.g864-carousel-caption {
  position: absolute; bottom: 12px; left: 12px; right: 12px;
  color: #fff; font-size: 1.3rem; font-weight: 600; z-index: 2;
}
.g864-carousel-dots {
  position: absolute; bottom: 8px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 6px; z-index: 3;
}
.g864-carousel-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,0.4); border: none; cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.g864-carousel-dot.g864-active { background: var(--g864-primary); transform: scale(1.3); }

/* ---------------- Hero / H1 ---------------- */
.g864-hero { padding: 1.4rem 1.2rem 0.6rem; text-align: center; }
.g864-hero h1 {
  font-size: 2.1rem; line-height: 2.6rem;
  color: var(--g864-primary); font-weight: 800; margin-bottom: 0.8rem;
}
.g864-hero p { color: var(--g864-text-dim); font-size: 1.35rem; line-height: 2rem; margin-bottom: 1rem; }

.g864-cta-row {
  display: flex; gap: 0.6rem; justify-content: center;
  margin: 1rem 0 0.4rem; flex-wrap: wrap;
}
.g864-cta-primary, .g864-cta-secondary {
  padding: 0.8rem 1.6rem; border-radius: 24px;
  font-weight: 700; font-size: 1.4rem; cursor: pointer;
  display: inline-flex; align-items: center; gap: 0.4rem;
}
.g864-cta-primary {
  background: linear-gradient(135deg, var(--g864-primary), var(--g864-secondary));
  color: #06160F; border: none; box-shadow: 0 6px 18px rgba(0,250,154,0.35);
}
.g864-cta-secondary {
  background: transparent; color: var(--g864-primary);
  border: 1px solid var(--g864-border); text-decoration: none;
}

/* ---------------- Section heading ---------------- */
.g864-section { padding: 1.6rem 1.2rem; }
.g864-section-title {
  display: flex; align-items: center; gap: 0.6rem;
  font-size: 1.7rem; font-weight: 700; color: var(--g864-primary);
  margin-bottom: 1rem; border-left: 4px solid var(--g864-primary); padding-left: 0.8rem;
}
.g864-section-title i { font-size: 2rem; }
.g864-section-sub { color: var(--g864-text-dim); font-size: 1.3rem; margin-bottom: 1rem; line-height: 2rem; }

/* ---------------- Category filter pills ---------------- */
.g864-filter-bar {
  display: flex; gap: 0.5rem; overflow-x: auto;
  padding: 0.4rem 0 0.8rem; scrollbar-width: none;
}
.g864-filter-bar::-webkit-scrollbar { display: none; }
.g864-filter-btn {
  flex: 0 0 auto; background: rgba(255,255,255,0.04); color: var(--g864-text-dim);
  border: 1px solid var(--g864-border); padding: 0.5rem 1rem;
  border-radius: 18px; font-size: 1.2rem; cursor: pointer; white-space: nowrap;
}
.g864-filter-btn.g864-active {
  background: linear-gradient(135deg, var(--g864-primary), var(--g864-secondary));
  color: #06160F; border-color: transparent; font-weight: 700;
}

/* ---------------- Game grid ---------------- */
.g864-game-section { margin-bottom: 1.6rem; }
.g864-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem; }
.g864-card {
  background: var(--g864-bg-alt); border-radius: var(--g864-radius);
  overflow: hidden; border: 1px solid var(--g864-border); cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease; text-align: center;
}
.g864-card:hover, .g864-card:active {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,250,154,0.22);
  border-color: var(--g864-primary);
}
.g864-card-img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: #1a1d22; }
.g864-card-name {
  padding: 0.5rem 0.4rem; font-size: 1.1rem; color: var(--g864-text);
  font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---------------- Content modules ---------------- */
.g864-module {
  background: var(--g864-bg-alt); border-radius: var(--g864-radius-lg);
  padding: 1.4rem; margin: 1rem 0; border: 1px solid var(--g864-border);
}
.g864-module h2 {
  color: var(--g864-primary); font-size: 1.6rem; font-weight: 700;
  margin-bottom: 0.8rem; display: flex; align-items: center; gap: 0.5rem;
}
.g864-module h3 { color: var(--g864-secondary); font-size: 1.4rem; font-weight: 600; margin: 0.8rem 0 0.4rem; }
.g864-module p { color: var(--g864-text-dim); font-size: 1.3rem; line-height: 2rem; margin-bottom: 0.6rem; }
.g864-module ul, .g864-module ol {
  padding-left: 1.4rem; color: var(--g864-text-dim);
  font-size: 1.3rem; line-height: 2rem; margin-bottom: 0.6rem;
}
.g864-module li { margin-bottom: 0.4rem; }
.g864-text-link { color: var(--g864-primary); font-weight: 600; text-decoration: underline; }

/* FAQ / Testimonials / Winners / Payment */
.g864-faq-item { border-bottom: 1px dashed var(--g864-border); padding: 0.8rem 0; }
.g864-faq-item h3 { margin-top: 0; }
.g864-faq-item:last-child { border-bottom: none; }

.g864-testimonial {
  background: rgba(255,255,255,0.04); border-radius: var(--g864-radius);
  padding: 1rem; margin-bottom: 0.8rem; border-left: 3px solid var(--g864-primary);
}
.g864-testimonial p { margin-bottom: 0.4rem; }
.g864-testimonial-author { color: var(--g864-primary); font-weight: 700; font-size: 1.2rem; }

.g864-pay-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.6rem; margin-top: 0.6rem; }
.g864-pay-item {
  background: rgba(255,255,255,0.04); border-radius: 8px;
  padding: 0.8rem 0.4rem; text-align: center;
  font-size: 1.1rem; color: var(--g864-text-dim); border: 1px solid var(--g864-border);
}
.g864-pay-item i { font-size: 2rem; color: var(--g864-primary); display: block; margin-bottom: 0.3rem; }

.g864-winner {
  display: flex; justify-content: space-between; padding: 0.6rem 0;
  border-bottom: 1px dashed var(--g864-border); font-size: 1.25rem;
}
.g864-winner:last-child { border: none; }
.g864-winner-name { color: var(--g864-text); font-weight: 600; }
.g864-winner-amount { color: var(--g864-primary); font-weight: 700; }

/* ---------------- Footer ---------------- */
.g864-footer {
  background: var(--g864-bg-alt); border-top: 1px solid var(--g864-border);
  padding: 1.6rem 1.2rem 2rem; margin-top: 1.6rem;
}
.g864-footer-brand { font-size: 1.3rem; color: var(--g864-text-dim); line-height: 2rem; margin-bottom: 1rem; }
.g864-footer-promos { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.8rem 0; }
.g864-footer-promos .g864-btn {
  background: rgba(0,250,154,0.1); color: var(--g864-primary);
  border: 1px solid var(--g864-border); font-size: 1.2rem; min-height: 32px; padding: 0 0.9rem;
}
.g864-footer-links { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin: 1rem 0; }
.g864-footer-links a { color: var(--g864-text-dim); font-size: 1.2rem; padding: 0.4rem 0; }
.g864-footer-links a:hover { color: var(--g864-primary); }
.g864-copyright {
  text-align: center; color: var(--g864-muted); font-size: 1.1rem;
  padding-top: 1rem; border-top: 1px solid var(--g864-border);
}

/* ---------------- Bottom nav ---------------- */
.g864-bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; height: 62px;
  background: linear-gradient(180deg, rgba(18,20,23,0.98), rgba(10,10,10,1));
  border-top: 1px solid var(--g864-border);
  display: flex; justify-content: space-around; align-items: center;
  z-index: 1000; box-shadow: 0 -4px 18px rgba(0,0,0,0.5);
}
.g864-bottom-nav a {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
  color: var(--g864-text-dim); font-size: 1.05rem; text-decoration: none;
  padding: 4px 0; min-width: 60px; min-height: 60px; position: relative;
  transition: color 0.18s ease, transform 0.18s ease;
}
.g864-bottom-nav a i { font-size: 22px; }
.g864-bottom-nav a:hover, .g864-bottom-nav a:focus {
  color: var(--g864-primary); text-decoration: none; transform: translateY(-2px);
}
.g864-bottom-nav a.g864-current { color: var(--g864-primary); }
.g864-bottom-nav a.g864-current::before {
  content: ""; position: absolute; top: 0; left: 25%; right: 25%;
  height: 3px; background: var(--g864-primary); border-radius: 0 0 6px 6px;
}
.g864-bottom-nav .g864-nav-badge {
  position: absolute; top: 6px; right: 22%;
  background: #FF3B30; color: #fff; font-size: 9px;
  padding: 1px 5px; border-radius: 8px; font-weight: 700;
}

/* Back-to-top floating button */
.g864-back-top {
  position: fixed; right: 14px; bottom: 78px;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--g864-primary); color: #06160F; border: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; cursor: pointer; opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease; z-index: 999;
}
.g864-back-top.g864-show { opacity: 1; transform: translateY(0); }

/* ---------------- Responsive ---------------- */
@media (min-width: 769px) {
  .g864-bottom-nav { display: none; }
  body { background: #07080A; }
  .g864-wrapper, .g864-header-row, .g864-mobile-menu-inner { max-width: 720px; }
  .g864-main { padding-bottom: 40px; }
}
@media (max-width: 768px) { .g864-main { padding-bottom: 88px; } }
@media (max-width: 360px) {
  .g864-grid { grid-template-columns: repeat(2, 1fr); }
  .g864-brand-name { font-size: 1.3rem; }
  .g864-pay-grid { grid-template-columns: repeat(3, 1fr); }
}
