/* ============================================================
   pinoy-time.homes - Core palette and layout stylesheet
   Mobile-first gaming canvas (320-430px).
   All custom classes use the pgc8- prefix.
   Color anchors:
     #FFEFD5 vanilla cream  -> page text / soft surface
     #262626 deep charcoal  -> page background
     #FFEB3B sun yellow     -> highlight / brand accent
     #FF7F50 coral          -> secondary action
     #FF5722 deep orange    -> primary action
   ============================================================ */

:root {
  --pgc8-bg: #262626;
  --pgc8-bg-soft: #2f2a26;
  --pgc8-bg-elev: #322c27;
  --pgc8-bg-card: #1f1b18;
  --pgc8-line: #3a342e;
  --pgc8-line-strong: #4a4239;
  --pgc8-cream: #FFEFD5;
  --pgc8-cream-dim: rgba(255, 239, 213, 0.72);
  --pgc8-cream-soft: rgba(255, 239, 213, 0.12);
  --pgc8-yellow: #FFEB3B;
  --pgc8-yellow-dim: rgba(255, 235, 59, 0.18);
  --pgc8-coral: #FF7F50;
  --pgc8-orange: #FF5722;
  --pgc8-orange-deep: #e64a1a;
  --pgc8-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
  --pgc8-shadow-soft: 0 4px 14px rgba(0, 0, 0, 0.32);
  --pgc8-radius-sm: 8px;
  --pgc8-radius: 14px;
  --pgc8-radius-lg: 20px;
  --pgc8-max-canvas: 430px;
  --pgc8-header-h: 116px;
  --pgc8-bottom-h: 70px;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", "Helvetica Neue", Roboto, Arial, system-ui, sans-serif;
  background: var(--pgc8-bg);
  color: var(--pgc8-cream);
  line-height: 1.55;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--pgc8-yellow); text-decoration: none; }
a:hover { color: var(--pgc8-coral); }
button { font-family: inherit; }

/* Mobile canvas locked to 320-430px; wider screens keep it centered. */
.pgc8-shell {
  width: 100%;
  max-width: var(--pgc8-max-canvas);
  margin: 0 auto;
  min-height: 100vh;
  background:
    radial-gradient(1200px 360px at 50% -60px, rgba(255, 87, 34, 0.18), transparent 70%),
    linear-gradient(180deg, #2b2521 0%, #262626 38%, #211d1a 100%);
  position: relative;
  box-shadow: var(--pgc8-shadow);
  padding-bottom: calc(var(--pgc8-bottom-h) + 18px);
}

/* ---------- Header (brand + action two-row arrangement) ---------- */
.pgc8-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: linear-gradient(180deg, rgba(38, 33, 28, 0.98), rgba(38, 33, 28, 0.92));
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--pgc8-line);
}

.pgc8-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px 8px;
}

.pgc8-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.pgc8-brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--pgc8-bg-card);
  border: 1px solid var(--pgc8-yellow);
  box-shadow: 0 0 0 3px rgba(255, 235, 59, 0.18);
  flex-shrink: 0;
}

.pgc8-brand-text { min-width: 0; line-height: 1.15; }
.pgc8-brand-name {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.2px;
  color: var(--pgc8-cream);
  white-space: nowrap;
}
.pgc8-brand-name span { color: var(--pgc8-yellow); }
.pgc8-brand-tag {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--pgc8-coral);
  font-weight: 700;
}

