/* ===========================================================
   fly88 game - base styles (prefix: v89d-)
   Mobile-first. Bottom nav fixed. Dark casual palette.
   =========================================================== */

:root {
  --v89d-bg: #0d1b2a;
  --v89d-bg-2: #102a43;
  --v89d-card: #15293f;
  --v89d-card-2: #1b3a55;
  --v89d-primary: #00BFFF;
  --v89d-primary-2: #5F9EA0;
  --v89d-accent: #87CEEB;
  --v89d-warm: #6F4E37;
  --v89d-gold: #ffd479;
  --v89d-text: #eaf4ff;
  --v89d-muted: #9bb3c9;
  --v89d-border: rgba(135, 206, 235, 0.18);
  --v89d-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  --v89d-radius: 16px;
}

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

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

body {
  font-family: "Be Vietnam Pro", "Segoe UI", "Roboto", system-ui, sans-serif;
  background: radial-gradient(1200px 600px at 50% -10%, #163b57 0%, var(--v89d-bg) 60%);
  color: var(--v89d-text);
  line-height: 1.6;
  font-size: 15px;
  overflow-x: hidden;
  padding-bottom: 80px;
}

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

.v89d-wrap { width: 100%; max-width: 430px; margin: 0 auto; padding: 0 14px; }
.v89d-wrap-wide { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* ============ Header ============ */
.v89d-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(135deg, rgba(13,27,42,0.96), rgba(16,42,67,0.96));
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--v89d-border);
}
.v89d-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.v89d-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 20px;
  color: var(--v89d-text);
  letter-spacing: 0.5px;
}
.v89d-logo .v89d-logo-mark {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--v89d-primary), var(--v89d-primary-2));
  display: grid; place-items: center;
  color: #04121d;
  font-weight: 900;
  box-shadow: 0 4px 12px rgba(0, 191, 255, 0.4);
}
.v89d-logo .v89d-logo-mark i { font-size: 18px; }
.v89d-logo small { display: block; font-size: 10px; color: var(--v89d-muted); font-weight: 600; letter-spacing: 2px; }

.v89d-header-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.v89d-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  cursor: pointer;
  font-weight: 700;
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 13px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.v89d-btn:active { transform: scale(0.96); }
.v89d-btn-register {
  background: linear-gradient(135deg, var(--v89d-gold), #ff9a3c);
  color: #2a1500;
  box-shadow: 0 4px 14px rgba(255, 154, 60, 0.35);
}
.v89d-btn-login {
  background: transparent;
  color: var(--v89d-text);
  border: 1.5px solid var(--v89d-primary);
}
.v89d-btn-login:hover { background: rgba(0,191,255,0.12); }
.v89d-icon-btn {
  background: transparent;
  border: none;
  color: var(--v89d-text);
  width: 38px; height: 38px;
  border-radius: 10px;
  display: grid; place-items: center;
  cursor: pointer;
  font-size: 20px;
}
.v89d-icon-btn:hover { background: rgba(135,206,235,0.12); }

/* Desktop nav */
.v89d-nav { display: none; gap: 18px; margin-left: 14px; }
.v89d-nav a { color: var(--v89d-muted); font-weight: 600; font-size: 14px; }
.v89d-nav a:hover { color: var(--v89d-primary); }

/* ============ Mobile menu ============ */
.v89d-menu-backdrop {
  position: fixed; inset: 0;
  background: rgba(4, 12, 22, 0.6);
  z-index: 9998;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
}
.v89d-backdrop-show { opacity: 1; pointer-events: auto; }
.v89d-mobile-menu {
  position: fixed;
  top: 0; right: -86%;
  width: 82%;
  max-width: 340px;
  height: 100%;
  background: linear-gradient(180deg, #0c1d30, #0a1726);
  z-index: 9999;
  padding: 22px 18px;
  transform: translateX(0);
  transition: right 0.3s ease;
  overflow-y: auto;
  box-shadow: var(--v89d-shadow);
}
.v89d-menu-open { right: 0; }
.v89d-menu-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.v89d-menu-head h3 { font-size: 18px; color: var(--v89d-text); }
.v89d-menu-close { background: transparent; border: none; color: var(--v89d-text); font-size: 26px; cursor: pointer; }
.v89d-menu-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 12px;
  border-radius: 12px;
  color: var(--v89d-text);
  font-weight: 600;
  border-bottom: 1px solid var(--v89d-border);
}
.v89d-menu-link i { font-size: 20px; color: var(--v89d-primary); width: 22px; text-align: center; }
.v89d-menu-link:hover { background: rgba(0,191,255,0.08); }
.v89d-menu-cta { margin-top: 18px; }
.v89d-menu-cta .v89d-btn { width: 100%; justify-content: center; padding: 13px; }

/* ============ Hero / Carousel ============ */
.v89d-hero { margin: 14px 0 8px; }
.v89d-carousel { position: relative; overflow: hidden; border-radius: var(--v89d-radius); box-shadow: var(--v89d-shadow); }
.v89d-slides-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
}
.v89d-slide {
  min-width: 100%;
  position: relative;
  background: linear-gradient(135deg, #15405f, #0c2538);
}
.v89d-slide img { width: 100%; height: 200px; object-fit: cover; }
.v89d-slide-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(8,18,30,0.88) 0%, rgba(8,18,30,0.15) 55%, rgba(8,18,30,0) 100%);
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.v89d-slide-title { font-size: 22px; font-weight: 800; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,0.5); }
.v89d-slide-desc { font-size: 13px; color: var(--v89d-accent); margin: 6px 0 12px; }
.v89d-dots { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; z-index: 2; }
.v89d-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,0.45);
  cursor: pointer; transition: all 0.2s ease;
  border: none;
}
.v89d-dot-active { background: var(--v89d-gold); width: 22px; border-radius: 6px; }

