/* ============================================================
   f16878 vil - theme-35f1.css
   CSS class prefix: v164-
   Palette: #2E4057 | #00E5FF | #FFDFBA | #FFFFFF | #FFFFBA | #FF91A4
   Dark = background, light = text. Mobile-first, rem units (root 62.5%).
   ============================================================ */

:root {
  --v164-primary: #00E5FF;
  --v164-bg: #2E4057;
  --v164-bg-deep: #1c2a3a;
  --v164-bg-soft: #34506b;
  --v164-text: #FFFFFF;
  --v164-text-soft: #FFDFBA;
  --v164-accent: #FF91A4;
  --v164-highlight: #FFFFBA;
  --v164-card: #34506b;
  --v164-card-deep: #23354a;
  --v164-border: rgba(0,229,255,0.18);
  --v164-shadow: 0 2px 12px rgba(0,0,0,0.35);
  --v164-radius: 1.2rem;
  --v164-radius-sm: 0.8rem;
}

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

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

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

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

.v164-container { width: 100%; max-width: 430px; margin: 0 auto; padding: 0 1.2rem; }
.v164-wrapper { width: 100%; max-width: 430px; margin: 0 auto; }

/* ---------- Header ---------- */
.v164-header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(28,42,58,0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--v164-border);
  box-shadow: var(--v164-shadow);
}
.v164-header-inner {
  max-width: 430px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.6rem 1.2rem; height: 5.2rem;
}
.v164-logo {
  display: flex; align-items: center; gap: 0.6rem;
  color: var(--v164-text); font-weight: 700; font-size: 1.5rem;
}
.v164-logo img { width: 2.8rem; height: 2.8rem; border-radius: 0.6rem; }
.v164-logo .v164-logo-accent { color: var(--v164-primary); }
.v164-header-actions { display: flex; align-items: center; gap: 0.6rem; }
.v164-menu-btn {
  background: transparent; border: 1px solid var(--v164-border);
  color: var(--v164-primary); width: 3.6rem; height: 3.6rem;
  border-radius: 0.8rem; font-size: 1.6rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.v164-menu-btn:hover, .v164-menu-btn.v164-active { background: var(--v164-primary); color: var(--v164-bg-deep); }
.v164-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.7rem 1.2rem; border-radius: 0.8rem;
  font-weight: 700; font-size: 1.3rem; cursor: pointer;
  border: none; transition: transform .15s, box-shadow .15s;
  min-height: 3.6rem; text-decoration: none;
}
.v164-btn:hover { transform: translateY(-1px); }
.v164-btn-login { background: transparent; color: var(--v164-primary); border: 1px solid var(--v164-primary); }
.v164-btn-register { background: linear-gradient(135deg, var(--v164-primary), var(--v164-highlight)); color: var(--v164-bg-deep); box-shadow: 0 2px 8px rgba(0,229,255,0.3); }

