/* ============================================================
 * phjoy.homes - Core stylesheet (css/style-5813.css)
 * Class prefix: s581-
 * Palette: #9400D3 (primary) | #CC99FF (light) | #34495E (dark bg) | #CCCCCC (text)
 * Mobile-first, max-width 430px. Root font 62.5% (1rem = 10px).
 * ============================================================ */

:root {
  --s581-primary: #9400D3;
  --s581-primary-dark: #6a00a0;
  --s581-light: #CC99FF;
  --s581-bg: #34495E;
  --s581-bg-dark: #22303d;
  --s581-bg-darker: #18222b;
  --s581-text: #CCCCCC;
  --s581-text-light: #ffffff;
  --s581-accent: #FFD700;
  --s581-accent-2: #FF6B9D;
  --s581-success: #2ecc71;
  --s581-radius: 1.2rem;
  --s581-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  --s581-shadow-glow: 0 0 18px rgba(148, 0, 211, 0.55);
  --s581-header-h: 5.6rem;
  --s581-bottom-h: 6.2rem;
}

/* ---------------- Reset & base ---------------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(160deg, var(--s581-bg) 0%, var(--s581-bg-dark) 60%, var(--s581-bg-darker) 100%);
  color: var(--s581-text-light);
  line-height: 1.5rem;
  font-size: 1.5rem;
  overflow-x: hidden;
  min-height: 100vh;
}

a { color: var(--s581-light); text-decoration: none; }
a:hover { color: var(--s581-text-light); }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { line-height: 1.3; font-weight: 700; color: var(--s581-text-light); }
ul { list-style: none; }

/* ---------------- Layout containers ---------------- */
.s581-container { width: 100%; max-width: 430px; margin: 0 auto; padding: 0 1.2rem; position: relative; }
.s581-wrapper { width: 100%; max-width: 430px; margin: 0 auto; }
.s581-section { padding: 2.4rem 0; }
.s581-section-title { font-size: 2.0rem; margin-bottom: 1.2rem; color: var(--s581-light); display: flex; align-items: center; gap: 0.8rem; }
.s581-section-title::before { content: ''; width: 0.5rem; height: 2.0rem; background: var(--s581-primary); border-radius: 0.3rem; }

/* ---------------- Header ---------------- */
.s581-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--s581-header-h);
  background: rgba(24, 34, 43, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 0.2rem solid var(--s581-primary);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}
.s581-header-inner { max-width: 430px; margin: 0 auto; height: 100%; display: flex; align-items: center; justify-content: space-between; padding: 0 1.0rem; }
.s581-logo { display: flex; align-items: center; gap: 0.6rem; }
.s581-logo img { width: 2.8rem; height: 2.8rem; border-radius: 0.6rem; }
.s581-logo-text { font-size: 1.8rem; font-weight: 800; color: var(--s581-text-light); letter-spacing: 0.05rem; }
.s581-logo-text span { color: var(--s581-light); }
.s581-header-actions { display: flex; align-items: center; gap: 0.6rem; }
.s581-menu-btn { background: transparent; border: 0.3rem solid var(--s581-primary); color: var(--s581-light); width: 3.4rem; height: 3.4rem; border-radius: 0.8rem; font-size: 1.6rem; cursor: pointer; display: flex; align-items: center; justify-content: center; }

