/* ===========================================================
   ph1xbet.homes - Core Stylesheet
   Mobile-first (max-width: 430px). All custom classes use the
   v041- prefix to avoid collisions with shared components.
   Palette: #40E0D0 | #1E90FF | #4169E1 | #0A0A0A
   =========================================================== */

:root {
  --v041-primary: #40E0D0;
  --v041-secondary: #1E90FF;
  --v041-tertiary: #4169E1;
  --v041-bg: #0A0A0A;
  --v041-bg-soft: #111418;
  --v041-bg-card: #161A20;
  --v041-text: #F5F7FA;
  --v041-text-muted: #A9B2BF;
  --v041-border: #232a35;
  --v041-gold: #FFC94D;
  --v041-success: #2EE6A6;
  --v041-danger: #FF5C7A;
  --v041-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
}

/* ---------- Base reset ---------- */
* { box-sizing: border-box; }
html { font-size: 62.5%; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--v041-bg);
  color: var(--v041-text);
  line-height: 1.5rem;
  font-size: 1.5rem;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--v041-primary); text-decoration: none; }
a:hover { color: var(--v041-secondary); }
h1, h2, h3, h4 { margin: 0 0 .6rem; line-height: 1.3; font-weight: 700; }
h1 { font-size: 2.4rem; }
h2 { font-size: 2.0rem; }
h3 { font-size: 1.7rem; }
p { margin: 0 0 1rem; }

/* ---------- Layout ---------- */
.v041-wrapper {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  position: relative;
  min-height: 100vh;
  background: linear-gradient(180deg, #0A0A0A 0%, #0c1018 60%, #0A0A0A 100%);
}
.v041-container {
  width: 100%;
  padding: 0 14px;
}
main { padding-bottom: 80px; }

/* ---------- Header ---------- */
.v041-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(10, 10, 10, 0.96);
  border-bottom: 1px solid var(--v041-border);
  backdrop-filter: blur(6px);
  transition: box-shadow .25s ease, background .25s ease;
}
.v041-header-scrolled { box-shadow: 0 4px 18px rgba(0,0,0,.5); }
.v041-header-inner {
  max-width: 430px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  gap: 8px;
}
.v041-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--v041-text);
  font-weight: 800;
  font-size: 1.7rem;
  letter-spacing: .3px;
}
.v041-brand img { width: 28px; height: 28px; border-radius: 6px; }
.v041-brand .v041-brand-accent {
  color: var(--v041-primary);
}

.v041-header-actions { display: flex; align-items: center; gap: 6px; }
.v041-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  border: none;
  border-radius: 20px;
  font-weight: 700;
  font-size: 1.3rem;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.v041-btn:active { transform: scale(.96); }
.v041-btn-login {
  background: transparent;
  color: var(--v041-text);
  border: 1px solid var(--v041-primary);
}
.v041-btn-register {
  background: linear-gradient(135deg, var(--v041-primary), var(--v041-secondary));
  color: #04121a;
  box-shadow: 0 4px 14px rgba(64, 224, 208, .35);
}
.v041-icon-btn {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent;
  color: var(--v041-text);
  border: 1px solid var(--v041-border);
  border-radius: 10px;
  cursor: pointer;
}
.v041-icon-btn.v041-active { background: rgba(64,224,208,.15); color: var(--v041-primary); }

/* ---------- Mobile menu (slide down) ---------- */
.v041-mobile-menu {
  position: fixed;
  top: 56px; left: 0; right: 0;
  max-height: 0;
  overflow: hidden;
  background: #0d1117;
  border-bottom: 1px solid var(--v041-border);
  z-index: 9999;
  transition: max-height .3s ease;
}
.v041-mobile-menu.v041-menu-open { max-height: 80vh; overflow-y: auto; }
.v041-mobile-menu ul { list-style: none; margin: 0; padding: 8px 12px; }
.v041-mobile-menu li { border-bottom: 1px solid rgba(255,255,255,.05); }
.v041-mobile-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 6px;
  color: var(--v041-text);
  font-size: 1.45rem;
  font-weight: 600;
}
.v041-mobile-menu a i { color: var(--v041-primary); font-size: 18px; }

/* ---------- Search bar ---------- */
.v041-search-bar {
  max-height: 0; overflow: hidden;
  background: #0d1117;
  border-bottom: 1px solid var(--v041-border);
  transition: max-height .25s ease;
}
.v041-search-bar.v041-search-open { max-height: 64px; }
.v041-search-bar input {
  width: calc(100% - 24px);
  margin: 10px 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--v041-border);
  background: #0A0A0A;
  color: var(--v041-text);
  font-size: 1.4rem;
}

