* {
  box-sizing: inherit;
  margin: 0;
  padding: 0;
}

:root {
  --site-bg: #fffcf0;
  --site-primary: #d97706;
  --site-secondary: #dc2626;
  --site-accent: #1d4ed8;
  --site-text: #1c1407;
  /* Layered surfaces (use these for depth — NEVER stack text directly on --site-bg) */
  --surface-1: #f7f4e9;   /* alternating section band */
  --surface-2: #ffffff;   /* cards & panels */
  --surface-3: #f2efe4;   /* raised / hover elements */
  --border-soft: #e0ded3; /* 1px hairline borders & dividers */
  --hero-glow: #eec087;   /* hero gradient companion to --site-primary */
  --accent-soft: #d6ddec; /* faint accent wash for tinted blocks */
  --text-muted: #565b68; /* secondary / supporting text */
}

/* ===== CONTRAST SAFETY NET (MANDATORY — copy verbatim, never remove) ===== */
/* Guarantees readable text on every surface. Computed from theme luminance. */
/* Each rule uses !important so it survives inline styles and model overrides. */
/* Body background is FORCED here so EVERY page (incl. legal/cookie pages) gets the dark
   base — the model sometimes forgets to set it on inner pages, leaving white/transparent
   pages with washed-out text. This guarantees the page background is always correct. */
