/* ============================================================
   365 casino login - Core Theme Stylesheet
   Mobile-first casino gaming website for Philippine market
   All custom classes use prefix "g4d0-" for namespace isolation
   Palette: #B8860B | #CD853F | #F4A460 | #0E1621 | #000080
   ============================================================ */

:root {
  --g4d0-primary: #B8860B;
  --g4d0-secondary: #CD853F;
  --g4d0-accent: #F4A460;
  --g4d0-bg: #0E1621;
  --g4d0-bg-alt: #111c2b;
  --g4d0-navy: #000080;
  --g4d0-text: #F4A460;
  --g4d0-text-light: #f5e6c8;
  --g4d0-text-muted: #b9a98c;
  --g4d0-border: rgba(244, 164, 96, 0.22);
  --g4d0-card: #16243a;
  --g4d0-shadow: 0 0.4rem 1.4rem rgba(0, 0, 0, 0.45);
  --g4d0-radius: 1rem;
  --g4d0-radius-sm: 0.6rem;
  --g4d0-transition: 0.25s ease;
}

/* Base reset and root font sizing (62.5% = 1rem equals 10px) */
* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(160deg, var(--g4d0-bg) 0%, var(--g4d0-bg-alt) 100%);
  color: var(--g4d0-text-light);
  line-height: 1.5rem;
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  overflow-x: hidden;
}

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

/* ---------- Header ---------- */
.g4d0-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  max-width: 430px;
  margin: 0 auto;
  height: 5.6rem;
  background: linear-gradient(90deg, var(--g4d0-navy) 0%, var(--g4d0-bg) 100%);
  border-bottom: 0.2rem solid var(--g4d0-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.2rem;
  z-index: 1000;
  box-shadow: var(--g4d0-shadow);
}

.g4d0-header-brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
}

.g4d0-logo {
  width: 3rem;
  height: 3rem;
  border-radius: 0.6rem;
  border: 0.15rem solid var(--g4d0-primary);
  object-fit: cover;
}

.g4d0-site-name {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--g4d0-accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.g4d0-header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.g4d0-menu-btn {
  background: transparent;
  border: 0.15rem solid var(--g4d0-primary);
  color: var(--g4d0-accent);
  width: 3.6rem;
  height: 3.6rem;
  border-radius: 0.6rem;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--g4d0-transition);
}

.g4d0-menu-btn:hover, .g4d0-menu-btn.g4d0-active {
  background: var(--g4d0-primary);
  color: #fff;
}

/* ---------- Buttons ---------- */
.g4d0-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.2rem;
  border-radius: var(--g4d0-radius-sm);
  font-size: 1.2rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: var(--g4d0-transition);
  text-align: center;
  min-height: 3.6rem;
}

.g4d0-btn-register {
  background: linear-gradient(135deg, var(--g4d0-primary), var(--g4d0-secondary));
  color: #fff;
  box-shadow: 0 0.3rem 0.8rem rgba(184, 134, 11, 0.4);
}

.g4d0-btn-login {
  background: transparent;
  color: var(--g4d0-accent);
  border: 0.15rem solid var(--g4d0-accent);
}

.g4d0-btn-register:hover, .g4d0-btn-login:hover {
  transform: translateY(-0.1rem);
  filter: brightness(1.12);
}

.g4d0-btn-promo {
  background: linear-gradient(135deg, var(--g4d0-navy), var(--g4d0-primary));
  color: #fff;
  padding: 0.9rem 1.6rem;
  font-size: 1.3rem;
  width: 100%;
  border-radius: var(--g4d0-radius-sm);
}

.g4d0-btn-promo:hover { filter: brightness(1.15); transform: translateY(-0.1rem); }

/* ---------- Mobile menu drawer ---------- */
.g4d0-mobile-menu {
  position: fixed;
  top: 5.6rem;
  left: 0;
  right: 0;
  max-width: 430px;
  margin: 0 auto;
  background: var(--g4d0-bg-alt);
  border-bottom: 0.2rem solid var(--g4d0-primary);
  padding: 1rem 1.2rem;
  z-index: 9999;
  transform: translateY(-150%);
  transition: transform 0.3s ease;
  max-height: calc(100vh - 5.6rem);
  overflow-y: auto;
}

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

