/* ===========================================================
 * Color Game Perya - design-cb18.css
 * All custom classes use prefix: v839-
 * Palette: #1A1A2E (deep navy bg) | #FFE135 | #FFEB3B | #FFEBCD | #FFBF00
 * Mobile-first, max content width 430px on phones, expands on desktop.
 * =========================================================== */

:root {
  --v839-bg: #1A1A2E;
  --v839-bg-2: #232347;
  --v839-bg-3: #2c2c54;
  --v839-primary: #FFE135;
  --v839-accent: #FFBF00;
  --v839-soft: #FFEB3B;
  --v839-cream: #FFEBCD;
  --v839-text: #FFEBCD;
  --v839-text-muted: #c9c4b5;
  --v839-white: #ffffff;
  --v839-shadow: 0 0.4rem 1.2rem rgba(0, 0, 0, 0.45);
  --v839-radius: 1.2rem;
  --v839-radius-sm: 0.8rem;
  --v839-transition: all 0.28s ease;
}

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

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

body {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: var(--v839-bg);
  background-image: radial-gradient(circle at 20% 10%, #2c2c54 0%, #1A1A2E 60%);
  color: var(--v839-text);
  line-height: 1.5rem;
  font-size: 1.4rem;
  min-height: 100vh;
  overflow-x: hidden;
}

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

/* ---------- Layout helpers ---------- */
.v839-container { width: 100%; max-width: 430px; margin: 0 auto; padding: 0 1.2rem; }
.v839-wrapper { padding-top: 6rem; padding-bottom: 8rem; }
.v839-section { padding: 2.4rem 0; }
.v839-hidden-cat { display: none !important; }

/* ---------- Header ---------- */
.v839-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: linear-gradient(180deg, rgba(26,26,46,0.96), rgba(26,26,46,0.88));
  backdrop-filter: blur(10px);
  border-bottom: 0.2rem solid rgba(255, 225, 53, 0.25);
}
.v839-header-inner {
  max-width: 430px; margin: 0 auto; padding: 0.6rem 1.2rem;
  display: flex; align-items: center; justify-content: space-between; gap: 0.8rem;
}
.v839-brand { display: flex; align-items: center; gap: 0.6rem; }
.v839-brand-logo { width: 3rem; height: 3rem; border-radius: 50%; border: 0.2rem solid var(--v839-primary); }
.v839-brand-name { font-size: 1.5rem; font-weight: 800; color: var(--v839-primary); letter-spacing: 0.03rem; }
.v839-brand-name span { color: var(--v839-cream); }

.v839-header-actions { display: flex; align-items: center; gap: 0.5rem; }
.v839-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.6rem 1.1rem; border-radius: 999px; font-weight: 700; font-size: 1.25rem;
  border: none; cursor: pointer; transition: var(--v839-transition);
  min-height: 3.2rem; line-height: 1; white-space: nowrap;
}
.v839-btn-primary {
  background: linear-gradient(135deg, var(--v839-primary), var(--v839-soft));
  color: #1A1A2E; box-shadow: 0 0.3rem 0.8rem rgba(255, 225, 53, 0.35);
}
.v839-btn-primary:hover { transform: translateY(-0.1rem); color: #1A1A2E; box-shadow: 0 0.4rem 1.2rem rgba(255, 225, 53, 0.55); }
.v839-btn-ghost {
  background: transparent; color: var(--v839-cream);
  border: 0.15rem solid var(--v839-primary);
}
.v839-btn-ghost:hover { background: rgba(255, 225, 53, 0.12); color: var(--v839-primary); }
.v839-btn-block { width: 100%; justify-content: center; padding: 1rem; font-size: 1.4rem; }

.v839-menu-btn {
  background: transparent; border: none; color: var(--v839-cream);
  font-size: 1.8rem; cursor: pointer; padding: 0.4rem 0.6rem; min-width: 4.4rem; min-height: 4.4rem;
  display: inline-flex; align-items: center; justify-content: center; border-radius: 0.8rem;
}
.v839-menu-btn:hover { background: rgba(255, 225, 53, 0.12); color: var(--v839-primary); }

/* ---------- Mobile drawer ---------- */
.v839-menu-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6);
  z-index: 9998; opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.v839-menu-overlay.v839-active { opacity: 1; pointer-events: auto; }
