/* earnph design system - prefix pg5e- */
:root {
  --pg5e-bg: #141414;
  --pg5e-bg-soft: #1c1c1c;
  --pg5e-bg-card: #222222;
  --pg5e-text: #F5F5F5;
  --pg5e-text-muted: #c8c8c8;
  --pg5e-primary: #F5DEB3;
  --pg5e-primary-dark: #d4b896;
  --pg5e-accent: #e8c98a;
  --pg5e-border: #333333;
  --pg5e-danger: #ff6b6b;
  --pg5e-success: #4caf50;
  --pg5e-header-h: 5.6rem;
  --pg5e-bottom-h: 6.2rem;
  --pg5e-radius: 1rem;
  --pg5e-shadow: 0 0.4rem 1.6rem rgba(0, 0, 0, 0.45);
}

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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--pg5e-bg);
  color: var(--pg5e-text);
  line-height: 1.5rem;
  font-size: 1.4rem;
  min-height: 100vh;
  overflow-x: hidden;
}

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

a {
  color: var(--pg5e-primary);
  text-decoration: none;
}

a:hover {
  color: var(--pg5e-accent);
}

ul,
ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

.pg5e-container {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1.2rem;
}

.pg5e-wrapper {
  min-height: 100vh;
  padding-top: var(--pg5e-header-h);
  padding-bottom: 8rem;
}

/* Header */
.pg5e-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(180deg, #1a1a1a 0%, #141414 100%);
  border-bottom: 1px solid var(--pg5e-border);
  height: var(--pg5e-header-h);
}

.pg5e-header-inner {
  max-width: 430px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.2rem;
  gap: 0.8rem;
}

.pg5e-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  flex-shrink: 1;
}

.pg5e-logo img {
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 0.6rem;
  object-fit: cover;
}

.pg5e-logo-text {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--pg5e-primary);
  white-space: nowrap;
  letter-spacing: 0.03em;
}

.pg5e-header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

.pg5e-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 4.4rem;
  min-width: 4.4rem;
  padding: 0.8rem 1.2rem;
  border-radius: 0.8rem;
  font-size: 1.2rem;
  font-weight: 700;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.pg5e-btn:active {
  transform: scale(0.96);
}

.pg5e-btn-primary {
  background: linear-gradient(135deg, var(--pg5e-primary) 0%, var(--pg5e-primary-dark) 100%);
  color: #141414;
}

.pg5e-btn-outline {
  border: 1px solid var(--pg5e-primary);
  color: var(--pg5e-primary);
  background: transparent;
}

.pg5e-btn-block {
  width: 100%;
}

.pg5e-btn-lg {
  padding: 1.2rem 2rem;
  font-size: 1.4rem;
  min-height: 4.8rem;
}

.pg5e-menu-toggle {
  width: 4.4rem;
  height: 4.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pg5e-primary);
  font-size: 2.2rem;
}

/* Mobile menu */
.pg5e-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
}

.pg5e-overlay-show {
  opacity: 1;
  visibility: visible;
}

.pg5e-mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: min(82vw, 320px);
  height: 100%;
  background: #1a1a1a;
  z-index: 9999;
  transform: translateX(100%);
  transition: transform 0.28s ease;
  overflow-y: auto;
  padding: 2rem 1.6rem 8rem;
  border-left: 1px solid var(--pg5e-border);
}

.pg5e-menu-open {
  transform: translateX(0);
}

.pg5e-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.pg5e-menu-title {
  font-size: 1.6rem;
  color: var(--pg5e-primary);
  font-weight: 700;
}

.pg5e-menu-close {
  width: 4.4rem;
  height: 4.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pg5e-text);
  font-size: 2.4rem;
}

.pg5e-menu-list a {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem 0.8rem;
  border-bottom: 1px solid var(--pg5e-border);
  color: var(--pg5e-text);
  font-size: 1.4rem;
  min-height: 4.8rem;
}

.pg5e-menu-list a:hover {
  color: var(--pg5e-primary);
  background: rgba(245, 222, 179, 0.06);
}

.pg5e-menu-list i,
.pg5e-menu-list .material-icons,
.pg5e-menu-list .ti {
  font-size: 2rem;
  width: 2.4rem;
  color: var(--pg5e-primary);
}

/* Hero / carousel */
.pg5e-hero {
  position: relative;
  margin: 1.2rem auto 1.6rem;
  max-width: 430px;
  padding: 0 1.2rem;
}

.pg5e-carousel {
  position: relative;
  border-radius: 1.2rem;
  overflow: hidden;
  box-shadow: var(--pg5e-shadow);
  aspect-ratio: 16 / 9;
  background: var(--pg5e-bg-card);
}

.pg5e-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
  cursor: pointer;
}

.pg5e-slide-active {
  opacity: 1;
  z-index: 1;
}

.pg5e-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pg5e-dots {
  position: absolute;
  bottom: 1rem;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  z-index: 2;
}

