/* ===========================================================
   F168 App - Core base stylesheet
   Prefix: g245-
   Palette: #ECF0F1 | #8FBC8F | #2E8B57 | #333333 | #C0C0C0
   Mobile-first HTML5 casino layout (max 430px)
   =========================================================== */

:root {
  --g245-bg: #333333;
  --g245-bg-alt: #2a2a2a;
  --g245-bg-deep: #1f1f1f;
  --g245-primary: #2E8B57;
  --g245-primary-dark: #246d45;
  --g245-accent: #8FBC8F;
  --g245-text: #ECF0F1;
  --g245-text-dim: #C0C0C0;
  --g245-gold: #f0c040;
  --g245-border: rgba(236, 240, 241, 0.12);
  --g245-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  --g245-radius: 12px;
  --g245-header-h: 56px;
  --g245-bottomnav-h: 62px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
}

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

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

/* ---------- Layout ---------- */
.g245-container {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1.2rem;
}

.g245-wrapper {
  padding-top: var(--g245-header-h);
  padding-bottom: calc(var(--g245-bottomnav-h) + 1rem);
}

main.g245-main { padding-bottom: 90px; }

/* ---------- Header ---------- */
.g245-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--g245-header-h);
  background: linear-gradient(90deg, var(--g245-bg-deep), var(--g245-primary-dark));
  border-bottom: 1px solid var(--g245-border);
  z-index: 1000;
  display: flex;
  align-items: center;
}

.g245-header-inner {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.g245-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--g245-text);
  font-weight: 700;
  font-size: 1.6rem;
}

.g245-brand img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.g245-brand span { color: var(--g245-gold); }

.g245-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.g245-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: none;
  border-radius: 8px;
  padding: 0.7rem 1rem;
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  min-height: 38px;
  transition: transform 0.15s, background 0.2s;
}

.g245-btn:active { transform: scale(0.94); }

.g245-btn-register {
  background: linear-gradient(180deg, var(--g245-gold), #d89e1f);
  color: #2a1d00;
}

.g245-btn-login {
  background: var(--g245-primary);
  color: var(--g245-text);
}

.g245-menu-btn {
  background: transparent;
  border: 1px solid var(--g245-border);
  color: var(--g245-text);
  border-radius: 8px;
  width: 38px;
  height: 38px;
  font-size: 1.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ---------- Mobile dropdown menu ---------- */
.g245-mobile-menu {
  position: fixed;
  top: var(--g245-header-h);
  left: 0; right: 0;
  max-width: 430px;
  margin: 0 auto;
  background: var(--g245-bg-alt);
  border-bottom: 1px solid var(--g245-border);
  padding: 0.8rem 1.2rem;
  z-index: 9999;
  transform: translateY(-130%);
  transition: transform 0.28s ease;
  box-shadow: var(--g245-shadow);
}

.g245-mobile-menu.g245-open { transform: translateY(0); }

.g245-mobile-menu a {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.9rem 0.6rem;
  color: var(--g245-text);
  font-size: 1.4rem;
  border-bottom: 1px solid var(--g245-border);
}

.g245-mobile-menu a:last-child { border-bottom: none; }
.g245-mobile-menu a i { width: 22px; text-align: center; color: var(--g245-accent); }

/* ---------- Hero / Carousel ---------- */
.g245-hero {
  margin: 1rem 0;
  border-radius: var(--g245-radius);
  overflow: hidden;
  box-shadow: var(--g245-shadow);
  position: relative;
}

.g245-carousel { position: relative; }

.g245-slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; }
.g245-slides::-webkit-scrollbar { display: none; }

.g245-slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  position: relative;
  cursor: pointer;
}

.g245-slide img { width: 100%; height: 180px; object-fit: cover; }

.g245-slide-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 0.8rem 1rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  color: var(--g245-text);
  font-weight: 700;
  font-size: 1.4rem;
}

.g245-dots {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 0;
}

.g245-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--g245-text-dim);
  opacity: 0.5;
  cursor: pointer;
}

.g245-dot.g245-active { background: var(--g245-gold); opacity: 1; }

/* ---------- Section ---------- */
.g245-section {
  margin: 1.4rem 0;
  padding: 0 1.2rem;
}

.g245-section-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--g245-gold);
  margin-bottom: 0.8rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--g245-primary);
}

.g245-section-title i { color: var(--g245-accent); }

.g245-h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--g245-text);
  margin: 0.6rem 0 0.8rem;
  line-height: 1.3;
}

.g245-lead {
  color: var(--g245-text-dim);
  font-size: 1.4rem;
  margin-bottom: 0.8rem;
}

/* ---------- Game grid ---------- */
.g245-cat-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--g245-accent);
  margin: 1rem 0 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.g245-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.7rem;
}

.g245-game-card {
  background: var(--g245-bg-alt);
  border: 1px solid var(--g245-border);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.2s;
  text-align: center;
}

.g245-game-card:active { transform: scale(0.95); border-color: var(--g245-gold); }

.g245-game-card img {
  width: 100%;
  height: 84px;
  object-fit: cover;
}

