/* =========================================================
 * ph-78.homes core styles
 * All custom classes use the "g323-" prefix.
 * Mobile-first design, viewport capped at 430px.
 * Code comments in English.
 * ========================================================= */

:root {
  --g323-primary: #4682B4;     /* Steel blue */
  --g323-secondary: #5F9EA0;   /* Cadet blue */
  --g323-dark: #2C2C2C;        /* Near-black background */
  --g323-darker: #1a1a1a;
  --g323-light: #FFFFFF;
  --g323-muted: #B0BEC5;
  --g323-accent: #FFC857;      /* Warm gold accent */
  --g323-success: #2ECC71;
  --g323-danger: #E74C3C;
  --g323-radius: 12px;
  --g323-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  --g323-header-h: 56px;
  --g323-bottomnav-h: 62px;
}

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

html { font-size: 62.5%; scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: var(--g323-dark);
  color: var(--g323-light);
  line-height: 1.5rem;
  font-size: 1.5rem;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

.g323-wrapper {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  position: relative;
  min-height: 100vh;
  background: linear-gradient(180deg, #232a33 0%, var(--g323-dark) 30%, var(--g323-darker) 100%);
}

/* ---------- Header ---------- */
.g323-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--g323-header-h);
  z-index: 1000;
  background: linear-gradient(90deg, rgba(70,130,180,0.96), rgba(95,158,160,0.96));
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.35);
}

.g323-header-inner {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.g323-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--g323-light);
  font-weight: 700;
  font-size: 1.7rem;
  letter-spacing: 0.4px;
}
.g323-logo img { width: 28px; height: 28px; border-radius: 6px; }

.g323-header-actions { display: flex; align-items: center; gap: 6px; }

.g323-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  border: none;
  border-radius: 20px;
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  color: var(--g323-light);
  text-decoration: none;
}
.g323-btn:active { transform: scale(0.96); }
.g323-btn-login {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.4);
}
.g323-btn-register {
  background: linear-gradient(135deg, var(--g323-accent), #ff9d3a);
  color: var(--g323-darker);
  box-shadow: 0 3px 10px rgba(255,200,87,0.35);
}

.g323-menu-toggle {
  background: transparent;
  border: none;
  color: var(--g323-light);
  font-size: 2.2rem;
  cursor: pointer;
  padding: 4px 6px;
  line-height: 1;
}

/* ---------- Mobile menu ---------- */
.g323-mobile-menu {
  position: fixed;
  top: 0; right: -85%;
  width: 80%;
  max-width: 320px;
  height: 100vh;
  background: var(--g323-darker);
  z-index: 9999;
  padding: 70px 18px 30px;
  transition: right .3s ease;
  overflow-y: auto;
  border-left: 1px solid rgba(255,255,255,0.06);
}
.g323-mobile-menu.g323-menu-open { right: 0; }
.g323-mobile-menu a {
  display: block;
  padding: 12px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  color: var(--g323-light);
  font-size: 1.45rem;
}
.g323-mobile-menu a:hover { background: rgba(70,130,180,0.2); color: var(--g323-accent); }

.g323-menu-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9998;
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease;
}
.g323-menu-overlay.g323-menu-open { opacity: 1; pointer-events: auto; }

/* ---------- Main content ---------- */
main.g323-main { padding-top: calc(var(--g323-header-h) + 6px); padding-bottom: 20px; }

/* ---------- Hero carousel ---------- */
.g323-hero {
  position: relative;
  width: 100%;
  margin: 0 0 18px;
  border-radius: 0;
  overflow: hidden;
}
.g323-slides { position: relative; width: 100%; aspect-ratio: 16/9; }
.g323-slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity .6s ease;
  cursor: pointer;
}
.g323-slide img { width: 100%; height: 100%; object-fit: cover; }
.g323-slide.g323-slide-active { opacity: 1; }
.g323-slide-caption {
  position: absolute; left: 12px; bottom: 14px; right: 12px;
  background: linear-gradient(0deg, rgba(0,0,0,0.65), transparent);
  padding: 24px 12px 10px;
  color: var(--g323-light);
  font-weight: 700;
  font-size: 1.5rem;
}
.g323-dots {
  position: absolute; bottom: 8px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 6px;
}
.g323-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
}
.g323-dot.g323-dot-active { background: var(--g323-accent); width: 22px; border-radius: 4px; }

/* ---------- Section blocks ---------- */
.g323-section { padding: 16px 14px; }
.g323-section-alt { background: rgba(255,255,255,0.03); }

