/* ============================================================
 * Han Online - style-7d7e.css
 * Mobile-first core stylesheet for han-online.homes.
 * Palette: #BA55D3 | #D2B48C | #F5F5F5 | #9932CC | #0C0C0C | #F5DEB3
 * All classes use the pg7d- prefix.
 * ============================================================ */

:root {
  --pg7d-primary: #BA55D3;
  --pg7d-secondary: #9932CC;
  --pg7d-tan: #D2B48C;
  --pg7d-wheat: #F5DEB3;
  --pg7d-light: #F5F5F5;
  --pg7d-dark: #0C0C0C;
  --pg7d-bg: #14091f;
  --pg7d-bg-alt: #1f1030;
  --pg7d-card: #261640;
  --pg7d-card-alt: #2f1a4d;
  --pg7d-text: #f5e9ff;
  --pg7d-muted: #b9a8d6;
  --pg7d-gold: #ffd773;
  --pg7d-grad: linear-gradient(135deg, #BA55D3 0%, #9932CC 60%, #6a1bb0 100%);
  --pg7d-gold-grad: linear-gradient(135deg, #F5DEB3 0%, #D2B48C 100%);
  --pg7d-radius: 1.2rem;
  --pg7d-radius-sm: 0.8rem;
}

/* Reset */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 62.5%; scroll-behavior: smooth; }
body {
  font-family: "Segoe UI", "Helvetica Neue", Arial, system-ui, -apple-system, sans-serif;
  background: var(--pg7d-bg);
  color: var(--pg7d-text);
  line-height: 1.5;
  font-size: 1.5rem;
  overflow-x: hidden;
  max-width: 430px;
  margin: 0 auto;
  position: relative;
}
img { max-width: 100%; display: block; }
a { color: var(--pg7d-wheat); text-decoration: none; }
a:hover { color: var(--pg7d-gold); }
ul { list-style: none; }

/* Layout helpers */
.pg7d-container { width: 100%; padding: 0 1.2rem; }
.pg7d-wrapper { padding: 2rem 1.2rem; }
.pg7d-section { padding: 2.4rem 1.2rem; }
.pg7d-section-alt { background: var(--pg7d-bg-alt); }
.pg7d-grid { display: grid; gap: 1rem; }

/* Section titles */
.pg7d-section-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--pg7d-wheat);
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.pg7d-section-title i { color: var(--pg7d-primary); }
.pg7d-section-sub {
  font-size: 1.3rem;
  color: var(--pg7d-muted);
  margin-bottom: 1.4rem;
}
.pg7d-divider {
  height: 3px;
  width: 60px;
  background: var(--pg7d-grad);
  border-radius: 3px;
  margin: 0.6rem 0 1.4rem;
}

/* ============ Header ============ */
.pg7d-header {
  position: fixed;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  z-index: 1000;
  background: rgba(20, 9, 31, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(186, 85, 211, 0.35);
  box-shadow: 0 2px 16px rgba(0,0,0,0.45);
}
.pg7d-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1rem;
}
.pg7d-brand { display: flex; align-items: center; gap: 0.6rem; }
.pg7d-brand-logo {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--pg7d-grad);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 1.4rem;
}
.pg7d-brand-name {
  font-size: 1.7rem; font-weight: 800;
  color: var(--pg7d-wheat);
  letter-spacing: 0.3px;
}
.pg7d-brand-name span { color: var(--pg7d-primary); }
.pg7d-header-actions { display: flex; align-items: center; gap: 0.5rem; }
.pg7d-menu-btn {
  background: transparent; border: 0;
  color: var(--pg7d-wheat); font-size: 2rem;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; border-radius: 8px;
}
.pg7d-menu-btn:active { background: rgba(186,85,211,0.2); }

/* Buttons */
.pg7d-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.4rem;
  border: 0; border-radius: 999px;
  padding: 0.7rem 1.2rem;
  font-size: 1.35rem; font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  text-align: center;
  line-height: 1;
}
.pg7d-btn:active { transform: scale(0.96); }
.pg7d-btn-login {
  background: transparent;
  color: var(--pg7d-wheat);
  border: 1.5px solid var(--pg7d-tan);
  padding: 0.55rem 1rem;
}
.pg7d-btn-register {
  background: var(--pg7d-gold-grad);
  color: #3a1c00;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(245, 222, 179, 0.3);
}
.pg7d-btn-promo {
  background: var(--pg7d-grad);
  color: #fff;
  box-shadow: 0 4px 14px rgba(186, 85, 211, 0.45);
}
.pg7d-btn-block { display: flex; width: 100%; padding: 1rem; font-size: 1.5rem; }
.pg7d-btn-lg { padding: 1.2rem; font-size: 1.6rem; }

