/**
 * FBMPlay - Core Stylesheet
 * Mobile-first design for Philippine gaming market
 * All classes use ga4d- prefix for namespace isolation
 * Color palette: #0E1621, #E65100, #FFB74D, #36454F, #FFB347
 */

/* CSS Variables */
:root {
  --ga4d-primary: #E65100;
  --ga4d-primary-dark: #BF360C;
  --ga4d-primary-light: #FF8A50;
  --ga4d-bg: #0E1621;
  --ga4d-bg-secondary: #162032;
  --ga4d-bg-card: #1A2744;
  --ga4d-text: #FFB74D;
  --ga4d-text-light: #FFFFFF;
  --ga4d-text-muted: #8A9BB5;
  --ga4d-accent: #FFB347;
  --ga4d-accent-glow: rgba(255, 179, 71, 0.3);
  --ga4d-border: #2A3A55;
  --ga4d-success: #4CAF50;
  --ga4d-danger: #EF5350;
  --ga4d-shadow: rgba(0, 0, 0, 0.4);
  --ga4d-radius: 12px;
  --ga4d-radius-sm: 8px;
  --ga4d-header-height: 56px;
  --ga4d-bottom-nav-height: 60px;
  font-size: 62.5%;
}

/* Reset and Base */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--ga4d-bg);
  color: var(--ga4d-text-light);
  line-height: 1.5rem;
  font-size: 1.4rem;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--ga4d-accent);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--ga4d-primary-light);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Container */
.ga4d-container {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 12px;
  position: relative;
}

.ga4d-wrapper {
  width: 100%;
  overflow: hidden;
}

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

.ga4d-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
}

.ga4d-logo-area {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.ga4d-logo-area img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.ga4d-logo-text {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--ga4d-accent);
  letter-spacing: 0.5px;
}

.ga4d-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ga4d-btn-register {
  background: linear-gradient(135deg, var(--ga4d-primary), var(--ga4d-primary-light));
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ga4d-btn-register:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 12px rgba(230, 81, 0, 0.5);
}

.ga4d-btn-login {
  background: transparent;
  color: var(--ga4d-accent);
  font-size: 1.2rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--ga4d-accent);
  cursor: pointer;
  transition: all 0.3s ease;
}

.ga4d-btn-login:hover {
  background: rgba(255, 179, 71, 0.1);
}

.ga4d-menu-toggle {
  background: none;
  border: none;
  color: var(--ga4d-accent);
  font-size: 22px;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
}

/* Mobile Menu */
.ga4d-mobile-menu {
  position: fixed;
  top: 0;
  right: -280px;
  width: 280px;
  height: 100vh;
  background: var(--ga4d-bg-secondary);
  z-index: 9999;
  transition: right 0.3s ease;
  padding: 60px 20px 20px;
  overflow-y: auto;
}

.ga4d-mobile-menu.ga4d-menu-active {
  right: 0;
}

.ga4d-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.ga4d-menu-overlay.ga4d-overlay-active {
  opacity: 1;
  visibility: visible;
}

.ga4d-menu-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--ga4d-text-muted);
  font-size: 24px;
  cursor: pointer;
}

.ga4d-menu-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  color: var(--ga4d-text-light);
  font-size: 1.4rem;
  border-bottom: 1px solid var(--ga4d-border);
  transition: color 0.3s ease;
}

.ga4d-menu-link:hover {
  color: var(--ga4d-accent);
}

.ga4d-menu-link i, .ga4d-menu-link span.material-symbols-outlined {
  font-size: 20px;
  color: var(--ga4d-primary-light);
}

/* Main Content */
.ga4d-main {
  padding-top: calc(var(--ga4d-header-height) + 8px);
  min-height: 100vh;
}

@media (max-width: 768px) {
  .ga4d-main {
    padding-bottom: 80px;
  }
}

/* Carousel */
.ga4d-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--ga4d-radius);
  margin-bottom: 16px;
}

.ga4d-carousel-track {
  display: flex;
  transition: transform 0.5s ease;
}

.ga4d-carousel-slide {
  min-width: 100%;
  display: none;
  cursor: pointer;
}

