/* ============================================================
 * bue.css - Stylesheet for bue.homes
 * All custom classes use the v38d- prefix.
 * Palette: #E8F5E8 | #0F0F23 | #008B8B | #D3D3D3 | #B0E0E6 | #0000FF
 * Mobile-first, max-width 430px viewport baseline.
 * ============================================================ */

:root {
  --v38d-bg: #0F0F23;
  --v38d-bg-soft: #161638;
  --v38d-bg-card: #1d1d44;
  --v38d-text: #E8F5E8;
  --v38d-text-muted: #D3D3D3;
  --v38d-accent: #008B8B;
  --v38d-accent-soft: #B0E0E6;
  --v38d-link: #0000FF;
  --v38d-link-bright: #4d6bff;
  --v38d-border: rgba(176, 224, 230, 0.18);
  --v38d-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  --v38d-radius: 14px;
  --v38d-radius-lg: 22px;
}

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

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

body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at 20% 0%, #1a1a40 0%, var(--v38d-bg) 55%);
  color: var(--v38d-text);
  font-family: "Segoe UI", "Helvetica Neue", Roboto, Arial, sans-serif;
  font-size: 1.5rem;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: var(--v38d-link-bright);
  text-decoration: none;
  transition: color 0.18s ease;
}
a:hover { color: var(--v38d-accent-soft); }

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

h1, h2, h3, h4 {
  margin: 0 0 0.6em;
  font-weight: 700;
  line-height: 1.25;
}

p { margin: 0 0 1em; }

/* ============================================================
 * Header
 * ============================================================ */
.v38d-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(15, 15, 35, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--v38d-border);
}
.v38d-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.v38d-logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 2rem;
  font-weight: 800;
  color: var(--v38d-text);
  letter-spacing: 0.5px;
}
.v38d-logo img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--v38d-accent);
}
.v38d-logo span {
  background: linear-gradient(90deg, var(--v38d-accent-soft), var(--v38d-link-bright));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.v38d-header-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.v38d-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  border-radius: 999px;
  padding: 1rem 1.8rem;
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  min-height: 44px;
  text-decoration: none;
}
.v38d-btn:active { transform: scale(0.96); }
.v38d-btn-login {
  background: transparent;
  color: var(--v38d-text);
  border: 1px solid var(--v38d-accent);
}
.v38d-btn-register {
  background: linear-gradient(135deg, var(--v38d-accent), var(--v38d-link));
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 139, 139, 0.4);
}
.v38d-btn-register:hover {
  color: #fff;
  box-shadow: 0 6px 20px rgba(77, 107, 255, 0.55);
}

/* Desktop nav */
.v38d-desktop-nav {
  display: none;
}
.v38d-desktop-nav a {
  color: var(--v38d-text-muted);
  font-size: 1.35rem;
  font-weight: 600;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
}
.v38d-desktop-nav a:hover {
  color: var(--v38d-accent-soft);
  background: rgba(176, 224, 230, 0.08);
}

/* Hamburger (mobile) */
.v38d-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--v38d-border);
  border-radius: 10px;
  color: var(--v38d-text);
  font-size: 1.8rem;
  cursor: pointer;
}

/* ============================================================
 * Mobile slide-in menu
 * ============================================================ */
.v38d-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
  z-index: 9998;
}
.v38d-menu-overlay.v38d-visible {
  opacity: 1;
  visibility: visible;
}
.v38d-mobile-menu {
  position: fixed;
  top: 0;
  right: -85%;
  width: 78%;
  max-width: 320px;
  height: 100vh;
  background: var(--v38d-bg-soft);
  border-left: 1px solid var(--v38d-border);
  padding: 2rem 1.5rem;
  z-index: 9999;
  transition: right 0.3s ease;
  overflow-y: auto;
}
.v38d-mobile-menu.v38d-open { right: 0; }
.v38d-mobile-menu h3 {
  color: var(--v38d-accent-soft);
  font-size: 1.4rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 1.5rem;
}
.v38d-mobile-menu a {
  display: block;
  padding: 1rem 0.6rem;
  color: var(--v38d-text);
  border-bottom: 1px solid var(--v38d-border);
  font-size: 1.45rem;
}
.v38d-mobile-menu a:hover { color: var(--v38d-accent-soft); }
.v38d-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  color: var(--v38d-text);
  font-size: 2rem;
  cursor: pointer;
}

/* ============================================================
 * Layout containers
 * ============================================================ */
main { padding-bottom: 90px; }
.v38d-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.2rem;
}
.v38d-section {
  padding: 3rem 0;
}
.v38d-section-title {
  font-size: 2.2rem;
  color: var(--v38d-text);
  margin-bottom: 0.4rem;
}
.v38d-section-sub {
  color: var(--v38d-text-muted);
  font-size: 1.35rem;
  margin-bottom: 1.8rem;
}