html { background: #fffcf0 !important; }
body { color: #15171f !important; background: #fffcf0 !important; }
/* Global minimum font size — nothing on the site may render below 14px */
small, .small, figcaption, sub, sup, .legal, .disclaimer-text, .cd5vxt-disclosure-bar, .cd5vxt-footer small { font-size: max(14px, 0.85rem) !important; }
/* SKELETON LAYOUT SAFETY - Protects all text from touching edges */
main > *:not([class*="-hero"]):not([class*="-full-width"]) {
  max-width: 1200px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 24px !important;
  padding-right: 24px !important;
  box-sizing: border-box !important;
}

/* Body copy floor — long-form paragraphs, lists & content text never wash out */
main p, main li, main td, .cd5vxt-content-section, .cd5vxt-content-section p, .cd5vxt-content-section li, .cd5vxt-content-section span, .cd5vxt-content-section div:not([class]) { color: #15171f !important; }
/* Header / navigation — text must contrast the header (primary) background */
.cd5vxt-header .cd5vxt-logo span, .cd5vxt-header nav a, .cd5vxt-header nav a:link, .cd5vxt-header nav a:visited, .cd5vxt-desktop-nav a, .cd5vxt-header .cd5vxt-hamburger { color: #f6f8fc !important; opacity: 1 !important; }
.cd5vxt-header nav a:hover, .cd5vxt-desktop-nav a:hover { color: #1d4ed8 !important; }
/* Hero — readable over images, gradients or solid colour */
.cd5vxt-hero h1, .cd5vxt-hero h2, .cd5vxt-hero-text h1, .cd5vxt-hero-text h2 { color: #ffffff !important; text-shadow: 0 2px 10px rgba(0,0,0,0.85), 0 0 2px rgba(0,0,0,0.7); }
.cd5vxt-hero p, .cd5vxt-hero-text p, .cd5vxt-hero li, .cd5vxt-hero-subtitle { color: #ffffff !important; text-shadow: 0 2px 10px rgba(0,0,0,0.85), 0 0 2px rgba(0,0,0,0.7); }
.cd5vxt-game-card { background: #ffffff !important; }
.cd5vxt-game-card h1, .cd5vxt-game-card h2, .cd5vxt-game-card h3, .cd5vxt-game-card h4, .cd5vxt-game-card p, .cd5vxt-game-card span:not([class]) { color: #829df7 !important; }
.cd5vxt-game-card small, .cd5vxt-game-card .muted { color: #565b68 !important; }
/* Footer — force a dark surface (inline bg would otherwise win) so light text reads */
.cd5vxt-footer { background: #161a26 !important; }
.cd5vxt-footer, .cd5vxt-footer p, .cd5vxt-footer li, .cd5vxt-footer span, .cd5vxt-footer div, .cd5vxt-footer h1, .cd5vxt-footer h2, .cd5vxt-footer h3 { color: #e7ecf5 !important; text-shadow: none !important; }
.cd5vxt-footer a { color: #1d4ed8 !important; opacity: 1 !important; }
/* Accessibility: honour reduced-motion preference (WCAG 2.3.3) — disables the decorative animations */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
/* Overflow guard (deterministic) — prevents the "second scrollbar" / horizontal spill no
   matter what the model styles. Any element wider than the viewport is clamped. */
html, body { 
  overflow-x: hidden !important; 
  width: auto !important; 
  max-width: 100% !important; 
  margin: 0 !important; 
  padding: 0 !important; 
}
body { position: relative; }
img, canvas, iframe, video, svg, table, pre { max-width: 100% !important; height: auto; }
.cd5vxt-hero, .cd5vxt-game-grid, .cd5vxt-content-section, main, header, footer, section { max-width: 100% !important; box-sizing: border-box !important; }

/* Global Styles */
html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 17px;
  line-height: 1.75;
  color: var(--site-text);
  background: var(--site-bg);
}

main {
  flex: 1 0 auto;
  width: 100%;
  box-sizing: border-box;
  animation: fadeInUp 0.65s ease-out both;
}

img, canvas, iframe, video, svg {
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  box-sizing: border-box;
}

.cd5vxt-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, .cd5vxt-logo {
  font-family: system-ui, 'Segoe UI', -apple-system, 'Helvetica Neue', Arial, sans-serif;
  color: var(--site-text); /* Default for general sections */
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  font-weight: 700;
  line-height: 1.2;
}

h3 {
  font-size: clamp(1.2rem, 2vw, 1.8rem);
  font-weight: 700;
}

h4 {
  font-size: 1.1rem;
  font-weight: 600;
}

p {
  line-height: 1.7;
}

.cd5vxt-eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--site-accent);
  font-weight: 600;
  margin-bottom: 8px;
  display: block;
}

/* Header */
.cd5vxt-header {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(var(--site-primary), 0.85); /* Glass effect */
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.cd5vxt-logo span {
  font-size: 1.1rem;
  font-weight: 800;
  color: #f6f8fc;
  white-space: nowrap;
}

.cd5vxt-desktop-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 28px;
  align-items: center;
}

.cd5vxt-desktop-nav a {
  color: #f6f8fc;
  text-decoration: none;
  font-weight: 600;
  padding: 6px 4px;
  opacity: 0.9;
  transition: opacity 0.2s;
  position: relative;
}

.cd5vxt-desktop-nav a::after {
  content: '';
  display: block;
  height: 2px;
  background: var(--site-accent);
  transform: scaleX(0);
  transition: transform 0.25s ease;
  transform-origin: left;
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
}

.cd5vxt-desktop-nav a:hover::after,
.cd5vxt-desktop-nav a.active::after {
  transform: scaleX(1);
}

.cd5vxt-desktop-nav a:hover {
  opacity: 1;
  color: var(--site-accent);
}

.cd5vxt-hamburger {
  display: none !important; /* Hidden by default on desktop */
}

.cd5vxt-mobile-menu {
  display: none; /* Controlled by JS */
  background: rgba(0,0,0,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.cd5vxt-mobile-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.cd5vxt-mobile-menu a {
  color: #fff;
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 600;
  transition: color 0.2s;
}

.cd5vxt-mobile-menu a:hover {
  color: var(--site-accent);
}

/* Buttons */
.cd5vxt-btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: 1rem;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  text-decoration: none;
  color: #ffffff; /* White text for contrast on accent background */
  background: linear-gradient(45deg, var(--site-accent) 0%, color-mix(in srgb, var(--site-accent) 80%, var(--site-primary)) 100%);
  box-shadow: 0 0 8px rgba(255,255,255,0.2);
  animation: btnGlow 2.5s ease-in-out infinite;
}

.cd5vxt-btn:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 8px 20px rgba(var(--site-accent), 0.4), 0 0 25px rgba(255,255,255,0.6);
}

/* Keyframe Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInHero {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes cardEnter {
  from { opacity: 0; transform: scale(0.95) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes btnGlow {
  0%, 100% { box-shadow: 0 0 8px rgba(255,255,255,0.2); }
  50% { box-shadow: 0 0 22px rgba(255,255,255,0.5); }
}

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

/* Hero Section */
.cd5vxt-hero {
  position: relative;
  min-height: 85vh;
  padding: 160px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
  background: linear-gradient(135deg, var(--site-bg) 0%, color-mix(in srgb, var(--site-primary) 55%, var(--site-bg)) 100%);
  overflow: hidden;
}

.cd5vxt-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 75% 30%, color-mix(in srgb, var(--site-accent) 35%, transparent) 0%, transparent 55%);
  z-index: 1;
}

.cd5vxt-hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
  color: #fff;
}

.cd5vxt-hero h1 {
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.85), 0 0 2px rgba(0,0,0,0.7);
  animation: slideInHero 0.7s 0.1s ease-out both;
}

.cd5vxt-hero p {
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.85), 0 0 2px rgba(0,0,0,0.7);
  margin-top: 20px;
  margin-bottom: 40px;
  animation: slideInHero 0.7s 0.25s ease-out both;
}

.cd5vxt-hero .cd5vxt-btn {
  animation-delay: 0.4s;
}

.cd5vxt-trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.cd5vxt-badge {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 0.85rem;
  color: #fff;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.3s ease, transform 0.2s ease;
  position: relative;
  overflow: hidden;
}

.cd5vxt-badge:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.3);
}

.cd5vxt-badge::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.7s ease;
}

.cd5vxt-badge:hover::before {
  left: 100%;
}

/* Section Styling (Modular Color Islands) */
section {
  padding: 80px 20px;
  margin: 32px auto;
  border-radius: 28px;
  max-width: 1200px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
  position: relative;
  overflow: hidden;
}

section:nth-of-type(odd) {
  background: var(--surface-1);
}

section:nth-of-type(even) {
  background: var(--surface-2);
}

section.cd5vxt-accent-island {
  background: linear-gradient(180deg, var(--surface-1), var(--accent-soft));
  border: 1px solid var(--border-soft);
}

section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 5%;
  width: 90%;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border-soft), transparent);
  opacity: 0.6;
}

