/* ============================================================
   ph2222 canvas stylesheet
   Prefix: pg15-   | JS prefix: web51a
   Palette: #141414 (bg) | #E8F5E8 (text) | #40E0D0 (accent)
            #80CBC4 (soft accent) | #A9A9A9 (muted)
   Mobile canvas 320-430px; centered phone canvas on wide screens.
   ============================================================ */

:root {
  --pg15-bg:        #141414;
  --pg15-bg-2:      #1c1f1f;
  --pg15-bg-3:      #232727;
  --pg15-card:      #1f2424;
  --pg15-text:      #E8F5E8;
  --pg15-muted:     #A9A9A9;
  --pg15-accent:    #40E0D0;
  --pg15-accent-2:  #80CBC4;
  --pg15-line:      rgba(232, 245, 232, 0.10);
  --pg15-shadow:    0 8px 24px rgba(0, 0, 0, 0.45);
  --pg15-radius:    14px;
  --pg15-radius-sm: 10px;
  --pg15-header-h:  58px;
  --pg15-nav-h:     62px;
}

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

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

body {
  margin: 0;
  font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  background: var(--pg15-bg);
  color: var(--pg15-text);
  font-size: 15px;
  line-height: 1.55;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--pg15-accent-2); text-decoration: none; }
a:hover { color: var(--pg15-accent); }

/* Phone canvas centered on wide screens (no desktop-width layout). */
.pg15-shell {
  max-width: 440px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  background:
    radial-gradient(1200px 320px at 50% -40px, rgba(64, 224, 208, 0.12), transparent 60%),
    var(--pg15-bg);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
}

/* ---------- Header ---------- */
.pg15-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--pg15-header-h);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  background: linear-gradient(180deg, rgba(20, 20, 20, 0.98), rgba(20, 20, 20, 0.88));
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--pg15-line);
}

.pg15-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}
.pg15-brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid rgba(64, 224, 208, 0.35);
  background: #0d0f0f;
  flex-shrink: 0;
}
.pg15-brand-text { min-width: 0; }
.pg15-brand-name {
  font-weight: 800;
  font-size: 17px;
  letter-spacing: 0.4px;
  color: var(--pg15-text);
  line-height: 1.1;
}
.pg15-brand-name span { color: var(--pg15-accent); }
.pg15-brand-tag {
  font-size: 10.5px;
  color: var(--pg15-muted);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.pg15-head-actions { display: flex; align-items: center; gap: 6px; }

.pg15-btn {
  -webkit-appearance: none;
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
  font-family: inherit;
}
.pg15-btn:active { transform: translateY(1px); }

.pg15-btn--login {
  background: transparent;
  color: var(--pg15-text);
  border: 1px solid var(--pg15-line);
  padding: 8px 12px;
}
.pg15-btn--register {
  background: linear-gradient(135deg, var(--pg15-accent), var(--pg15-accent-2));
  color: #0d1f1d;
  box-shadow: 0 4px 14px rgba(64, 224, 208, 0.35);
  padding: 9px 14px;
}

.pg15-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--pg15-line);
  background: var(--pg15-bg-2);
  color: var(--pg15-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.pg15-icon-btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; }
.pg15-icon-btn--active { background: var(--pg15-bg-3); border-color: var(--pg15-accent); }

/* ---------- Slide-down menu ---------- */
.pg15-menu {
  position: absolute;
  top: var(--pg15-header-h);
  left: 0;
  right: 0;
  background: var(--pg15-bg-2);
  border-bottom: 1px solid var(--pg15-line);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
  z-index: 39;
}
.pg15-menu--open { max-height: 560px; box-shadow: var(--pg15-shadow); }
.pg15-menu-section { padding: 10px 14px; }
.pg15-menu-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--pg15-muted);
  margin: 4px 0 6px;
}
.pg15-menu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}
.pg15-menu-link {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--pg15-bg-3);
  color: var(--pg15-text);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid transparent;
}
.pg15-menu-link:hover { border-color: var(--pg15-accent); color: var(--pg15-accent); }
.pg15-menu-promo {
  display: flex;
  gap: 8px;
  padding: 10px 14px 14px;
  border-top: 1px solid var(--pg15-line);
}
.pg15-menu-promo .pg15-btn { flex: 1; }

/* ---------- Main / sections ---------- */
.pg15-main {
  padding: 12px 12px calc(var(--pg15-nav-h) + 24px);
}

.pg15-section { margin: 18px 0; }
.pg15-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 14px 0 10px;
  gap: 8px;
}
.pg15-section-head h2 {
  font-size: 17px;
  font-weight: 800;
  margin: 0;
  letter-spacing: 0.2px;
}
.pg15-section-head h2 em { font-style: normal; color: var(--pg15-accent); }
.pg15-section-link {
  font-size: 12px;
  color: var(--pg15-accent-2);
  white-space: nowrap;
}