/* ============================================================
 * Hero / Carousel
 * ============================================================ */
.v38d-hero {
  position: relative;
  border-radius: var(--v38d-radius-lg);
  overflow: hidden;
  margin: 1.5rem 0;
  box-shadow: var(--v38d-shadow);
}
.v38d-hero-track { position: relative; min-height: 220px; }
.v38d-hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem 1.5rem;
  background-size: cover;
  background-position: center;
}
.v38d-hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15,15,35,0.92) 10%, rgba(15,15,35,0.25) 70%);
}
.v38d-hero-slide.v38d-active { opacity: 1; }
.v38d-hero-content {
  position: relative;
  z-index: 2;
}
.v38d-hero-tag {
  display: inline-block;
  background: var(--v38d-accent);
  color: #fff;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.7rem;
}
.v38d-hero-title {
  font-size: 2.4rem;
  margin-bottom: 0.4rem;
  color: #fff;
}
.v38d-hero-text {
  color: var(--v38d-accent-soft);
  font-size: 1.35rem;
  margin-bottom: 1.2rem;
}
.v38d-hero-dots {
  position: relative;
  z-index: 3;
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  padding: 0.6rem 0 1rem;
}
.v38d-hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(176, 224, 230, 0.35);
  cursor: pointer;
}
.v38d-hero-dot.v38d-active {
  background: var(--v38d-link-bright);
  width: 22px;
  border-radius: 4px;
}

/* ============================================================
 * Filter tabs
 * ============================================================ */
.v38d-filter-bar {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding: 0.5rem 0 1.2rem;
  -webkit-overflow-scrolling: touch;
}
.v38d-filter-bar::-webkit-scrollbar { display: none; }
.v38d-filter-tab {
  flex: 0 0 auto;
  padding: 0.8rem 1.4rem;
  background: var(--v38d-bg-card);
  border: 1px solid var(--v38d-border);
  border-radius: 999px;
  color: var(--v38d-text-muted);
  font-size: 1.3rem;
  font-weight: 600;
  cursor: pointer;
}
.v38d-filter-tab.v38d-active,
.v38d-filter-tab:hover {
  background: linear-gradient(135deg, var(--v38d-accent), var(--v38d-link));
  color: #fff;
}

/* ============================================================
 * Game grid & cards
 * ============================================================ */
.v38d-game-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.v38d-game-card {
  background: var(--v38d-bg-card);
  border: 1px solid var(--v38d-border);
  border-radius: var(--v38d-radius);
  overflow: hidden;
  position: relative;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.v38d-game-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--v38d-shadow);
}
.v38d-game-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #0a0a1f;
  overflow: hidden;
}
.v38d-game-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.v38d-game-card .v38d-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 15, 35, 0.55);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.v38d-game-card:hover .v38d-play { opacity: 1; }
.v38d-play span {
  background: linear-gradient(135deg, var(--v38d-accent), var(--v38d-link));
  color: #fff;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  font-size: 1.25rem;
  font-weight: 700;
}
.v38d-game-info {
  padding: 0.8rem 0.9rem 1rem;
}
.v38d-game-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--v38d-text);
  margin: 0 0 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.v38d-game-type {
  font-size: 1.1rem;
  color: var(--v38d-accent-soft);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

/* Feature blocks */
.v38d-feature-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.v38d-feature {
  background: var(--v38d-bg-card);
  border: 1px solid var(--v38d-border);
  border-left: 4px solid var(--v38d-accent);
  border-radius: var(--v38d-radius);
  padding: 1.5rem;
}
.v38d-feature h3 {
  font-size: 1.6rem;
  color: var(--v38d-accent-soft);
}
.v38d-feature p {
  color: var(--v38d-text-muted);
  margin: 0;
  font-size: 1.35rem;
}

/* SEO long text */
.v38d-seo-block {
  background: var(--v38d-bg-soft);
  border: 1px solid var(--v38d-border);
  border-radius: var(--v38d-radius-lg);
  padding: 2rem 1.5rem;
  color: var(--v38d-text-muted);
  line-height: 1.7;
}
.v38d-seo-block h2 {
  color: var(--v38d-text);
  font-size: 2rem;
}
.v38d-seo-block h3 {
  color: var(--v38d-accent-soft);
  font-size: 1.7rem;
  margin-top: 1.4rem;
}
.v38d-seo-block a { color: var(--v38d-link-bright); }

/* FAQ */
.v38d-faq-item {
  background: var(--v38d-bg-card);
  border: 1px solid var(--v38d-border);
  border-radius: var(--v38d-radius);
  margin-bottom: 0.8rem;
  overflow: hidden;
}
.v38d-faq-q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 1.4rem;
  cursor: pointer;
  font-weight: 700;
  color: var(--v38d-text);
  font-size: 1.45rem;
}
.v38d-faq-q .v38d-icon {
  transition: transform 0.25s ease;
  color: var(--v38d-accent-soft);
}
.v38d-faq-item.v38d-open .v38d-icon { transform: rotate(45deg); }
.v38d-faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  color: var(--v38d-text-muted);
  padding: 0 1.4rem;
}
.v38d-faq-item.v38d-open .v38d-faq-a {
  max-height: 500px;
  padding-bottom: 1.3rem;
}

