/* sc888 core base CSS - prefix g39d- */
/* English comments only */

:root {
  --g39d-primary: #1A1A2E;
  --g39d-accent: #F5DEB3;
  --g39d-deep: #191970;
  --g39d-blue: #4682B4;
  --g39d-bg: #0f0f1a;
  --g39d-bg2: #161628;
  --g39d-card: #1f1f38;
  --g39d-text: #F5DEB3;
  --g39d-muted: #b8b8d4;
  --g39d-gold: #f5c451;
  --g39d-red: #e74c3c;
  --g39d-green: #2ecc71;
  --g39d-radius: 12px;
}

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

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

body {
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--g39d-bg);
  color: var(--g39d-text);
  line-height: 1.5rem;
  font-size: 1.4rem;
  max-width: 430px;
  margin: 0 auto;
  overflow-x: hidden;
}

a { color: var(--g39d-gold); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

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

/* ===== Header ===== */
.g39d-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  max-width: 430px;
  margin: 0 auto;
  background: linear-gradient(90deg, var(--g39d-primary), var(--g39d-deep));
  border-bottom: 1px solid rgba(245,222,179,0.18);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  height: 56px;
}
.g39d-logo { display: flex; align-items: center; gap: 0.6rem; color: var(--g39d-accent); font-weight: 700; font-size: 1.8rem; }
.g39d-logo img { width: 28px; height: 28px; border-radius: 6px; }
.g39d-logo span { background: linear-gradient(90deg, var(--g39d-gold), var(--g39d-accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.g39d-head-actions { display: flex; align-items: center; gap: 0.5rem; }
.g39d-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  border: none; cursor: pointer; font-weight: 700; font-size: 1.3rem;
  border-radius: 20px; padding: 0.6rem 1.2rem; transition: transform .15s, opacity .15s;
  min-height: 36px;
}
.g39d-btn:active { transform: scale(0.96); }
.g39d-btn-register { background: linear-gradient(90deg, var(--g39d-gold), #f5a623); color: var(--g39d-primary); }
.g39d-btn-login { background: transparent; color: var(--g39d-accent); border: 1px solid var(--g39d-accent); }
.g39d-btn-cta { background: linear-gradient(90deg, var(--g39d-red), #c0392b); color: #fff; padding: 0.8rem 1.6rem; font-size: 1.4rem; border-radius: 24px; }

.g39d-menu-btn {
  background: transparent; border: none; color: var(--g39d-accent);
  font-size: 2rem; cursor: pointer; padding: 0 0.4rem; min-width: 44px; min-height: 44px;
}

/* ===== Mobile expandable menu ===== */
.g39d-mobile-menu {
  position: fixed; top: 56px; left: 0; right: 0; max-width: 430px; margin: 0 auto;
  background: var(--g39d-bg2); border-bottom: 1px solid rgba(245,222,179,0.18);
  max-height: 0; overflow: hidden; transition: max-height .3s ease; z-index: 9999;
}
.g39d-mobile-menu.g39d-open { max-height: 420px; }
.g39d-mobile-menu ul { list-style: none; padding: 0.6rem 1rem; }
.g39d-mobile-menu li a {
  display: block; padding: 1rem 0.6rem; color: var(--g39d-accent);
  border-bottom: 1px solid rgba(245,222,179,0.08); font-size: 1.4rem;
}
.g39d-mobile-menu li a:hover { color: var(--g39d-gold); }

/* ===== Main ===== */
.g39d-main { padding-top: 56px; padding-bottom: 80px; }

/* ===== Carousel ===== */
.g39d-carousel { position: relative; margin: 1rem 0; border-radius: var(--g39d-radius); overflow: hidden; }
.g39d-slides { position: relative; height: 180px; }
.g39d-slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity .5s ease;
  cursor: pointer;
}
.g39d-slide.g39d-active { opacity: 1; }
.g39d-slide img { width: 100%; height: 100%; object-fit: cover; }
.g39d-slide .g39d-slide-cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  padding: 1.4rem 1rem 0.8rem; color: #fff; font-weight: 700; font-size: 1.5rem;
}
.g39d-dots { position: absolute; bottom: 8px; left: 0; right: 0; text-align: center; }
.g39d-dot {
  display: inline-block; width: 8px; height: 8px; margin: 0 3px;
  border-radius: 50%; background: rgba(255,255,255,0.4); cursor: pointer;
}
.g39d-dot.g39d-active { background: var(--g39d-gold); }

/* ===== Section ===== */
.g39d-section { padding: 1.2rem 0; }
.g39d-section-title {
  font-size: 1.8rem; color: var(--g39d-gold); margin-bottom: 0.8rem;
  padding-left: 0.6rem; border-left: 4px solid var(--g39d-blue); font-weight: 800;
}
.g39d-h1 {
  font-size: 2rem; color: var(--g39d-accent); margin: 1rem 0; line-height: 1.3;
  font-weight: 800; text-align: center;
}
.g39d-lead { color: var(--g39d-muted); font-size: 1.4rem; margin-bottom: 1rem; }

/* ===== Game grid ===== */
.g39d-filter { display: flex; gap: 0.5rem; overflow-x: auto; padding: 0.4rem 0 0.8rem; }
.g39d-ftab {
  flex: 0 0 auto; padding: 0.5rem 1rem; border-radius: 16px;
  background: var(--g39d-card); color: var(--g39d-muted); font-size: 1.2rem;
  cursor: pointer; border: 1px solid rgba(245,222,179,0.1);
}
.g39d-ftab.g39d-active { background: var(--g39d-gold); color: var(--g39d-primary); font-weight: 700; }

.g39d-gcat-title { color: var(--g39d-blue); font-size: 1.5rem; margin: 1rem 0 0.6rem; font-weight: 700; }
.g39d-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem;
}
.g39d-game {
  display: block; background: var(--g39d-card); border-radius: 10px;
  padding: 0.5rem; text-align: center; cursor: pointer; transition: transform .15s;
  border: 1px solid rgba(245,222,179,0.06);
}
.g39d-game:active { transform: scale(0.95); }
.g39d-game img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.g39d-game-name { color: var(--g39d-accent); font-size: 1.1rem; margin-top: 0.4rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ===== Cards ===== */
.g39d-card {
  background: var(--g39d-card); border-radius: var(--g39d-radius);
  padding: 1rem; margin-bottom: 0.8rem; border: 1px solid rgba(70,130,180,0.2);
}
.g39d-card h3 { color: var(--g39d-gold); font-size: 1.5rem; margin-bottom: 0.5rem; }
.g39d-card p { color: var(--g39d-muted); font-size: 1.3rem; line-height: 1.6; }

.g39d-feature-row { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.g39d-feature {
  flex: 1 1 45%; background: var(--g39d-bg2); border-radius: 10px; padding: 0.8rem;
  text-align: center; border: 1px solid rgba(70,130,180,0.15);
}
.g39d-feature i { color: var(--g39d-gold); font-size: 2.2rem; }
.g39d-feature h4 { color: var(--g39d-accent); font-size: 1.3rem; margin: 0.4rem 0; }
.g39d-feature p { color: var(--g39d-muted); font-size: 1.1rem; }

/* ===== Testimonials ===== */
.g39d-testi { background: var(--g39d-bg2); border-radius: 10px; padding: 0.9rem; margin-bottom: 0.6rem; }
.g39d-testi-head { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.4rem; }
.g39d-testi-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--g39d-blue); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.g39d-testi-name { color: var(--g39d-accent); font-weight: 700; font-size: 1.3rem; }
.g39d-testi-stars { color: var(--g39d-gold); font-size: 1.1rem; }
.g39d-testi p { color: var(--g39d-muted); font-size: 1.2rem; }

/* ===== Winners ===== */
.g39d-winner { display: flex; justify-content: space-between; padding: 0.5rem 0; border-bottom: 1px solid rgba(245,222,179,0.06); font-size: 1.2rem; }
.g39d-winner .g39d-wname { color: var(--g39d-accent); }
.g39d-winner .g39d-wamt { color: var(--g39d-green); font-weight: 700; }

/* ===== Payment ===== */
.g39d-pay { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.g39d-pay span { background: var(--g39d-bg2); border-radius: 8px; padding: 0.5rem 0.8rem; color: var(--g39d-accent); font-size: 1.1rem; border: 1px solid rgba(70,130,180,0.2); }

/* ===== CTA ===== */
.g39d-cta-box {
  background: linear-gradient(135deg, var(--g39d-deep), var(--g39d-blue));
  border-radius: var(--g39d-radius); padding: 1.2rem; text-align: center; margin: 1rem 0;
}
.g39d-cta-box h3 { color: var(--g39d-gold); font-size: 1.6rem; margin-bottom: 0.4rem; }
.g39d-cta-box p { color: #fff; font-size: 1.2rem; margin-bottom: 0.8rem; }

/* ===== Footer ===== */
.g39d-footer {
  background: var(--g39d-primary); padding: 1.4rem 1.2rem 2rem; margin-top: 1rem;
  border-top: 2px solid var(--g39d-gold);
}
.g39d-footer-brand { color: var(--g39d-accent); font-size: 1.3rem; line-height: 1.6; margin-bottom: 1rem; }
.g39d-footer-links { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.g39d-footer-links a { background: var(--g39d-bg2); color: var(--g39d-accent); padding: 0.4rem 0.8rem; border-radius: 14px; font-size: 1.1rem; }
.g39d-footer-promo { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.g39d-footer-promo button { background: var(--g39d-gold); color: var(--g39d-primary); border: none; padding: 0.5rem 0.9rem; border-radius: 16px; font-weight: 700; font-size: 1.2rem; cursor: pointer; }
.g39d-footer-copy { color: var(--g39d-muted); font-size: 1.1rem; text-align: center; border-top: 1px solid rgba(245,222,179,0.1); padding-top: 0.8rem; }

/* ===== Bottom nav ===== */
.g39d-bnav {
  position: fixed; bottom: 0; left: 0; right: 0; max-width: 430px; margin: 0 auto;
  background: linear-gradient(180deg, var(--g39d-deep), var(--g39d-primary));
  border-top: 1px solid rgba(245,222,179,0.18);
  display: flex; justify-content: space-around; align-items: center;
  height: 60px; z-index: 1000;
}
.g39d-bnav-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: transparent; border: none; color: var(--g39d-muted);
  min-width: 60px; min-height: 60px; cursor: pointer; font-size: 1rem; gap: 2px;
  transition: color .15s, transform .15s;
}
.g39d-bnav-btn i, .g39d-bnav-btn .material-icons-outlined, .g39d-bnav-btn ion-icon { font-size: 24px; }
.g39d-bnav-btn:active { transform: scale(0.9); }
.g39d-bnav-btn.g39d-current { color: var(--g39d-gold); }
.g39d-bnav-btn.g39d-promo { color: var(--g39d-gold); }
.g39d-bnav-badge { position: absolute; top: 6px; right: 16px; background: var(--g39d-red); color: #fff; font-size: 0.9rem; border-radius: 8px; padding: 0 4px; }

/* ===== Desktop ===== */
@media (min-width: 769px) {
  .g39d-bnav { display: none; }
  body { max-width: 768px; }
  .g39d-header { max-width: 768px; }
  .g39d-mobile-menu { max-width: 768px; }
}
@media (max-width: 768px) {
  .g39d-main { padding-bottom: 80px; }
}

/* Utility */
.g39d-text-center { text-align: center; }
.g39d-mt1 { margin-top: 1rem; }
.g39d-promo-text { color: var(--g39d-gold); font-weight: 700; }
