/*!
 * cm8888.cyou - Core stylesheet
 * All custom classes use the g004- prefix.
 * Palette: #FFFFFF (text/light) | #0E1621 (dark bg) | #F0FDFF (cool accent bg).
 * Mobile-first: base styles target max-width 430px; desktop tweaks via media queries.
 */
:root {
  --g004-primary: #0e1621;
  --g004-bg: #0e1621;
  --g004-bg-soft: #14202e;
  --g004-bg-card: #18283a;
  --g004-text: #ffffff;
  --g004-text-muted: #9fb3c8;
  --g004-accent: #f0fdff;
  --g004-gold: #ffd479;
  --g004-red: #ff5a6e;
  --g004-green: #38e29b;
  --g004-blue: #4aa8ff;
  --g004-purple: #b07cff;
  --g004-border: rgba(255, 255, 255, 0.08);
  --g004-radius: 14px;
  --g004-radius-lg: 22px;
  --g004-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  --g004-header-h: 58px;
  --g004-bottomnav-h: 62px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: "Segoe UI", "Roboto", "Inter", system-ui, -apple-system, sans-serif;
  background: var(--g004-bg);
  color: var(--g004-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(--g004-gold); text-decoration: none; }
a:hover { text-decoration: underline; }

.g004-wrapper {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  position: relative;
}

.g004-container {
  padding: 0 1.4rem;
  width: 100%;
}

/* ===== Header ===== */
.g004-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--g004-header-h);
  background: linear-gradient(180deg, #0b121c 0%, #0e1621 100%);
  border-bottom: 1px solid var(--g004-border);
  z-index: 1000;
  display: flex;
  align-items: center;
}

.g004-header-inner {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.g004-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex: 1;
  min-width: 0;
}
.g004-logo img { width: 28px; height: 28px; border-radius: 8px; }
.g004-logo-text {
  font-weight: 800;
  font-size: 1.7rem;
  color: var(--g004-text);
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.g004-logo-text span { color: var(--g004-gold); }

.g004-menu-toggle {
  background: transparent;
  border: 0;
  color: var(--g004-text);
  font-size: 2rem;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  border-radius: 10px;
}
.g004-menu-toggle:hover { background: rgba(255,255,255,0.06); }

.g004-header-btns { display: flex; gap: 0.5rem; }

.g004-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-weight: 700;
  font-size: 1.3rem;
  border: 0;
  border-radius: 999px;
  padding: 0.7rem 1.2rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  min-height: 36px;
  text-decoration: none;
}
.g004-btn:hover { text-decoration: none; transform: translateY(-1px); }
.g004-btn:active { transform: scale(0.96); }

.g004-btn-primary {
  background: linear-gradient(135deg, #ffd479 0%, #ff9d3c 100%);
  color: #2a1700;
  box-shadow: 0 4px 12px rgba(255, 157, 60, 0.35);
}
.g004-btn-secondary {
  background: rgba(240, 253, 255, 0.12);
  color: var(--g004-accent);
  border: 1px solid rgba(240, 253, 255, 0.25);
}
.g004-btn-ghost {
  background: transparent;
  color: var(--g004-accent);
  border: 1px solid var(--g004-border);
}
.g004-btn-block { width: 100%; }
.g004-btn-lg { padding: 1rem 1.6rem; font-size: 1.5rem; min-height: 48px; }

/* ===== Mobile slide-down menu ===== */
.g004-mobile-menu {
  position: fixed;
  top: var(--g004-header-h);
  left: 0; right: 0;
  background: #0b121c;
  border-bottom: 1px solid var(--g004-border);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  z-index: 999;
}
.g004-mobile-menu.g004-menu-open { max-height: 520px; }
.g004-mobile-menu-inner {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 0.8rem 1.2rem 1.2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}
.g004-mobile-menu a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 1rem;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  color: var(--g004-text);
  font-size: 1.35rem;
  font-weight: 600;
  text-decoration: none;
}
.g004-mobile-menu a i { color: var(--g004-gold); width: 20px; text-align: center; }
.g004-mobile-menu a:hover { background: rgba(255,212,121,0.12); text-decoration: none; }

/* ===== Main layout ===== */
.g004-main {
  padding-top: calc(var(--g004-header-h) + 6px);
  padding-bottom: calc(var(--g004-bottomnav-h) + 24px);
}