/* CTA banner */
.v38d-cta {
  background: linear-gradient(135deg, var(--v38d-accent) 0%, var(--v38d-link) 100%);
  border-radius: var(--v38d-radius-lg);
  padding: 2.5rem 1.6rem;
  text-align: center;
  margin: 2rem 0;
  box-shadow: var(--v38d-shadow);
}
.v38d-cta h2 {
  color: #fff;
  font-size: 2.3rem;
  margin-bottom: 0.4rem;
}
.v38d-cta p {
  color: var(--v38d-accent-soft);
  margin-bottom: 1.4rem;
}
.v38d-cta .v38d-btn {
  background: #fff;
  color: var(--v38d-link);
  font-size: 1.5rem;
  padding: 1.2rem 2.4rem;
}

/* Footer */
.v38d-footer {
  background: var(--v38d-bg-soft);
  border-top: 1px solid var(--v38d-border);
  padding: 3rem 0 1.5rem;
  color: var(--v38d-text-muted);
}
.v38d-footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.8rem;
  margin-bottom: 2rem;
}
.v38d-footer-col h4 {
  color: var(--v38d-accent-soft);
  font-size: 1.5rem;
  margin-bottom: 0.8rem;
}
.v38d-footer-col a {
  display: block;
  color: var(--v38d-text-muted);
  padding: 0.35rem 0;
  font-size: 1.3rem;
}
.v38d-footer-col a:hover { color: var(--v38d-accent-soft); }
.v38d-footer-bottom {
  border-top: 1px solid var(--v38d-border);
  padding-top: 1.2rem;
  font-size: 1.2rem;
  text-align: center;
}

/* Bottom nav */
.v38d-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(15, 15, 35, 0.97);
  border-top: 1px solid var(--v38d-border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  padding-bottom: env(safe-area-inset-bottom);
}
.v38d-bottom-nav a,
.v38d-bottom-nav button {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 60px;
  min-height: 60px;
  background: transparent;
  border: none;
  color: var(--v38d-text-muted);
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
}
.v38d-bottom-nav .material-icons,
.v38d-bottom-nav .fas,
.v38d-bottom-nav .bi {
  font-size: 22px;
}
.v38d-bottom-nav a:hover,
.v38d-bottom-nav button:hover,
.v38d-bottom-nav .v38d-nav-active {
  color: var(--v38d-accent-soft);
  transform: translateY(-2px);
}
.v38d-bottom-nav .v38d-nav-active {
  color: var(--v38d-link-bright);
}

/* Promo inline text link */
.v38d-promo-link {
  color: var(--v38d-link-bright);
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
}
.v38d-promo-link:hover { color: var(--v38d-accent-soft); }

/* Utility */
.v38d-text-center { text-align: center; }
.v38d-mt { margin-top: 2rem; }

/* ============================================================
 * Tablet & desktop responsive
 * ============================================================ */
@media (min-width: 600px) {
  .v38d-game-grid { grid-template-columns: repeat(3, 1fr); }
  .v38d-feature-row { grid-template-columns: repeat(2, 1fr); }
  .v38d-footer-grid { grid-template-columns: repeat(2, 1fr); }
  .v38d-hero-title { font-size: 3rem; }
}

@media (min-width: 769px) {
  main { padding-bottom: 0; }
  .v38d-bottom-nav { display: none; }
  .v38d-menu-btn { display: none; }
  .v38d-desktop-nav { display: flex; gap: 0.6rem; }
  .v38d-game-grid { grid-template-columns: repeat(4, 1fr); }
  .v38d-feature-row { grid-template-columns: repeat(4, 1fr); }
  .v38d-footer-grid { grid-template-columns: repeat(4, 1fr); }
  .v38d-section-title { font-size: 2.8rem; }
}

@media (min-width: 1024px) {
  .v38d-game-grid { grid-template-columns: repeat(6, 1fr); }
  .v38d-hero-title { font-size: 3.4rem; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
