/* =========================================================
 * 6623b.click - Shared site stylesheet (basefiles)
 * All custom class names use the "pg59-" prefix.
 * Palette: #95A5A6 | #808080 | #212F3D
 * Mobile-first layout, max wrapper width 430px.
 * Code comments are written in English per project rules.
 * ========================================================= */

:root {
  --pg59-primary: #212F3D;     /* deep slate (background) */
  --pg59-secondary: #808080;   /* neutral grey */
  --pg59-muted: #95A5A6;       /* soft grey */
  --pg59-bg: #0f1721;
  --pg59-bg-alt: #1a2735;
  --pg59-text: #f3f6f8;
  --pg59-text-dim: #c5cdd4;
  --pg59-accent: #e6b54a;      /* warm gold CTA */
  --pg59-accent-2: #d94f4f;    /* alert red */
  --pg59-border: #2a3a4d;
  --pg59-radius: 14px;
  --pg59-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
  background: var(--pg59-bg);
  color: var(--pg59-text);
  font-size: 15px;
  line-height: 1.5rem;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--pg59-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Layout containers ---------- */
.pg59-container {
  width: 100%;
  max-width: 430px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 12px;
  padding-right: 12px;
}
.pg59-wrapper {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  position: relative;
}
.pg59-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.pg59-grid-4 { grid-template-columns: repeat(4, 1fr); gap: 8px; }

/* ---------- Header ---------- */
.pg59-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--pg59-primary);
  border-bottom: 1px solid var(--pg59-border);
  box-shadow: var(--pg59-shadow);
}
.pg59-header-inner {
  max-width: 430px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  min-height: 52px;
}
.pg59-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--pg59-text);
  font-weight: 700;
  font-size: 18px;
}
.pg59-brand img { width: 28px; height: 28px; border-radius: 6px; }
.pg59-brand:hover { text-decoration: none; }
.pg59-actions { display: flex; align-items: center; gap: 8px; }
.pg59-burger {
  background: transparent;
  border: 0;
  color: var(--pg59-text);
  font-size: 22px;
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
}

/* ---------- Buttons ---------- */
.pg59-btn {
  display: inline-block;
  padding: 9px 16px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13px;
  border: 0;
  cursor: pointer;
  text-align: center;
  min-height: 40px;
  line-height: 1.2;
}
.pg59-btn:hover { text-decoration: none; transform: translateY(-1px); }
.pg59-btn-primary { background: var(--pg59-accent); color: #1a1206; }
.pg59-btn-secondary { background: transparent; color: var(--pg59-text); border: 1px solid var(--pg59-text); }
.pg59-btn-danger { background: var(--pg59-accent-2); color: #fff; }
.pg59-btn-block { display: block; width: 100%; }

/* ---------- Mobile menu drawer ---------- */
.pg59-mobile-menu {
  position: fixed;
  top: 0; right: 0;
  width: 80%; max-width: 320px;
  height: 100%;
  background: var(--pg59-bg-alt);
  border-left: 1px solid var(--pg59-border);
  transform: translateX(100%);
  transition: transform 0.25s ease;
  z-index: 9999;
  padding: 60px 16px 24px;
  overflow-y: auto;
}
body.pg59-menu-open .pg59-mobile-menu { transform: translateX(0); }
.pg59-mobile-menu a {
  display: block;
  padding: 12px 8px;
  color: var(--pg59-text);
  border-bottom: 1px solid var(--pg59-border);
  font-size: 14px;
}
.pg59-mobile-menu a:hover { background: var(--pg59-primary); text-decoration: none; }
.pg59-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 9998;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
}
body.pg59-menu-open .pg59-overlay { opacity: 1; pointer-events: auto; }

/* ---------- Page shell ---------- */
.pg59-main { padding-top: 64px; padding-bottom: 16px; }
.pg59-section { padding: 18px 0; }
.pg59-section h2 {
  font-size: 18px; margin: 0 0 10px 0; color: var(--pg59-text);
  display: flex; align-items: center; gap: 8px;
}
.pg59-section h3 { font-size: 15px; margin: 10px 0 6px; color: var(--pg59-accent); }
.pg59-section p { margin: 0 0 10px; color: var(--pg59-text-dim); }
.pg59-muted { color: var(--pg59-muted); }
.pg59-keyword { color: var(--pg59-accent); font-weight: 700; }
.pg59-text-link { color: var(--pg59-accent); font-weight: 700; }

/* ---------- Carousel ---------- */
.pg59-carousel { position: relative; overflow: hidden; border-radius: var(--pg59-radius); box-shadow: var(--pg59-shadow); }
.pg59-slide {
  display: none; cursor: pointer;
}
.pg59-slide.pg59-slide-active { display: block; }
.pg59-slide img { width: 100%; height: auto; }
.pg59-dots { display: flex; justify-content: center; gap: 6px; padding: 8px 0; }
.pg59-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--pg59-secondary); cursor: pointer; border: 0; padding: 0;
}
.pg59-dot.pg59-dot-active { background: var(--pg59-accent); }

