/*!
 * ph777 registration - Core stylesheet
 * Every custom class is namespaced with the "g4b3-" prefix to avoid clashes
 * with utility libraries (Tailwind / Bootstrap) loaded later.
 * Palette: #2C2C2C | #CD853F | #F5DEB3 | #DEB887 | #E0F2F1
 * Mobile-first: target width <= 430px, then progressive enhancement.
 */

/* ----------------------------- Tokens ----------------------------- */
:root {
  --g4b3-bg: #2c2c2c;
  --g4b3-bg-soft: #3a3a3a;
  --g4b3-bg-deep: #1f1f1f;
  --g4b3-primary: #cd853f;
  --g4b3-secondary: #deb887;
  --g4b3-text: #f5deb3;
  --g4b3-text-light: #e0f2f1;
  --g4b3-text-muted: rgba(245, 222, 179, 0.72);
  --g4b3-border: rgba(222, 184, 135, 0.25);
  --g4b3-accent: #ffd166;
  --g4b3-success: #6dd5b3;
  --g4b3-shadow: 0 8px 24px rgba(0, 0, 0, 0.32);
  --g4b3-radius: 14px;
  --g4b3-radius-sm: 8px;
  --g4b3-space: 12px;
  --g4b3-max: 430px;
  --g4b3-header-h: 56px;
  --g4b3-nav-h: 62px;
}

* { box-sizing: border-box; }
html { font-size: 62.5%; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  background: var(--g4b3-bg);
  background-image: radial-gradient(circle at 20% -10%, #3a2f1c 0%, transparent 60%),
                    radial-gradient(circle at 100% 0%, #3a2c20 0%, transparent 55%),
                    linear-gradient(180deg, #2c2c2c 0%, #1f1f1f 100%);
  background-attachment: fixed;
  color: var(--g4b3-text);
  line-height: 1.5;
  font-size: 1.6rem;
  min-height: 100vh;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--g4b3-accent); text-decoration: none; }

/* --------------------------- Layout core --------------------------- */
.g4b3-wrapper { width: 100%; max-width: var(--g4b3-max); margin: 0 auto; padding: 0 var(--g4b3-space); }
.g4b3-container { padding: 18px 0; }
.g4b3-section { margin-top: 22px; padding-top: 8px; }
.g4b3-section-title {
  font-size: 2rem; font-weight: 800; color: var(--g4b3-accent);
  margin: 0 0 4px; display: flex; align-items: center; gap: 8px;
}
.g4b3-section-title i { color: var(--g4b3-primary); }
.g4b3-section-subtitle { font-size: 1.35rem; color: var(--g4b3-text-muted); margin: 0 0 14px; }
.g4b3-h1 { font-size: 2.4rem; font-weight: 900; margin: 8px 0 10px; color: var(--g4b3-text-light); line-height: 1.25; }

/* ------------------------------- Header ---------------------------- */
.g4b3-header {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--g4b3-header-h);
  background: linear-gradient(90deg, #1f1f1f 0%, #2c2c2c 70%, #3a2f1c 100%);
  border-bottom: 1px solid var(--g4b3-border);
  z-index: 1000;
  display: flex; align-items: center;
}
.g4b3-header-inner {
  width: 100%; max-width: var(--g4b3-max); margin: 0 auto;
  padding: 0 var(--g4b3-space);
  display: flex; align-items: center; gap: 8px;
}
.g4b3-logo {
  display: flex; align-items: center; gap: 6px;
  color: var(--g4b3-text-light); font-weight: 800; font-size: 1.5rem; flex: 1;
}
.g4b3-logo img { width: 30px; height: 30px; border-radius: 6px; }
.g4b3-logo span { color: var(--g4b3-primary); }

.g4b3-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 14px; border-radius: var(--g4b3-radius-sm);
  font-weight: 700; font-size: 1.3rem; cursor: pointer; border: none;
  transition: transform 0.15s ease, filter 0.15s ease;
  min-height: 36px; line-height: 1;
}
.g4b3-btn:active { transform: scale(0.96); }
.g4b3-btn--login { background: transparent; color: var(--g4b3-text); border: 1px solid var(--g4b3-secondary); }
.g4b3-btn--register {
  background: linear-gradient(180deg, #ffd166 0%, #cd853f 100%);
  color: #2c1a05;
  box-shadow: 0 4px 14px rgba(205, 133, 63, 0.4);
}
.g4b3-btn--block { display: flex; width: 100%; padding: 12px; font-size: 1.5rem; }
.g4b3-btn--ghost { background: rgba(255, 255, 255, 0.06); color: var(--g4b3-text-light); }

.g4b3-icon-btn {
  background: transparent; border: none; color: var(--g4b3-text);
  font-size: 1.8rem; cursor: pointer; width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center; border-radius: 50%;
}

/* ---------------------------- Mobile nav --------------------------- */
.g4b3-mobile-nav {
  position: fixed; top: var(--g4b3-header-h); left: 0; right: 0;
  background: var(--g4b3-bg-deep);
  border-bottom: 1px solid var(--g4b3-border);
  transform: translateY(-130%);
  transition: transform 0.28s ease;
  z-index: 9999; padding: 8px var(--g4b3-space) 14px;
}
.g4b3-mobile-nav--open { transform: translateY(0); }
.g4b3-mobile-nav a {
  display: flex; align-items: center; gap: 10px; padding: 10px 6px;
  color: var(--g4b3-text); border-bottom: 1px dashed var(--g4b3-border); font-size: 1.4rem;
}
.g4b3-mobile-nav a:last-child { border-bottom: none; }
.g4b3-mobile-nav a i { color: var(--g4b3-primary); width: 22px; }

/* ----------------------------- Carousel ---------------------------- */
.g4b3-carousel {
  position: relative; margin-top: calc(var(--g4b3-header-h) + 12px);
  border-radius: var(--g4b3-radius); overflow: hidden; box-shadow: var(--g4b3-shadow);
}
.g4b3-carousel-track { position: relative; height: 200px; }
.g4b3-carousel-slide {
  position: absolute; inset: 0; opacity: 0;
  transition: opacity 0.6s ease;
  background-size: cover; background-position: center;
}
.g4b3-carousel-slide--active { opacity: 1; }
.g4b3-carousel-slide a { display: block; width: 100%; height: 100%; }
.g4b3-carousel-overlay {
  position: absolute; bottom: 0; left: 0; right: 0; padding: 12px;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.7) 100%);
  color: #fff; font-weight: 700; font-size: 1.4rem;
}
.g4b3-carousel-dots { position: absolute; bottom: 10px; right: 12px; display: flex; gap: 6px; }
.g4b3-carousel-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, 0.5); cursor: pointer; }
.g4b3-carousel-dot--active { background: var(--g4b3-accent); }