/* ---------- Nav menu (expandable) ---------- */
.v164-nav-menu {
  position: fixed; top: 5.2rem; right: 0; left: 0;
  max-width: 430px; margin: 0 auto;
  background: var(--v164-bg-deep);
  border-bottom: 1px solid var(--v164-border);
  max-height: 0; overflow: hidden; transition: max-height .3s ease;
  z-index: 9999;
}
.v164-nav-menu.v164-open { max-height: 60rem; }
.v164-nav-menu ul { list-style: none; padding: 0.6rem 1.2rem 1rem; }
.v164-nav-menu li { padding: 0.7rem 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
.v164-nav-menu li:last-child { border-bottom: none; }
.v164-nav-menu a { color: var(--v164-text-soft); display: block; font-size: 1.4rem; }
.v164-nav-menu a:hover { color: var(--v164-primary); }
.v164-nav-menu .v164-nav-group-label { color: var(--v164-accent); font-size: 1.1rem; text-transform: uppercase; letter-spacing: .05em; padding: 0.6rem 0 0.2rem; }

/* ---------- Main ---------- */
main { padding-top: 6rem; padding-bottom: 80px; }
.v164-section { padding: 1.6rem 0; }
.v164-section-title {
  font-size: 1.8rem; font-weight: 700; margin-bottom: 1rem;
  color: var(--v164-text); border-left: 4px solid var(--v164-primary);
  padding-left: 0.8rem;
}
.v164-section-title .v164-accent { color: var(--v164-primary); }
.v164-subtitle { font-size: 1.35rem; color: var(--v164-text-soft); margin: 1rem 0 0.6rem; font-weight: 600; }
.v164-text-para { margin-bottom: 0.9rem; color: rgba(255,255,255,0.88); }

/* ---------- Carousel ---------- */
.v164-carousel {
  position: relative; border-radius: var(--v164-radius); overflow: hidden;
  box-shadow: var(--v164-shadow); margin-bottom: 1.2rem;
}
.v164-slide {
  position: relative; display: none; cursor: pointer;
}
.v164-slide.v164-active { display: block; }
.v164-slide img { width: 100%; height: 18rem; object-fit: cover; }
.v164-slide-overlay {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 1rem 1.2rem; background: linear-gradient(0deg, rgba(28,42,58,0.9), rgba(28,42,58,0));
  color: var(--v164-text);
}
.v164-slide-overlay h2 { font-size: 1.6rem; font-weight: 700; margin-bottom: 0.3rem; }
.v164-slide-overlay p { font-size: 1.2rem; color: var(--v164-text-soft); }
.v164-dots { position: absolute; bottom: 0.6rem; left: 50%; transform: translateX(-50%); display: flex; gap: 0.5rem; z-index: 5; }
.v164-dot { width: 0.7rem; height: 0.7rem; border-radius: 50%; background: rgba(255,255,255,0.4); cursor: pointer; border: none; }
.v164-dot.v164-active { background: var(--v164-primary); }

/* ---------- Game grid ---------- */
.v164-filter-bar { display: flex; gap: 0.5rem; overflow-x: auto; padding: 0.4rem 0 1rem; -webkit-overflow-scrolling: touch; }
.v164-filter-tab {
  flex: 0 0 auto; padding: 0.5rem 1rem; border-radius: 2rem;
  background: var(--v164-card); color: var(--v164-text-soft);
  font-size: 1.2rem; border: 1px solid transparent; cursor: pointer; white-space: nowrap;
}
.v164-filter-tab.v164-active { background: var(--v164-primary); color: var(--v164-bg-deep); font-weight: 700; }

.v164-game-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.7rem;
}
.v164-game-card {
  background: var(--v164-card); border-radius: var(--v164-radius-sm);
  overflow: hidden; cursor: pointer; border: 1px solid var(--v164-border);
  transition: transform .15s, box-shadow .15s; position: relative;
}
.v164-game-card:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(0,229,255,0.25); }
.v164-game-card img { width: 100%; height: 8.6rem; object-fit: cover; }
.v164-game-name {
  padding: 0.4rem 0.5rem; font-size: 1.05rem; text-align: center;
  color: var(--v164-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: var(--v164-card-deep);
}
.v164-game-card .v164-hot-badge {
  position: absolute; top: 0.3rem; left: 0.3rem;
  background: var(--v164-accent); color: #fff; font-size: 0.9rem;
  padding: 0.1rem 0.4rem; border-radius: 0.4rem; font-weight: 700;
}

/* ---------- Feature / info cards ---------- */
.v164-card {
  background: var(--v164-card); border-radius: var(--v164-radius);
  padding: 1.2rem; border: 1px solid var(--v164-border); margin-bottom: 1rem;
}
.v164-card h3 { font-size: 1.4rem; color: var(--v164-primary); margin-bottom: 0.5rem; }
.v164-card p { font-size: 1.25rem; color: rgba(255,255,255,0.9); }
.v164-features-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 0.8rem; }
.v164-feature-item {
  background: var(--v164-card-deep); border-radius: var(--v164-radius-sm);
  padding: 1rem; text-align: center; border: 1px solid var(--v164-border);
}
.v164-feature-item .v164-ico { font-size: 2rem; color: var(--v164-primary); margin-bottom: 0.4rem; }
.v164-feature-item h4 { font-size: 1.2rem; color: var(--v164-text); margin-bottom: 0.3rem; }
.v164-feature-item p { font-size: 1.1rem; color: var(--v164-text-soft); }

/* ---------- Testimonials ---------- */
.v164-testimonial {
  background: var(--v164-card-deep); border-radius: var(--v164-radius-sm);
  padding: 1rem; margin-bottom: 0.8rem; border-left: 3px solid var(--v164-accent);
}
.v164-testimonial .v164-quote { font-size: 1.2rem; color: rgba(255,255,255,0.92); font-style: italic; }
.v164-testimonial .v164-author { font-size: 1.1rem; color: var(--v164-primary); margin-top: 0.4rem; }

