/* ========================================================
   LudoKhelo Modern Overrides & Canvas Fallbacks
   ======================================================== */

.brand-logo {
  height: 2.6rem;
  width: 2.6rem;
  object-fit: contain;
}

.play-now {
  box-shadow: 0 0.8rem 2.2rem rgba(251, 191, 36, 0.4);
  font-size: 1.05rem;
  min-width: 12rem;
  animation: play-now-glow 2.5s ease-in-out infinite;
}

.board-canvas-wrap {
  inset: 0;
  position: absolute;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.board-canvas-wrap canvas {
  height: 100% !important;
  position: relative;
  width: 100% !important;
  z-index: 2;
}

/* Fallback for non-WebGL devices */
.board-fallback {
  align-items: center;
  background: conic-gradient(#f59e0b 0 25%, #3b82f6 0 50%, #ef4444 0 75%, #10b981 0);
  border: 10px solid #ffffff;
  border-radius: 1.5rem;
  display: grid;
  gap: 0.6rem;
  grid-template-columns: 1fr 1fr;
  inset: 2.5rem 2rem;
  justify-items: center;
  padding: 1.25rem;
  position: absolute;
  transform: rotate(3deg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  z-index: 1;
}

.board-fallback i {
  background: #ffffff;
  border: 2px solid rgba(0, 0, 0, 0.15);
  border-radius: 50%;
  box-shadow: 0 0.35rem 0.5rem rgba(0, 0, 0, 0.3);
  height: 1.6rem;
  width: 1.6rem;
}

.board-fallback b {
  align-items: center;
  background: #ffffff;
  border-radius: 50%;
  color: #071427;
  display: flex;
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 900;
  grid-column: 1 / 3;
  height: 4.2rem;
  justify-content: center;
  margin-top: -5.2rem;
  width: 4.2rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.3);
}

.board-canvas-wrap.is-ready .board-fallback {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

/* Shimmer & Glow Effects */
@keyframes play-now-glow {
  0%, 100% {
    box-shadow: 0 0.8rem 2.2rem rgba(251, 191, 36, 0.4);
  }
  50% {
    box-shadow: 0 1.2rem 3rem rgba(251, 191, 36, 0.65), 0 0 20px rgba(84, 243, 188, 0.4);
    transform: translateY(-2px);
  }
}

/* ========================================================
   MOBILE-FIRST ENHANCEMENTS & SUBPAGE LAYOUTS
   ======================================================== */
.subnav-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.65rem 1.25rem;
  background: rgba(10, 21, 38, 0.75);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  scrollbar-width: none;
}

.subnav-bar::-webkit-scrollbar {
  display: none;
}

.subnav-chip {
  white-space: nowrap;
  padding: 0.4rem 0.95rem;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-decoration: none;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.subnav-chip.active,
.subnav-chip:hover {
  color: #0f172a;
  background: linear-gradient(135deg, #ffd700 0%, #f59e0b 100%);
  border-color: #ffd700;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* SEO Subpage Framework */
.seo-page {
  max-width: 840px;
  margin: 1.5rem auto 4rem;
  padding: 0 1.25rem;
}

.seo-page .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: 9999px;
  color: #ffd700;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.seo-page h1 {
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: clamp(1.85rem, 6vw, 3rem);
  line-height: 1.2;
  font-weight: 800;
  color: #ffffff;
  margin: 0.5rem 0 1rem;
  letter-spacing: -0.02em;
}

.seo-page p,
.seo-page li {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #94a3b8;
}

.seo-card {
  background: rgba(14, 28, 48, 0.7);
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: 20px;
  padding: 1.75rem;
  margin: 2rem 0;
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.45);
}

.seo-card h2 {
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: clamp(1.3rem, 4.5vw, 1.75rem);
  line-height: 1.3;
  color: #ffffff;
  margin: 0 0 0.75rem;
}

.seo-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.seo-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: 12px;
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: 0.95rem;
  font-weight: 800;
  text-decoration: none;
  transition: all 0.25s ease;
  min-height: 48px;
}

.seo-button.primary {
  background: linear-gradient(135deg, #ffd700 0%, #f59e0b 100%);
  color: #0f172a !important;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.35);
}

.seo-button.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(245, 158, 11, 0.5);
}

.seo-button.secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff !important;
}

.seo-button.secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.seo-footer {
  max-width: 840px;
  margin: 3rem auto 2rem;
  padding: 1.5rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #64748b;
  text-align: center;
  font-size: 0.88rem;
}

.seo-footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.seo-footer-links a {
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.2s;
}

.seo-footer-links a:hover {
  color: #ffd700;
}

.seo-footer-dot {
  color: #475569;
}

/* Mobile Viewport Tweaks */
@media (max-width: 640px) {
  .nav {
    padding: 0.75rem 1rem !important;
  }
  
  .brand-logo {
    height: 2.25rem !important;
    width: 2.25rem !important;
  }

  .brand span {
    font-size: 1.2rem !important;
  }

  .nav-cta {
    padding: 0.5rem 0.9rem !important;
    font-size: 0.8rem !important;
  }

  .board-stage {
    height: auto !important;
    min-height: 0 !important;
    padding: 1.25rem 0 !important;
  }

  .ludo-svg-container {
    max-width: 21rem !important;
    margin: 0 auto !important;
  }

  .hero-proof {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0.5rem !important;
    text-align: center !important;
  }

  .hero-proof-item {
    padding: 0.5rem 0.25rem !important;
  }

  .hero-proof-item b {
    font-size: 1.15rem !important;
  }

  .hero-proof-item span {
    font-size: 0.72rem !important;
  }

  .seo-actions {
    flex-direction: column !important;
    width: 100% !important;
  }

  .seo-button {
    width: 100% !important;
  }

  .seo-page {
    padding: 0 1rem !important;
    margin: 1rem auto 3rem !important;
  }

  .seo-card {
    padding: 1.25rem !important;
    border-radius: 16px !important;
    margin: 1.5rem 0 !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .play-now {
    animation: none;
  }
  .ticker-track {
    animation: none;
  }
}

