/* ============================================================
 * ph365 app - Theme Stylesheet (theme-5253.css)
 * All custom classes use w5253- prefix.
 * Color palette: #1A1A2E | #F5DEB3 | #FF8000 | #DEB887 | #FFFACD
 * Mobile-first, max-width 430px, rem units (root font 62.5%).
 * ============================================================ */

:root {
  --w5253-bg: #1A1A2E;
  --w5253-bg-soft: #232347;
  --w5253-bg-card: #20203c;
  --w5253-text: #F5DEB3;
  --w5253-accent: #FF8000;
  --w5253-accent-2: #DEB887;
  --w5253-light: #FFFACD;
  --w5253-muted: #b8a98a;
  --w5253-border: rgba(245, 222, 179, 0.14);
  --w5253-radius: 14px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: var(--w5253-bg);
  color: var(--w5253-text);
  line-height: 1.5rem;
  font-size: 1.4rem;
  max-width: 430px;
  margin-left: auto;
  margin-right: auto;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

.w5253-container { width: 100%; padding: 0 1.2rem; }
.w5253-wrapper { padding-top: 5.6rem; padding-bottom: 1rem; }

/* ---------- Header ---------- */
.w5253-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  max-width: 430px;
  margin: 0 auto;
  z-index: 1000;
  background: linear-gradient(180deg, #14142b 0%, #1A1A2E 100%);
  border-bottom: 1px solid var(--w5253-border);
  box-shadow: 0 2px 12px rgba(0,0,0,0.35);
}
.w5253-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  gap: 0.6rem;
}
.w5253-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}
.w5253-logo {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--w5253-accent);
}
.w5253-brand-name {
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--w5253-light);
  white-space: nowrap;
  letter-spacing: 0.3px;
}
.w5253-brand-name span { color: var(--w5253-accent); }
.w5253-header-actions { display: flex; align-items: center; gap: 0.4rem; }

.w5253-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 3.2rem;
  padding: 0 1rem;
  border: none;
  border-radius: 10px;
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s;
  text-decoration: none;
}
.w5253-btn:active { transform: scale(0.96); }
.w5253-btn-primary {
  background: linear-gradient(135deg, #FF8000 0%, #FF9d33 100%);
  color: #1A1A2E;
  box-shadow: 0 4px 14px rgba(255, 128, 0, 0.35);
}
.w5253-btn-ghost {
  background: transparent;
  color: var(--w5253-text);
  border: 1px solid var(--w5253-accent-2);
}
.w5253-btn-block { width: 100%; padding: 1rem; font-size: 1.5rem; }

.w5253-menu-btn {
  background: transparent;
  border: 1px solid var(--w5253-border);
  color: var(--w5253-text);
  border-radius: 10px;
  width: 3.2rem;
  height: 3.2rem;
  font-size: 1.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.w5253-menu-btn-active { background: var(--w5253-accent); color: #1A1A2E; }

/* ---------- Expandable Mobile Menu ---------- */
.w5253-mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.28s ease;
  background: #16162c;
  border-top: 1px solid var(--w5253-border);
}
.w5253-menu-open { max-height: 520px; }
.w5253-mobile-menu ul {
  list-style: none;
  margin: 0;
  padding: 0.4rem 0.6rem;
}
.w5253-mobile-menu li { border-bottom: 1px solid var(--w5253-border); }
.w5253-mobile-menu li:last-child { border-bottom: none; }
.w5253-mobile-menu a {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 1rem 0.8rem;
  color: var(--w5253-text);
  font-weight: 600;
  font-size: 1.35rem;
}
.w5253-mobile-menu a:hover { color: var(--w5253-accent); background: rgba(255,128,0,0.06); }
.w5253-mobile-menu .material-icons,
.w5253-mobile-menu i { font-size: 2rem; color: var(--w5253-accent); }

/* ---------- Main content ---------- */
main { display: block; padding-bottom: 8rem; }
.w5253-section { padding: 1.6rem 0; }
.w5253-section-alt { background: var(--w5253-bg-soft); }

.w5253-h1 {
  font-size: 2.1rem;
  line-height: 1.35;
  font-weight: 800;
  color: var(--w5253-light);
  margin: 1.2rem 0 0.6rem;
}
.w5253-h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--w5253-light);
  margin: 1.6rem 0 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.w5253-h2 .w5253-bar {
  width: 4px; height: 1.8rem;
  background: var(--w5253-accent);
  border-radius: 4px;
  display: inline-block;
}
.w5253-h3 {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--w5253-accent-2);
  margin: 1.2rem 0 0.4rem;
}
.w5253-text-muted { color: var(--w5253-muted); }
.w5253-lead { font-size: 1.4rem; color: var(--w5253-text); }
.w5253-promo-text {
  color: var(--w5253-accent);
  font-weight: 800;
  cursor: pointer;
}