.ga4d-carousel-slide.ga4d-slide-active {
  display: block;
}

.ga4d-carousel-slide img {
  width: 100%;
  aspect-ratio: 16/7;
  object-fit: cover;
  border-radius: var(--ga4d-radius);
}

.ga4d-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 8px 0;
}

.ga4d-carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ga4d-border);
  cursor: pointer;
  transition: all 0.3s ease;
}

.ga4d-carousel-dot.ga4d-dot-active {
  background: var(--ga4d-primary);
  width: 20px;
  border-radius: 4px;
}

/* Section Titles */
.ga4d-section-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--ga4d-accent);
  margin: 20px 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--ga4d-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.ga4d-section-title i {
  color: var(--ga4d-primary-light);
}

/* Game Grid */
.ga4d-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.ga4d-game-item {
  text-align: center;
  cursor: pointer;
  transition: transform 0.3s ease;
  border-radius: var(--ga4d-radius-sm);
  overflow: hidden;
}

.ga4d-game-item:hover {
  transform: scale(1.05);
}

.ga4d-game-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--ga4d-radius-sm);
  border: 1px solid var(--ga4d-border);
}

.ga4d-game-item span {
  display: block;
  font-size: 1.1rem;
  color: var(--ga4d-text-light);
  margin-top: 4px;
  line-height: 1.3rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Cards */
.ga4d-card {
  background: var(--ga4d-bg-card);
  border-radius: var(--ga4d-radius);
  padding: 16px;
  margin-bottom: 16px;
  border: 1px solid var(--ga4d-border);
}

.ga4d-card-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--ga4d-accent);
  margin-bottom: 10px;
}

.ga4d-card-text {
  font-size: 1.3rem;
  color: var(--ga4d-text-muted);
  line-height: 1.8rem;
}

/* Promo Buttons */
.ga4d-promo-btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--ga4d-primary), var(--ga4d-primary-light));
  color: #fff;
  font-size: 1.3rem;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 25px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.ga4d-promo-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(230, 81, 0, 0.4);
}

/* Promo text link */
.ga4d-promo-link {
  color: var(--ga4d-primary-light);
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.ga4d-promo-link:hover {
  color: var(--ga4d-accent);
}

/* Footer */
.ga4d-footer {
  background: var(--ga4d-bg-secondary);
  padding: 30px 12px 20px;
  margin-top: 30px;
  border-top: 1px solid var(--ga4d-border);
}

.ga4d-footer-brand {
  font-size: 1.3rem;
  color: var(--ga4d-text-muted);
  line-height: 1.8rem;
  margin-bottom: 16px;
}

.ga4d-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.ga4d-footer-links a {
  font-size: 1.2rem;
  color: var(--ga4d-text-light);
  padding: 4px 8px;
}

.ga4d-footer-copy {
  font-size: 1.1rem;
  color: var(--ga4d-text-muted);
  text-align: center;
  padding-top: 12px;
  border-top: 1px solid var(--ga4d-border);
}

/* Bottom Mobile Navigation */
.ga4d-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--ga4d-bottom-nav-height);
  background: linear-gradient(180deg, #162032 0%, #0E1621 100%);
  border-top: 1px solid var(--ga4d-border);
  z-index: 1000;
  justify-content: space-around;
  align-items: center;
  padding: 0 4px;
}

@media (max-width: 768px) {
  .ga4d-bottom-nav {
    display: flex;
  }
}

.ga4d-bottom-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  min-height: 54px;
  background: none;
  border: none;
  color: var(--ga4d-text-muted);
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 4px;
  border-radius: 8px;
  position: relative;
}

.ga4d-bottom-nav-btn:hover,
.ga4d-bottom-nav-btn.ga4d-nav-active {
  color: var(--ga4d-accent);
}

.ga4d-bottom-nav-btn.ga4d-nav-active::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  background: var(--ga4d-primary);
  border-radius: 0 0 3px 3px;
}

.ga4d-bottom-nav-btn i,
.ga4d-bottom-nav-btn span.material-symbols-outlined,
.ga4d-bottom-nav-btn ion-icon {
  font-size: 22px;
  margin-bottom: 2px;
}