/* Game Grid */
.cd5vxt-game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  grid-auto-rows: 350px;
  gap: 30px;
  margin: 60px auto;
  max-width: 1400px;
  padding: 0 20px;
}

@media (min-width: 768px) {
  .cd5vxt-game-card:first-child {
    grid-column: span 2;
    grid-row: span 2;
  }
}

.cd5vxt-game-card {
  background: var(--surface-2);
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  animation: cardEnter 0.5s ease-out both;
}

.cd5vxt-game-card:nth-child(1) { animation-delay: 0.05s; }
.cd5vxt-game-card:nth-child(2) { animation-delay: 0.15s; }
.cd5vxt-game-card:nth-child(3) { animation-delay: 0.25s; }
.cd5vxt-game-card:nth-child(4) { animation-delay: 0.35s; }
.cd5vxt-game-card:nth-child(5) { animation-delay: 0.4s; }
.cd5vxt-game-card:nth-child(6) { animation-delay: 0.45s; }
.cd5vxt-game-card:nth-child(7) { animation-delay: 0.5s; }
.cd5vxt-game-card:nth-child(8) { animation-delay: 0.55s; }

.cd5vxt-game-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 30px color-mix(in srgb, var(--site-accent) 40%, transparent);
}

.cd5vxt-game-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  transition: transform 0.3s ease;
}

.cd5vxt-game-card:hover img {
  transform: scale(1.05);
}

.cd5vxt-game-card-info {
  position: relative;
  z-index: 2;
  padding: 20px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  color: #fff;
  width: 100%;
  box-sizing: border-box;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.cd5vxt-game-card-info h3 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

.cd5vxt-game-card-info p {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0;
  line-height: 1.4;
}

.cd5vxt-game-card .cd5vxt-btn {
  margin-top: 15px;
  padding: 8px 18px;
  font-size: 0.85rem;
  border-radius: 30px;
  background: var(--site-accent);
  color: #fff;
  box-shadow: none;
  animation: none;
}

.cd5vxt-game-card .cd5vxt-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(var(--site-accent), 0.4);
}

/* Content Sections */
.cd5vxt-content-section {
  padding: 80px 20px;
  line-height: 1.8;
  font-size: 1.05rem;
}

.cd5vxt-content-section h2 {
  color: var(--site-text);
  margin-bottom: 25px;
  text-align: left;
}

.cd5vxt-content-section p {
  margin-bottom: 1.2em;
  text-align: left;
}

.cd5vxt-content-section ul {
  list-style: disc;
  margin-left: 20px;
  margin-bottom: 1.5em;
  text-align: left;
}

.cd5vxt-content-section li {
  margin-bottom: 0.5em;
}

/* Footer */
.cd5vxt-footer {
  background: #161a26; /* Dark background for footer */
  color: #e7ecf5;
  padding: 60px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.95rem;
}

.cd5vxt-footer h4 {
  color: var(--site-accent);
  text-transform: uppercase;
  margin-bottom: 15px;
}

.cd5vxt-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cd5vxt-footer a {
  color: #1d4ed8;
  text-decoration: none;
  transition: color 0.2s;
}

.cd5vxt-footer a:hover {
  color: #fff;
  text-decoration: underline;
}