.g4d0-mobile-menu a {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 0.8rem;
  color: var(--g4d0-text-light);
  font-size: 1.3rem;
  border-bottom: 0.1rem solid var(--g4d0-border);
  transition: var(--g4d0-transition);
}

.g4d0-mobile-menu a:hover { color: var(--g4d0-accent); background: rgba(184, 134, 11, 0.12); padding-left: 1.2rem; }
.g4d0-mobile-menu a i, .g4d0-mobile-menu a span.mi { color: var(--g4d0-primary); font-size: 1.6rem; }

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

.g4d0-main {
  padding-top: 5.6rem;
  padding-bottom: 7.5rem;
}

.g4d0-section {
  padding: 2rem 0;
}

.g4d0-section-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--g4d0-accent);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.g4d0-section-title i, .g4d0-section-title span.mi { color: var(--g4d0-primary); }

.g4d0-subtitle {
  font-size: 1.4rem;
  color: var(--g4d0-secondary);
  font-weight: 700;
  margin: 1.4rem 0 0.6rem;
}

.g4d0-text { font-size: 1.3rem; color: var(--g4d0-text-muted); line-height: 1.6; }
.g4d0-text strong { color: var(--g4d0-accent); }

/* ---------- Hero carousel ---------- */
.g4d0-carousel {
  position: relative;
  width: 100%;
  border-radius: var(--g4d0-radius);
  overflow: hidden;
  box-shadow: var(--g4d0-shadow);
  margin-bottom: 1.4rem;
}

.g4d0-carousel-track { position: relative; width: 100%; height: 18rem; }

.g4d0-carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
  cursor: pointer;
}

.g4d0-carousel-slide.g4d0-active { opacity: 1; }

.g4d0-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.g4d0-carousel-caption {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  background: rgba(14, 22, 33, 0.78);
  padding: 0.6rem 1rem;
  border-radius: var(--g4d0-radius-sm);
  border-left: 0.25rem solid var(--g4d0-primary);
}

.g4d0-carousel-caption strong { color: var(--g4d0-accent); font-size: 1.3rem; display: block; }
.g4d0-carousel-caption span { color: var(--g4d0-text-light); font-size: 1.1rem; }

.g4d0-carousel-dots {
  position: absolute;
  bottom: 0.6rem;
  right: 1rem;
  display: flex;
  gap: 0.4rem;
}

.g4d0-carousel-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: rgba(244, 164, 96, 0.4);
  cursor: pointer;
  transition: var(--g4d0-transition);
}

.g4d0-carousel-dot.g4d0-active { background: var(--g4d0-primary); width: 1.6rem; border-radius: 0.4rem; }

/* ---------- Game grid ---------- */
.g4d0-game-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
}

.g4d0-game-card {
  background: var(--g4d0-card);
  border: 0.1rem solid var(--g4d0-border);
  border-radius: var(--g4d0-radius-sm);
  padding: 0.6rem;
  text-align: center;
  cursor: pointer;
  transition: var(--g4d0-transition);
  overflow: hidden;
}

.g4d0-game-card:hover {
  transform: translateY(-0.2rem);
  border-color: var(--g4d0-primary);
  box-shadow: 0 0.4rem 1rem rgba(184, 134, 11, 0.3);
}

.g4d0-game-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 0.5rem;
  margin-bottom: 0.4rem;
}

.g4d0-game-name {
  font-size: 1.05rem;
  color: var(--g4d0-text-light);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.g4d0-game-tag {
  display: inline-block;
  font-size: 0.95rem;
  color: var(--g4d0-primary);
  background: rgba(184, 134, 11, 0.15);
  padding: 0.1rem 0.5rem;
  border-radius: 0.3rem;
  margin-top: 0.3rem;
}

/* ---------- Cards / modules ---------- */
.g4d0-card {
  background: var(--g4d0-card);
  border: 0.1rem solid var(--g4d0-border);
  border-radius: var(--g4d0-radius);
  padding: 1.4rem;
  margin-bottom: 1.2rem;
  box-shadow: var(--g4d0-shadow);
}

.g4d0-card-feature {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  border-radius: var(--g4d0-radius-sm);
  background: rgba(184, 134, 11, 0.08);
  margin-bottom: 0.8rem;
}

.g4d0-card-feature i, .g4d0-card-feature span.mi {
  font-size: 2rem;
  color: var(--g4d0-primary);
  flex-shrink: 0;
}

.g4d0-card-feature h4 { font-size: 1.3rem; color: var(--g4d0-accent); margin-bottom: 0.2rem; }
.g4d0-card-feature p { font-size: 1.15rem; color: var(--g4d0-text-muted); line-height: 1.5; }

/* ---------- RTP compact table ---------- */
.g4d0-rtp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.15rem;
}