.ga4d-bottom-nav-btn span.ga4d-nav-label {
  font-size: 1rem;
  font-weight: 500;
}

/* Utility */
.ga4d-text-center { text-align: center; }
.ga4d-mt-8 { margin-top: 8px; }
.ga4d-mt-16 { margin-top: 16px; }
.ga4d-mb-8 { margin-bottom: 8px; }
.ga4d-mb-16 { margin-bottom: 16px; }
.ga4d-flex-center { display: flex; justify-content: center; align-items: center; }
.ga4d-gap-8 { gap: 8px; }

/* Responsive grid for larger screens */
@media (min-width: 769px) {
  .ga4d-container {
    max-width: 430px;
  }
  .ga4d-game-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* Highlight badge for bottom nav */
.ga4d-nav-badge {
  position: absolute;
  top: 2px;
  right: 8px;
  min-width: 16px;
  height: 16px;
  background: var(--ga4d-danger);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* FAQ Accordion */
.ga4d-faq-item {
  background: var(--ga4d-bg-card);
  border-radius: var(--ga4d-radius-sm);
  margin-bottom: 8px;
  overflow: hidden;
  border: 1px solid var(--ga4d-border);
}

.ga4d-faq-q {
  padding: 12px 16px;
  font-weight: 600;
  color: var(--ga4d-text-light);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ga4d-faq-a {
  padding: 0 16px 12px;
  color: var(--ga4d-text-muted);
  font-size: 1.3rem;
  line-height: 1.7rem;
}

/* Testimonial card */
.ga4d-testimonial {
  background: var(--ga4d-bg-card);
  border-radius: var(--ga4d-radius);
  padding: 14px;
  margin-bottom: 10px;
  border-left: 3px solid var(--ga4d-primary);
}

.ga4d-testimonial-name {
  font-weight: 700;
  color: var(--ga4d-accent);
  font-size: 1.3rem;
}

.ga4d-testimonial-text {
  color: var(--ga4d-text-muted);
  font-size: 1.2rem;
  margin-top: 6px;
  line-height: 1.6rem;
}

/* Winner showcase */
.ga4d-winner-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--ga4d-bg-card);
  padding: 10px 12px;
  border-radius: var(--ga4d-radius-sm);
  margin-bottom: 8px;
}

.ga4d-winner-item img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--ga4d-primary);
}

.ga4d-winner-info {
  flex: 1;
}

.ga4d-winner-name {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ga4d-text-light);
}

.ga4d-winner-amount {
  font-size: 1.1rem;
  color: var(--ga4d-success);
  font-weight: 700;
}

/* Payment icons row */
.ga4d-payment-row {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.ga4d-payment-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.ga4d-payment-item i {
  font-size: 28px;
  color: var(--ga4d-accent);
}

.ga4d-payment-item span {
  font-size: 1rem;
  color: var(--ga4d-text-muted);
}

/* App download CTA */
.ga4d-download-cta {
  background: linear-gradient(135deg, var(--ga4d-bg-card), var(--ga4d-primary-dark));
  border-radius: var(--ga4d-radius);
  padding: 20px;
  text-align: center;
  border: 1px solid var(--ga4d-primary);
  margin-bottom: 16px;
}

.ga4d-download-cta h3 {
  color: var(--ga4d-accent);
  font-size: 1.6rem;
  margin-bottom: 8px;
}

.ga4d-download-cta p {
  color: var(--ga4d-text-muted);
  font-size: 1.2rem;
  margin-bottom: 14px;
}

/* Content article */
.ga4d-article {
  font-size: 1.3rem;
  line-height: 1.8rem;
  color: var(--ga4d-text-muted);
  margin-bottom: 12px;
}

.ga4d-article strong {
  color: var(--ga4d-text-light);
}

.ga4d-article h2 {
  font-size: 1.7rem;
  color: var(--ga4d-accent);
  margin: 18px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--ga4d-border);
}

.ga4d-article h3 {
  font-size: 1.5rem;
  color: var(--ga4d-text);
  margin: 14px 0 8px;
}

.ga4d-article ul {
  padding-left: 20px;
  margin: 8px 0;
}

.ga4d-article li {
  margin-bottom: 6px;
}