/* ===== Hero carousel ===== */
.g004-hero {
  position: relative;
  margin: 1rem 1.4rem 1.4rem;
  border-radius: var(--g004-radius-lg);
  overflow: hidden;
  box-shadow: var(--g004-shadow);
  aspect-ratio: 16/9;
  background: #000;
}
.g004-slides { position: absolute; inset: 0; }
.g004-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.7s ease;
  cursor: pointer;
}
.g004-slide img { width: 100%; height: 100%; object-fit: cover; }
.g004-slide.g004-slide-active { opacity: 1; }
.g004-slide-caption {
  position: absolute;
  left: 1rem; bottom: 1rem; right: 1rem;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.7));
  color: #fff;
  font-size: 1.35rem;
  font-weight: 700;
  padding: 1.6rem 0.6rem 0.4rem;
}
.g004-slide-dots {
  position: absolute;
  bottom: 0.8rem; right: 1rem;
  display: flex; gap: 0.4rem;
}
.g004-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
}
.g004-hero-cta {
  position: absolute;
  bottom: 1rem; left: 1rem;
}

/* ===== Section heading ===== */
.g004-section {
  margin: 2rem 0;
}
.g004-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.4rem;
  margin-bottom: 1rem;
}
.g004-section-title {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--g004-text);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.g004-section-title i { color: var(--g004-gold); }
.g004-section-link {
  font-size: 1.2rem;
  color: var(--g004-gold);
  font-weight: 600;
}

/* ===== H1 hero ===== */
.g004-h1 {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.25;
  margin: 1.6rem 1.4rem 0.8rem;
  color: var(--g004-text);
}
.g004-h1 span { color: var(--g004-gold); }
.g004-sub {
  margin: 0 1.4rem 1rem;
  color: var(--g004-text-muted);
  font-size: 1.35rem;
}

/* ===== Game grid ===== */
.g004-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.7rem;
  padding: 0 1.4rem;
}
.g004-card {
  background: var(--g004-bg-card);
  border-radius: var(--g004-radius);
  overflow: hidden;
  border: 1px solid var(--g004-border);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.2s ease;
  display: block;
  text-decoration: none;
  color: var(--g004-text);
}
.g004-card:hover { transform: translateY(-2px); border-color: rgba(255,212,121,0.4); text-decoration: none; }
.g004-card-img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  background: #0b121c;
}
.g004-card-name {
  padding: 0.5rem 0.6rem 0.7rem;
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
  color: var(--g004-text);
  line-height: 1.2rem;
  height: 3.6rem;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
}
.g004-card-badge {
  position: absolute;
  top: 6px; left: 6px;
  background: var(--g004-red);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
}
.g004-card-wrap { position: relative; }

/* ===== Featured / Highlights ===== */
.g004-feature {
  background: linear-gradient(135deg, #18283a 0%, #0e1621 100%);
  border-radius: var(--g004-radius-lg);
  padding: 1.6rem;
  margin: 1.4rem;
  border: 1px solid var(--g004-border);
  position: relative;
  overflow: hidden;
}
.g004-feature h3 {
  margin: 0 0 0.6rem;
  font-size: 1.6rem;
  color: var(--g004-gold);
}
.g004-feature p {
  margin: 0 0 1rem;
  color: var(--g004-text-muted);
  font-size: 1.3rem;
}

.g004-icon-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
  margin: 1rem 1.4rem;
}
.g004-icon-item {
  background: var(--g004-bg-card);
  border-radius: var(--g004-radius);
  padding: 1.2rem;
  border: 1px solid var(--g004-border);
  text-align: center;
}
.g004-icon-item i {
  font-size: 2.4rem;
  color: var(--g004-gold);
  margin-bottom: 0.6rem;
  display: block;
}
.g004-icon-item b { color: var(--g004-text); font-size: 1.35rem; }
.g004-icon-item span { color: var(--g004-text-muted); font-size: 1.15rem; display: block; margin-top: 0.3rem; }