/* ============ Mobile Menu ============ */
.pg7d-menu-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 9998;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
}
.pg7d-overlay-show { opacity: 1; pointer-events: auto; }
.pg7d-mobile-menu {
  position: fixed;
  top: 0; right: -85%;
  width: 80%; max-width: 340px;
  height: 100vh;
  background: linear-gradient(180deg, #1f1030 0%, #14091f 100%);
  z-index: 9999;
  padding: 2rem 1.4rem;
  overflow-y: auto;
  transition: right 0.3s ease;
  border-left: 1px solid rgba(186,85,211,0.3);
}
.pg7d-menu-open { right: 0; }
.pg7d-menu-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 1.6rem;
}
.pg7d-menu-head .pg7d-brand-name { font-size: 1.9rem; }
.pg7d-menu-close {
  background: transparent; border: 0; color: var(--pg7d-wheat);
  font-size: 2rem; cursor: pointer;
}
.pg7d-menu-cta { display: grid; gap: 0.7rem; margin-bottom: 1.6rem; }
.pg7d-menu-links { display: grid; gap: 0.2rem; }
.pg7d-menu-links a {
  display: flex; align-items: center; gap: 0.8rem;
  padding: 0.9rem 0.8rem;
  border-radius: var(--pg7d-radius-sm);
  color: var(--pg7d-text);
  font-size: 1.4rem; font-weight: 600;
  border-bottom: 1px solid rgba(186,85,211,0.12);
}
.pg7d-menu-links a i { color: var(--pg7d-primary); width: 22px; text-align: center; }
.pg7d-menu-links a:hover { background: rgba(186,85,211,0.15); }

/* ============ Main ============ */
.pg7d-main { padding-top: 6rem; padding-bottom: 90px; }

/* ============ Hero Carousel ============ */
.pg7d-hero { position: relative; margin: 1rem 0 0; }
.pg7d-carousel {
  position: relative;
  border-radius: var(--pg7d-radius);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.pg7d-slide {
  display: none;
  position: relative;
}
.pg7d-slide-active { display: block; }
.pg7d-slide img {
  width: 100%; height: 200px; object-fit: cover;
}
.pg7d-slide-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,9,31,0.15) 0%, rgba(20,9,31,0.85) 100%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 1.2rem;
}
.pg7d-slide-title {
  font-size: 1.8rem; font-weight: 800;
  color: var(--pg7d-wheat);
  margin-bottom: 0.3rem;
}
.pg7d-slide-desc {
  font-size: 1.2rem; color: var(--pg7d-light);
  margin-bottom: 0.7rem;
}
.pg7d-dots {
  position: absolute; bottom: 8px; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 6px; z-index: 2;
}
.pg7d-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(245,245,245,0.45);
  border: 0; cursor: pointer;
}
.pg7d-dot-active { background: var(--pg7d-gold); width: 22px; border-radius: 4px; }

/* ============ Quick CTA Bar ============ */
.pg7d-quick-cta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  margin: 1rem 0;
}
.pg7d-quick-cta .pg7d-btn { padding: 0.8rem 0.4rem; font-size: 1.2rem; }

/* ============ Category badge strip ============ */
.pg7d-cat-strip {
  display: flex; gap: 0.5rem;
  overflow-x: auto;
  padding: 0.6rem 0;
  margin-bottom: 0.4rem;
  -webkit-overflow-scrolling: touch;
}
.pg7d-cat-strip::-webkit-scrollbar { display: none; }
.pg7d-cat-badge {
  flex: 0 0 auto;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: var(--pg7d-card);
  border: 1px solid rgba(186,85,211,0.3);
  font-size: 1.25rem; font-weight: 600;
  color: var(--pg7d-wheat);
  display: inline-flex; align-items: center; gap: 0.4rem;
}