/* ---------------- Buttons ---------------- */
.s581-btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; border: none; cursor: pointer; font-weight: 700; border-radius: 0.8rem; padding: 0.9rem 1.4rem; font-size: 1.3rem; transition: transform 0.18s ease, box-shadow 0.18s ease; text-align: center; }
.s581-btn:active { transform: scale(0.95); }
.s581-btn-login { background: transparent; color: var(--s581-light); border: 0.2rem solid var(--s581-light); padding: 0.7rem 1.2rem; }
.s581-btn-register { background: linear-gradient(135deg, var(--s581-primary), var(--s581-primary-dark)); color: #fff; box-shadow: var(--s581-shadow-glow); padding: 0.8rem 1.4rem; }
.s581-btn-register:hover { color: #fff; box-shadow: 0 0 26px rgba(148, 0, 211, 0.8); }
.s581-btn-cta { background: linear-gradient(135deg, var(--s581-primary), var(--s581-accent-2)); color: #fff; padding: 1.2rem 2.0rem; font-size: 1.5rem; width: 100%; box-shadow: var(--s581-shadow-glow); }
.s581-btn-cta:hover { color: #fff; transform: translateY(-2px); }
.s581-btn-small { padding: 0.6rem 1.0rem; font-size: 1.2rem; }

/* ---------------- Mobile menu ---------------- */
.s581-menu-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 9998; opacity: 0; visibility: hidden; transition: opacity 0.25s; }
.s581-menu-backdrop.s581-backdrop-show { opacity: 1; visibility: visible; }
.s581-mobile-menu {
  position: fixed; top: 0; right: -85%; width: 80%; max-width: 320px; height: 100vh; z-index: 9999;
  background: var(--s581-bg-dark); padding: 2.0rem 1.6rem; overflow-y: auto;
  transition: right 0.3s ease; border-left: 0.3rem solid var(--s581-primary);
}
.s581-mobile-menu.s581-menu-open { right: 0; }
.s581-menu-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.6rem; padding-bottom: 1.2rem; border-bottom: 0.1rem solid rgba(204, 153, 255, 0.2); }
.s581-menu-title { font-size: 1.6rem; color: var(--s581-light); }
.s581-menu-close { background: transparent; border: none; color: var(--s581-text); font-size: 2.0rem; cursor: pointer; }
.s581-menu-list a { display: flex; align-items: center; gap: 1.0rem; padding: 1.2rem 1.0rem; border-radius: 0.6rem; color: var(--s581-text-light); font-size: 1.4rem; border-bottom: 0.1rem solid rgba(204, 153, 255, 0.12); transition: background 0.2s, padding 0.2s; }
.s581-menu-list a:hover { background: rgba(148, 0, 211, 0.25); padding-left: 1.4rem; color: #fff; }
.s581-menu-list a i { color: var(--s581-light); width: 2.0rem; text-align: center; }
.s581-menu-cta { margin-top: 1.6rem; display: flex; flex-direction: column; gap: 0.8rem; }

/* ---------------- Hero / Carousel ---------------- */
.s581-carousel { position: relative; margin-top: calc(var(--s581-header-h) + 1.2rem); border-radius: var(--s581-radius); overflow: hidden; box-shadow: var(--s581-shadow); }
.s581-carousel-track { position: relative; height: 18rem; }
.s581-carousel-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 0.6s ease; cursor: pointer; }
.s581-carousel-slide.s581-slide-active { opacity: 1; }
.s581-carousel-slide img { width: 100%; height: 100%; object-fit: cover; }
.s581-carousel-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(24,34,43,0.85) 0%, rgba(24,34,43,0.2) 100%); display: flex; flex-direction: column; justify-content: center; padding: 1.6rem; }
.s581-carousel-title { font-size: 2.2rem; color: #fff; margin-bottom: 0.4rem; }
.s581-carousel-sub { font-size: 1.3rem; color: var(--s581-light); margin-bottom: 0.8rem; }
.s581-carousel-cta { display: inline-flex; align-items: center; gap: 0.4rem; background: var(--s581-primary); color: #fff; padding: 0.6rem 1.2rem; border-radius: 0.6rem; font-size: 1.2rem; font-weight: 700; width: fit-content; }
.s581-carousel-arrow { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.45); color: #fff; border: none; width: 3.2rem; height: 3.2rem; border-radius: 50%; font-size: 1.6rem; cursor: pointer; z-index: 2; }
.s581-carousel-arrow.s581-prev { left: 0.8rem; }
.s581-carousel-arrow.s581-next { right: 0.8rem; }
.s581-carousel-dots { position: absolute; bottom: 0.8rem; left: 50%; transform: translateX(-50%); display: flex; gap: 0.5rem; z-index: 2; }
.s581-carousel-dot { width: 0.8rem; height: 0.8rem; border-radius: 50%; background: rgba(255,255,255,0.45); cursor: pointer; }
.s581-carousel-dot.s581-dot-active { background: var(--s581-primary); width: 2.0rem; border-radius: 0.4rem; }

/* ---------------- Hero intro ---------------- */
.s581-hero-intro { padding: 2.0rem 0 0.6rem; text-align: center; }
.s581-hero-intro h1 { font-size: 2.4rem; color: var(--s581-light); margin-bottom: 0.6rem; }
.s581-hero-intro p { font-size: 1.3rem; color: var(--s581-text); line-height: 1.6; }

/* ---------------- Filter pills ---------------- */
.s581-filters { display: flex; gap: 0.6rem; overflow-x: auto; padding: 1.0rem 0; -webkit-overflow-scrolling: touch; }
.s581-filters::-webkit-scrollbar { display: none; }
.s581-filter-pill { flex: 0 0 auto; padding: 0.6rem 1.2rem; border-radius: 2.0rem; background: var(--s581-bg-dark); color: var(--s581-text); font-size: 1.2rem; font-weight: 600; cursor: pointer; border: 0.15rem solid transparent; white-space: nowrap; }
.s581-filter-pill.s581-pill-active { background: var(--s581-primary); color: #fff; border-color: var(--s581-light); box-shadow: var(--s581-shadow-glow); }

/* ---------------- Game grid ---------------- */
.s581-game-section { margin-bottom: 2.0rem; }
.s581-game-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.0rem; }
.s581-game-section-head h2 { font-size: 1.7rem; color: var(--s581-light); display: flex; align-items: center; gap: 0.6rem; }
.s581-game-section-head h2 i { color: var(--s581-primary); }
.s581-game-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.7rem; }
.s581-game-card { display: flex; flex-direction: column; align-items: center; background: var(--s581-bg-dark); border-radius: 0.8rem; padding: 0.5rem; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; border: 0.1rem solid rgba(204,153,255,0.12); }
.s581-game-card:hover { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(148,0,211,0.4); border-color: var(--s581-primary); }
.s581-game-card img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 0.6rem; }
.s581-game-card-name { font-size: 1.0rem; color: var(--s581-text-light); text-align: center; margin-top: 0.4rem; line-height: 1.2; height: 2.4rem; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* ---------------- Info / content blocks ---------------- */
.s581-card { background: var(--s581-bg-dark); border-radius: var(--s581-radius); padding: 1.6rem; margin-bottom: 1.4rem; box-shadow: var(--s581-shadow); border-left: 0.3rem solid var(--s581-primary); }
.s581-card h2 { font-size: 1.8rem; color: var(--s581-light); margin-bottom: 0.8rem; }
.s581-card h3 { font-size: 1.5rem; color: var(--s581-text-light); margin: 1.0rem 0 0.4rem; }
.s581-card p { font-size: 1.3rem; color: var(--s581-text); line-height: 1.6; margin-bottom: 0.6rem; }
.s581-card ul { margin: 0.6rem 0 0.6rem 1.2rem; }
.s581-card ul li { font-size: 1.3rem; color: var(--s581-text); line-height: 1.6; margin-bottom: 0.4rem; list-style: disc; }
.s581-card ul li::marker { color: var(--s581-primary); }

/* Inline promo link inside content */
.s581-promo-link { color: var(--s581-accent); font-weight: 700; cursor: pointer; }
.s581-promo-link:hover { color: var(--s581-accent-2); text-decoration: underline; }

/* ---------------- Steps ---------------- */
.s581-steps { counter-reset: step; }
.s581-step { display: flex; gap: 1.0rem; margin-bottom: 1.2rem; align-items: flex-start; }
.s581-step-num { flex: 0 0 3.2rem; width: 3.2rem; height: 3.2rem; background: linear-gradient(135deg, var(--s581-primary), var(--s581-primary-dark)); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.5rem; }
.s581-step-body h3 { font-size: 1.4rem; color: var(--s581-light); margin-bottom: 0.2rem; }
.s581-step-body p { font-size: 1.3rem; color: var(--s581-text); line-height: 1.5; }

/* ---------------- Features grid ---------------- */
.s581-feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
.s581-feature-item { background: var(--s581-bg-dark); border-radius: 0.8rem; padding: 1.2rem; text-align: center; border-top: 0.25rem solid var(--s581-primary); }
.s581-feature-item i { font-size: 2.4rem; color: var(--s581-light); margin-bottom: 0.5rem; }
.s581-feature-item h3 { font-size: 1.3rem; color: var(--s581-text-light); margin-bottom: 0.3rem; }
.s581-feature-item p { font-size: 1.1rem; color: var(--s581-text); line-height: 1.4; }

/* ---------------- RTP table ---------------- */
.s581-rtp-table { width: 100%; border-collapse: collapse; font-size: 1.2rem; }
.s581-rtp-table th { background: var(--s581-primary); color: #fff; padding: 0.8rem; text-align: left; font-size: 1.2rem; }
.s581-rtp-table td { padding: 0.7rem 0.8rem; border-bottom: 0.1rem solid rgba(204,153,255,0.15); color: var(--s581-text-light); }
.s581-rtp-table tr:nth-child(even) td { background: rgba(148,0,211,0.08); }
.s581-rtp-badge { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 0.4rem; font-weight: 700; font-size: 1.1rem; }
.s581-rtp-high { background: rgba(46,204,113,0.25); color: var(--s581-success); }
.s581-rtp-mid { background: rgba(255,215,0,0.25); color: var(--s581-accent); }

/* ---------------- Testimonials ---------------- */
.s581-testimonial { background: var(--s581-bg-dark); border-radius: 0.8rem; padding: 1.2rem; margin-bottom: 0.8rem; border-left: 0.3rem solid var(--s581-light); }
.s581-testimonial-stars { color: var(--s581-accent); font-size: 1.2rem; margin-bottom: 0.4rem; }
.s581-testimonial p { font-size: 1.2rem; color: var(--s581-text); line-height: 1.5; font-style: italic; }
.s581-testimonial-author { font-size: 1.1rem; color: var(--s581-light); margin-top: 0.4rem; font-weight: 600; }

/* ---------------- Payment methods ---------------- */
.s581-pay-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.6rem; }
.s581-pay-item { background: var(--s581-bg-dark); border-radius: 0.6rem; padding: 0.8rem 0.4rem; text-align: center; border: 0.1rem solid rgba(204,153,255,0.15); }
.s581-pay-item i { font-size: 2.0rem; color: var(--s581-light); }
.s581-pay-item span { display: block; font-size: 0.95rem; color: var(--s581-text); margin-top: 0.3rem; }

/* ---------------- Winners showcase ---------------- */
.s581-winner { display: flex; align-items: center; gap: 0.8rem; background: var(--s581-bg-dark); border-radius: 0.6rem; padding: 0.8rem; margin-bottom: 0.6rem; }
.s581-winner-avatar { width: 3.2rem; height: 3.2rem; border-radius: 50%; background: linear-gradient(135deg, var(--s581-primary), var(--s581-light)); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 1.3rem; }
.s581-winner-info { flex: 1; }
.s581-winner-name { font-size: 1.2rem; color: var(--s581-text-light); font-weight: 600; }
.s581-winner-game { font-size: 1.0rem; color: var(--s581-text); }
.s581-winner-amount { font-size: 1.3rem; color: var(--s581-accent); font-weight: 800; }

/* ---------------- App download CTA ---------------- */
.s581-app-cta { background: linear-gradient(135deg, var(--s581-primary-dark), var(--s581-bg-dark)); border-radius: var(--s581-radius); padding: 1.6rem; text-align: center; border: 0.2rem solid var(--s581-light); }
.s581-app-cta h3 { font-size: 1.7rem; color: var(--s581-light); margin-bottom: 0.4rem; }
.s581-app-cta p { font-size: 1.2rem; color: var(--s581-text); margin-bottom: 1.0rem; }
.s581-app-buttons { display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap; }
.s581-app-btn { display: inline-flex; align-items: center; gap: 0.4rem; background: var(--s581-bg-darker); color: #fff; padding: 0.7rem 1.0rem; border-radius: 0.6rem; font-size: 1.1rem; font-weight: 600; border: 0.15rem solid var(--s581-light); cursor: pointer; }

/* ---------------- FAQ accordion ---------------- */
.s581-faq-item { background: var(--s581-bg-dark); border-radius: 0.8rem; margin-bottom: 0.6rem; overflow: hidden; border: 0.1rem solid rgba(204,153,255,0.12); }
.s581-faq-q { width: 100%; text-align: left; background: transparent; border: none; color: var(--s581-text-light); padding: 1.0rem 1.2rem; font-size: 1.3rem; font-weight: 600; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; }
.s581-faq-q i { color: var(--s581-light); transition: transform 0.25s; }
.s581-faq-item.s581-faq-open .s581-faq-q i { transform: rotate(45deg); }
.s581-faq-a { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; padding: 0 1.2rem; }
.s581-faq-item.s581-faq-open .s581-faq-a { max-height: 30rem; padding-bottom: 1.0rem; }
.s581-faq-a p { font-size: 1.2rem; color: var(--s581-text); line-height: 1.55; }

/* ---------------- CTA band ---------------- */
.s581-cta-band { background: linear-gradient(135deg, var(--s581-primary), var(--s581-accent-2)); border-radius: var(--s581-radius); padding: 2.0rem 1.4rem; text-align: center; margin: 1.6rem 0; box-shadow: var(--s581-shadow-glow); }
.s581-cta-band h3 { font-size: 1.9rem; color: #fff; margin-bottom: 0.4rem; }
.s581-cta-band p { font-size: 1.2rem; color: rgba(255,255,255,0.9); margin-bottom: 1.0rem; }

/* ---------------- Footer ---------------- */
.s581-footer { background: var(--s581-bg-darker); padding: 2.4rem 0 calc(var(--s581-bottom-h) + 1.6rem); margin-top: 2.0rem; border-top: 0.25rem solid var(--s581-primary); }
.s581-footer-brand { font-size: 1.4rem; color: var(--s581-text); line-height: 1.6; margin-bottom: 1.2rem; }
.s581-footer-brand strong { color: var(--s581-light); }
.s581-footer-promos { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1.2rem; }
.s581-footer-promos .s581-btn { flex: 1 1 auto; min-width: 8rem; }
.s581-footer-links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.6rem; margin-bottom: 1.2rem; }
.s581-footer-links a { font-size: 1.2rem; color: var(--s581-text); padding: 0.4rem 0; display: flex; align-items: center; gap: 0.4rem; }
.s581-footer-links a:hover { color: var(--s581-light); }
.s581-footer-copy { font-size: 1.1rem; color: var(--s581-text); text-align: center; border-top: 0.1rem solid rgba(204,153,255,0.15); padding-top: 1.0rem; }

/* ---------------- Mobile bottom nav ---------------- */
.s581-bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000;
  height: var(--s581-bottom-h);
  background: linear-gradient(180deg, var(--s581-bg-dark) 0%, var(--s581-bg-darker) 100%);
  border-top: 0.2rem solid var(--s581-primary);
  display: flex; justify-content: space-around; align-items: center;
  box-shadow: 0 -4px 14px rgba(0,0,0,0.45);
}
.s581-bottom-nav-btn { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.2rem; background: transparent; border: none; color: var(--s581-text); font-size: 1.0rem; cursor: pointer; padding: 0.4rem 0; min-width: 6.0rem; min-height: 6.0rem; transition: color 0.2s, transform 0.2s; position: relative; }
.s581-bottom-nav-btn i, .s581-bottom-nav-btn .material-icons-outlined, .s581-bottom-nav-btn .ion-icon { font-size: 2.4rem; line-height: 1; }
.s581-bottom-nav-btn .s581-nav-label { font-size: 1.0rem; line-height: 1.2; }
.s581-bottom-nav-btn:active { transform: scale(0.92); }
.s581-bottom-nav-btn:hover { color: var(--s581-light); }
.s581-bottom-nav-btn.s581-bottom-active { color: var(--s581-primary); }
.s581-bottom-nav-btn.s581-bottom-active::after { content: ''; position: absolute; top: 0; width: 2.4rem; height: 0.25rem; background: var(--s581-primary); border-radius: 0 0 0.3rem 0.3rem; }
.s581-bottom-nav-btn.s581-bottom-active i, .s581-bottom-nav-btn.s581-bottom-active .s581-nav-label { color: var(--s581-light); }
.s581-nav-badge { position: absolute; top: 0.4rem; right: 1.6rem; background: var(--s581-accent-2); color: #fff; font-size: 0.9rem; min-width: 1.6rem; height: 1.6rem; border-radius: 0.8rem; display: flex; align-items: center; justify-content: center; padding: 0 0.3rem; font-weight: 700; }

/* ---------------- Back to top ---------------- */
.s581-back-top { position: fixed; right: 1.2rem; bottom: calc(var(--s581-bottom-h) + 1.0rem); width: 4.0rem; height: 4.0rem; border-radius: 50%; background: var(--s581-primary); color: #fff; border: none; font-size: 1.8rem; cursor: pointer; z-index: 900; opacity: 0; visibility: hidden; transition: opacity 0.3s, transform 0.3s; box-shadow: var(--s581-shadow-glow); }
.s581-back-top.s581-back-show { opacity: 1; visibility: visible; }
.s581-back-top:active { transform: scale(0.9); }

/* ---------------- Main content bottom padding for mobile nav ---------------- */
.s581-main { padding-bottom: calc(var(--s581-bottom-h) + 1.6rem); }

/* ---------------- Desktop / tablet (>= 769px): hide bottom nav, widen container ---------------- */
@media (min-width: 769px) {
  .s581-bottom-nav { display: none; }
  .s581-container, .s581-wrapper, .s581-header-inner { max-width: 720px; }
  .s581-main { padding-bottom: 2.0rem; }
  .s581-footer { padding-bottom: 2.4rem; }
  .s581-game-grid { grid-template-columns: repeat(6, 1fr); }
  .s581-feature-grid { grid-template-columns: repeat(4, 1fr); }
  .s581-pay-grid { grid-template-columns: repeat(8, 1fr); }
}

/* ---------------- Small mobile tweaks ---------------- */
@media (max-width: 360px) {
  .s581-game-grid { grid-template-columns: repeat(3, 1fr); }
  .s581-pay-grid { grid-template-columns: repeat(3, 1fr); }
  .s581-logo-text { font-size: 1.5rem; }
  .s581-btn-login { padding: 0.6rem 0.8rem; font-size: 1.1rem; }
  .s581-btn-register { padding: 0.7rem 1.0rem; font-size: 1.1rem; }
}