/* ---------- Hero carousel ---------- */
.pg15-hero {
  position: relative;
  border-radius: var(--pg15-radius);
  overflow: hidden;
  box-shadow: var(--pg15-shadow);
  border: 1px solid var(--pg15-line);
}
.pg15-hero-viewport { overflow: hidden; }
.pg15-hero-track {
  display: flex;
  transition: transform 0.45s ease;
}
.pg15-hero-slide {
  min-width: 100%;
  position: relative;
  cursor: pointer;
}
.pg15-hero-slide img {
  width: 100%;
  height: 168px;
  object-fit: cover;
}
.pg15-hero-cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 24px 14px 12px;
  background: linear-gradient(0deg, rgba(0,0,0,0.75), transparent);
  color: var(--pg15-text);
}
.pg15-hero-cap strong { font-size: 15px; display: block; }
.pg15-hero-cap span { font-size: 11.5px; color: var(--pg15-accent-2); }
.pg15-hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(20, 20, 20, 0.7);
  border: 1px solid var(--pg15-line);
  color: var(--pg15-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.pg15-hero-arrow svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2.4; }
.pg15-hero-prev { left: 6px; }
.pg15-hero-next { right: 6px; }
.pg15-hero-dots {
  position: absolute;
  bottom: 6px; left: 0; right: 0;
  display: flex;
  justify-content: center;
  gap: 5px;
  z-index: 2;
}
.pg15-hero-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(232, 245, 232, 0.35);
  border: none; cursor: pointer; padding: 0;
}
.pg15-hero-dot--active { background: var(--pg15-accent); width: 16px; border-radius: 4px; }

/* ---------- Chips ---------- */
.pg15-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 0 8px;
  -webkit-overflow-scrolling: touch;
}
.pg15-chips::-webkit-scrollbar { display: none; }
.pg15-chip {
  flex-shrink: 0;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--pg15-bg-2);
  border: 1px solid var(--pg15-line);
  color: var(--pg15-text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.pg15-chip--active {
  background: rgba(64, 224, 208, 0.16);
  border-color: var(--pg15-accent);
  color: var(--pg15-accent);
}

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

.pg15-card {
  background: var(--pg15-card);
  border-radius: var(--pg15-radius-sm);
  border: 1px solid var(--pg15-line);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease;
  display: flex;
  flex-direction: column;
}
.pg15-card:hover { border-color: var(--pg15-accent); }
.pg15-card:active { transform: translateY(-2px); }
.pg15-card-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #0d0f0f;
}
.pg15-card-name {
  font-size: 11px;
  text-align: center;
  padding: 5px 4px 6px;
  color: var(--pg15-text);
  line-height: 1.25;
  min-height: 30px;
  word-break: break-word;
}

.pg15-shelf--focus {
  outline: 2px solid var(--pg15-accent);
  outline-offset: 2px;
  border-radius: var(--pg15-radius-sm);
}

/* ---------- Info / feature blocks ---------- */
.pg15-prose {
  background: var(--pg15-bg-2);
  border: 1px solid var(--pg15-line);
  border-radius: var(--pg15-radius);
  padding: 14px;
}
.pg15-prose h3 {
  margin: 0 0 8px;
  font-size: 15px;
  color: var(--pg15-accent-2);
}
.pg15-prose p { margin: 0 0 10px; font-size: 13.5px; color: var(--pg15-text); }
.pg15-prose p:last-child { margin-bottom: 0; }
.pg15-prose a { color: var(--pg15-accent); text-decoration: underline; }

.pg15-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.pg15-feature {
  background: var(--pg15-bg-2);
  border: 1px solid var(--pg15-line);
  border-radius: var(--pg15-radius-sm);
  padding: 12px;
}
.pg15-feature .pg15-feature-ico {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: rgba(64, 224, 208, 0.15);
  color: var(--pg15-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}
.pg15-feature .pg15-feature-ico svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }
.pg15-feature h4 { margin: 0 0 4px; font-size: 13px; }
.pg15-feature p { margin: 0; font-size: 11.5px; color: var(--pg15-muted); line-height: 1.4; }