.pg5e-dot {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  background: rgba(245, 245, 245, 0.4);
  transition: background 0.2s, transform 0.2s;
}

.pg5e-dot-active {
  background: var(--pg5e-primary);
  transform: scale(1.25);
}

/* Sections */
.pg5e-section {
  max-width: 430px;
  margin: 0 auto 2rem;
  padding: 0 1.2rem;
}

.pg5e-h1 {
  font-size: 1.8rem;
  line-height: 2.4rem;
  color: var(--pg5e-primary);
  text-align: center;
  margin: 0.8rem 0 1.6rem;
  font-weight: 800;
}

.pg5e-h2 {
  font-size: 1.6rem;
  line-height: 2.2rem;
  color: var(--pg5e-primary);
  margin: 0 0 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.pg5e-h3 {
  font-size: 1.4rem;
  line-height: 2rem;
  color: var(--pg5e-accent);
  margin: 1.2rem 0 0.8rem;
  font-weight: 700;
}

.pg5e-text {
  font-size: 1.3rem;
  line-height: 2rem;
  color: var(--pg5e-text-muted);
  margin-bottom: 1rem;
}

.pg5e-text strong,
.pg5e-text b {
  color: var(--pg5e-primary);
  font-weight: 700;
}

.pg5e-text a {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.2rem;
}

/* Game grid */
.pg5e-cat {
  margin-bottom: 2rem;
}

.pg5e-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
}

.pg5e-game-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.15s ease;
  min-width: 0;
}

.pg5e-game-item:active {
  transform: scale(0.94);
}

.pg5e-game-item img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 0.8rem;
  object-fit: cover;
  border: 1px solid var(--pg5e-border);
  background: var(--pg5e-bg-card);
}

.pg5e-game-item span {
  display: block;
  width: 100%;
  margin-top: 0.4rem;
  font-size: 1rem;
  line-height: 1.3rem;
  text-align: center;
  color: var(--pg5e-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Cards / modules */
.pg5e-card {
  background: var(--pg5e-bg-card);
  border: 1px solid var(--pg5e-border);
  border-radius: var(--pg5e-radius);
  padding: 1.4rem;
  margin-bottom: 1.2rem;
  box-shadow: var(--pg5e-shadow);
}

.pg5e-card-soft {
  background: var(--pg5e-bg-soft);
}

.pg5e-list {
  margin: 0.8rem 0 1.2rem;
}

.pg5e-list li {
  position: relative;
  padding: 0.6rem 0 0.6rem 1.8rem;
  font-size: 1.3rem;
  line-height: 1.9rem;
  color: var(--pg5e-text-muted);
}

.pg5e-list li::before {
  content: '';
  position: absolute;
  left: 0.2rem;
  top: 1.1rem;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--pg5e-primary);
}

.pg5e-faq-item {
  border-bottom: 1px solid var(--pg5e-border);
  padding: 1rem 0;
}

.pg5e-faq-item:last-child {
  border-bottom: none;
}

.pg5e-faq-q {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--pg5e-primary);
  margin-bottom: 0.4rem;
}

.pg5e-faq-a {
  font-size: 1.2rem;
  line-height: 1.8rem;
  color: var(--pg5e-text-muted);
}

.pg5e-feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.pg5e-feature {
  background: var(--pg5e-bg-soft);
  border: 1px solid var(--pg5e-border);
  border-radius: 0.8rem;
  padding: 1.2rem;
  text-align: center;
}

.pg5e-feature i,
.pg5e-feature .material-icons,
.pg5e-feature .bi {
  font-size: 2.4rem;
  color: var(--pg5e-primary);
  margin-bottom: 0.6rem;
  display: block;
}

.pg5e-feature h3 {
  font-size: 1.2rem;
  color: var(--pg5e-text);
  margin-bottom: 0.4rem;
}

.pg5e-feature p {
  font-size: 1.1rem;
  line-height: 1.6rem;
  color: var(--pg5e-text-muted);
}

.pg5e-cta-box {
  background: linear-gradient(145deg, #2a2418 0%, #1c1c1c 60%);
  border: 1px solid var(--pg5e-primary);
  border-radius: 1.2rem;
  padding: 2rem 1.4rem;
  text-align: center;
  margin: 1.6rem 0;
}

.pg5e-cta-box .pg5e-h2 {
  justify-content: center;
}

.pg5e-promo-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
  margin: 1.2rem 0;
}

.pg5e-link-text {
  color: var(--pg5e-primary);
  font-weight: 700;
  font-size: 1.3rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.25rem;
}

.pg5e-link-text:hover {
  color: var(--pg5e-accent);
}

.pg5e-steps {
  counter-reset: pg5e-step;
}

.pg5e-step {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.2rem;
  align-items: flex-start;
}