/* ---------- Hero / Carousel ---------- */
.v041-hero {
  margin-top: 56px;
  position: relative;
}
.v041-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 0;
}
.v041-slide {
  position: relative;
  display: none;
  width: 100%;
  cursor: pointer;
}
.v041-slide.v041-slide-active { display: block; }
.v041-slide img { width: 100%; height: 200px; object-fit: cover; }
.v041-slide-overlay {
  position: absolute;
  left: 14px; right: 14px; bottom: 14px;
  background: linear-gradient(0deg, rgba(0,0,0,.85), rgba(0,0,0,0));
  padding: 30px 14px 12px;
  border-radius: 10px;
}
.v041-slide-overlay h2 { font-size: 1.8rem; color: #fff; margin: 0 0 4px; }
.v041-slide-overlay p { font-size: 1.25rem; color: #d6dbe2; margin: 0; }
.v041-dots {
  position: absolute;
  bottom: 8px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 6px;
  z-index: 4;
}
.v041-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,.4);
  border: none; padding: 0; cursor: pointer;
}
.v041-dot.v041-dot-active { background: var(--v041-primary); width: 22px; border-radius: 6px; }

/* ---------- Section ---------- */
.v041-section {
  padding: 18px 14px;
}
.v041-section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.v041-section-head h2 {
  font-size: 1.8rem;
  margin: 0;
  background: linear-gradient(90deg, var(--v041-primary), var(--v041-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.v041-section-head .v041-more {
  font-size: 1.25rem; color: var(--v041-primary); font-weight: 600;
}

/* ---------- Game grid (compact) ---------- */
.v041-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.v041-grid-4 { grid-template-columns: repeat(4, 1fr); }
.v041-game-card {
  background: var(--v041-bg-card);
  border: 1px solid var(--v041-border);
  border-radius: 12px;
  overflow: hidden;
  text-align: center;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.v041-game-card:hover {
  transform: translateY(-3px);
  border-color: var(--v041-primary);
  box-shadow: 0 6px 16px rgba(64,224,208,.18);
}
.v041-game-card .v041-game-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #0d1117;
}
.v041-game-card .v041-game-name {
  font-size: 1.15rem;
  color: var(--v041-text);
  padding: 6px 4px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Featured / banner CTA ---------- */
.v041-cta {
  background: linear-gradient(135deg, #4169E1, #1E90FF);
  border-radius: 14px;
  padding: 16px;
  color: #fff;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  box-shadow: 0 8px 22px rgba(65,105,225,.35);
  margin: 14px;
}
.v041-cta h3 { color: #fff; margin: 0 0 4px; font-size: 1.6rem; }
.v041-cta p { margin: 0; font-size: 1.2rem; color: #e8eefc; }
.v041-cta .v041-btn-register { background: #fff; color: var(--v041-tertiary); box-shadow: none; }

/* ---------- Card ---------- */
.v041-card {
  background: var(--v041-bg-card);
  border: 1px solid var(--v041-border);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
}
.v041-card h3 { color: var(--v041-primary); }
.v041-card p { color: var(--v041-text-muted); font-size: 1.35rem; }

/* ---------- Feature list ---------- */
.v041-features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.v041-feature {
  background: var(--v041-bg-card);
  border: 1px solid var(--v041-border);
  border-radius: 12px;
  padding: 14px 10px;
  text-align: center;
}
.v041-feature i { font-size: 26px; color: var(--v041-primary); }
.v041-feature h4 { margin: 8px 0 4px; font-size: 1.35rem; color: var(--v041-text); }
.v041-feature p { margin: 0; font-size: 1.15rem; color: var(--v041-text-muted); }

/* ---------- RTP table ---------- */
.v041-rtp-table { width: 100%; border-collapse: collapse; font-size: 1.3rem; }
.v041-rtp-table th, .v041-rtp-table td {
  border-bottom: 1px solid var(--v041-border);
  padding: 8px 6px; text-align: left;
}
.v041-rtp-table th { color: var(--v041-primary); font-weight: 700; }
.v041-rtp-bar {
  height: 8px; background: #0d1117; border-radius: 6px; overflow: hidden;
  width: 80px; display: inline-block; vertical-align: middle;
}
.v041-rtp-bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--v041-primary), var(--v041-secondary)); }

/* ---------- Testimonials ---------- */
.v041-testimonials { display: grid; gap: 10px; }
.v041-testimonial {
  background: var(--v041-bg-card);
  border-left: 3px solid var(--v041-primary);
  border-radius: 10px;
  padding: 12px;
}
.v041-testimonial .v041-stars { color: var(--v041-gold); font-size: 1.2rem; }
.v041-testimonial p { font-size: 1.3rem; color: var(--v041-text); margin: 6px 0; }
.v041-testimonial .v041-author { font-size: 1.15rem; color: var(--v041-text-muted); }

/* ---------- Winners ---------- */
.v041-winner-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0; border-bottom: 1px dashed var(--v041-border); font-size: 1.3rem;
}
.v041-winner-row:last-child { border-bottom: none; }
.v041-winner-name { color: var(--v041-text); font-weight: 600; }
.v041-winner-amount { color: var(--v041-success); font-weight: 700; }

/* ---------- Payment chips ---------- */
.v041-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.v041-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: 20px;
  background: var(--v041-bg-card); border: 1px solid var(--v041-border);
  color: var(--v041-text); font-size: 1.25rem;
}
.v041-chip i { color: var(--v041-primary); }

/* ---------- FAQ ---------- */
.v041-faq details {
  background: var(--v041-bg-card);
  border: 1px solid var(--v041-border);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
}
.v041-faq summary {
  cursor: pointer; font-weight: 700; color: var(--v041-text); font-size: 1.35rem;
}
.v041-faq details[open] summary { color: var(--v041-primary); }
.v041-faq p { margin-top: 8px; color: var(--v041-text-muted); font-size: 1.3rem; }

/* ---------- SEO long text ---------- */
.v041-seo-text {
  background: var(--v041-bg-card);
  border: 1px solid var(--v041-border);
  border-radius: 12px;
  padding: 14px;
  color: var(--v041-text-muted);
  font-size: 1.3rem;
}
.v041-seo-text h3 { color: var(--v041-text); }
.v041-seo-text a { color: var(--v041-secondary); font-weight: 600; }

/* ---------- Promo inline link ---------- */
.v041-promo-link {
  color: var(--v041-gold);
  font-weight: 700;
  cursor: pointer;
}
.v041-promo-link:hover { text-decoration: underline; }

/* ---------- Footer ---------- */
.v041-footer {
  background: #06080c;
  border-top: 1px solid var(--v041-border);
  padding: 22px 14px 16px;
  color: var(--v041-text-muted);
}
.v041-footer h4 { color: var(--v041-text); font-size: 1.4rem; margin-bottom: 8px; }
.v041-footer .v041-footer-brand {
  font-size: 1.5rem; font-weight: 700; color: var(--v041-text); margin-bottom: 6px;
}
.v041-footer .v041-footer-brand span { color: var(--v041-primary); }
.v041-footer-links {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 10px;
  margin: 12px 0;
}
.v041-footer-links a { color: var(--v041-text-muted); font-size: 1.25rem; }
.v041-footer-links a:hover { color: var(--v041-primary); }
.v041-footer-promos { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.v041-footer-promos .v041-btn { font-size: 1.2rem; padding: 0 12px; min-height: 32px; }
.v041-footer-copy { font-size: 1.15rem; color: #6b7480; text-align: center; margin-top: 10px; }

/* ---------- Back to top ---------- */
#v041BackTop {
  position: fixed;
  right: 14px; bottom: 76px;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--v041-primary), var(--v041-secondary));
  color: #04121a;
  border: none;
  font-size: 18px;
  cursor: pointer;
  z-index: 999;
  display: none;
  box-shadow: 0 4px 12px rgba(0,0,0,.45);
}

/* ---------- Mobile bottom navigation ---------- */
.v041-bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 62px;
  background: rgba(8, 10, 14, 0.98);
  border-top: 1px solid var(--v041-border);
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  z-index: 1000;
  backdrop-filter: blur(8px);
}
.v041-bottom-nav .v041-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--v041-text-muted);
  font-size: 1.05rem;
  cursor: pointer;
  background: transparent;
  border: none;
  min-width: 60px;
  min-height: 60px;
  transition: color .2s ease, transform .15s ease;
  position: relative;
}
.v041-bottom-nav .v041-nav-item i { font-size: 22px; }
.v041-bottom-nav .v041-nav-item.v041-nav-active { color: var(--v041-primary); }
.v041-bottom-nav .v041-nav-item:active { transform: scale(.92); }
.v041-bottom-nav .v041-nav-item .v041-badge {
  position: absolute; top: 6px; right: 18px;
  background: var(--v041-danger); color: #fff;
  font-size: .9rem; min-width: 14px; height: 14px;
  border-radius: 7px; padding: 0 4px;
  display: flex; align-items: center; justify-content: center;
}
.v041-bottom-nav .v041-nav-item.v041-nav-promo {
  color: var(--v041-gold);
}
.v041-bottom-nav .v041-nav-item.v041-nav-promo i {
  background: linear-gradient(135deg, var(--v041-primary), var(--v041-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---------- Reveal animation ---------- */
.v041-reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.v041-reveal.v041-revealed { opacity: 1; transform: translateY(0); }

/* ---------- Desktop ---------- */
@media (min-width: 769px) {
  .v041-bottom-nav { display: none; }
  .v041-wrapper { max-width: 430px; box-shadow: 0 0 40px rgba(0,0,0,.4); }
  main { padding-bottom: 40px; }
}
@media (max-width: 768px) {
  main { padding-bottom: 80px; }
}

/* ---------- Utility ---------- */
.v041-text-center { text-align: center; }
.v041-mt-8 { margin-top: 8px; }
.v041-mt-16 { margin-top: 16px; }
.v041-mb-8 { margin-bottom: 8px; }
.v041-hidden { display: none !important; }