.g323-section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.g323-section-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--g323-light);
  display: flex; align-items: center; gap: 8px;
}
.g323-section-title i, .g323-section-title .material-icons,
.g323-section-title .bi { color: var(--g323-accent); font-size: 2rem; }
.g323-section-link { font-size: 1.25rem; color: var(--g323-accent); font-weight: 700; }

.g323-h1 {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.25;
  padding: 8px 14px 4px;
  background: linear-gradient(90deg, var(--g323-accent), var(--g323-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.g323-lead { padding: 0 14px 12px; color: var(--g323-muted); font-size: 1.4rem; }

/* ---------- Category chips ---------- */
.g323-chips {
  display: flex; gap: 8px;
  padding: 6px 14px 12px;
  overflow-x: auto;
  scrollbar-width: none;
}
.g323-chips::-webkit-scrollbar { display: none; }
.g323-chip {
  flex: 0 0 auto;
  padding: 6px 14px;
  border-radius: 16px;
  background: rgba(70,130,180,0.18);
  border: 1px solid rgba(70,130,180,0.4);
  color: var(--g323-light);
  font-size: 1.25rem;
  font-weight: 600;
  white-space: nowrap;
}

/* ---------- Game grid ---------- */
.g323-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 4px 14px 12px;
}
.g323-game {
  background: rgba(255,255,255,0.04);
  border-radius: var(--g323-radius);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: transform .15s ease, box-shadow .2s ease;
  border: 1px solid rgba(255,255,255,0.05);
}
.g323-game:active { transform: scale(0.96); }
.g323-game img {
  width: 100%; aspect-ratio: 1/1; object-fit: cover;
  background: #0d1117;
}
.g323-game-name {
  padding: 6px 6px 8px;
  font-size: 1.15rem;
  color: var(--g323-light);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.g323-game-badge {
  position: absolute; top: 4px; left: 4px;
  background: var(--g323-danger);
  color: #fff;
  font-size: 1rem;
  padding: 2px 6px;
  border-radius: 6px;
  font-weight: 700;
}
.g323-game-badge.g323-hot { background: linear-gradient(135deg, #ff512f, #dd2476); }
.g323-game-badge.g323-new { background: var(--g323-success); }

/* ---------- Promo cards / CTA ---------- */
.g323-cta {
  margin: 18px 14px;
  padding: 18px 16px;
  border-radius: var(--g323-radius);
  background: linear-gradient(135deg, rgba(70,130,180,0.45), rgba(95,158,160,0.45));
  border: 1px solid rgba(255,200,87,0.35);
  box-shadow: var(--g323-shadow);
  text-align: center;
}
.g323-cta h2 { font-size: 1.9rem; margin-bottom: 6px; color: var(--g323-light); }
.g323-cta p { color: var(--g323-muted); font-size: 1.3rem; margin-bottom: 12px; }
.g323-cta .g323-btn { font-size: 1.5rem; padding: 10px 26px; }

/* ---------- Feature cards ---------- */
.g323-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 4px 14px 12px;
}
.g323-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--g323-radius);
  padding: 14px 12px;
  text-align: center;
}
.g323-card i, .g323-card .material-icons, .g323-card .bi {
  font-size: 2.6rem; color: var(--g323-secondary); margin-bottom: 6px;
}
.g323-card h3 { font-size: 1.35rem; color: var(--g323-light); margin-bottom: 4px; }
.g323-card p { font-size: 1.2rem; color: var(--g323-muted); line-height: 1.35; }

/* ---------- Winners / testimonials ---------- */
.g323-list { padding: 4px 14px 12px; }
.g323-list-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
}
.g332-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--g323-primary), var(--g323-secondary));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 1.3rem;
  flex-shrink: 0;
}
.g323-list-item .g323-list-info { flex: 1; min-width: 0; }
.g323-list-item .g323-list-info strong { color: var(--g323-light); font-size: 1.3rem; }
.g323-list-item .g323-list-info span { color: var(--g323-muted); font-size: 1.15rem; display: block; }
.g323-list-item .g323-list-amount { color: var(--g323-accent); font-weight: 800; font-size: 1.35rem; }

/* ---------- RTP table ---------- */
.g323-rtp-table {
  width: 100%;
  border-collapse: collapse;
  margin: 4px 14px 12px;
  width: calc(100% - 28px);
  font-size: 1.25rem;
}
.g323-rtp-table th, .g323-rtp-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.g323-rtp-table th { color: var(--g323-accent); font-size: 1.2rem; }
.g323-rtp-table td { color: var(--g323-muted); }
.g323-rtp-table td.g323-rtp-value { color: var(--g323-success); font-weight: 700; }