/* ---------- Carousel ---------- */
.w5253-carousel {
  position: relative;
  border-radius: var(--w5253-radius);
  overflow: hidden;
  margin: 0.6rem 0;
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
}
.w5253-carousel-track { position: relative; }
.w5253-slide {
  position: absolute;
  top: 0; left: 0;
  opacity: 0;
  transition: opacity var(--w5253-carousel-transition-var, 0.45s) ease;
  width: 100%;
}
.w5253-slide img { width: 100%; height: 18rem; object-fit: cover; }
.w5253-slide-active { position: relative; opacity: 1; }
.w5253-slide-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.78) 0%, rgba(0,0,0,0) 100%);
  padding: 1.4rem 1rem 1rem;
  color: #fff;
}
.w5253-slide-caption strong { color: var(--w5253-accent); font-size: 1.5rem; }
.w5253-dots {
  position: absolute;
  bottom: 0.6rem; right: 0.8rem;
  display: flex; gap: 0.4rem;
}
.w5253-dot {
  width: 0.7rem; height: 0.7rem;
  border-radius: 50%;
  background: rgba(255,255,255,0.45);
  border: none; cursor: pointer; padding: 0;
}
.w5253-dot-active { background: var(--w5253-accent); }

/* ---------- Game list ---------- */
.w5253-game-section { margin: 1rem 0; }
.w5253-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.55rem;
}
.w5253-game-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--w5253-bg-card);
  border: 1px solid var(--w5253-border);
  border-radius: 10px;
  padding: 0.45rem 0.3rem;
  cursor: pointer;
  transition: transform 0.12s, border-color 0.12s;
}
.w5253-game-card:active { transform: scale(0.94); border-color: var(--w5253-accent); }
.w5253-game-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
}
.w5253-game-name {
  margin-top: 0.3rem;
  font-size: 1rem;
  text-align: center;
  color: var(--w5253-text);
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}

/* ---------- Cards / modules ---------- */
.w5253-card {
  background: var(--w5253-bg-card);
  border: 1px solid var(--w5253-border);
  border-radius: var(--w5253-radius);
  padding: 1.2rem;
  margin: 0.8rem 0;
}
.w5253-card-accent { border-left: 4px solid var(--w5253-accent); }
.w5253-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
}
.w5253-stat {
  background: #181833;
  border-radius: 10px;
  padding: 0.8rem;
  text-align: center;
}
.w5253-stat .num { color: var(--w5253-accent); font-size: 1.6rem; font-weight: 800; }
.w5253-stat .label { color: var(--w5253-muted); font-size: 1.1rem; }

.w5253-list { padding-left: 1.6rem; margin: 0.4rem 0; color: var(--w5253-text); }
.w5253-list li { margin-bottom: 0.5rem; }

.w5253-step {
  display: flex; gap: 0.8rem; align-items: flex-start;
  padding: 0.7rem 0;
  border-bottom: 1px dashed var(--w5253-border);
}
.w5253-step:last-child { border-bottom: none; }
.w5253-step-num {
  flex: 0 0 2.6rem; height: 2.6rem;
  background: var(--w5253-accent);
  color: #1A1A2E;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.3rem;
}

.w5253-faq-item {
  border-bottom: 1px solid var(--w5253-border);
  padding: 0.8rem 0;
}
.w5253-faq-q { font-weight: 700; color: var(--w5253-accent-2); margin-bottom: 0.3rem; }

.w5253-testimonial {
  background: #181833;
  border-radius: 10px;
  padding: 0.9rem;
  margin-bottom: 0.7rem;
  border-left: 3px solid var(--w5253-accent-2);
}
.w5253-testimonial .who { color: var(--w5253-accent); font-weight: 700; font-size: 1.2rem; }