.g4d0-rtp-table th, .g4d0-rtp-table td {
  padding: 0.6rem 0.4rem;
  text-align: left;
  border-bottom: 0.1rem solid var(--g4d0-border);
}

.g4d0-rtp-table th { color: var(--g4d0-accent); font-size: 1.1rem; }
.g4d0-rtp-table td { color: var(--g4d0-text-light); }
.g4d0-rtp-table td.g4d0-rtp-val { color: var(--g4d0-primary); font-weight: 700; }

/* ---------- Testimonial / winner ---------- */
.g4d0-testimonial {
  background: rgba(184, 134, 11, 0.08);
  border-left: 0.3rem solid var(--g4d0-primary);
  padding: 1rem 1.2rem;
  border-radius: 0.4rem;
  margin-bottom: 0.8rem;
}

.g4d0-testimonial p { font-size: 1.2rem; color: var(--g4d0-text-light); font-style: italic; }
.g4d0-testimonial .g4d0-author { font-size: 1.05rem; color: var(--g4d0-secondary); margin-top: 0.4rem; font-weight: 700; }

.g4d0-winner-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0;
  border-bottom: 0.1rem solid var(--g4d0-border);
  font-size: 1.15rem;
}

.g4d0-winner-row span:first-child { color: var(--g4d0-text-light); }
.g4d0-winner-row span:last-child { color: var(--g4d0-primary); font-weight: 700; }

/* ---------- Payment methods ---------- */
.g4d0-payment-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
}

.g4d0-payment-item {
  background: var(--g4d0-card);
  border: 0.1rem solid var(--g4d0-border);
  border-radius: 0.5rem;
  padding: 0.8rem 0.4rem;
  text-align: center;
  font-size: 1rem;
  color: var(--g4d0-text-light);
}

.g4d0-payment-item i, .g4d0-payment-item span.mi { font-size: 1.8rem; color: var(--g4d0-accent); display: block; margin-bottom: 0.3rem; }

/* ---------- App download CTA ---------- */
.g4d0-app-cta {
  background: linear-gradient(135deg, var(--g4d0-navy), var(--g4d0-primary));
  border-radius: var(--g4d0-radius);
  padding: 1.6rem;
  text-align: center;
  margin-bottom: 1.2rem;
}