/* ============ Marquee / Notice ============ */
.v89d-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(90deg, rgba(0,191,255,0.12), rgba(135,206,235,0.06));
  border: 1px solid var(--v89d-border);
  border-radius: 12px;
  padding: 9px 12px;
  margin: 12px 0;
  font-size: 12.5px;
  color: var(--v89d-accent);
  overflow: hidden;
}
.v89d-notice i { color: var(--v89d-gold); font-size: 16px; flex-shrink: 0; }
.v89d-notice b { color: var(--v89d-gold); }
.v89d-marquee { white-space: nowrap; overflow: hidden; flex: 1; }
.v89d-marquee span { display: inline-block; padding-left: 100%; animation: v89dmarq 18s linear infinite; }
@keyframes v89dmarq { to { transform: translateX(-100%); } }

/* ============ Section ============ */
.v89d-section { margin: 22px 0; }
.v89d-section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.v89d-section-title {
  font-size: 19px; font-weight: 800;
  display: flex; align-items: center; gap: 9px;
  color: var(--v89d-text);
}
.v89d-section-title i { color: var(--v89d-primary); font-size: 22px; }
.v89d-section-title .v89d-tag {
  font-size: 11px; background: rgba(255, 212, 121, 0.18);
  color: var(--v89d-gold);
  padding: 3px 9px; border-radius: 999px; font-weight: 700;
}
.v89d-more { color: var(--v89d-accent); font-size: 12.5px; font-weight: 600; }

/* ============ Filter buttons ============ */
.v89d-filters {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 4px 0 10px;
  scrollbar-width: none;
}
.v89d-filters::-webkit-scrollbar { display: none; }
.v89d-filter-btn {
  flex-shrink: 0;
  background: var(--v89d-card);
  border: 1px solid var(--v89d-border);
  color: var(--v89d-muted);
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  transition: all 0.2s ease;
}
.v89d-filter-btn i { font-size: 14px; }
.v89d-filter-btn:hover { color: var(--v89d-text); border-color: var(--v89d-primary); }
.v89d-filter-active {
  background: linear-gradient(135deg, var(--v89d-primary), var(--v89d-primary-2));
  color: #04121d;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(0,191,255,0.35);
}

/* ============ Game grid ============ */
.v89d-game-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.v89d-game-card {
  background: var(--v89d-card);
  border: 1px solid var(--v89d-border);
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  cursor: pointer;
}
.v89d-game-card:hover { transform: translateY(-4px); box-shadow: var(--v89d-shadow); border-color: var(--v89d-primary); }
.v89d-game-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, #1b3a55, #122a40);
  overflow: hidden;
}
.v89d-game-thumb img { width: 100%; height: 100%; object-fit: cover; }
.v89d-game-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(4,12,22,0.85), rgba(4,12,22,0));
  display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 10px;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.v89d-game-card:hover .v89d-game-overlay { opacity: 1; }