.g245-game-card .g245-game-name {
  font-size: 1.1rem;
  padding: 0.4rem 0.3rem;
  color: var(--g245-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Promo banner / CTA ---------- */
.g245-cta {
  background: linear-gradient(120deg, var(--g245-primary-dark), var(--g245-primary));
  border-radius: var(--g245-radius);
  padding: 1.2rem;
  text-align: center;
  margin: 1rem 0;
  box-shadow: var(--g245-shadow);
}

.g245-cta h3 { font-size: 1.6rem; color: var(--g245-gold); margin-bottom: 0.4rem; }
.g245-cta p { font-size: 1.3rem; color: var(--g245-text); margin-bottom: 0.8rem; }

.g245-cta .g245-btn { font-size: 1.5rem; padding: 0.9rem 1.6rem; }

.g245-text-link {
  color: var(--g245-gold);
  font-weight: 700;
  border-bottom: 1px dashed var(--g245-gold);
  cursor: pointer;
}

/* ---------- Card blocks ---------- */
.g245-card {
  background: var(--g245-bg-alt);
  border: 1px solid var(--g245-border);
  border-radius: var(--g245-radius);
  padding: 1rem;
  margin: 0.8rem 0;
}

.g245-card h2 { font-size: 1.6rem; color: var(--g245-accent); margin-bottom: 0.5rem; }
.g245-card h3 { font-size: 1.4rem; color: var(--g245-gold); margin: 0.6rem 0 0.3rem; }
.g245-card p { font-size: 1.35rem; color: var(--g245-text-dim); margin-bottom: 0.5rem; }
.g245-card ul { padding-left: 1.4rem; color: var(--g245-text-dim); font-size: 1.35rem; }
.g245-card li { margin-bottom: 0.3rem; }

/* ---------- Testimonial ---------- */
.g245-testimonials { display: grid; gap: 0.7rem; }
.g245-testimonial {
  background: var(--g245-bg-alt);
  border-left: 3px solid var(--g245-gold);
  padding: 0.8rem 1rem;
  border-radius: 8px;
  font-size: 1.3rem;
  color: var(--g245-text);
}
.g245-testimonial strong { color: var(--g245-accent); }

/* ---------- Payment / Features compact grid ---------- */
.g245-features, .g245-payments, .g245-winners {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
}

.g245-feature, .g245-payment, .g245-winner {
  background: var(--g245-bg-alt);
  border: 1px solid var(--g245-border);
  border-radius: 8px;
  padding: 0.7rem;
  font-size: 1.25rem;
  text-align: center;
  color: var(--g245-text);
}

.g245-feature i, .g245-payment i { font-size: 2rem; color: var(--g245-gold); display: block; margin-bottom: 0.3rem; }
.g245-winner b { color: var(--g245-gold); }

/* ---------- FAQ ---------- */
.g245-faq-item {
  background: var(--g245-bg-alt);
  border-radius: 8px;
  margin-bottom: 0.6rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--g245-border);
}
.g245-faq-item h3 { color: var(--g245-accent); font-size: 1.4rem; margin-bottom: 0.3rem; }
.g245-faq-item p { color: var(--g245-text-dim); font-size: 1.3rem; }

/* ---------- Footer ---------- */
.g245-footer {
  background: var(--g245-bg-deep);
  padding: 1.4rem 1.2rem 2rem;
  margin-top: 1.4rem;
  border-top: 2px solid var(--g245-primary);
}

.g245-footer-brand {
  color: var(--g245-text);
  font-size: 1.35rem;
  margin-bottom: 0.8rem;
}

.g245-footer-promos {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.8rem 0;
}

.g245-footer-promos .g245-btn { flex: 1 1 auto; font-size: 1.2rem; padding: 0.6rem 0.8rem; }

.g245-footer-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.4rem 0.8rem;
  margin: 0.8rem 0;
}

.g245-footer-links a {
  color: var(--g245-text-dim);
  font-size: 1.25rem;
  padding: 0.3rem 0;
}

.g245-footer-copy {
  text-align: center;
  font-size: 1.2rem;
  color: var(--g245-text-dim);
  margin-top: 0.8rem;
  border-top: 1px solid var(--g245-border);
  padding-top: 0.8rem;
}

/* ---------- Bottom nav ---------- */
.g245-bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  max-width: 430px;
  margin: 0 auto;
  height: var(--g245-bottomnav-h);
  background: linear-gradient(180deg, var(--g245-bg-alt), var(--g245-bg-deep));
  border-top: 1px solid var(--g245-border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.4);
}

.g245-bottom-nav a, .g245-bottom-nav button {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--g245-text-dim);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 60px;
  min-height: 60px;
  font-size: 1.05rem;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s, transform 0.15s;
}

.g245-bottom-nav a i,
.g245-bottom-nav button i,
.g245-bottom-nav a .material-icons-outlined,
.g245-bottom-nav button .material-icons-outlined,
.g245-bottom-nav a ion-icon,
.g245-bottom-nav button ion-icon { font-size: 22px; }

.g245-bottom-nav a:active, .g245-bottom-nav button:active { transform: scale(0.9); }

.g245-bottom-nav a.g245-active, .g245-bottom-nav button.g245-active {
  color: var(--g245-gold);
}

.g245-bottom-nav .g245-nav-promo { color: var(--g245-accent); }

/* ---------- Desktop ---------- */
@media (min-width: 769px) {
  .g245-bottom-nav { display: none; }
  .g245-menu-btn { display: none; }
  main.g245-main { padding-bottom: 1rem; }
  body { max-width: 768px; }
}

/* ---------- Helpers ---------- */
.g245-hidden { display: none !important; }
.g245-text-center { text-align: center; }
.g245-mt { margin-top: 1rem; }