.pgc8-header-toggle {
  width: 42px;
  height: 42px;
  border: 1px solid var(--pgc8-line-strong);
  background: var(--pgc8-bg-elev);
  color: var(--pgc8-cream);
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.pgc8-header-toggle svg { width: 22px; height: 22px; }
.pgc8-header-toggle[aria-expanded="true"] {
  background: var(--pgc8-orange);
  border-color: var(--pgc8-orange);
  color: #fff;
}

/* Action row */
.pgc8-action-row {
  display: flex;
  gap: 8px;
  padding: 0 12px 10px;
}

.pgc8-btn {
  flex: 1;
  min-height: 44px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 14.5px;
  letter-spacing: 0.4px;
  border: none;
  cursor: pointer;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.pgc8-btn:active { transform: translateY(1px) scale(0.99); }

.pgc8-btn--primary {
  background: linear-gradient(135deg, var(--pgc8-orange) 0%, var(--pgc8-orange-deep) 100%);
  color: #fff;
  box-shadow: 0 6px 16px rgba(255, 87, 34, 0.36);
}
.pgc8-btn--ghost {
  background: transparent;
  color: var(--pgc8-yellow);
  border: 1.5px solid var(--pgc8-yellow);
}
.pgc8-btn--ghost:active { background: var(--pgc8-yellow-dim); }

/* ---------- Layered dropdown menu ---------- */
.pgc8-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--pgc8-bg-elev);
  border-top: 1px solid var(--pgc8-line);
  border-bottom: 1px solid var(--pgc8-line);
  padding: 10px 12px 14px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.32s ease, padding 0.32s ease;
  z-index: 55;
}
.pgc8-menu.is-open {
  max-height: 560px;
  padding: 12px 12px 16px;
  box-shadow: var(--pgc8-shadow);
}
.pgc8-menu-group { margin-top: 8px; }
.pgc8-menu-group-title {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--pgc8-coral);
  font-weight: 700;
  padding: 6px 4px 4px;
}
.pgc8-menu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}
.pgc8-menu-link {
  display: block;
  padding: 10px 12px;
  background: var(--pgc8-bg-card);
  border: 1px solid var(--pgc8-line);
  border-radius: 10px;
  color: var(--pgc8-cream);
  font-size: 13px;
  font-weight: 600;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pgc8-menu-link::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pgc8-yellow);
  flex-shrink: 0;
}
.pgc8-menu-link:active { background: var(--pgc8-bg-soft); }

.pgc8-menu-cta {
  margin-top: 12px;
  display: flex;
  gap: 8px;
}

/* ---------- Hero carousel ---------- */
.pgc8-main { padding: 14px 12px 0; }

.pgc8-hero {
  position: relative;
  border-radius: var(--pgc8-radius-lg);
  overflow: hidden;
  background: var(--pgc8-bg-card);
  box-shadow: var(--pgc8-shadow);
  border: 1px solid var(--pgc8-line);
}
.pgc8-hero-track {
  display: flex;
  transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}
.pgc8-hero-slide {
  flex: 0 0 100%;
  position: relative;
}
.pgc8-hero-slide img {
  width: 100%;
  height: 196px;
  object-fit: cover;
  filter: brightness(0.78) saturate(1.05);
}
.pgc8-hero-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 30px 14px 14px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.82));
  color: var(--pgc8-cream);
}
.pgc8-hero-title {
  font-size: 19px;
  font-weight: 800;
  margin: 0 0 4px;
  color: var(--pgc8-yellow);
  line-height: 1.2;
}
.pgc8-hero-sub {
  font-size: 12.5px;
  margin: 0 0 10px;
  color: var(--pgc8-cream-dim);
}
.pgc8-hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--pgc8-orange), var(--pgc8-orange-deep));
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(255, 87, 34, 0.42);
}
.pgc8-hero-dots {
  position: absolute;
  bottom: 8px;
  right: 12px;
  display: flex;
  gap: 5px;
}
.pgc8-hero-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 239, 213, 0.4);
  border: none;
  cursor: pointer;
  padding: 0;
}
.pgc8-hero-dot.is-active {
  background: var(--pgc8-yellow);
  width: 18px;
  border-radius: 999px;
}

/* ---------- Section primitives ---------- */
.pgc8-section { margin: 22px 0 0; }
.pgc8-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 10px;
}
.pgc8-section-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--pgc8-cream);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pgc8-section-title::before {
  content: "";
  width: 4px;
  height: 18px;
  background: linear-gradient(180deg, var(--pgc8-yellow), var(--pgc8-orange));
  border-radius: 2px;
}
.pgc8-section-link {
  font-size: 12px;
  color: var(--pgc8-yellow);
  font-weight: 700;
}

/* ---------- Game grid ---------- */
.pgc8-game-block {
  background: var(--pgc8-bg-soft);
  border: 1px solid var(--pgc8-line);
  border-radius: var(--pgc8-radius-lg);
  padding: 14px 12px 16px;
  margin-top: 14px;
}
.pgc8-game-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.pgc8-game-block-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--pgc8-yellow);
  letter-spacing: 0.3px;
  margin: 0;
}
.pgc8-game-block-meta {
  font-size: 11px;
  color: var(--pgc8-cream-dim);
  font-weight: 600;
}