.g4d0-app-cta h3 { color: #fff; font-size: 1.6rem; margin-bottom: 0.4rem; }
.g4d0-app-cta p { color: var(--g4d0-text-light); font-size: 1.2rem; margin-bottom: 1rem; }
.g4d0-app-cta .g4d0-app-btns { display: flex; gap: 0.8rem; justify-content: center; }
.g4d0-app-cta .g4d0-app-btns button {
  background: #fff;
  color: var(--g4d0-navy);
  border: none;
  padding: 0.7rem 1.2rem;
  border-radius: 0.5rem;
  font-weight: 700;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* ---------- Promo link inline ---------- */
.g4d0-link-promo {
  color: var(--g4d0-accent);
  font-weight: 800;
  cursor: pointer;
  border-bottom: 0.15rem dashed var(--g4d0-primary);
  transition: var(--g4d0-transition);
}

.g4d0-link-promo:hover { color: var(--g4d0-primary); border-bottom-style: solid; }

.g4d0-promo-banner {
  background: linear-gradient(90deg, var(--g4d0-primary), var(--g4d0-secondary));
  color: #fff;
  padding: 1.2rem;
  border-radius: var(--g4d0-radius-sm);
  text-align: center;
  margin: 1rem 0;
  cursor: pointer;
  transition: var(--g4d0-transition);
}

.g4d0-promo-banner:hover { filter: brightness(1.1); }
.g4d0-promo-banner strong { display: block; font-size: 1.4rem; }
.g4d0-promo-banner span { font-size: 1.1rem; }

/* ---------- FAQ ---------- */
.g4d0-faq-item {
  background: var(--g4d0-card);
  border: 0.1rem solid var(--g4d0-border);
  border-radius: var(--g4d0-radius-sm);
  padding: 1rem 1.2rem;
  margin-bottom: 0.7rem;
}

.g4d0-faq-item h4 { font-size: 1.3rem; color: var(--g4d0-accent); margin-bottom: 0.4rem; }
.g4d0-faq-item p { font-size: 1.2rem; color: var(--g4d0-text-muted); line-height: 1.5; }

/* ---------- Footer ---------- */
.g4d0-footer {
  background: var(--g4d0-bg-alt);
  border-top: 0.2rem solid var(--g4d0-primary);
  padding: 2rem 1.2rem 7.5rem;
  margin-top: 1.5rem;
}

.g4d0-footer-brand { font-size: 1.2rem; color: var(--g4d0-text-muted); line-height: 1.6; margin-bottom: 1.2rem; }
.g4d0-footer-brand strong { color: var(--g4d0-accent); }

.g4d0-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  margin-bottom: 1.2rem;
}

.g4d0-footer-links a {
  font-size: 1.1rem;
  color: var(--g4d0-text-light);
  text-decoration: underline;
  text-underline-offset: 0.2rem;
}

.g4d0-footer-links a:hover { color: var(--g4d0-accent); }

.g4d0-footer-promo {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.2rem;
}

.g4d0-footer-promo button {
  flex: 1 1 calc(50% - 0.6rem);
  background: linear-gradient(135deg, var(--g4d0-primary), var(--g4d0-secondary));
  color: #fff;
  border: none;
  padding: 0.7rem;
  border-radius: 0.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
}

.g4d0-footer-copy { font-size: 1.05rem; color: var(--g4d0-text-muted); text-align: center; border-top: 0.1rem solid var(--g4d0-border); padding-top: 1rem; }

/* ---------- Mobile bottom navigation ---------- */
.g4d0-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 430px;
  margin: 0 auto;
  height: 6rem;
  background: linear-gradient(180deg, var(--g4d0-navy), var(--g4d0-bg));
  border-top: 0.2rem solid var(--g4d0-primary);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 -0.3rem 1rem rgba(0, 0, 0, 0.5);
}

.g4d0-bottom-nav-btn {
  flex: 1;
  min-width: 60px;
  min-height: 60px;
  background: transparent;
  border: none;
  color: var(--g4d0-text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  cursor: pointer;
  font-size: 1rem;
  transition: var(--g4d0-transition);
  position: relative;
}

.g4d0-bottom-nav-btn i, .g4d0-bottom-nav-btn span.mi, .g4d0-bottom-nav-btn ion-icon {
  font-size: 2.2rem;
  transition: var(--g4d0-transition);
}

.g4d0-bottom-nav-btn:hover, .g4d0-bottom-nav-btn.g4d0-nav-active {
  color: var(--g4d0-accent);
  transform: translateY(-0.15rem);
}

.g4d0-bottom-nav-btn:hover i, .g4d0-bottom-nav-btn.g4d0-nav-active i,
.g4d0-bottom-nav-btn:hover span.mi, .g4d0-bottom-nav-btn.g4d0-nav-active span.mi,
.g4d0-bottom-nav-btn:hover ion-icon, .g4d0-bottom-nav-btn.g4d0-nav-active ion-icon {
  color: var(--g4d0-primary);
}

.g4d0-bottom-nav-btn.g4d0-nav-active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2.4rem;
  height: 0.25rem;
  background: var(--g4d0-primary);
  border-radius: 0 0 0.3rem 0.3rem;
}

/* ---------- Desktop adjustments ---------- */
@media (min-width: 769px) {
  .g4d0-bottom-nav { display: none; }
  .g4d0-footer { padding-bottom: 2rem; }
  .g4d0-main { padding-bottom: 2rem; }
  body { max-width: 430px; }
}

/* ---------- Mobile bottom padding clearance ---------- */
@media (max-width: 768px) {
  .g4d0-main { padding-bottom: 8rem; }
}

/* ---------- Utility ---------- */
.g4d0-divider {
  height: 0.1rem;
  background: var(--g4d0-border);
  margin: 1.2rem 0;
}

.g4d0-badge {
  display: inline-block;
  background: var(--g4d0-primary);
  color: #fff;
  font-size: 0.95rem;
  padding: 0.1rem 0.5rem;
  border-radius: 0.3rem;
  font-weight: 700;
}