/* ---------- Payment methods ---------- */
.g323-pay-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 4px 14px 12px;
}
.g323-pay {
  background: rgba(255,255,255,0.05);
  border-radius: 10px;
  padding: 10px 4px;
  text-align: center;
  font-size: 1.05rem;
  color: var(--g323-light);
}
.g323-pay i, .g323-pay .material-icons { font-size: 2.2rem; color: var(--g323-secondary); }

/* ---------- FAQ ---------- */
.g323-faq-item {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 0 14px 10px;
}
.g323-faq-item h3 { font-size: 1.35rem; color: var(--g323-accent); margin-bottom: 6px; }
.g323-faq-item p { font-size: 1.25rem; color: var(--g323-muted); }

/* ---------- SEO long text ---------- */
.g323-seo-text {
  padding: 6px 14px 16px;
  color: var(--g323-muted);
  font-size: 1.3rem;
  line-height: 1.55;
}
.g323-seo-text h2 { color: var(--g323-light); font-size: 1.7rem; margin: 14px 0 6px; }
.g323-seo-text h3 { color: var(--g323-secondary); font-size: 1.45rem; margin: 10px 0 4px; }
.g323-seo-text p { margin-bottom: 8px; }
.g323-seo-text strong { color: var(--g323-accent); }
.g323-seo-text a { color: var(--g323-secondary); text-decoration: underline; }

/* ---------- Footer ---------- */
.g323-footer {
  background: var(--g323-darker);
  padding: 22px 14px calc(var(--g323-bottomnav-h) + 24px);
  margin-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.g323-footer-brand { color: var(--g323-muted); font-size: 1.25rem; margin-bottom: 12px; line-height: 1.5; }
.g323-footer-links {
  display: flex; flex-wrap: wrap; gap: 8px 14px; margin-bottom: 12px;
}
.g323-footer-links a {
  color: var(--g323-light);
  font-size: 1.2rem;
  text-decoration: underline;
}
.g323-footer-promos {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 12px;
}
.g323-footer-copy { color: var(--g323-muted); font-size: 1.15rem; border-top: 1px solid rgba(255,255,255,0.05); padding-top: 10px; }

/* ---------- Mobile bottom nav ---------- */
.g323-bottomnav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--g323-bottomnav-h);
  background: linear-gradient(180deg, rgba(34,40,48,0.98), rgba(20,22,26,0.98));
  border-top: 1px solid rgba(70,130,180,0.35);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.g323-bottomnav-btn {
  flex: 1;
  min-width: 60px;
  min-height: 60px;
  background: transparent;
  border: none;
  color: var(--g323-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 1.05rem;
  cursor: pointer;
  position: relative;
  transition: color .2s ease, transform .15s ease;
}
.g323-bottomnav-btn i,
.g323-bottomnav-btn .material-icons,
.g323-bottomnav-btn .bi,
.g323-bottomnav-btn ion-icon {
  font-size: 22px;
}
.g323-bottomnav-btn:active { transform: scale(0.92); }
.g323-bottomnav-btn.g323-bottomnav-active { color: var(--g323-accent); }
.g323-bottomnav-btn.g323-bottomnav-active::before {
  content: "";
  position: absolute; top: 0;
  width: 32px; height: 3px;
  background: var(--g323-accent);
  border-radius: 0 0 4px 4px;
}
.g323-bottomnav-btn.g323-bottomnav-promo {
  color: var(--g323-accent);
}
.g323-bottomnav-btn.g323-bottomnav-promo ion-icon,
.g323-bottomnav-btn.g323-bottomnav-promo i { font-size: 24px; }

/* ---------- Desktop: hide bottom nav, widen wrapper ---------- */
@media (min-width: 769px) {
  .g323-bottomnav { display: none; }
  .g323-wrapper { max-width: 430px; box-shadow: 0 0 40px rgba(0,0,0,0.6); }
  main.g323-main { padding-bottom: 40px; }
}

/* Mobile padding so content clears bottom nav */
@media (max-width: 768px) {
  main.g323-main { padding-bottom: 80px; }
}

/* ---------- Utility ---------- */
.g323-text-center { text-align: center; }
.g323-mt-12 { margin-top: 12px; }
.g323-mt-16 { margin-top: 16px; }
.g323-hide-mobile { display: none; }
.g323-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  margin: 16px 14px;
}