.w5253-payment-row {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
}
.w5253-payment-chip {
  background: #181833;
  border: 1px solid var(--w5253-border);
  color: var(--w5253-text);
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  font-size: 1.15rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.w5253-cta {
  background: linear-gradient(135deg, #FF8000 0%, #b5651d 100%);
  color: #1A1A2E;
  border-radius: var(--w5253-radius);
  padding: 1.4rem 1.2rem;
  text-align: center;
  margin: 1rem 0;
  box-shadow: 0 6px 18px rgba(255,128,0,0.3);
}
.w5253-cta h3 { color: #1A1A2E; margin: 0 0 0.3rem; }
.w5253-cta p { color: #2a2a45; margin: 0 0 0.8rem; }

.w5253-winners {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}
.w5253-winner {
  background: #181833;
  border-radius: 8px;
  padding: 0.6rem;
  font-size: 1.15rem;
}
.w5253-winner .amt { color: var(--w5253-accent); font-weight: 800; }

.w5253-category-card {
  background: #181833;
  border: 1px solid var(--w5253-border);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.6rem;
  cursor: pointer;
}
.w5253-category-card .ic {
  width: 3.4rem; height: 3.4rem;
  background: rgba(255,128,0,0.15);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--w5253-accent);
  font-size: 1.8rem;
}
.w5253-category-card h4 { margin: 0; font-size: 1.3rem; color: var(--w5253-light); }
.w5253-category-card p { margin: 0; font-size: 1.1rem; color: var(--w5253-muted); }

/* ---------- Footer ---------- */
.w5253-footer {
  background: #14142b;
  border-top: 1px solid var(--w5253-border);
  padding: 1.6rem 1.2rem 2rem;
  color: var(--w5253-muted);
}
.w5253-footer h4 { color: var(--w5253-light); margin: 1rem 0 0.5rem; font-size: 1.3rem; }
.w5253-footer-links {
  display: flex; flex-wrap: wrap; gap: 0.5rem 0.8rem;
  margin: 0.6rem 0;
}
.w5253-footer-links a {
  color: var(--w5253-text);
  font-size: 1.15rem;
  text-decoration: underline;
  text-decoration-color: rgba(245,222,179,0.3);
}
.w5253-footer-promo {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  margin: 0.6rem 0;
}
.w5253-footer-copy {
  font-size: 1.1rem; color: var(--w5253-muted);
  margin-top: 1rem; text-align: center;
}

/* ---------- Mobile Bottom Nav ---------- */
.w5253-bottomnav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  max-width: 430px;
  margin: 0 auto;
  height: 6rem;
  background: #14142b;
  border-top: 1px solid var(--w5253-accent);
  box-shadow: 0 -3px 14px rgba(0,0,0,0.45);
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  z-index: 1000;
}
.w5253-bottomnav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  background: transparent;
  border: none;
  color: var(--w5253-text);
  font-size: 1rem;
  cursor: pointer;
  min-width: 6rem;
  min-height: 6rem;
  text-decoration: none;
  transition: color 0.12s, transform 0.12s;
  position: relative;
}
.w5253-bottomnav-btn:active { transform: scale(0.92); }
.w5253-bottomnav-btn .ic {
  font-size: 2.2rem;
  line-height: 1;
}
.w5253-bottomnav-btn .label { font-size: 1rem; color: var(--w5253-muted); }
.w5253-bottomnav-btn.is-active .ic,
.w5253-bottomnav-btn.is-active .label { color: var(--w5253-accent); }
.w5253-bottomnav-btn.is-promo .ic { color: var(--w5253-accent); }
.w5253-bottomnav-btn.is-promo::after {
  content: '';
  position: absolute;
  top: 0.4rem; right: 1.1rem;
  width: 0.6rem; height: 0.6rem;
  background: var(--w5253-accent);
  border-radius: 50%;
}

/* ---------- Desktop ---------- */
@media (min-width: 769px) {
  .w5253-bottomnav { display: none; }
  main { padding-bottom: 2rem; }
}

/* ---------- Utilities ---------- */
.w5253-text-center { text-align: center; }
.w5253-mt-1 { margin-top: 0.6rem; }
.w5253-mt-2 { margin-top: 1.2rem; }
.w5253-divider { height: 1px; background: var(--w5253-border); margin: 1rem 0; }
.w5253-pill {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  background: rgba(255,128,0,0.15);
  color: var(--w5253-accent);
  border-radius: 999px;
  font-size: 1.05rem;
  font-weight: 700;
}