/* ===== Testimonial / Review ===== */
.g004-review {
  background: var(--g004-bg-card);
  border-radius: var(--g004-radius);
  padding: 1.2rem;
  margin: 0.8rem 1.4rem;
  border-left: 3px solid var(--g004-gold);
}
.g004-review-head { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.6rem; }
.g004-review-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd479, #ff5a6e);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: #1a0c00;
}
.g004-review-name { font-weight: 700; font-size: 1.3rem; }
.g004-review-stars { color: var(--g004-gold); font-size: 1.1rem; }
.g004-review-text { color: var(--g004-text-muted); font-size: 1.25rem; }

/* ===== Payment ===== */
.g004-pay-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0 1.4rem;
}
.g004-pay-item {
  flex: 1 1 calc(33.333% - 0.6rem);
  min-width: 90px;
  background: var(--g004-bg-card);
  border-radius: 10px;
  padding: 0.8rem;
  text-align: center;
  border: 1px solid var(--g004-border);
  color: var(--g004-accent);
  font-size: 1.15rem;
  font-weight: 600;
}
.g004-pay-item i { display: block; font-size: 1.8rem; color: var(--g004-gold); margin-bottom: 0.4rem; }

/* ===== Winners ===== */
.g004-winner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  background: var(--g004-bg-card);
  margin: 0.5rem 1.4rem;
  font-size: 1.2rem;
}
.g004-winner b { color: var(--g004-gold); }
.g004-winner small { color: var(--g004-text-muted); }

/* ===== FAQ ===== */
.g004-faq { padding: 0 1.4rem; }
.g004-faq-item {
  background: var(--g004-bg-card);
  border-radius: 10px;
  margin-bottom: 0.6rem;
  border: 1px solid var(--g004-border);
  overflow: hidden;
}
.g004-faq-q {
  padding: 0.9rem 1rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--g004-text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.g004-faq-q i { color: var(--g004-gold); }
.g004-faq-a {
  padding: 0 1rem 0.9rem;
  color: var(--g004-text-muted);
  font-size: 1.2rem;
  line-height: 1.4rem;
}

/* ===== CTA banner ===== */
.g004-cta {
  margin: 1.4rem;
  padding: 1.6rem;
  border-radius: var(--g004-radius-lg);
  background: linear-gradient(135deg, #ff9d3c 0%, #ffd479 100%);
  color: #2a1700;
  text-align: center;
}
.g004-cta h3 { margin: 0 0 0.4rem; font-size: 1.7rem; }
.g004-cta p { margin: 0 0 1rem; font-size: 1.25rem; }

/* ===== Footer ===== */
.g004-footer {
  background: #0b121c;
  border-top: 1px solid var(--g004-border);
  padding: 1.8rem 1.4rem calc(var(--g004-bottomnav-h) + 1.6rem);
  margin-top: 2rem;
}
.g004-footer-brand {
  font-weight: 800;
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}
.g004-footer-brand span { color: var(--g004-gold); }
.g004-footer-desc { color: var(--g004-text-muted); font-size: 1.2rem; margin-bottom: 1rem; line-height: 1.5rem; }
.g004-footer-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1rem;
  margin: 1rem 0;
}
.g004-footer-links a {
  color: var(--g004-accent);
  font-size: 1.15rem;
  text-decoration: none;
}
.g004-footer-links a:hover { color: var(--g004-gold); }
.g004-footer-promos {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}
.g004-footer-copy {
  margin-top: 1.2rem;
  font-size: 1.1rem;
  color: var(--g004-text-muted);
  text-align: center;
}

/* ===== Bottom nav (mobile) ===== */
.g004-bottomnav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--g004-bottomnav-h);
  background: linear-gradient(180deg, #0b121c, #050a12);
  border-top: 1px solid var(--g004-border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.4);
}
.g004-bottomnav-inner {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  display: flex;
  justify-content: space-around;
  align-items: center;
}
.g004-navbtn {
  background: transparent;
  border: 0;
  color: var(--g004-text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  min-width: 60px;
  min-height: 60px;
  padding: 0.4rem;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.15s ease;
}
.g004-navbtn i, .g004-navbtn .material-icons-outlined,
.g004-navbtn .ion-icon { font-size: 22px; }
.g004-navbtn span { font-size: 1rem; font-weight: 600; }
.g004-navbtn:hover { color: var(--g004-gold); transform: translateY(-1px); }
.g004-navbtn:active { transform: scale(0.92); }
.g004-navbtn.g004-navbtn-active { color: var(--g004-gold); }
.g004-navbtn-promo {
  position: relative;
}
.g004-navbtn-promo::after {
  content: "";
  position: absolute;
  top: 6px; right: 14px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--g004-red);
  box-shadow: 0 0 0 2px #050a12;
}