.v839-mobile-menu {
  position: fixed; top: 0; right: -80%; width: 80%; max-width: 32rem; height: 100vh;
  background: linear-gradient(180deg, #232347, #1A1A2E);
  z-index: 9999; padding: 6rem 1.6rem 2rem; overflow-y: auto;
  transition: right 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  border-left: 0.2rem solid rgba(255, 225, 53, 0.25);
}
.v839-mobile-menu.v839-menu-open { right: 0; }
.v839-mobile-menu h3 { color: var(--v839-primary); font-size: 1.3rem; margin: 1.2rem 0 0.6rem; text-transform: uppercase; letter-spacing: 0.08rem; }
.v839-mobile-menu ul { list-style: none; }
.v839-mobile-menu li { border-bottom: 0.1rem solid rgba(255, 235, 205, 0.08); }
.v839-mobile-menu a {
  display: block; color: var(--v839-cream); padding: 1rem 0.4rem;
  font-size: 1.35rem; font-weight: 600;
}
.v839-mobile-menu a:hover { color: var(--v839-primary); padding-left: 1rem; }
.v839-menu-close {
  position: absolute; top: 1.2rem; right: 1.2rem; background: transparent;
  border: none; color: var(--v839-cream); font-size: 2rem; cursor: pointer; min-width: 4.4rem; min-height: 4.4rem;
}

/* ---------- Hero / Carousel ---------- */
.v839-hero { margin-top: 1rem; }
.v839-carousel {
  position: relative; border-radius: var(--v839-radius); overflow: hidden;
  box-shadow: var(--v839-shadow); aspect-ratio: 16 / 9;
}
.v839-slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity 0.8s ease;
  display: flex; align-items: flex-end;
}
.v839-slide img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; z-index: -1; }
.v839-slide-overlay {
  width: 100%; padding: 1.4rem; background: linear-gradient(0deg, rgba(26,26,46,0.92) 30%, transparent 100%);
}
.v839-slide-overlay h2 { color: var(--v839-primary); font-size: 1.7rem; margin-bottom: 0.4rem; }
.v839-slide-overlay p { color: var(--v839-cream); font-size: 1.2rem; }
.v839-slide-active { opacity: 1; z-index: 2; }
.v839-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(26,26,46,0.7); color: var(--v839-primary); border: none;
  width: 3.6rem; height: 3.6rem; border-radius: 50%; cursor: pointer; z-index: 4;
  font-size: 1.6rem; display: flex; align-items: center; justify-content: center;
}
.v839-arrow:hover { background: var(--v839-primary); color: #1A1A2E; }
#v839SlidePrev { left: 0.8rem; }
#v839SlideNext { right: 0.8rem; }
.v839-dots {
  position: absolute; bottom: 0.8rem; left: 0; right: 0; z-index: 5;
  display: flex; justify-content: center; gap: 0.5rem;
}
.v839-dot {
  width: 0.8rem; height: 0.8rem; border-radius: 50%;
  background: rgba(255, 235, 205, 0.5); border: none; cursor: pointer;
}
.v839-dot-active { background: var(--v839-primary); width: 1.8rem; border-radius: 0.5rem; }

/* ---------- Headings ---------- */
.v839-h1 { font-size: 2rem; line-height: 1.25; color: var(--v839-white); margin: 1.6rem 0 0.8rem; font-weight: 800; }
.v839-h1 span, .v839-section-title span { color: var(--v839-primary); }
.v839-section-title { font-size: 1.7rem; color: var(--v839-white); margin-bottom: 1rem; font-weight: 700; }
.v839-section-sub { color: var(--v839-text-muted); font-size: 1.25rem; margin-bottom: 1.2rem; }
.v839-eyebrow {
  display: inline-block; background: rgba(255, 225, 53, 0.15); color: var(--v839-primary);
  padding: 0.3rem 0.9rem; border-radius: 999px; font-size: 1.1rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06rem; margin-bottom: 0.6rem;
}

/* ---------- Category tabs ---------- */
.v839-cat-tabs { display: flex; gap: 0.6rem; overflow-x: auto; padding: 0.6rem 0 1rem; -webkit-overflow-scrolling: touch; }
.v839-cat-tabs::-webkit-scrollbar { display: none; }
.v839-cat-tab {
  flex-shrink: 0; padding: 0.6rem 1.2rem; border-radius: 999px;
  background: rgba(255, 235, 205, 0.08); color: var(--v839-cream);
  font-size: 1.2rem; font-weight: 600; cursor: pointer; border: 0.1rem solid transparent;
  min-height: 3.2rem; display: inline-flex; align-items: center;
}
.v839-cat-tab-active { background: var(--v839-primary); color: #1A1A2E; }

/* ---------- Game grid ---------- */
.v839-cat-block { margin-bottom: 2.2rem; }
.v839-cat-head {
  display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.9rem;
}
.v839-cat-icon {
  width: 2.8rem; height: 2.8rem; border-radius: 0.6rem; background: rgba(255, 225, 53, 0.15);
  display: flex; align-items: center; justify-content: center; color: var(--v839-primary); font-size: 1.5rem;
}
.v839-cat-name { font-size: 1.4rem; font-weight: 700; color: var(--v839-white); }
.v839-cat-count { color: var(--v839-text-muted); font-size: 1.1rem; margin-left: auto; }
.v839-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem;
}
.v839-card {
  background: var(--v839-bg-2); border-radius: var(--v839-radius-sm); overflow: hidden;
  border: 0.1rem solid rgba(255, 225, 53, 0.1); transition: var(--v839-transition);
  cursor: pointer; position: relative;
}
.v839-card:hover { transform: translateY(-0.3rem); border-color: var(--v839-primary); box-shadow: 0 0.4rem 1rem rgba(255, 225, 53, 0.25); }
.v839-card-img { width: 100%; aspect-ratio: 1; object-fit: cover; background: #000; }
.v839-card-name {
  font-size: 1.1rem; color: var(--v839-cream); padding: 0.5rem 0.4rem; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600;
}

/* ---------- Feature / promo blocks ---------- */
.v839-card-box {
  background: var(--v839-bg-2); border-radius: var(--v839-radius); padding: 1.4rem;
  margin-bottom: 1rem; border: 0.1rem solid rgba(255, 225, 53, 0.12);
}
.v839-card-box h3 { color: var(--v839-primary); font-size: 1.4rem; margin-bottom: 0.5rem; }
.v839-card-box p { color: var(--v839-text-muted); font-size: 1.25rem; line-height: 1.6; }
.v839-card-box ul { list-style: none; padding: 0; }
.v839-card-box li { padding: 0.4rem 0 0.4rem 1.6rem; position: relative; color: var(--v839-cream); font-size: 1.25rem; }
.v839-card-box li::before { content: "▸"; position: absolute; left: 0.2rem; color: var(--v839-primary); }

.v839-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.7rem; }
.v839-stat {
  background: linear-gradient(135deg, rgba(255, 225, 53, 0.12), rgba(255, 191, 0, 0.08));
  padding: 1rem; border-radius: var(--v839-radius-sm); border: 0.1rem solid rgba(255, 225, 53, 0.18);
  text-align: center;
}
.v839-stat-num { display: block; font-size: 1.7rem; font-weight: 800; color: var(--v839-primary); }
.v839-stat-label { color: var(--v839-cream); font-size: 1.1rem; }

/* ---------- Testimonials ---------- */
.v839-testimonials { display: grid; gap: 0.8rem; }
.v839-testimonial {
  background: var(--v839-bg-2); border-left: 0.3rem solid var(--v839-primary);
  padding: 1rem 1.2rem; border-radius: 0.6rem;
}
.v839-testimonial p { color: var(--v839-cream); font-size: 1.2rem; font-style: italic; margin-bottom: 0.5rem; }
.v839-testimonial cite { color: var(--v839-primary); font-size: 1.1rem; font-weight: 700; font-style: normal; }

/* ---------- Payment grid ---------- */
.v839-pay-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.7rem; }
.v839-pay-item {
  background: var(--v839-bg-2); border-radius: 0.6rem; padding: 0.8rem; text-align: center;
  border: 0.1rem solid rgba(255, 225, 53, 0.12);
}
.v839-pay-item span { display: block; color: var(--v839-cream); font-size: 1.1rem; margin-top: 0.3rem; }
.v839-pay-icon { color: var(--v839-primary); font-size: 1.8rem; }