/* ---------- Steps ---------- */
.pg15-steps { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.pg15-steps li {
  position: relative;
  padding: 8px 8px 8px 38px;
  margin-bottom: 6px;
  background: var(--pg15-bg-2);
  border: 1px solid var(--pg15-line);
  border-radius: var(--pg15-radius-sm);
  font-size: 13px;
  counter-increment: step;
}
.pg15-steps li::before {
  content: counter(step);
  position: absolute;
  left: 8px; top: 50%;
  transform: translateY(-50%);
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--pg15-accent);
  color: #0d1f1d;
  font-weight: 800;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.pg15-steps strong { color: var(--pg15-accent-2); }

/* ---------- Banner CTA ---------- */
.pg15-cta {
  background: linear-gradient(135deg, rgba(64,224,208,0.16), rgba(128,203,196,0.10));
  border: 1px solid rgba(64, 224, 208, 0.4);
  border-radius: var(--pg15-radius);
  padding: 14px;
  display: flex;
  gap: 12px;
  align-items: center;
}
.pg15-cta-text { flex: 1; }
.pg15-cta-text strong { display: block; font-size: 15px; margin-bottom: 3px; }
.pg15-cta-text span { font-size: 12px; color: var(--pg15-muted); }
.pg15-cta .pg15-btn { flex-shrink: 0; }

/* ---------- Extended footer (index only) ---------- */
.pg15-ext {
  margin-top: 18px;
  border-top: 1px solid var(--pg15-line);
  padding-top: 14px;
}
.pg15-ext-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.pg15-ext-col {
  background: var(--pg15-bg-2);
  border: 1px solid var(--pg15-line);
  border-radius: var(--pg15-radius-sm);
  padding: 10px;
}
.pg15-ext-col h4 {
  margin: 0 0 6px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--pg15-accent);
}
.pg15-ext-col a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 0;
  font-size: 12.5px;
  color: var(--pg15-text);
  border-bottom: 1px dashed var(--pg15-line);
}
.pg15-ext-col a:last-child { border-bottom: none; }
.pg15-ext-col a:hover { color: var(--pg15-accent); }
.pg15-ext-col a svg { width: 14px; height: 14px; stroke: var(--pg15-accent-2); fill: none; stroke-width: 2; flex-shrink: 0; }

.pg15-ext-promos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 10px;
}
.pg15-ext-promo {
  background: var(--pg15-bg-2);
  border: 1px solid var(--pg15-line);
  border-radius: var(--pg15-radius-sm);
  padding: 10px 6px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.12s ease;
}
.pg15-ext-promo:active { transform: translateY(2px); }
.pg15-ext-promo svg { width: 22px; height: 22px; stroke: var(--pg15-accent); fill: none; stroke-width: 2; margin: 0 auto 4px; }
.pg15-ext-promo span { display: block; font-size: 10.5px; color: var(--pg15-text); line-height: 1.2; }

.pg15-disclaimer {
  margin-top: 12px;
  padding: 10px;
  background: var(--pg15-bg-2);
  border-left: 3px solid var(--pg15-accent-2);
  border-radius: 6px;
  font-size: 11.5px;
  color: var(--pg15-muted);
  line-height: 1.5;
}

/* ---------- Footer ---------- */
.pg15-foot {
  text-align: center;
  padding: 14px 12px calc(var(--pg15-nav-h) + 16px);
  font-size: 11.5px;
  color: var(--pg15-muted);
  border-top: 1px solid var(--pg15-line);
  margin-top: 8px;
}
.pg15-foot a { color: var(--pg15-muted); margin: 0 4px; }
.pg15-foot a:hover { color: var(--pg15-accent); }

/* ---------- Mobile bottom nav (5 roles, fixed) ---------- */
.pg15-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 45;
  display: flex;
  justify-content: center;
}
.pg15-nav-inner {
  width: 100%;
  max-width: 440px;
  height: var(--pg15-nav-h);
  background: linear-gradient(180deg, rgba(28,31,31,0.96), rgba(20,20,20,0.98));
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--pg15-line);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 6px 4px;
  padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -6px 18px rgba(0,0,0,0.45);
}
.pg15-nav-item {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  color: var(--pg15-muted);
  font-family: inherit;
  font-size: 10px;
  font-weight: 600;
  padding: 2px;
  position: relative;
  transition: transform 0.14s ease, color 0.14s ease;
  min-height: 44px;
}
.pg15-nav-item svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; }
.pg15-nav-item--promo { color: var(--pg15-text); }
.pg15-nav-item--promo svg { stroke: var(--pg15-accent-2); }
.pg15-nav-item--active { color: var(--pg15-accent); transform: translateY(-3px); }
.pg15-nav-item--active::after {
  content: '';
  position: absolute;
  bottom: 1px;
  left: 50%;
  transform: translateX(-50%);
  width: 18px; height: 2px;
  border-radius: 2px;
  background: var(--pg15-accent);
}
.pg15-nav-item:active { transform: translateY(0); }
.pg15-nav-item--promo:active { transform: translateY(-1px); }

/* Utility */
.pg15-sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.pg15-divider { height: 1px; background: var(--pg15-line); margin: 14px 0; border: none; }