.pgc8-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
@media (min-width: 360px) {
  .pgc8-game-grid { gap: 9px; }
}
@media (min-width: 400px) {
  .pgc8-game-grid { grid-template-columns: repeat(5, 1fr); }
}

.pgc8-game {
  background: var(--pgc8-bg-card);
  border: 1px solid var(--pgc8-line);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
.pgc8-game:active {
  transform: translateY(2px);
  border-color: var(--pgc8-yellow);
  box-shadow: 0 0 0 2px var(--pgc8-yellow-dim);
}
.pgc8-game-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: linear-gradient(135deg, #2a2520, #1a1613);
}
.pgc8-game-name {
  font-size: 10.5px;
  text-align: center;
  padding: 5px 4px 6px;
  color: var(--pgc8-cream-dim);
  font-weight: 600;
  line-height: 1.2;
  min-height: 28px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Promo / info cards ---------- */
.pgc8-card-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.pgc8-info-card {
  background: var(--pgc8-bg-soft);
  border: 1px solid var(--pgc8-line);
  border-radius: var(--pgc8-radius);
  padding: 14px;
}
.pgc8-info-card h3 {
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--pgc8-yellow);
}
.pgc8-info-card p {
  margin: 0;
  font-size: 12.5px;
  color: var(--pgc8-cream-dim);
}
.pgc8-info-card a { font-weight: 700; }

.pgc8-steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0;
}
.pgc8-steps li {
  counter-increment: step;
  position: relative;
  padding: 10px 12px 10px 40px;
  background: var(--pgc8-bg-card);
  border: 1px solid var(--pgc8-line);
  border-radius: 10px;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--pgc8-cream-dim);
}
.pgc8-steps li::before {
  content: counter(step);
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  background: linear-gradient(135deg, var(--pgc8-orange), var(--pgc8-orange-deep));
  color: #fff;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pgc8-prose {
  background: var(--pgc8-bg-soft);
  border: 1px solid var(--pgc8-line);
  border-radius: var(--pgc8-radius);
  padding: 16px 14px;
  font-size: 13.5px;
  color: var(--pgc8-cream-dim);
}
.pgc8-prose h2 {
  color: var(--pgc8-cream);
  font-size: 16px;
  margin: 14px 0 6px;
  font-weight: 800;
}
.pgc8-prose h2:first-child { margin-top: 0; }
.pgc8-prose h3 {
  color: var(--pgc8-yellow);
  font-size: 14px;
  margin: 12px 0 4px;
}
.pgc8-prose p { margin: 0 0 10px; }
.pgc8-prose strong { color: var(--pgc8-cream); }

/* ---------- Promo banner strip ---------- */
.pgc8-promo-strip {
  background:
    linear-gradient(135deg, rgba(255, 87, 34, 0.94), rgba(255, 127, 80, 0.92)),
    repeating-linear-gradient(45deg, rgba(0,0,0,0.05) 0 8px, transparent 8px 16px);
  border-radius: var(--pgc8-radius-lg);
  padding: 16px 14px;
  color: #fff;
  margin-top: 18px;
  box-shadow: var(--pgc8-shadow);
  position: relative;
  overflow: hidden;
}
.pgc8-promo-strip h3 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 900;
}
.pgc8-promo-strip p {
  margin: 0 0 12px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.92);
}
.pgc8-promo-strip .pgc8-btn {
  background: #fff;
  color: var(--pgc8-orange-deep);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.22);
}

/* ---------- App download block ---------- */
.pgc8-app-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  background: var(--pgc8-bg-soft);
  border: 1px solid var(--pgc8-line);
  border-radius: var(--pgc8-radius-lg);
  padding: 16px;
}
.pgc8-app-banner {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--pgc8-line);
}
.pgc8-app-banner img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}
.pgc8-app-text h3 {
  margin: 0 0 6px;
  font-size: 15px;
  color: var(--pgc8-yellow);
}
.pgc8-app-text p {
  margin: 0 0 12px;
  font-size: 12.5px;
  color: var(--pgc8-cream-dim);
}
.pgc8-app-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.pgc8-app-buttons .pgc8-btn { flex: 1 1 45%; }

/* ---------- Quick facts list ---------- */
.pgc8-facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.pgc8-facts li {
  background: var(--pgc8-bg-card);
  border: 1px solid var(--pgc8-line);
  border-radius: 10px;
  padding: 10px;
  font-size: 12px;
  color: var(--pgc8-cream-dim);
}
.pgc8-facts li strong {
  display: block;
  color: var(--pgc8-yellow);
  font-size: 13px;
  margin-bottom: 2px;
}

