/* ==========================================================================
   tableplus 1 - theme.css (en-PH)
   All custom classes use the g976- prefix.
   Palette: #0F0F23 base, #FFC0CB pink, #FF5722 accent, #BAE1FF soft blue, #006400 green.
   Mobile-first, max-width 430px container.
   ========================================================================== */

:root {
  --g976-bg: #0F0F23;
  --g976-bg-2: #161635;
  --g976-bg-3: #1e1e44;
  --g976-pink: #FFC0CB;
  --g976-accent: #FF5722;
  --g976-blue: #BAE1FF;
  --g976-green: #006400;
  --g976-text: #F5F7FF;
  --g976-muted: #B4B7D6;
  --g976-border: rgba(186, 225, 255, 0.14);
  --g976-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  --g976-radius: 14px;
  --g976-radius-lg: 22px;
  --g976-max: 430px;
}

* { box-sizing: border-box; }

html { font-size: 62.5%; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: 'Segoe UI', 'Helvetica Neue', Arial, system-ui, sans-serif;
  background: radial-gradient(circle at 50% -10%, #20204d 0%, var(--g976-bg) 55%);
  color: var(--g976-text);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--g976-blue); text-decoration: none; }

.g976-wrap {
  width: 100%;
  max-width: var(--g976-max);
  margin: 0 auto;
  padding: 0 12px;
}

main { padding-bottom: 96px; }