/* ---------- Winners ---------- */
.v839-winner {
  display: flex; align-items: center; gap: 0.8rem; padding: 0.7rem 0;
  border-bottom: 0.1rem solid rgba(255, 235, 205, 0.08);
}
.v839-winner-avatar {
  width: 3rem; height: 3rem; border-radius: 50%; background: var(--v839-primary);
  color: #1A1A2E; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.2rem;
}
.v839-winner-info { flex: 1; }
.v839-winner-name { color: var(--v839-cream); font-size: 1.2rem; font-weight: 600; }
.v839-winner-game { color: var(--v839-text-muted); font-size: 1.05rem; }
.v839-winner-amount { color: var(--v839-primary); font-weight: 800; font-size: 1.2rem; }

/* ---------- FAQ ---------- */
.v839-faq-list { display: grid; gap: 0.7rem; }
.v839-faq-item {
  background: var(--v839-bg-2); border-radius: 0.8rem; overflow: hidden;
  border: 0.1rem solid rgba(255, 225, 53, 0.1);
}
.v839-faq-head {
  width: 100%; text-align: left; background: transparent; border: none; cursor: pointer;
  padding: 1rem 1.2rem; color: var(--v839-cream); font-size: 1.25rem; font-weight: 700;
  display: flex; justify-content: space-between; align-items: center; gap: 0.6rem;
}
.v839-faq-head i { color: var(--v839-primary); transition: transform 0.3s ease; }
.v839-faq-body {
  max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 1.2rem; color: var(--v839-text-muted); font-size: 1.2rem; line-height: 1.6;
}
.v839-faq-open .v839-faq-body { max-height: 30rem; padding: 0 1.2rem 1rem; }
.v839-faq-open .v839-faq-head i { transform: rotate(180deg); }