.cd5vxt-footer p {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.cd5vxt-footer .cd5vxt-copyright {
  margin-top: 15px;
  font-size: 0.85em;
  opacity: 0.8;
}

/* Responsive & Mobile Fixes */
/* === TABLET (≤1024px) === */
@media (max-width: 1024px) {
  .cd5vxt-hero { grid-template-columns: 1fr !important; flex-direction: column !important; padding: 80px 5% 60px !important; gap: 40px !important; }
  .cd5vxt-hero h1 { font-size: clamp(1.8rem, 5vw, 3rem) !important; }
  .cd5vxt-hero-image { display: none !important; }
  .cd5vxt-game-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important; }
}
/* === MOBILE (≤768px) === */
@media (max-width: 768px) {
  html, body { font-size: 17px; overflow-x: hidden; }
  small, .small, figcaption, sub, sup, .legal, .disclaimer-text { font-size: max(14px, 0.85rem) !important; }
  .cd5vxt-header { padding: 12px 16px !important; position: sticky; top: 0; z-index: 100; }
  .cd5vxt-desktop-nav { display: none !important; }
  .cd5vxt-hamburger { display: flex !important; align-items: center; justify-content: center; background: transparent; border: 2px solid currentColor; border-radius: 8px; padding: 6px 10px; font-size: 1.4rem; cursor: pointer; }
  .cd5vxt-hero { grid-template-columns: 1fr !important; flex-direction: column !important; padding: 60px 16px 40px !important; text-align: center !important; gap: 24px !important; min-height: unset !important; background-attachment: scroll !important; }
  .cd5vxt-hero h1, .cd5vxt-hero-text h1 { font-size: clamp(1.6rem, 7vw, 2.4rem) !important; line-height: 1.2 !important; margin-bottom: 16px !important; }
  .cd5vxt-hero p, .cd5vxt-hero-text p { font-size: max(15px, 1rem) !important; }
  .cd5vxt-hero-image { display: none !important; }
  .cd5vxt-hero img { display: none !important; }
  .cd5vxt-game-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; padding: 0 12px !important; }
  .cd5vxt-game-card { border-radius: 12px !important; }
  .cd5vxt-game-card img { height: 140px !important; }
  .cd5vxt-btn { padding: 12px 24px !important; font-size: max(14px, 0.875rem) !important; }
  .cd5vxt-content-section { padding: 40px 16px !important; font-size: max(15px, 1rem) !important; }
  .cd5vxt-footer { padding: 30px 16px !important; font-size: max(14px, 0.875rem) !important; }
  .cd5vxt-footer ul { flex-direction: column !important; gap: 10px !important; }
  canvas { max-width: 100% !important; height: auto !important; }
  img, video, iframe { max-width: 100% !important; }
}
/* === SMALL MOBILE (≤480px) === */
@media (max-width: 480px) {
  .cd5vxt-hero h1, .cd5vxt-hero-text h1 { font-size: clamp(1.4rem, 8vw, 2rem) !important; }
  .cd5vxt-game-grid { grid-template-columns: 1fr !important; }
  .cd5vxt-game-card img { height: 180px !important; }
}
/* === DESKTOP ONLY: Hide hamburger === */
@media (min-width: 769px) {
  .cd5vxt-hamburger { display: none !important; }
  .cd5vxt-desktop-nav { display: flex !important; }
}
/* ============================================================
   React build additions — intro-video hero + responsive nav
   (appended; later rules win over the base .cd5vxt-hero column layout)
   ============================================================ */
.cd5vxt-hero {
  flex-direction: row;
  align-items: center;
  gap: 48px;
  flex-wrap: wrap;
}
.cd5vxt-hero .cd5vxt-hero-text {
  position: relative;
  z-index: 2;
  flex: 1 1 52%;
  min-width: 300px;
  max-width: 700px;
}
.cd5vxt-hero-video {
  position: relative;
  z-index: 2;
  flex: 1 1 40%;
  min-width: 280px;
  display: flex;
  justify-content: center;
}
.cd5vxt-hero-video video {
  width: 100%;
  max-width: 560px;
  border-radius: 20px;
  background: #000;
  border: 1px solid rgba(255,255,255,0.25);
  box-shadow: 0 20px 50px rgba(0,0,0,0.45);
}

/* Responsive: hamburger swap + stack video under text on mobile */
@media (max-width: 860px) {
  .cd5vxt-desktop-nav { display: none !important; }
  .cd5vxt-hamburger { display: block !important; }
  .cd5vxt-hero { flex-direction: column; align-items: stretch; }
  .cd5vxt-hero .cd5vxt-hero-text { order: 1; max-width: 100%; flex-basis: auto; }
  .cd5vxt-hero-video { order: 2; margin-top: 28px; flex-basis: auto; }
}
.cd5vxt-mobile-menu a { color: #fff; text-decoration: none; font-size: 1.4rem; font-weight: 700; }
.cd5vxt-mobile-menu a:hover { color: var(--site-primary, #d97706); }