/* ---------- Game cards ---------- */
.pg59-cat-title {
  font-size: 15px; font-weight: 700;
  margin: 14px 0 8px;
  color: var(--pg59-accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-left: 3px solid var(--pg59-accent);
  padding-left: 8px;
}
.pg59-game {
  background: var(--pg59-bg-alt);
  border: 1px solid var(--pg59-border);
  border-radius: 10px;
  overflow: hidden;
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.pg59-game:hover { transform: translateY(-2px); }
.pg59-game img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.pg59-game-name {
  font-size: 11px;
  color: var(--pg59-text-dim);
  padding: 4px 4px 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---------- Cards / generic ---------- */
.pg59-card {
  background: var(--pg59-bg-alt);
  border: 1px solid var(--pg59-border);
  border-radius: var(--pg59-radius);
  padding: 12px;
  margin-bottom: 12px;
  box-shadow: var(--pg59-shadow);
}
.pg59-card-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
}
.pg59-stat {
  background: var(--pg59-primary); border-radius: 10px; padding: 10px; text-align: center;
}
.pg59-stat-num { display: block; font-size: 18px; font-weight: 800; color: var(--pg59-accent); }
.pg59-stat-label { display: block; font-size: 11px; color: var(--pg59-text-dim); }

/* ---------- Testimonials ---------- */
.pg59-quote {
  border-left: 3px solid var(--pg59-accent);
  padding: 8px 12px;
  margin-bottom: 10px;
  background: var(--pg59-primary);
  border-radius: 0 10px 10px 0;
}
.pg59-quote p { margin: 0 0 4px; font-style: italic; }
.pg59-quote small { color: var(--pg59-muted); }

/* ---------- Payment / partner chips ---------- */
.pg59-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pg59-chip {
  background: var(--pg59-bg-alt); border: 1px solid var(--pg59-border);
  padding: 6px 10px; border-radius: 20px; font-size: 12px; color: var(--pg59-text-dim);
}

/* ---------- Footer ---------- */
.pg59-footer {
  background: var(--pg59-primary);
  border-top: 1px solid var(--pg59-border);
  padding: 18px 0 96px;
  margin-top: 20px;
}
.pg59-footer p { color: var(--pg59-text-dim); font-size: 13px; }
.pg59-footer-links {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0;
}
.pg59-footer-links a {
  flex: 1 1 45%;
  background: var(--pg59-bg-alt);
  padding: 8px; border-radius: 8px;
  text-align: center; font-size: 12px;
  color: var(--pg59-text);
}
.pg59-footer-links a:hover { background: var(--pg59-secondary); text-decoration: none; }
.pg59-copy { text-align: center; font-size: 12px; color: var(--pg59-muted); margin-top: 12px; }

/* ---------- Bottom navigation (mobile) ---------- */
.pg59-bottomnav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 62px;
  background: var(--pg59-primary);
  border-top: 1px solid var(--pg59-border);
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  z-index: 1000;
  box-shadow: 0 -4px 14px rgba(0,0,0,0.35);
}
.pg59-bottomnav a {
  flex: 1 1 0;
  min-width: 60px;
  min-height: 60px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: var(--pg59-text-dim);
  font-size: 11px;
  gap: 2px;
  transition: color 0.15s ease, transform 0.15s ease;
}
.pg59-bottomnav a i, .pg59-bottomnav a span.material-icons-outlined,
.pg59-bottomnav a ion-icon {
  font-size: 22px;
}
.pg59-bottomnav a:hover { color: var(--pg59-accent); transform: translateY(-1px); text-decoration: none; }
.pg59-bottomnav a.pg59-bottomnav-active { color: var(--pg59-accent); }
.pg59-bottomnav .pg59-bn-badge {
  position: absolute; top: 6px; right: 50%; margin-right: -22px;
  background: var(--pg59-accent-2); color: #fff;
  font-size: 9px; padding: 1px 5px; border-radius: 8px;
}

/* ---------- Bottom padding for mobile clearance ---------- */
@media (max-width: 768px) {
  main { padding-bottom: 80px; }
  .pg59-main { padding-bottom: 90px; }
}

/* ---------- Desktop: hide bottom nav, widen shell ---------- */
@media (min-width: 769px) {
  .pg59-bottomnav { display: none; }
  .pg59-burger { display: none; }
  .pg59-container, .pg59-wrapper, .pg59-header-inner { max-width: 430px; }
  .pg59-footer { padding-bottom: 28px; }
}

/* ---------- Utility ---------- */
.pg59-text-center { text-align: center; }
.pg59-mt-8 { margin-top: 8px; }
.pg59-mt-16 { margin-top: 16px; }
.pg59-hidden { display: none !important; }