/* ============ Game Grid ============ */
.pg7d-game-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.7rem;
}
.pg7d-game-card {
  background: var(--pg7d-card);
  border-radius: var(--pg7d-radius-sm);
  overflow: hidden;
  border: 1px solid rgba(186,85,211,0.18);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  text-align: center;
}
.pg7d-game-card:active {
  transform: scale(0.96);
  box-shadow: 0 0 0 2px var(--pg7d-primary);
}
.pg7d-game-card img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  background: #0c0414;
}
.pg7d-game-card-name {
  font-size: 1.1rem;
  color: var(--pg7d-text);
  padding: 0.4rem 0.3rem 0.5rem;
  line-height: 1.2;
  min-height: 2.4em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pg7d-game-card-hot {
  position: relative;
}
.pg7d-game-card-hot::before {
  content: "HOT";
  position: absolute; top: 4px; left: 4px;
  background: linear-gradient(135deg, #ff5e62, #ff9966);
  color: #fff; font-size: 0.9rem; font-weight: 800;
  padding: 1px 6px; border-radius: 4px;
  z-index: 2;
}

/* ============ Features / Cards ============ */
.pg7d-card {
  background: var(--pg7d-card);
  border: 1px solid rgba(186,85,211,0.18);
  border-radius: var(--pg7d-radius);
  padding: 1.4rem;
}
.pg7d-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
}
.pg7d-feature-item {
  background: var(--pg7d-card);
  border-radius: var(--pg7d-radius-sm);
  padding: 1rem 0.8rem;
  text-align: center;
  border: 1px solid rgba(186,85,211,0.15);
}
.pg7d-feature-icon {
  width: 46px; height: 46px;
  margin: 0 auto 0.5rem;
  border-radius: 50%;
  background: var(--pg7d-grad);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 2rem;
}
.pg7d-feature-item h4 {
  font-size: 1.25rem; color: var(--pg7d-wheat);
  margin-bottom: 0.3rem;
}
.pg7d-feature-item p {
  font-size: 1.1rem; color: var(--pg7d-muted);
  line-height: 1.35;
}

/* ============ Promo CTA banner ============ */
.pg7d-promo-banner {
  background: var(--pg7d-grad);
  border-radius: var(--pg7d-radius);
  padding: 1.6rem 1.2rem;
  text-align: center;
  margin: 1.4rem 0;
  box-shadow: 0 8px 24px rgba(186,85,211,0.4);
  position: relative;
  overflow: hidden;
}
.pg7d-promo-banner::after {
  content: "";
  position: absolute; right: -30px; top: -30px;
  width: 120px; height: 120px;
  background: rgba(255,255,255,0.12);
  border-radius: 50%;
}
.pg7d-promo-banner h3 {
  font-size: 1.8rem; color: #fff; margin-bottom: 0.3rem;
}
.pg7d-promo-banner p {
  font-size: 1.25rem; color: rgba(255,255,255,0.92);
  margin-bottom: 1rem;
}
.pg7d-promo-banner .pg7d-btn {
  background: var(--pg7d-gold-grad);
  color: #3a1c00;
}

/* ============ RTP table ============ */
.pg7d-rtp-table {
  width: 100%; border-collapse: collapse;
  background: var(--pg7d-card);
  border-radius: var(--pg7d-radius-sm);
  overflow: hidden;
  font-size: 1.2rem;
}
.pg7d-rtp-table th, .pg7d-rtp-table td {
  padding: 0.7rem 0.6rem;
  text-align: left;
  border-bottom: 1px solid rgba(186,85,211,0.15);
}
.pg7d-rtp-table th {
  background: rgba(186,85,211,0.18);
  color: var(--pg7d-wheat);
  font-size: 1.15rem;
}
.pg7d-rtp-bar {
  display: inline-block;
  height: 8px; border-radius: 4px;
  background: var(--pg7d-gold-grad);
  vertical-align: middle;
}

/* ============ Testimonials ============ */
.pg7d-testi-grid {
  display: grid; gap: 0.8rem;
}
.pg7d-testi {
  background: var(--pg7d-card);
  border-left: 3px solid var(--pg7d-primary);
  border-radius: var(--pg7d-radius-sm);
  padding: 1rem;
}
.pg7d-testi-head {
  display: flex; align-items: center; gap: 0.6rem;
  margin-bottom: 0.4rem;
}
.pg7d-testi-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--pg7d-grad);
  color: #fff; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
}
.pg7d-testi-name { font-size: 1.25rem; color: var(--pg7d-wheat); font-weight: 700; }
.pg7d-testi-stars { color: var(--pg7d-gold); font-size: 1.1rem; margin-left: auto; }
.pg7d-testi-text { font-size: 1.2rem; color: var(--pg7d-muted); line-height: 1.4; }