/* ---------- Extended footer ---------- */
.pgc8-extended {
  margin-top: 26px;
  padding: 18px 12px 8px;
  border-top: 1px dashed var(--pgc8-line-strong);
}
.pgc8-ext-group { margin-bottom: 18px; }
.pgc8-ext-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--pgc8-coral);
  font-weight: 800;
  margin: 0 0 10px;
}
.pgc8-ext-promos {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.pgc8-ext-promo-btn {
  background: var(--pgc8-bg-card);
  border: 1px solid var(--pgc8-line);
  border-radius: 10px;
  padding: 12px;
  color: var(--pgc8-cream);
  text-align: left;
  cursor: pointer;
  min-height: 44px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-weight: 700;
}
.pgc8-ext-promo-btn span {
  font-size: 10.5px;
  color: var(--pgc8-yellow);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.pgc8-ext-promo-btn small {
  font-size: 11px;
  color: var(--pgc8-cream-dim);
  font-weight: 500;
}

.pgc8-ext-brand p {
  font-size: 12.5px;
  color: var(--pgc8-cream-dim);
  margin: 0;
  line-height: 1.6;
}

.pgc8-ext-directory {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}
.pgc8-ext-directory a {
  background: var(--pgc8-bg-card);
  border: 1px solid var(--pgc8-line);
  border-radius: 8px;
  padding: 9px 10px;
  font-size: 12px;
  color: var(--pgc8-cream);
  font-weight: 600;
  display: block;
  min-height: 36px;
}
.pgc8-ext-directory a:hover { color: var(--pgc8-yellow); }

.pgc8-ext-disclaimer {
  font-size: 11.5px;
  color: var(--pgc8-cream-dim);
  background: var(--pgc8-bg-card);
  border-left: 3px solid var(--pgc8-coral);
  padding: 10px 12px;
  border-radius: 8px;
  line-height: 1.55;
}

/* ---------- Footer copyright ---------- */
.pgc8-footer {
  padding: 14px 12px 8px;
  text-align: center;
  font-size: 11.5px;
  color: var(--pgc8-cream-dim);
  border-top: 1px solid var(--pgc8-line);
}

/* ---------- Mobile bottom nav (compact icon rack) ---------- */
.pgc8-bottom {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  display: flex;
  justify-content: center;
  pointer-events: none;
}
.pgc8-bottom-inner {
  width: 100%;
  max-width: var(--pgc8-max-canvas);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: linear-gradient(180deg, rgba(31, 27, 24, 0.98), rgba(20, 17, 15, 0.99));
  border-top: 1px solid var(--pgc8-line-strong);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  pointer-events: auto;
  box-shadow: 0 -8px 20px rgba(0, 0, 0, 0.45);
}
.pgc8-bottom-btn {
  background: none;
  border: none;
  color: var(--pgc8-cream-dim);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 2px;
  min-height: 56px;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  position: relative;
  border-radius: 10px;
  transition: color 0.18s ease, background 0.18s ease;
}
.pgc8-bottom-btn svg {
  width: 22px;
  height: 22px;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.pgc8-bottom-btn:active svg { transform: scale(0.9); }
.pgc8-bottom-btn.is-active {
  color: var(--pgc8-yellow);
}
.pgc8-bottom-btn.is-active::after {
  content: "";
  position: absolute;
  bottom: 2px;
  width: 22px;
  height: 3px;
  border-radius: 999px;
  background: var(--pgc8-yellow);
}
.pgc8-bottom-btn.pgc8-bottom-btn--promo { color: var(--pgc8-coral); }
.pgc8-bottom-btn.pgc8-bottom-btn--promo.is-active { color: var(--pgc8-yellow); }

/* Hide bottom nav on very wide screens is unnecessary; keep it,
   because the canvas remains mobile-centric. */

/* ---------- Accessibility helpers ---------- */
.pgc8-skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--pgc8-yellow);
  color: #262626;
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 100;
  font-weight: 800;
}
.pgc8-skip:focus { left: 10px; top: 10px; }

:focus-visible {
  outline: 2px solid var(--pgc8-yellow);
  outline-offset: 2px;
}