.pg5e-step-num {
  flex-shrink: 0;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 50%;
  background: var(--pg5e-primary);
  color: #141414;
  font-weight: 800;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pg5e-step-body h3 {
  font-size: 1.3rem;
  color: var(--pg5e-text);
  margin-bottom: 0.3rem;
}

.pg5e-step-body p {
  font-size: 1.2rem;
  line-height: 1.8rem;
  color: var(--pg5e-text-muted);
}

.pg5e-review {
  background: var(--pg5e-bg-soft);
  border-left: 3px solid var(--pg5e-primary);
  padding: 1.2rem;
  margin-bottom: 1rem;
  border-radius: 0 0.8rem 0.8rem 0;
}

.pg5e-review-stars {
  color: var(--pg5e-primary);
  font-size: 1.2rem;
  margin-bottom: 0.4rem;
}

.pg5e-review p {
  font-size: 1.2rem;
  line-height: 1.8rem;
  color: var(--pg5e-text-muted);
  font-style: italic;
}

.pg5e-review-author {
  font-size: 1.1rem;
  color: var(--pg5e-primary);
  margin-top: 0.6rem;
  font-weight: 700;
  font-style: normal;
}

.pg5e-rtp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.pg5e-rtp-item {
  background: var(--pg5e-bg-soft);
  border-radius: 0.8rem;
  padding: 1rem;
  text-align: center;
  border: 1px solid var(--pg5e-border);
}

.pg5e-rtp-val {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--pg5e-primary);
}

.pg5e-rtp-label {
  font-size: 1.1rem;
  color: var(--pg5e-text-muted);
  margin-top: 0.3rem;
}

/* Footer */
.pg5e-footer {
  background: #0f0f0f;
  border-top: 1px solid var(--pg5e-border);
  padding: 2.4rem 1.2rem 2rem;
  max-width: 430px;
  margin: 0 auto;
}

.pg5e-footer-brand {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--pg5e-primary);
  margin-bottom: 0.8rem;
}

.pg5e-footer-desc {
  font-size: 1.2rem;
  line-height: 1.8rem;
  color: var(--pg5e-text-muted);
  margin-bottom: 1.4rem;
}

.pg5e-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.2rem;
  margin-bottom: 1.4rem;
}

.pg5e-footer-links a {
  font-size: 1.2rem;
  color: var(--pg5e-text-muted);
  min-height: 3.2rem;
  display: inline-flex;
  align-items: center;
}

.pg5e-footer-links a:hover {
  color: var(--pg5e-primary);
}

.pg5e-footer-promo {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.4rem;
}

.pg5e-footer-promo .pg5e-btn {
  min-height: 4rem;
  padding: 0.6rem 1rem;
  font-size: 1.1rem;
}

.pg5e-copyright {
  font-size: 1.1rem;
  color: #888;
  text-align: center;
  padding-top: 1rem;
  border-top: 1px solid var(--pg5e-border);
}

/* Bottom navigation */
.pg5e-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--pg5e-bottom-h);
  background: linear-gradient(0deg, #1a150f 0%, #1f1a12 100%);
  border-top: 2px solid var(--pg5e-primary);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0 0.4rem;
  box-shadow: 0 -0.4rem 1.6rem rgba(0, 0, 0, 0.5);
}

.pg5e-bnav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 6rem;
  min-height: 6rem;
  color: var(--pg5e-text-muted);
  font-size: 1rem;
  gap: 0.2rem;
  transition: color 0.2s, transform 0.15s;
  cursor: pointer;
  text-decoration: none;
  background: none;
  border: none;
}

.pg5e-bnav-item i,
.pg5e-bnav-item .material-icons,
.pg5e-bnav-item .bi,
.pg5e-bnav-item ion-icon {
  font-size: 2.2rem;
  line-height: 1;
}

.pg5e-bnav-item .material-icons {
  font-size: 2.4rem;
}

.pg5e-bnav-item span {
  font-size: 1rem;
  line-height: 1.2rem;
  max-width: 6.4rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pg5e-bnav-item:active {
  transform: scale(0.9);
}

.pg5e-bnav-item.pg5e-bnav-active,
.pg5e-bnav-item:hover {
  color: var(--pg5e-primary);
}

.pg5e-bnav-item.pg5e-bnav-active {
  position: relative;
}

.pg5e-bnav-item.pg5e-bnav-active::after {
  content: '';
  position: absolute;
  top: 0.4rem;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--pg5e-primary);
}

/* Desktop */
@media (min-width: 769px) {
  .pg5e-bottom-nav {
    display: none;
  }

  .pg5e-wrapper {
    padding-bottom: 2rem;
  }

  body {
    background: #0a0a0a;
  }

  .pg5e-header-inner,
  .pg5e-hero,
  .pg5e-section,
  .pg5e-footer,
  .pg5e-container {
    max-width: 430px;
  }
}

@media (max-width: 768px) {
  .pg5e-wrapper {
    padding-bottom: 8rem;
  }

  main {
    padding-bottom: 8rem;
  }
}

@media (max-width: 360px) {
  .pg5e-game-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .pg5e-btn {
    padding: 0.7rem 0.9rem;
    font-size: 1.1rem;
  }

  .pg5e-logo-text {
    font-size: 1.4rem;
  }
}