/* ===== Back to top ===== */
.g004-to-top {
  position: fixed;
  right: 14px; bottom: calc(var(--g004-bottomnav-h) + 14px);
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--g004-gold);
  color: #2a1700;
  border: 0;
  font-size: 1.8rem;
  font-weight: 800;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 999;
}
.g004-to-top.g004-to-top-show { opacity: 1; pointer-events: auto; }

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

/* ===== Long-form SEO text ===== */
.g004-longtext {
  padding: 0 1.4rem;
  color: var(--g004-text-muted);
  font-size: 1.3rem;
  line-height: 1.55rem;
}
.g004-longtext h2 { color: var(--g004-text); font-size: 1.55rem; margin: 1.4rem 0 0.6rem; }
.g004-longtext h3 { color: var(--g004-gold); font-size: 1.4rem; margin: 1.2rem 0 0.5rem; }
.g004-longtext p { margin: 0 0 0.8rem; }
.g004-longtext a { color: var(--g004-gold); font-weight: 600; }

/* ===== Sub-page hero (help pages) ===== */
.g004-page-head {
  margin: 1rem 1.4rem 1.4rem;
  padding: 1.6rem;
  border-radius: var(--g004-radius-lg);
  background: linear-gradient(135deg, #1b2c40 0%, #0b121c 100%);
  border: 1px solid var(--g004-border);
  box-shadow: var(--g004-shadow);
}
.g004-page-head .g004-h1 { margin: 0 0 0.6rem; }
.g004-page-head p { margin: 0 0 1rem; color: var(--g004-text-muted); font-size: 1.3rem; }

/* ===== Step list (how-to guides) ===== */
.g004-step {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--g004-bg-card);
  border: 1px solid var(--g004-border);
  border-radius: var(--g004-radius);
  padding: 1rem 1.2rem;
  margin: 0.6rem 1.4rem;
}
.g004-step-num {
  flex: 0 0 auto;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd479, #ff9d3c);
  color: #2a1700;
  font-weight: 800;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.g004-step-body b { display: block; color: var(--g004-text); font-size: 1.35rem; margin-bottom: 0.2rem; }
.g004-step-body span { color: var(--g004-text-muted); font-size: 1.2rem; }

/* ===== Tip box ===== */
.g004-tip {
  margin: 1rem 1.4rem;
  padding: 1rem 1.2rem;
  border-radius: var(--g004-radius);
  background: rgba(56, 226, 155, 0.08);
  border: 1px solid rgba(56, 226, 155, 0.35);
  color: var(--g004-text-muted);
  font-size: 1.25rem;
}
.g004-tip b { color: var(--g004-green); }

/* ===== Compact info table ===== */
.g004-table {
  width: calc(100% - 2.8rem);
  margin: 0.8rem 1.4rem;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 1.2rem;
  background: var(--g004-bg-card);
  border: 1px solid var(--g004-border);
  border-radius: 10px;
  overflow: hidden;
}
.g004-table th, .g004-table td {
  padding: 0.7rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid var(--g004-border);
}
.g004-table th { background: #0b121c; color: var(--g004-gold); font-size: 1.15rem; }
.g004-table td { color: var(--g004-text-muted); }
.g004-table b { color: var(--g004-green); }

/* ===== Desktop ===== */
@media (min-width: 769px) {
  .g004-bottomnav { display: none; }
  .g004-main { padding-bottom: 40px; }
  .g004-wrapper, .g004-header-inner, .g004-mobile-menu-inner { max-width: 960px; }
  .g004-grid { grid-template-columns: repeat(6, 1fr); padding: 0; }
  .g004-icon-row { grid-template-columns: repeat(4, 1fr); margin: 1.4rem 0; }
  .g004-footer-links { grid-template-columns: repeat(4, 1fr); }
  body { font-size: 1.55rem; }
  .g004-h1 { font-size: 2.4rem; }
}