/* ============================== Header ============================== */
.g976-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(135deg, rgba(15, 15, 35, 0.96), rgba(30, 30, 68, 0.96));
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--g976-border);
}
.g976-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  max-width: var(--g976-max);
  margin: 0 auto;
}
.g976-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--g976-text);
  font-weight: 800;
  font-size: 1.7rem;
  letter-spacing: .3px;
}
.g976-brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--g976-accent), var(--g976-pink));
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1.4rem;
  box-shadow: 0 4px 12px rgba(255, 87, 34, .45);
}
.g976-brand-name span { color: var(--g976-pink); }
.g976-header-actions { display: flex; gap: 8px; align-items: center; }
.g976-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--g976-bg-3);
  border: 1px solid var(--g976-border);
  color: var(--g976-blue);
  display: grid;
  place-items: center;
  font-size: 1.8rem;
  cursor: pointer;
}
.g976-btn {
  border: none;
  border-radius: 12px;
  padding: 9px 16px;
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.g976-btn:active { transform: scale(.96); }
.g976-btn-login {
  background: var(--g976-bg-3);
  color: var(--g976-text);
  border: 1px solid var(--g976-border);
}
.g976-btn-register {
  background: linear-gradient(135deg, var(--g976-accent), #ff8a4c);
  color: #fff;
  box-shadow: 0 6px 16px rgba(255, 87, 34, .45);
}

/* ============================== Hero ============================== */
.g976-hero {
  margin: 14px 0;
  border-radius: var(--g976-radius-lg);
  overflow: hidden;
  position: relative;
  box-shadow: var(--g976-shadow);
}
.g976-hero-track { position: relative; }
.g976-hero-slide {
  display: none;
  position: relative;
  padding: 22px 18px;
  min-height: 158px;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}
.g976-hero-slide.g976-active { display: flex; }
.g976-hero-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(15, 15, 35, .88) 30%, rgba(15, 15, 35, .25));
  z-index: 1;
}
.g976-hero-slide > * { position: relative; z-index: 2; }
.g976-hero-slide-1 { background: linear-gradient(135deg, #2a1a55, #FF5722); }
.g976-hero-slide-2 { background: linear-gradient(135deg, #006400, #143d20); }
.g976-hero-slide-3 { background: linear-gradient(135deg, #FFC0CB, #BAE1FF); color: #0F0F23; }
.g976-hero-tag {
  display: inline-block;
  background: rgba(0,0,0,.35);
  color: var(--g976-pink);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 1.1rem;
  font-weight: 700;
  width: fit-content;
}
.g976-hero-slide-3 .g976-hero-tag { background: rgba(255,255,255,.5); color: #0F0F23; }
.g976-hero-title { font-size: 2.3rem; font-weight: 900; margin: 2px 0; line-height: 1.15; }
.g976-hero-sub { font-size: 1.25rem; opacity: .92; margin: 0 0 8px; }
.g976-hero-cta {
  width: fit-content;
  background: var(--g976-pink);
  color: #0F0F23;
  font-weight: 800;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.g976-hero-dots {
  position: absolute;
  bottom: 10px;
  right: 14px;
  display: flex;
  gap: 6px;
  z-index: 3;
}
.g976-hero-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(255,255,255,.4);
}
.g976-hero-dot.g976-active { background: var(--g976-pink); width: 18px; border-radius: 999px; }

/* ============================== Quick stats ============================== */
.g976-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 12px 0 16px;
}
.g976-stat {
  background: var(--g976-bg-2);
  border: 1px solid var(--g976-border);
  border-radius: var(--g976-radius);
  padding: 12px 6px;
  text-align: center;
}
.g976-stat-num { font-size: 1.7rem; font-weight: 900; color: var(--g976-pink); }
.g976-stat-label { font-size: 1.05rem; color: var(--g976-muted); margin-top: 2px; }

/* ============================== Category chips ============================== */
.g976-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  scrollbar-width: none;
}
.g976-chips::-webkit-scrollbar { display: none; }
.g976-chip {
  flex: 0 0 auto;
  background: var(--g976-bg-2);
  border: 1px solid var(--g976-border);
  color: var(--g976-text);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 1.25rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.g976-chip.g976-active {
  background: linear-gradient(135deg, var(--g976-accent), var(--g976-pink));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(255, 87, 34, .35);
}

/* ============================== Game grid ============================== */
.g976-section { margin: 14px 0 20px; }
.g976-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.g976-section-title { font-size: 1.7rem; font-weight: 800; color: var(--g976-text); }
.g976-section-title i { color: var(--g976-pink); margin-right: 6px; }
.g976-section-link { font-size: 1.2rem; color: var(--g976-blue); }

.g976-game-panel { display: none; }
.g976-game-panel.g976-active { display: block; }

.g976-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.g976-game-card {
  background: var(--g976-bg-2);
  border: 1px solid var(--g976-border);
  border-radius: var(--g976-radius);
  overflow: hidden;
  position: relative;
  transition: transform .15s ease, box-shadow .15s ease;
}
.g976-game-card:active { transform: translateY(2px) scale(.98); }
.g976-game-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #000;
}
.g976-game-thumb img { width: 100%; height: 100%; object-fit: cover; }
.g976-game-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15,15,35,.85) 10%, transparent 60%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .15s ease;
}
.g976-game-card:hover .g976-game-overlay,
.g976-game-card:focus-within .g976-game-overlay { opacity: 1; }
.g976-play-btn {
  background: var(--g976-pink);
  color: #0F0F23;
  border: none;
  border-radius: 999px;
  padding: 6px 14px;
  font-weight: 800;
  font-size: 1.15rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.g976-game-meta {
  padding: 6px 8px 8px;
}
.g976-game-name {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--g976-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.g976-game-type {
  font-size: 1rem;
  color: var(--g976-muted);
  text-transform: capitalize;
}
.g976-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: var(--g976-accent);
  color: #fff;
  font-size: .95rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  z-index: 2;
}

/* ============================== Promo banner ============================== */
.g976-promo {
  margin: 18px 0;
  border-radius: var(--g976-radius-lg);
  padding: 18px 16px;
  background: linear-gradient(135deg, var(--g976-green), #0b5a0b);
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: var(--g976-shadow);
}
.g976-promo-title { font-size: 1.7rem; font-weight: 900; margin: 0 0 4px; }
.g976-promo-text { font-size: 1.2rem; opacity: .92; margin: 0 0 10px; }
.g976-promo-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--g976-pink);
  color: #0F0F23;
  font-weight: 800;
  padding: 9px 18px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 1.3rem;
}

/* ============================== Content blocks ============================== */
.g976-content {
  background: var(--g976-bg-2);
  border: 1px solid var(--g976-border);
  border-radius: var(--g976-radius-lg);
  padding: 16px;
  margin: 14px 0 18px;
}
.g976-content h2 {
  font-size: 1.7rem;
  margin: 0 0 8px;
  color: var(--g976-pink);
}
.g976-content h3 { font-size: 1.4rem; color: var(--g976-blue); margin: 14px 0 4px; }
.g976-content p { font-size: 1.25rem; color: var(--g976-muted); margin: 0 0 10px; }
.g976-content ul { padding-left: 18px; color: var(--g976-muted); font-size: 1.2rem; }
.g976-content a { color: var(--g976-pink); font-weight: 600; }

/* ============================== Footer ============================== */
.g976-footer {
  background: var(--g976-bg-2);
  border-top: 1px solid var(--g976-border);
  padding: 18px 12px 22px;
  margin-top: 14px;
}
.g976-footer-cols { display: grid; gap: 14px; margin-bottom: 14px; }
.g976-footer-col h4 { font-size: 1.3rem; color: var(--g976-pink); margin: 0 0 6px; }
.g976-footer-col a { display: block; font-size: 1.15rem; color: var(--g976-muted); padding: 3px 0; }
.g976-footer-col a:hover { color: var(--g976-text); }
.g976-footer-bottom {
  border-top: 1px solid var(--g976-border);
  padding-top: 10px;
  text-align: center;
  font-size: 1.1rem;
  color: var(--g976-muted);
}

/* ============================== Mobile bottom nav ============================== */
.g976-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: linear-gradient(180deg, rgba(22, 22, 53, .98), rgba(15, 15, 35, 1));
  border-top: 1px solid var(--g976-border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.g976-nav-btn {
  flex: 1;
  min-width: 60px;
  min-height: 60px;
  background: none;
  border: none;
  color: var(--g976-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: color .15s ease, transform .15s ease;
}
.g976-nav-btn i,
.g976-nav-btn span.material-icons,
.g976-nav-btn ion-icon { font-size: 22px; }
.g976-nav-btn ion-icon { font-size: 24px; }
.g976-nav-btn.g976-promo-center {
  background: linear-gradient(135deg, var(--g976-accent), var(--g976-pink));
  color: #fff;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin-top: -22px;
  box-shadow: 0 6px 18px rgba(255, 87, 34, .55);
  flex: 0 0 auto;
}
.g976-nav-btn.g976-promo-center i { font-size: 26px; }
.g976-nav-btn:active { transform: scale(.9); }
.g976-nav-btn.active { color: var(--g976-pink); }

/* ============================== Mobile menu ============================== */
.g976-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .6);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease;
  z-index: 9998;
}
.g976-menu-overlay.g976-visible { opacity: 1; visibility: visible; }
.g976-mobile-menu {
  position: fixed;
  top: 0;
  right: -86%;
  width: 86%;
  max-width: 360px;
  height: 100vh;
  background: var(--g976-bg-2);
  border-left: 1px solid var(--g976-border);
  z-index: 9999;
  padding: 16px;
  transition: right .25s ease;
  overflow-y: auto;
}
.g976-mobile-menu.g976-open { right: 0; }
.g976-menu-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--g976-border);
}
.g976-menu-head h3 { margin: 0; font-size: 1.6rem; color: var(--g976-pink); }
.g976-menu-close {
  background: var(--g976-bg-3);
  color: #fff;
  border: none;
  width: 36px; height: 36px;
  border-radius: 50%;
  font-size: 1.8rem;
  cursor: pointer;
}
.g976-menu-list { display: flex; flex-direction: column; gap: 6px; }
.g976-menu-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--g976-text);
  font-size: 1.3rem;
  background: var(--g976-bg-3);
  border: 1px solid var(--g976-border);
}
.g976-menu-list a:hover { background: var(--g976-bg-3); color: var(--g976-pink); }
.g976-menu-list a i { color: var(--g976-blue); width: 22px; }
.g976-menu-cta {
  margin-top: 14px;
  width: 100%;
  justify-content: center;
  padding: 12px;
  font-size: 1.4rem;
}

/* ============================== Toast ============================== */
.g976-toast {
  position: fixed;
  left: 50%;
  bottom: 90px;
  transform: translate(-50%, 20px);
  background: var(--g976-pink);
  color: #0F0F23;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1.2rem;
  opacity: 0;
  transition: opacity .25s ease, transform .25s ease;
  z-index: 10000;
  box-shadow: var(--g976-shadow);
}
.g976-toast.g976-visible { opacity: 1; transform: translate(-50%, 0); }

/* ============================== Desktop ============================== */
@media (min-width: 769px) {
  .g976-bottom-nav { display: none; }
  .g976-wrap { max-width: 720px; }
  .g976-grid { grid-template-columns: repeat(6, 1fr); }
  .g976-footer-cols { grid-template-columns: repeat(3, 1fr); }
  main { padding-bottom: 24px; }
}

/* Hide desktop-only elements on small screens if any added later. */
.g976-desktop-only { display: none; }
@media (min-width: 769px) { .g976-desktop-only { display: block; } }