/* ---------- Winners ---------- */
.v164-winners { display: flex; flex-direction: column; gap: 0.5rem; }
.v164-winner-row {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--v164-card-deep); padding: 0.6rem 0.8rem; border-radius: 0.6rem;
  font-size: 1.15rem;
}
.v164-winner-row .v164-wname { color: var(--v164-highlight); font-weight: 600; }
.v164-winner-row .v164-wamount { color: var(--v164-accent); font-weight: 700; }

/* ---------- Payment / app CTA ---------- */
.v164-pay-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.v164-pay-chip {
  background: var(--v164-card-deep); border: 1px solid var(--v164-border);
  border-radius: 0.6rem; padding: 0.5rem 0.8rem; font-size: 1.1rem; color: var(--v164-text-soft);
  display: inline-flex; align-items: center; gap: 0.4rem;
}
.v164-cta {
  display: block; text-align: center; padding: 1rem;
  background: linear-gradient(135deg, var(--v164-primary), var(--v164-highlight));
  color: var(--v164-bg-deep); border-radius: var(--v164-radius); font-weight: 700; font-size: 1.4rem;
  margin: 1rem 0; box-shadow: 0 3px 12px rgba(0,229,255,0.3);
}
.v164-cta:hover { color: var(--v164-bg-deep); opacity: .92; }

/* ---------- Footer ---------- */
.v164-footer {
  background: var(--v164-bg-deep); border-top: 1px solid var(--v164-border);
  padding: 1.6rem 1.2rem 2rem; margin-top: 1.6rem;
}
.v164-footer-inner { max-width: 430px; margin: 0 auto; }
.v164-footer-brand { font-size: 1.2rem; color: rgba(255,255,255,0.8); margin-bottom: 0.8rem; }
.v164-footer-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; margin-bottom: 1rem; }
.v164-footer-links a { color: var(--v164-text-soft); font-size: 1.15rem; }
.v164-footer-links a:hover { color: var(--v164-primary); }
.v164-footer-promo { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0.8rem 0; }
.v164-footer-promo .v164-btn { flex: 1 1 auto; justify-content: center; }
.v164-copyright { font-size: 1.1rem; color: rgba(255,255,255,0.6); margin-top: 0.8rem; }

/* ---------- Bottom nav ---------- */
.v164-bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000;
  height: 6rem; max-width: 430px; margin: 0 auto;
  background: rgba(28,42,58,0.98);
  border-top: 1px solid var(--v164-border);
  display: flex; justify-content: space-around; align-items: stretch;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.35);
}
.v164-nav-btn {
  flex: 1; min-width: 60px; min-height: 60px;
  background: transparent; border: none; color: var(--v164-text-soft);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.2rem; cursor: pointer; transition: color .15s, transform .15s;
  font-size: 1rem; text-decoration: none;
}
.v164-nav-btn .v164-nav-ico { font-size: 2.2rem; line-height: 1; }
.v164-nav-btn:hover { color: var(--v164-primary); transform: translateY(-1px); }
.v164-nav-btn.v164-current { color: var(--v164-primary); }
.v164-nav-btn.v164-current .v164-nav-ico { color: var(--v164-accent); }

/* ---------- Back to top ---------- */
.v164-totop {
  position: fixed; right: 1.2rem; bottom: 7rem; z-index: 999;
  width: 3.6rem; height: 3.6rem; border-radius: 50%;
  background: var(--v164-primary); color: var(--v164-bg-deep);
  border: none; font-size: 1.6rem; cursor: pointer; box-shadow: var(--v164-shadow);
  display: flex; align-items: center; justify-content: center;
}

/* ---------- Desktop ---------- */
@media (min-width: 769px) {
  .v164-bottom-nav { display: none; }
  .v164-container, .v164-header-inner, .v164-footer-inner, .v164-nav-menu { max-width: 760px; }
  .v164-game-grid { grid-template-columns: repeat(5, 1fr); }
  .v164-features-grid { grid-template-columns: repeat(4, 1fr); }
  main { padding-bottom: 2rem; }
}

@media (min-width: 481px) and (max-width: 768px) {
  .v164-game-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 768px) {
  main { padding-bottom: 80px; }
}
