/*!
 * perya-plus-homes core stylesheet
 * Mobile-first HTML5 gaming website.
 * All custom classes use the "pg53-" prefix for namespace isolation.
 * Color palette: #FF8000 / #333333 / #FF4500 / #FF5722
 * Root font-size 62.5% => 1rem = 10px for easy rem math.
 * Code comments are written in English.
 */

:root {
  --pg53-primary: #FF8000;     /* brand orange */
  --pg53-bg: #333333;          /* deep neutral background */
  --pg53-bg-deep: #1f1f24;     /* darker section background */
  --pg53-bg-card: #2a2a30;     /* card surface */
  --pg53-accent: #FF4500;      /* hot accent */
  --pg53-accent2: #FF5722;     /* secondary accent */
  --pg53-text: #ffffff;        /* primary text */
  --pg53-text-muted: #c9c9d1;  /* secondary text */
  --pg53-border: rgba(255,128,0,0.25);
  --pg53-radius: 1.4rem;
  --pg53-shadow: 0 0.4rem 1.8rem rgba(0,0,0,0.45);
  --pg53-gradient: linear-gradient(135deg, #FF8000 0%, #FF4500 60%, #FF5722 100%);
  --pg53-header-h: 5.6rem;
  --pg53-bottom-h: 6.2rem;
}

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

html {
  font-size: 62.5%;            /* 1rem = 10px */
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  background: var(--pg53-bg);
  color: var(--pg53-text);
  line-height: 1.5rem;
  font-size: 1.5rem;
  overflow-x: hidden;
  max-width: 430px;
  margin: 0 auto;
  position: relative;
}

img { max-width: 100%; display: block; }
a { color: var(--pg53-primary); text-decoration: none; }
a:hover { color: var(--pg53-accent2); }
h1, h2, h3, h4 { line-height: 1.6rem; font-weight: 700; }

/* ---------- Layout helpers ---------- */
.pg53-container { width: 100%; max-width: 430px; margin: 0 auto; padding: 0 1.2rem; }
.pg53-wrapper { padding: 2rem 1.2rem; }
.pg53-section { padding: 2.4rem 0; }
.pg53-section--alt { background: var(--pg53-bg-deep); }
.pg53-text-center { text-align: center; }
.pg53-mt-1 { margin-top: 1rem; } .pg53-mt-2 { margin-top: 2rem; }

/* ---------- Header ---------- */
.pg53-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--pg53-header-h);
  background: rgba(31,31,36,0.96);
  backdrop-filter: blur(8px);
  border-bottom: 0.2rem solid var(--pg53-primary);
  box-shadow: var(--pg53-shadow);
}
.pg53-header-inner {
  max-width: 430px; margin: 0 auto;
  height: 100%;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1rem;
}
.pg53-logo {
  display: flex; align-items: center; gap: 0.7rem;
  color: var(--pg53-text); font-weight: 800; font-size: 1.7rem;
}
.pg53-logo img { width: 3rem; height: 3rem; border-radius: 0.6rem; }
.pg53-logo span { background: var(--pg53-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.pg53-header-actions { display: flex; align-items: center; gap: 0.6rem; }
.pg53-menu-btn {
  width: 3.8rem; height: 3.8rem; border: none; background: transparent;
  color: var(--pg53-primary); font-size: 2.2rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  border-radius: 0.8rem;
}
.pg53-menu-btn:hover { background: rgba(255,128,0,0.12); }

/* ---------- Buttons ---------- */
.pg53-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 1rem 1.6rem; font-size: 1.4rem; font-weight: 700;
  border: none; border-radius: 2.4rem; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none; min-height: 4.4rem;
}
.pg53-btn:hover { transform: translateY(-0.1rem); }
.pg53-btn--primary { background: var(--pg53-gradient); color: #fff; box-shadow: 0 0.4rem 1rem rgba(255,69,0,0.4); }
.pg53-btn--ghost { background: transparent; color: var(--pg53-primary); border: 0.2rem solid var(--pg53-primary); }
.pg53-btn--ghost:hover { background: rgba(255,128,0,0.1); color: #fff; }
.pg53-btn--lg { padding: 1.3rem 2.4rem; font-size: 1.6rem; width: 100%; }
.pg53-btn--block { width: 100%; }

/* ---------- Mobile menu ---------- */
.pg53-mobile-menu {
  position: fixed;
  top: var(--pg53-header-h); left: 0; right: 0;
  background: var(--pg53-bg-deep);
  border-bottom: 0.2rem solid var(--pg53-primary);
  transform: translateY(-130%);
  transition: transform 0.3s ease;
  z-index: 9999;
  max-height: 75vh; overflow-y: auto;
  box-shadow: var(--pg53-shadow);
}
.pg53-mobile-menu--open { transform: translateY(0); }
.pg53-mobile-menu ul { list-style: none; padding: 0.6rem 0; }
.pg53-mobile-menu li { border-bottom: 0.1rem solid rgba(255,255,255,0.06); }
.pg53-mobile-menu a {
  display: flex; align-items: center; gap: 0.9rem;
  padding: 1.3rem 1.6rem; color: var(--pg53-text); font-weight: 600; font-size: 1.5rem;
}
.pg53-mobile-menu a:hover { background: rgba(255,128,0,0.12); color: var(--pg53-primary); }
.pg53-mobile-menu .material-icons, .pg53-mobile-menu i { color: var(--pg53-primary); font-size: 2rem; }
.pg53-mobile-menu-cta { padding: 1rem 1.2rem 1.4rem; display: flex; gap: 0.8rem; }

/* ---------- Hero / Carousel ---------- */
.pg53-hero { margin-top: var(--pg53-header-h); }
.pg53-carousel {
  position: relative; overflow: hidden;
  border-radius: 0 0 1.6rem 1.6rem;
  box-shadow: var(--pg53-shadow);
}
.pg53-carousel-track { display: flex; transition: transform 0.5s ease; }
.pg53-carousel-slide { min-width: 100%; position: relative; }
.pg53-carousel-slide img { width: 100%; height: 22rem; object-fit: cover; }
.pg53-carousel-caption {
  position: absolute; left: 1.4rem; right: 1.4rem; bottom: 1.4rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
  padding: 1rem; border-radius: 1rem;
}
.pg53-carousel-caption h2 { color: #fff; font-size: 1.8rem; margin-bottom: 0.4rem; }
.pg53-carousel-caption p { color: var(--pg53-text-muted); font-size: 1.3rem; margin-bottom: 0.8rem; }
.pg53-carousel-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 3.6rem; height: 3.6rem; border-radius: 50%;
  background: rgba(0,0,0,0.45); color: #fff; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 2rem;
}
.pg53-carousel-arrow:hover { background: var(--pg53-primary); }
.pg53-carousel-prev { left: 0.8rem; }
.pg53-carousel-next { right: 0.8rem; }
.pg53-carousel-dots {
  position: absolute; bottom: 0.8rem; left: 0; right: 0;
  display: flex; justify-content: center; gap: 0.6rem;
}
.pg53-carousel-dot {
  width: 0.9rem; height: 0.9rem; border-radius: 50%;
  background: rgba(255,255,255,0.5); border: none; cursor: pointer;
}
.pg53-carousel-dot--active { background: var(--pg53-primary); width: 2.2rem; border-radius: 0.6rem; }

/* ---------- Section title ---------- */
.pg53-section-title {
  display: flex; align-items: center; gap: 0.8rem;
  margin: 2.4rem 0 1.4rem; padding-bottom: 0.6rem;
  border-bottom: 0.2rem solid var(--pg53-border);
}
.pg53-section-title h2 { font-size: 1.9rem; color: var(--pg53-text); }
.pg53-section-title .pg53-title-icon { color: var(--pg53-primary); font-size: 2.2rem; }
.pg53-section-sub { color: var(--pg53-text-muted); font-size: 1.35rem; margin-bottom: 1.2rem; }

/* ---------- H1 intro ---------- */
.pg53-h1-block { padding: 2rem 1.2rem 0.6rem; text-align: center; }
.pg53-h1-block h1 {
  font-size: 2.1rem; line-height: 1.7rem;
  background: var(--pg53-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: 0.8rem;
}
.pg53-h1-block p { color: var(--pg53-text-muted); font-size: 1.4rem; }

/* ---------- Game grid ---------- */
.pg53-game-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
}
.pg53-game-card {
  background: var(--pg53-bg-card);
  border-radius: 1.2rem; overflow: hidden;
  text-align: center; cursor: pointer;
  border: 0.1rem solid rgba(255,255,255,0.05);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  opacity: 0.85;
}
.pg53-game-card--visible { opacity: 1; }
.pg53-game-card:hover {
  transform: translateY(-0.3rem);
  border-color: var(--pg53-primary);
  box-shadow: 0 0.6rem 1.4rem rgba(255,87,34,0.35);
}
.pg53-game-card img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.pg53-game-card .pg53-game-name {
  display: block; padding: 0.6rem 0.4rem; font-size: 1.2rem;
  color: var(--pg53-text); font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---------- Category badge ---------- */
.pg53-cat-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: rgba(255,128,0,0.15); color: var(--pg53-primary);
  padding: 0.4rem 1rem; border-radius: 2rem; font-size: 1.2rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05rem; margin-bottom: 1rem;
}

/* ---------- Feature / info cards ---------- */
.pg53-card {
  background: var(--pg53-bg-card);
  border-radius: var(--pg53-radius);
  padding: 1.6rem; margin-bottom: 1.2rem;
  border: 0.1rem solid rgba(255,128,0,0.12);
  box-shadow: var(--pg53-shadow);
}
.pg53-card h3 { color: var(--pg53-primary); font-size: 1.6rem; margin-bottom: 0.6rem; display: flex; align-items: center; gap: 0.6rem; }
.pg53-card p { color: var(--pg53-text-muted); font-size: 1.4rem; line-height: 1.7rem; }
.pg53-card ul { list-style: none; margin-top: 0.6rem; }
.pg53-card li { padding: 0.4rem 0 0.4rem 1.8rem; position: relative; color: var(--pg53-text-muted); font-size: 1.4rem; }
.pg53-card li::before { content: "\f00c"; font-family: "Font Awesome 6 Free"; font-weight: 900; color: var(--pg53-primary); position: absolute; left: 0; }

/* ---------- Stats / RTP grid ---------- */
.pg53-stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
.pg53-stat-item {
  background: var(--pg53-bg-deep); border-radius: 1rem; padding: 1.2rem; text-align: center;
  border: 0.1rem solid rgba(255,128,0,0.15);
}
.pg53-stat-num { display: block; font-size: 2rem; font-weight: 800; color: var(--pg53-primary); }
.pg53-stat-label { display: block; font-size: 1.2rem; color: var(--pg53-text-muted); margin-top: 0.3rem; }

/* ---------- Testimonials ---------- */
.pg53-testimonial { background: var(--pg53-bg-card); border-radius: 1.2rem; padding: 1.3rem; margin-bottom: 1rem; border-left: 0.4rem solid var(--pg53-primary); }
.pg53-testimonial p { font-size: 1.35rem; color: var(--pg53-text); font-style: italic; margin-bottom: 0.6rem; }
.pg53-testimonial .pg53-author { font-size: 1.2rem; color: var(--pg53-primary); font-weight: 700; }
.pg53-stars { color: #FFD700; font-size: 1.3rem; }

/* ---------- Payment ---------- */
.pg53-pay-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.7rem; }
.pg53-pay-item { background: #fff; border-radius: 0.8rem; padding: 0.8rem; text-align: center; }
.pg53-pay-item img { height: 3rem; width: auto; margin: 0 auto; }

/* ---------- Winners ---------- */
.pg53-winner-row { display: flex; align-items: center; justify-content: space-between; padding: 0.7rem 0; border-bottom: 0.1rem solid rgba(255,255,255,0.06); }
.pg53-winner-name { font-weight: 700; color: var(--pg53-text); font-size: 1.3rem; }
.pg53-winner-game { color: var(--pg53-text-muted); font-size: 1.2rem; }
.pg53-winner-amount { color: var(--pg53-primary); font-weight: 800; font-size: 1.4rem; }

/* ---------- CTA banner ---------- */
.pg53-cta {
  background: var(--pg53-gradient);
  border-radius: var(--pg53-radius);
  padding: 2rem 1.4rem; text-align: center; margin: 2rem 0;
  box-shadow: 0 0.6rem 1.8rem rgba(255,69,0,0.4);
}
.pg53-cta h3 { color: #fff; font-size: 1.8rem; margin-bottom: 0.6rem; }
.pg53-cta p { color: rgba(255,255,255,0.9); font-size: 1.35rem; margin-bottom: 1.2rem; }
.pg53-cta .pg53-btn { background: #fff; color: var(--pg53-accent); }

/* ---------- App download ---------- */
.pg53-app-row { display: flex; align-items: center; gap: 1rem; }
.pg53-app-row img { width: 11rem; height: 11rem; border-radius: 1.2rem; object-fit: cover; }
.pg53-app-text h3 { color: var(--pg53-primary); font-size: 1.6rem; margin-bottom: 0.4rem; }
.pg53-app-text p { color: var(--pg53-text-muted); font-size: 1.3rem; margin-bottom: 0.8rem; }

/* ---------- FAQ ---------- */
.pg53-faq details { background: var(--pg53-bg-card); border-radius: 1rem; margin-bottom: 0.8rem; padding: 1rem 1.2rem; border: 0.1rem solid rgba(255,128,0,0.12); }
.pg53-faq summary { cursor: pointer; font-weight: 700; color: var(--pg53-text); font-size: 1.4rem; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.pg53-faq summary::after { content: "+"; color: var(--pg53-primary); font-size: 1.8rem; }
.pg53-faq details[open] summary::after { content: "\2212"; }
.pg53-faq p { margin-top: 0.8rem; color: var(--pg53-text-muted); font-size: 1.35rem; line-height: 1.7rem; }

/* ---------- Tricks list ---------- */
.pg53-trick { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1rem; }
.pg53-trick .pg53-trick-num { background: var(--pg53-gradient); color: #fff; min-width: 2.6rem; height: 2.6rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.3rem; }
.pg53-trick p { color: var(--pg53-text-muted); font-size: 1.35rem; line-height: 1.6rem; }

/* ---------- Footer ---------- */
.pg53-footer { background: var(--pg53-bg-deep); padding: 2.4rem 1.2rem calc(var(--pg53-bottom-h) + 2rem); border-top: 0.3rem solid var(--pg53-primary); }
.pg53-footer h4 { color: var(--pg53-primary); font-size: 1.5rem; margin-bottom: 0.8rem; }
.pg53-footer p { color: var(--pg53-text-muted); font-size: 1.3rem; line-height: 1.6rem; margin-bottom: 1rem; }
.pg53-footer-links { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1rem 0; }
.pg53-footer-links a { background: var(--pg53-bg-card); color: var(--pg53-text); padding: 0.6rem 1rem; border-radius: 2rem; font-size: 1.2rem; border: 0.1rem solid rgba(255,128,0,0.15); }
.pg53-footer-links a:hover { background: var(--pg53-primary); color: #fff; }
.pg53-footer-internal { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem 1rem; margin: 1rem 0; }
.pg53-footer-internal a { color: var(--pg53-text-muted); font-size: 1.25rem; }
.pg53-footer-internal a:hover { color: var(--pg53-primary); }
.pg53-copyright { text-align: center; color: var(--pg53-text-muted); font-size: 1.2rem; padding-top: 1.4rem; border-top: 0.1rem solid rgba(255,255,255,0.08); margin-top: 1.4rem; }

/* ---------- Mobile bottom nav ---------- */
.pg53-bottom-nav {
  position: fixed;
  bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 430px;
  height: var(--pg53-bottom-h);
  background: linear-gradient(180deg, #2a2a30 0%, #1f1f24 100%);
  border-top: 0.25rem solid var(--pg53-primary);
  display: flex; justify-content: space-around; align-items: center;
  z-index: 1000;
  box-shadow: 0 -0.4rem 1.4rem rgba(0,0,0,0.5);
}
.pg53-bottom-nav-btn {
  flex: 1; min-width: 6rem; min-height: 6rem;
  background: transparent; border: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.2rem;
  color: var(--pg53-text-muted); font-size: 1.1rem; font-weight: 600;
  transition: color 0.18s ease, transform 0.18s ease;
  text-decoration: none;
  position: relative;
}
.pg53-bottom-nav-btn .pg53-bn-icon { font-size: 2.4rem; line-height: 1; }
.pg53-bottom-nav-btn:hover { color: var(--pg53-primary); transform: translateY(-0.15rem); }
.pg53-bottom-nav-btn--active { color: var(--pg53-primary); }
.pg53-bottom-nav-btn--active::before {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 3rem; height: 0.3rem; background: var(--pg53-primary); border-radius: 0 0 0.4rem 0.4rem;
}
.pg53-bottom-nav-btn--promo .pg53-bn-icon {
  background: var(--pg53-gradient); color: #fff;
  width: 3.6rem; height: 3.6rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 2rem;
  margin-top: -1.4rem; box-shadow: 0 0.4rem 1rem rgba(255,69,0,0.5);
  border: 0.25rem solid #1f1f24;
}

/* ---------- Back to top ---------- */
.pg53-back-top {
  position: fixed; right: 1.2rem; bottom: calc(var(--pg53-bottom-h) + 1.2rem);
  width: 4.2rem; height: 4.2rem; border-radius: 50%;
  background: var(--pg53-gradient); color: #fff; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 2rem;
  z-index: 999; opacity: 0; visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  box-shadow: 0 0.4rem 1.2rem rgba(255,69,0,0.4);
}
.pg53-back-top--visible { opacity: 1; visibility: visible; }

/* ---------- Desktop: hide bottom nav ---------- */
@media (min-width: 769px) {
  .pg53-bottom-nav { display: none; }
  body { max-width: 430px; }
  .pg53-footer { padding-bottom: 2.4rem; }
}

/* ---------- Mobile: reserve space for bottom nav ---------- */
@media (max-width: 768px) {
  .pg53-page { padding-bottom: var(--pg53-bottom-h); }
}

/* ---------- Small screens fine-tune ---------- */
@media (max-width: 360px) {
  .pg53-game-grid { grid-template-columns: repeat(2, 1fr); }
  .pg53-h1-block h1 { font-size: 1.8rem; }
}