/* ---------- App download CTA ---------- */
.v839-app-cta {
  background: linear-gradient(135deg, #2c2c54, #1A1A2E);
  border: 0.15rem solid var(--v839-primary); border-radius: var(--v839-radius);
  padding: 1.6rem; text-align: center; margin: 1.4rem 0;
}
.v839-app-cta h3 { color: var(--v839-primary); font-size: 1.5rem; margin-bottom: 0.4rem; }
.v839-app-cta p { color: var(--v839-cream); font-size: 1.2rem; margin-bottom: 1rem; }
.v839-app-row { display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.v839-footer {
  background: #14142a; border-top: 0.2rem solid rgba(255, 225, 53, 0.25);
  padding: 2rem 1.2rem 9rem; margin-top: 2rem;
}
.v839-footer-inner { max-width: 430px; margin: 0 auto; }
.v839-footer-brand { color: var(--v839-primary); font-size: 1.4rem; font-weight: 800; margin-bottom: 0.5rem; }
.v839-footer-desc { color: var(--v839-text-muted); font-size: 1.2rem; line-height: 1.6; margin-bottom: 1rem; }
.v839-footer-links {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.4rem 0.8rem; margin-bottom: 1rem;
}
.v839-footer-links a { color: var(--v839-cream); font-size: 1.15rem; }
.v839-footer-links a:hover { color: var(--v839-primary); }
.v839-footer-promos { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.8rem 0 1rem; }
.v839-footer-promos .v839-btn { font-size: 1.1rem; padding: 0.5rem 0.9rem; }
.v839-footer-copy {
  border-top: 0.1rem solid rgba(255, 235, 205, 0.1); padding-top: 1rem;
  color: var(--v839-text-muted); font-size: 1.1rem; text-align: center;
}

/* ---------- Bottom navigation (mobile only) ---------- */
.v839-bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; height: 6.2rem; z-index: 1000;
  background: linear-gradient(180deg, rgba(26,26,46,0.98), #14142a);
  border-top: 0.18rem solid var(--v839-primary);
  display: flex; justify-content: space-around; align-items: stretch;
  box-shadow: 0 -0.4rem 1.2rem rgba(0, 0, 0, 0.45);
}
.v839-bottom-btn {
  flex: 1; min-width: 6rem; min-height: 6.2rem;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: transparent; border: none; color: var(--v839-cream);
  font-size: 1rem; gap: 0.2rem; cursor: pointer; transition: var(--v839-transition);
  padding: 0.4rem 0.2rem; position: relative;
}
.v839-bottom-btn i, .v839-bottom-btn .material-icons-outlined, .v839-bottom-btn .ion-icon {
  font-size: 2.2rem; color: var(--v839-cream); transition: var(--v839-transition);
}
.v839-bottom-btn:hover { transform: translateY(-0.15rem); }
.v839-bottom-btn:hover i, .v839-bottom-btn:hover .material-icons-outlined { color: var(--v839-soft); }
.v839-bottom-btn-active i, .v839-bottom-btn-active .material-icons-outlined { color: var(--v839-primary); }
.v839-bottom-btn-active { color: var(--v839-primary); font-weight: 700; }
.v839-bottom-btn-active::before {
  content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 0.25rem;
  background: var(--v839-primary); border-radius: 0 0 0.3rem 0.3rem;
}
.v839-bottom-badge {
  position: absolute; top: 0.6rem; right: 28%; min-width: 1.4rem; height: 1.4rem;
  padding: 0 0.3rem; border-radius: 999px; background: #ff4d6d; color: #fff;
  font-size: 0.95rem; font-weight: 800; display: flex; align-items: center; justify-content: center;
}

/* ---------- Promo text link inline ---------- */
.v839-text-link { color: var(--v839-primary); font-weight: 700; border-bottom: 0.12rem dotted var(--v839-accent); }
.v839-text-link:hover { color: var(--v839-accent); }

/* ---------- Back to top ---------- */
.v839-to-top {
  position: fixed; right: 1rem; bottom: 7.4rem; z-index: 900;
  width: 3.6rem; height: 3.6rem; border-radius: 50%; border: none; cursor: pointer;
  background: var(--v839-primary); color: #1A1A2E; font-size: 1.5rem;
  box-shadow: var(--v839-shadow); display: flex; align-items: center; justify-content: center;
  opacity: 0.9;
}

/* ---------- Desktop / tablet adjustments ---------- */
@media (min-width: 769px) {
  body { background-image: radial-gradient(circle at 30% 10%, #2c2c54 0%, #1A1A2E 70%); }
  .v839-container { max-width: 960px; }
  .v839-header-inner { max-width: 960px; }
  .v839-grid { grid-template-columns: repeat(6, 1fr); }
  .v839-bottom-nav { display: none; }
  .v839-footer { padding-bottom: 2rem; }
  .v839-wrapper { padding-bottom: 2rem; }
  .v839-footer-inner { max-width: 960px; }
  .v839-footer-links { grid-template-columns: repeat(4, 1fr); }
  .v839-pay-grid { grid-template-columns: repeat(6, 1fr); }
  .v839-stats { grid-template-columns: repeat(4, 1fr); }
  .v839-menu-btn { display: none; }
  .v839-testimonials { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  main { padding-bottom: 8rem; }
  .v839-to-top { bottom: 7.2rem; }
}

@media (max-width: 360px) {
  .v839-grid { grid-template-columns: repeat(2, 1fr); }
  .v839-brand-name { font-size: 1.3rem; }
}