/* ---------------------------- Games grid --------------------------- */
.g4b3-games { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.g4b3-game-card {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--g4b3-border);
  border-radius: var(--g4b3-radius-sm);
  padding: 8px 4px 10px;
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.g4b3-game-card:active { transform: scale(0.97); border-color: var(--g4b3-primary); }
.g4b3-game-card img {
  width: 72px; height: 72px; border-radius: 12px; margin-bottom: 6px;
  object-fit: cover; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}
.g4b3-game-name {
  font-size: 1.2rem; color: var(--g4b3-text); line-height: 1.2;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; font-weight: 600;
}
.g4b3-category-label {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 1.3rem; color: var(--g4b3-secondary);
  margin: 16px 0 10px; padding: 4px 10px;
  border: 1px solid var(--g4b3-border); border-radius: 999px;
  background: rgba(205, 133, 63, 0.12);
}

/* ----------------------------- Cards ------------------------------- */
.g4b3-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--g4b3-border);
  border-radius: var(--g4b3-radius);
  padding: 14px; margin-bottom: 14px; box-shadow: var(--g4b3-shadow);
}
.g4b3-card h2 { margin: 0 0 6px; font-size: 1.7rem; color: var(--g4b3-accent); }
.g4b3-card h3 { margin: 10px 0 4px; font-size: 1.45rem; color: var(--g4b3-secondary); }
.g4b3-card p { margin: 6px 0; color: var(--g4b3-text-light); font-size: 1.35rem; }
.g4b3-text-link { color: var(--g4b3-accent); font-weight: 700; }

/* --------------------------- Feature grid -------------------------- */
.g4b3-feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 10px 0; }
.g4b3-feature {
  background: linear-gradient(160deg, rgba(205,133,63,0.18) 0%, rgba(255,255,255,0.04) 100%);
  border: 1px solid var(--g4b3-border);
  border-radius: var(--g4b3-radius-sm);
  padding: 12px; text-align: center;
}
.g4b3-feature i { font-size: 2.2rem; color: var(--g4b3-accent); }
.g4b3-feature b { display: block; margin: 6px 0 2px; color: var(--g4b3-text-light); font-size: 1.3rem; }
.g4b3-feature span { color: var(--g4b3-text-muted); font-size: 1.2rem; }

/* --------------------------- Stats row ----------------------------- */
.g4b3-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; text-align: center; }
.g4b3-stat {
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--g4b3-border);
  border-radius: var(--g4b3-radius-sm);
  padding: 10px 4px;
}
.g4b3-stat b { display: block; font-size: 1.8rem; color: var(--g4b3-accent); }
.g4b3-stat span { font-size: 1.1rem; color: var(--g4b3-text-muted); }