.v89d-play-pill {
  background: linear-gradient(135deg, var(--v89d-gold), #ff9a3c);
  color: #2a1500;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 800;
  display: inline-flex; align-items: center; gap: 5px;
}
.v89d-game-name {
  padding: 7px 8px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--v89d-text);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.v89d-game-badge {
  position: absolute;
  top: 6px; left: 6px;
  background: linear-gradient(135deg, #ff4d6d, #ff8a3c);
  color: #fff;
  font-size: 9.5px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.4px;
}
.v89d-game-badge.hot { background: linear-gradient(135deg, #ff2e63, #ff7676); }
.v89d-game-badge.new { background: linear-gradient(135deg, #00d4a0, #00bfff); color: #04121d; }

/* ============ Feature cards ============ */
.v89d-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.v89d-feature {
  background: var(--v89d-card);
  border: 1px solid var(--v89d-border);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.v89d-feature-ic {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: rgba(0,191,255,0.12);
  color: var(--v89d-primary);
  display: grid; place-items: center;
  font-size: 22px;
}
.v89d-feature h4 { font-size: 14.5px; color: var(--v89d-text); }
.v89d-feature p { font-size: 12px; color: var(--v89d-muted); }

/* ============ Promo banner ============ */
.v89d-promo-banner {
  background: linear-gradient(135deg, #2a1a00 0%, #1a3b57 100%);
  border: 1px solid var(--v89d-gold);
  border-radius: var(--v89d-radius);
  padding: 18px;
  position: relative;
  overflow: hidden;
  margin: 18px 0;
  display: flex; flex-direction: column; gap: 10px;
}
.v89d-promo-banner::after {
  content: "";
  position: absolute; right: -40px; top: -40px;
  width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(255,212,121,0.35), transparent 70%);
  border-radius: 50%;
}
.v89d-promo-banner h3 { font-size: 19px; color: var(--v89d-gold); position: relative; z-index: 1; }
.v89d-promo-banner p { font-size: 13px; color: var(--v89d-accent); position: relative; z-index: 1; }
.v89d-promo-banner .v89d-btn { align-self: flex-start; position: relative; z-index: 1; }

/* ============ SEO content ============ */
.v89d-seo {
  background: var(--v89d-card);
  border: 1px solid var(--v89d-border);
  border-radius: var(--v89d-radius);
  padding: 18px 16px;
  margin: 18px 0;
}
.v89d-seo h2 { font-size: 18px; margin: 14px 0 8px; color: var(--v89d-text); display: flex; align-items: center; gap: 8px; }
.v89d-seo h2:first-child { margin-top: 0; }
.v89d-seo h2 i { color: var(--v89d-primary); }
.v89d-seo h3 { font-size: 15px; margin: 12px 0 6px; color: var(--v89d-accent); }
.v89d-seo p { font-size: 13.5px; color: var(--v89d-muted); margin-bottom: 10px; }
.v89d-seo ul { padding-left: 18px; margin-bottom: 10px; }
.v89d-seo li { font-size: 13px; color: var(--v89d-muted); margin-bottom: 5px; }
.v89d-seo a { color: var(--v89d-primary); font-weight: 600; }
.v89d-seo .v89d-promo-link {
  color: var(--v89d-gold);
  font-weight: 800;
  border-bottom: 2px dashed var(--v89d-gold);
  cursor: pointer;
}

/* ============ FAQ ============ */
.v89d-faq-item {
  background: var(--v89d-card);
  border: 1px solid var(--v89d-border);
  border-radius: 12px;
  margin-bottom: 10px;
  overflow: hidden;
}
.v89d-faq-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 13px 14px;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  color: var(--v89d-text);
}
.v89d-faq-head i { color: var(--v89d-primary); transition: transform 0.25s ease; }
.v89d-faq-open .v89d-faq-head i { transform: rotate(180deg); }
.v89d-faq-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding: 0 14px;
}
.v89d-faq-body p {
  padding-bottom: 14px;
  font-size: 13px;
  color: var(--v89d-muted);
}

/* ============ Reveal animation ============ */
.v89d-reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.55s ease, transform 0.55s ease; }
.v89d-revealed { opacity: 1; transform: none; }

/* ============ Footer ============ */
.v89d-footer {
  background: linear-gradient(180deg, #0a1726, #050d18);
  border-top: 1px solid var(--v89d-border);
  padding: 24px 16px 30px;
  margin-top: 20px;
}
.v89d-footer-cols {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  max-width: 1100px;
  margin: 0 auto;
}
.v89d-footer h4 { font-size: 14px; color: var(--v89d-text); margin-bottom: 10px; }
.v89d-footer ul { list-style: none; }
.v89d-footer li { margin-bottom: 7px; }
.v89d-footer a { color: var(--v89d-muted); font-size: 12.5px; }
.v89d-footer a:hover { color: var(--v89d-primary); }
.v89d-footer-bottom {
  max-width: 1100px;
  margin: 18px auto 0;
  padding-top: 14px;
  border-top: 1px solid var(--v89d-border);
  text-align: center;
  font-size: 11.5px;
  color: var(--v89d-muted);
}
.v89d-disclaimer {
  background: rgba(111, 78, 55, 0.15);
  border-left: 3px solid var(--v89d-warm);
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 11.5px;
  color: var(--v89d-muted);
  margin: 14px auto;
  max-width: 1100px;
}

/* ============ Bottom nav ============ */
.v89d-bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 62px;
  background: linear-gradient(180deg, rgba(12,29,48,0.98), rgba(8,18,30,1));
  border-top: 1px solid var(--v89d-border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.v89d-nav-btn {
  flex: 1;
  min-width: 60px;
  min-height: 60px;
  background: transparent;
  border: none;
  color: var(--v89d-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  font-size: 10.5px;
  font-weight: 600;
  transition: color 0.2s ease, transform 0.2s ease;
  position: relative;
}
.v89d-nav-btn i { font-size: 22px; }
.v89d-nav-btn .material-icons-outlined,
.v89d-nav-btn .material-icons { font-size: 22px; }
.v89d-nav-btn:hover { color: var(--v89d-accent); transform: translateY(-2px); }
.v89d-nav-btn.active { color: var(--v89d-primary); }
.v89d-nav-btn.active::before {
  content: "";
  position: absolute; top: 0;
  width: 30px; height: 3px;
  background: var(--v89d-primary);
  border-radius: 0 0 4px 4px;
}
.v89d-nav-btn-promo {
  color: var(--v89d-gold);
}
.v89d-nav-btn-promo i {
  background: linear-gradient(135deg, var(--v89d-gold), #ff9a3c);
  color: #2a1500;
  width: 44px; height: 44px;
  border-radius: 50%;
  display: grid; place-items: center;
  margin-top: -22px;
  box-shadow: 0 4px 14px rgba(255, 154, 60, 0.5);
  font-size: 22px;
}

/* ============ Back to top ============ */
.v89d-totop {
  position: fixed;
  right: 14px; bottom: 76px;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--v89d-primary);
  color: #04121d;
  border: none;
  cursor: pointer;
  display: grid; place-items: center;
  font-size: 20px;
  opacity: 0; pointer-events: none;
  transform: translateY(10px);
  transition: all 0.25s ease;
  z-index: 999;
  box-shadow: 0 4px 14px rgba(0,191,255,0.45);
}
.v89d-totop-show { opacity: 1; pointer-events: auto; transform: translateY(0); }

.v89d-no-scroll { overflow: hidden; }

/* ============ Desktop ============ */
@media (min-width: 769px) {
  .v89d-bottom-nav { display: none; }
  body { padding-bottom: 0; }
  .v89d-header-inner { padding: 12px 20px; }
  .v89d-nav { display: flex; }
  .v89d-menu-toggle { display: none; }
  .v89d-game-grid { grid-template-columns: repeat(5, 1fr); }
  .v89d-features { grid-template-columns: repeat(4, 1fr); }
  .v89d-footer-cols { grid-template-columns: repeat(4, 1fr); }
  .v89d-slide img { height: 340px; }
  .v89d-wrap { max-width: 1100px; }
  main { max-width: 1100px; margin: 0 auto; }
}

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