/* ============ Winners ============ */
.pg7d-winner-list { display: grid; gap: 0.5rem; }
.pg7d-winner-row {
  display: flex; align-items: center; gap: 0.7rem;
  background: var(--pg7d-card);
  padding: 0.7rem 0.9rem;
  border-radius: var(--pg7d-radius-sm);
  font-size: 1.2rem;
}
.pg7d-winner-row i { color: var(--pg7d-gold); }
.pg7d-winner-name { color: var(--pg7d-wheat); font-weight: 700; }
.pg7d-winner-amt { margin-left: auto; color: #6cff9e; font-weight: 800; }

/* ============ Payment methods ============ */
.pg7d-pay-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem;
}
.pg7d-pay-item {
  background: var(--pg7d-card);
  border-radius: var(--pg7d-radius-sm);
  padding: 1rem 0.5rem;
  text-align: center;
  border: 1px solid rgba(186,85,211,0.15);
  font-size: 1.15rem;
  color: var(--pg7d-text);
}
.pg7d-pay-item i { color: var(--pg7d-wheat); font-size: 2rem; display: block; margin-bottom: 0.3rem; }

/* ============ App download ============ */
.pg7d-app-box {
  background: linear-gradient(135deg, #261640 0%, #381859 100%);
  border-radius: var(--pg7d-radius);
  padding: 1.6rem 1.2rem;
  display: flex; flex-direction: column; gap: 0.8rem;
  border: 1px solid rgba(186,85,211,0.25);
}
.pg7d-app-box h3 { font-size: 1.7rem; color: var(--pg7d-wheat); }
.pg7d-app-box p { font-size: 1.25rem; color: var(--pg7d-muted); }
.pg7d-app-row { display: flex; gap: 0.6rem; flex-wrap: wrap; }

/* ============ SEO content / FAQ ============ */
.pg7d-seo-text {
  font-size: 1.35rem; line-height: 1.65;
  color: var(--pg7d-text);
}
.pg7d-seo-text p { margin-bottom: 1rem; }
.pg7d-seo-text h3 { font-size: 1.6rem; color: var(--pg7d-wheat); margin: 1.2rem 0 0.6rem; }
.pg7d-seo-text strong { color: var(--pg7d-gold); }
.pg7d-seo-text a { color: var(--pg7d-primary); text-decoration: underline; }

.pg7d-faq-list { display: grid; gap: 0.6rem; }
.pg7d-faq-item {
  background: var(--pg7d-card);
  border-radius: var(--pg7d-radius-sm);
  border: 1px solid rgba(186,85,211,0.18);
  overflow: hidden;
}
.pg7d-faq-q {
  width: 100%;
  background: transparent;
  border: 0;
  color: var(--pg7d-wheat);
  text-align: left;
  padding: 1rem;
  font-size: 1.3rem; font-weight: 700;
  cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
}
.pg7d-faq-q .pg7d-faq-icon { color: var(--pg7d-primary); transition: transform 0.2s; }
.pg7d-faq-a {
  max-height: 0; overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 1rem;
  font-size: 1.25rem; color: var(--pg7d-muted); line-height: 1.5;
}
.pg7d-faq-open .pg7d-faq-a { max-height: 320px; padding: 0 1rem 1rem; }
.pg7d-faq-open .pg7d-faq-icon { transform: rotate(45deg); }

/* ============ Footer ============ */
.pg7d-footer {
  background: #0a0413;
  border-top: 1px solid rgba(186,85,211,0.3);
  padding: 2rem 1.2rem 1rem;
  margin-top: 1.5rem;
}
.pg7d-footer-brand {
  display: flex; align-items: center; gap: 0.6rem;
  margin-bottom: 0.8rem;
}
.pg7d-footer p {
  font-size: 1.2rem; color: var(--pg7d-muted); line-height: 1.5;
  margin-bottom: 1rem;
}
.pg7d-footer-links {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.4rem 0.8rem;
  margin-bottom: 1rem;
}
.pg7d-footer-links a {
  font-size: 1.2rem; color: var(--pg7d-text);
}
.pg7d-footer-promos {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  margin-bottom: 1rem;
}
.pg7d-footer-promos .pg7d-btn { padding: 0.5rem 0.9rem; font-size: 1.1rem; }
.pg7d-footer-copy {
  border-top: 1px solid rgba(186,85,211,0.18);
  padding-top: 0.8rem;
  font-size: 1.1rem; color: var(--pg7d-muted); text-align: center;
}

/* ============ Bottom Nav ============ */
.pg7d-bottom-nav {
  position: fixed;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%; max-width: 430px;
  height: 62px;
  background: linear-gradient(180deg, #1f1030 0%, #0a0413 100%);
  border-top: 1px solid rgba(186,85,211,0.35);
  display: flex; justify-content: space-around; align-items: center;
  z-index: 1000;
  box-shadow: 0 -4px 18px rgba(0,0,0,0.4);
}
.pg7d-bottom-nav-btn {
  flex: 1;
  min-width: 60px; min-height: 60px;
  background: transparent; border: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px;
  color: var(--pg7d-muted);
  font-size: 1rem; font-weight: 600;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.15s ease;
  position: relative;
}
.pg7d-bottom-nav-btn i,
.pg7d-bottom-nav-btn .material-icons-outlined,
.pg7d-bottom-nav-btn ion-icon { font-size: 22px; }
.pg7d-bottom-nav-btn ion-icon { font-size: 24px; }
.pg7d-bottom-nav-btn:active { transform: scale(0.92); }
.pg7d-bottom-nav-btn:hover { color: var(--pg7d-wheat); }
.pg7d-bottom-nav-active { color: var(--pg7d-gold); }
.pg7d-bottom-nav-active::before {
  content: "";
  position: absolute; top: 0;
  width: 32px; height: 3px;
  background: var(--pg7d-gold-grad);
  border-radius: 0 0 4px 4px;
}
.pg7d-bottom-nav-badge {
  position: absolute; top: 8px; right: 18px;
  background: #ff3b6b; color: #fff;
  font-size: 0.85rem; font-weight: 800;
  min-width: 16px; height: 16px;
  border-radius: 8px; padding: 0 4px;
  display: flex; align-items: center; justify-content: center;
}

/* ============ Back to top ============ */
.pg7d-back-top {
  position: fixed;
  right: 14px; bottom: 78px;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--pg7d-grad);
  color: #fff; border: 0;
  font-size: 1.8rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  z-index: 999;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease, transform 0.15s ease;
  box-shadow: 0 4px 14px rgba(186,85,211,0.5);
}
.pg7d-back-top-show { opacity: 1; pointer-events: auto; }
.pg7d-back-top:active { transform: scale(0.92); }

/* ============ Utility ============ */
.pg7d-text-center { text-align: center; }
.pg7d-mt-1 { margin-top: 0.6rem; }
.pg7d-mt-2 { margin-top: 1.2rem; }
.pg7d-tag {
  display: inline-block;
  background: rgba(186,85,211,0.2);
  color: var(--pg7d-wheat);
  border: 1px solid rgba(186,85,211,0.4);
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  font-size: 1.05rem; font-weight: 600;
}

/* Desktop: hide bottom nav, widen layout */
@media (min-width: 769px) {
  body { max-width: 100%; }
  .pg7d-bottom-nav { display: none; }
  .pg7d-main { padding-bottom: 2rem; }
  .pg7d-container, .pg7d-section { max-width: 1100px; margin: 0 auto; }
  .pg7d-header { max-width: 100%; }
  .pg7d-game-grid { grid-template-columns: repeat(6, 1fr); }
  .pg7d-feature-grid { grid-template-columns: repeat(4, 1fr); }
  .pg7d-pay-grid { grid-template-columns: repeat(6, 1fr); }
  .pg7d-footer-links { grid-template-columns: repeat(4, 1fr); }
}