/* ---------------------------- Testimonial -------------------------- */
.g4b3-testimonial {
  background: rgba(255, 255, 255, 0.05);
  border-left: 4px solid var(--g4b3-primary);
  padding: 10px 12px;
  border-radius: var(--g4b3-radius-sm);
  margin-bottom: 10px;
}
.g4b3-testimonial p { margin: 0 0 6px; font-size: 1.3rem; color: var(--g4b3-text-light); }
.g4b3-testimonial b { color: var(--g4b3-accent); font-size: 1.2rem; }

/* --------------------------- Payment row --------------------------- */
.g4b3-payment { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.g4b3-payment span {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--g4b3-border);
  border-radius: 6px; padding: 6px 10px;
  font-size: 1.2rem; color: var(--g4b3-text);
}

/* ---------------------------- Winners ------------------------------ */
.g4b3-winner {
  display: flex; justify-content: space-between;
  padding: 6px 0; border-bottom: 1px dashed var(--g4b3-border);
  font-size: 1.3rem;
}
.g4b3-winner b { color: var(--g4b3-success); }

/* ------------------------- Bottom navigation ------------------------ */
.g4b3-bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--g4b3-nav-h);
  background: linear-gradient(180deg, #2c2c2c 0%, #1f1f1f 100%);
  border-top: 1px solid var(--g4b3-border);
  display: flex; justify-content: space-around; align-items: center;
  z-index: 1000; box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.4);
}
.g4b3-bottom-nav a,
.g4b3-bottom-nav button {
  flex: 1; background: transparent; border: none;
  color: var(--g4b3-text-muted);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 1rem; gap: 2px; cursor: pointer;
  min-height: 60px; min-width: 60px; position: relative;
  transition: color 0.18s ease, transform 0.18s ease;
}
.g4b3-bottom-nav a i,
.g4b3-bottom-nav button i { font-size: 2rem; }
.g4b3-bottom-nav a:active,
.g4b3-bottom-nav button:active { transform: scale(0.92); }
.g4b3-bottom-nav .g4b3-nav-active { color: var(--g4b3-accent); }
.g4b3-bottom-nav .g4b3-nav-active::before {
  content: ""; position: absolute; top: 0; left: 25%; right: 25%;
  height: 3px; background: var(--g4b3-accent); border-radius: 0 0 4px 4px;
}
.g4b3-nav-promo {
  background: linear-gradient(180deg, #ffd166 0%, #cd853f 100%) !important;
  color: #2c1a05 !important;
  border-radius: 50%; height: 52px; width: 52px;
  margin-top: -22px; box-shadow: 0 6px 14px rgba(205, 133, 63, 0.5);
}
.g4b3-nav-promo i { font-size: 2.2rem; }

/* ------------------------------ Footer ----------------------------- */
.g4b3-footer {
  background: var(--g4b3-bg-deep);
  border-top: 1px solid var(--g4b3-border);
  padding: 18px var(--g4b3-space) calc(var(--g4b3-nav-h) + 16px);
  margin-top: 24px;
  color: var(--g4b3-text-muted);
  font-size: 1.25rem;
}
.g4b3-footer-links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin: 12px 0; }
.g4b3-footer-links a {
  color: var(--g4b3-text); padding: 6px 8px;
  border-radius: 6px; background: rgba(255, 255, 255, 0.04); font-size: 1.2rem;
}
.g4b3-footer-promo { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.g4b3-footer-promo .g4b3-btn { flex: 1; min-width: 100px; }

/* ----------------------- Scroll to top button ---------------------- */
.g4b3-to-top {
  position: fixed; right: 14px; bottom: calc(var(--g4b3-nav-h) + 14px);
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--g4b3-primary); color: #1f1f1f; border: none;
  font-size: 1.8rem; display: none; align-items: center; justify-content: center;
  z-index: 900; box-shadow: var(--g4b3-shadow);
}
.g4b3-to-top--show { display: flex; }

/* ----------------------- Reveal animation -------------------------- */
.g4b3-reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.4s ease, transform 0.4s ease; }
.g4b3-reveal--show { opacity: 1; transform: translateY(0); }

/* ------------------------- Bottom padding -------------------------- */
@media (max-width: 768px) {
  main { padding-bottom: calc(var(--g4b3-nav-h) + 18px); }
}

/* ---------------------------- Desktop ------------------------------ */
@media (min-width: 769px) {
  body { background-color: #181818; }
  .g4b3-wrapper { max-width: 960px; padding: 0 24px; }
  .g4b3-header-inner { max-width: 960px; }
  .g4b3-bottom-nav { display: none; }
  .g4b3-footer { padding-bottom: 24px; }
  .g4b3-games { grid-template-columns: repeat(6, 1fr); }
  .g4b3-feature-grid { grid-template-columns: repeat(4, 1fr); }
  main { padding-bottom: 30px; }
}
