* {
  box-sizing: inherit;
  margin: 0;
  padding: 0;
  max-width: 100vw;
}

html, body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  max-width: 100vw;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  background-color: #020818; /* Sapphire Galaxy BG */
  color: #d0eaff; /* Sapphire Galaxy Text */
  line-height: 1.6;
}

main {
  flex: 1;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

/* Global CSS Variables (for consistency) */
:root {
  --cxc20p-bg: #020818;
  --cxc20p-primary: #1e90ff; /* Blue */
  --cxc20p-secondary: #00d4ff; /* Cyan */
  --cxc20p-accent: #ffe400; /* Yellow */
  --cxc20p-text: #d0eaff;
  --cxc20p-glass-bg: rgba(255, 255, 255, 0.05);
  --cxc20p-glass-border: rgba(255, 255, 255, 0.1);
  --cxc20p-shadow-dark: rgba(0, 0, 0, 0.4);
  --cxc20p-shadow-light: rgba(0, 0, 0, 0.15);
  --cxc20p-border-radius-card: 16px;
  --cxc20p-border-radius-button: 50px;
  --cxc20p-transition-speed: 0.3s;
}

/* Container for centering content */
.cxc20p-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

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

/* Header Styling */
.cxc20p-header {
  padding: 20px;
  background: rgba(0, 0, 0, 0.5); /* Semi-transparent dark */
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.cxc20p-logo {
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--cxc20p-accent);
}

.cxc20p-logo span {
  margin-left: 5px;
}

.cxc20p-desktop-nav ul {
  display: flex;
  gap: 25px; /* Increased gap */
  align-items: center;
  justify-content: center;
  list-style: none;
}

.cxc20p-desktop-nav a {
  color: var(--cxc20p-text);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
  padding: 8px 15px;
  border-radius: 30px;
  transition: background-color var(--cxc20p-transition-speed) ease, color var(--cxc20p-transition-speed) ease;
  position: relative;
  overflow: hidden; /* For potential slide-in effects */
}

.cxc20p-desktop-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background-color: var(--cxc20p-secondary);
  transition: width var(--cxc20p-transition-speed) ease;
}

.cxc20p-desktop-nav a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--cxc20p-secondary);
}

.cxc20p-desktop-nav a:hover::after {
  width: 80%;
}

.cxc20p-age-flag {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.4);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--cxc20p-accent);
}

.cxc20p-header-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* Hamburger Menu Styles */
.cxc20p-hamburger {
  display: none; /* Hidden by default on desktop */
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 2px solid currentColor;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--cxc20p-accent);
  transition: transform var(--cxc20p-transition-speed) ease;
}

.cxc20p-hamburger:hover {
  transform: scale(1.1);
}

.cxc20p-mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.95); /* Darker overlay */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.cxc20p-mobile-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 25px; /* Consistent gap */
}

.cxc20p-mobile-menu li {
  margin-bottom: 15px;
}

.cxc20p-mobile-menu a {
  color: #fff;
  text-decoration: none;
  font-size: 1.8rem; /* Larger font for mobile */
  font-weight: 700;
  transition: color var(--cxc20p-transition-speed) ease;
}

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

.cxc20p-close-menu {
  position: absolute;
  top: 30px; /* Adjusted position */
  right: 30px; /* Adjusted position */
  background: transparent;
  border: none;
  color: #fff;
  font-size: 2.5rem; /* Larger close button */
  cursor: pointer;
  line-height: 1;
  transition: transform var(--cxc20p-transition-speed) ease;
}

.cxc20p-close-menu:hover {
  transform: rotate(90deg);
  color: var(--cxc20p-accent);
}

/* Disclosure Bar */
#cxc20p-disclosure-bar {
  background: #1a0800; /* Darker, richer red */
  color: #ffd700; /* Gold */
  text-align: center;
  padding: 7px 16px;
  font-size: 0.78em;
  font-weight: 700;
  letter-spacing: 0.4px;
  border-bottom: 2px solid #e65c00; /* Orange-red */
  width: 100%;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Footer Styling */
.cxc20p-footer {
  padding: 40px 20px;
  background: rgba(0, 0, 0, 0.2); /* Lighter dark background */
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: auto; /* Pushes footer to the bottom */
}

.cxc20p-footer ul {
  display: flex;
  gap: 20px;
  list-style: none;
  padding: 0;
  margin-bottom: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.cxc20p-footer a {
  color: inherit;
  text-decoration: none;
  opacity: 0.9;
  font-weight: 500;
  transition: opacity var(--cxc20p-transition-speed) ease;
}

.cxc20p-footer a:hover {
  opacity: 1;
  text-decoration: underline;
}

.cxc20p-footer-contact {
  margin-top: 15px;
  font-size: 0.9em;
  text-align: left;
  opacity: 0.9;
}

.cxc20p-footer-contact p {
  margin-bottom: 10px;
}

.cxc20p-footer-contact strong {
  color: var(--cxc20p-accent);
}

.cxc20p-footer > div > div:nth-of-type(2) { /* Styling for the inner divs in footer */
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 15px;
  margin-top: 15px;
  width: 100%;
  max-width: 900px; /* Limit width for readability */
  text-align: center; /* Center elements within this div */
}

.cxc20p-footer > div > div:nth-of-type(2) > div:first-of-type { /* No Real Money Badge */
  display: inline-block;
  background: transparent;
  padding: 10px 25px;
  border-radius: 50px;
  margin-bottom: 20px;
  border: 1px solid var(--cxc20p-accent);
  text-align: center;
}

.cxc20p-footer > div > div:nth-of-type(2) > div:first-of-type span:first-of-type {
  color: var(--cxc20p-accent);
  font-weight: bold;
  display: block;
}

.cxc20p-footer > div > div:nth-of-type(2) > div:first-of-type span:last-of-type {
  font-size: 0.9em;
  opacity: 0.8;
}

.cxc20p-footer p {
  margin-bottom: 10px;
  font-size: 0.9em;
  text-align: justify; /* Justify text for better readability */
}

.cxc20p-footer p strong {
  color: var(--cxc20p-accent);
}

.cxc20p-footer a[href*="gambleaware.org"] {
  color: var(--cxc20p-secondary);
  text-decoration: underline;
}

.cxc20p-footer > div > div:nth-of-type(2) > div:last-of-type { /* Regulatory Info */
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 12px;
  margin-top: 12px;
  font-size: 0.78em;
  opacity: 0.75;
  line-height: 1.55;
  text-align: left;
}

.cxc20p-footer > div > div:nth-of-type(2) > div:last-of-type strong {
  display: block;
  margin-bottom: 4px;
  opacity: 0.9;
  color: var(--cxc20p-accent);
}

.cxc20p-copyright {
  margin-top: 15px;
  text-align: center;
  font-size: 0.85em;
  opacity: 0.7;
}

.cxc20p-copyright a {
  color: inherit;
  text-decoration: underline;
}

/* Button Style */
.cxc20p-btn {
  display: inline-block;
  padding: 14px 32px; /* Slightly larger padding */
  border-radius: var(--cxc20p-border-radius-button);
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: 0.9rem; /* Slightly larger font */
  transition: all var(--cxc20p-transition-speed) ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 15px rgba(var(--cxc20p-accent), 0.4); /* Glow effect */
  background: linear-gradient(45deg, var(--cxc20p-accent), var(--cxc20p-secondary));
  color: #020818; /* Dark text on bright button */
}

.cxc20p-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 20px rgba(var(--cxc20p-accent), 0.6);
}

/* Hero Layout: Cinematic-Centered */
.cxc20p-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 160px 5% 100px 5%;
  gap: 60px;
  margin: 0 auto;
  position: relative; /* For background image positioning */
  min-height: 600px; /* Ensure enough height */
  background-attachment: fixed; /* Parallax effect */
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  overflow: hidden; /* Prevent content overflow */
}

.cxc20p-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(2, 8, 24, 0.7) 0%, rgba(2, 8, 24, 0.9) 100%); /* Gradient overlay */
  z-index: 1;
  pointer-events: none; /* allow text selection and interaction through the decorative overlay */
}

.cxc20p-hero-text {
  position: relative; /* Ensure text is above the overlay */
  z-index: 2;
  max-width: 800px;
  margin: 0 auto; /* Center text block */
}

/* Ensure the hero's container sits above the decorative ::before overlay
   even if markup doesn't use the .cxc20p-hero-text wrapper. */
.cxc20p-hero > .cxc20p-container {
  position: relative;
  z-index: 2;
}

.cxc20p-hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem); /* Responsive font size */
  margin-bottom: 20px;
  line-height: 1.1;
  color: var(--cxc20p-accent); /* Accent color for main title */
  text-shadow: 0 0 20px rgba(0,0,0,0.4);
}

.cxc20p-hero p {
  font-size: 1.2rem;
  margin-bottom: 30px;
  opacity: 0.95;
  color: var(--cxc20p-text);
}

.cxc20p-hero-image {
  width: 100%;
  max-width: 1600px; /* Max width for the image */
  height: 40vh; /* Responsive height */
  min-height: 400px; /* Minimum height */
  border-radius: 32px; /* Large radius for the image */
  box-shadow: 0 40px 80px var(--cxc20p-shadow-light);
  position: relative; /* Needed for img styling */
  z-index: 2; /* Ensure image is above overlay */
  overflow: hidden;
}

.cxc20p-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Covers the area without distortion */
  border-radius: 32px; /* Match container radius */
}


/* Games Grid Layout: Neo-Brutalist Architecture */
.cxc20p-game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 40px;
  max-width: 1300px;
  margin: 60px auto;
  padding: 0 20px;
}

.cxc20p-game-card {
  background: var(--cxc20p-glass-bg);
  border: 6px solid #000; /* Thick black border */
  box-shadow: 12px 12px 0px #000; /* Hard, offset shadow */
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform var(--cxc20p-transition-speed) ease, box-shadow var(--cxc20p-transition-speed) ease;
  display: flex;
  flex-direction: column;
  text-decoration: none; /* Remove underline for links */
  color: inherit; /* Inherit text color */
}

.cxc20p-game-card:hover {
  transform: translateY(8px) scale(1.02); /* Pushes down and slightly scales */
  box-shadow: 4px 4px 0px #000; /* Reduced shadow on hover */
}

.cxc20p-game-card img {
  width: 100%;
  height: 240px; /* Fixed height for consistency */
  object-fit: cover;
  border-bottom: 6px solid #000; /* Match card border */
  filter: grayscale(20%) contrast(120%); /* Slightly desaturated, increased contrast */
  transition: filter var(--cxc20p-transition-speed) ease;
}

.cxc20p-game-card:hover img {
  filter: grayscale(0%) contrast(100%); /* Restore on hover */
}

.cxc20p-game-card-info {
  padding: 20px;
  text-align: center;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cxc20p-game-card h3 {
  font-size: 1.4rem;
  margin-bottom: 10px;
  color: var(--cxc20p-accent);
  text-shadow: 0 0 5px rgba(0,0,0,0.3);
}

.cxc20p-game-card p {
  font-size: 0.95rem;
  opacity: 0.85;
  margin-bottom: 15px;
}

.cxc20p-game-card .cxc20p-btn {
  margin-top: auto; /* Pushes button to bottom */
  background: linear-gradient(45deg, var(--cxc20p-secondary), var(--cxc20p-primary)); /* Different gradient for game buttons */
  box-shadow: 0 4px 10px rgba(var(--cxc20p-secondary), 0.4);
}

.cxc20p-game-card .cxc20p-btn:hover {
  box-shadow: 0 8px 15px rgba(var(--cxc20p-secondary), 0.6);
}

/* Content Section Styling */
.cxc20p-content-section {
  padding: 80px 20px;
  line-height: 1.8;
  font-size: 1.1rem;
  max-width: 900px; /* Limit width for readability */
  margin: 0 auto; /* Center the section */
  text-align: left; /* Default text alignment */
}

.cxc20p-content-section h2 {
  font-size: 2.5rem;
  margin-bottom: 30px;
  text-align: center;
  color: var(--cxc20p-secondary);
}

.cxc20p-content-section p {
  margin-bottom: 20px;
}

.cxc20p-content-section ul {
  margin-bottom: 20px;
  padding-left: 25px; /* Indent list items */
}

.cxc20p-content-section li {
  margin-bottom: 10px;
}

/* === MOBILE FIXES === */

/* === TABLET (≤1024px) === */
@media (max-width: 1024px) {
  .cxc20p-hero {
    grid-template-columns: 1fr !important;
    flex-direction: column !important;
    padding: 80px 5% 60px !important;
    gap: 40px !important;
    min-height: unset !important; /* Adjust min-height */
  }
  .cxc20p-hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem) !important;
  }
  .cxc20p-hero p {
    font-size: 1.1rem !important;
  }
  .cxc20p-hero-image {
    height: 30vh !important; /* Reduced height */
    min-height: 300px !important;
  }
  .cxc20p-game-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    gap: 24px !important;
  }
  .cxc20p-content-section {
    padding: 60px 20px !important;
    font-size: 1.05rem !important;
  }
  .cxc20p-content-section h2 {
    font-size: 2.2rem !important;
  }
  .cxc20p-footer {
    padding: 30px 20px !important;
  }
  .cxc20p-footer ul {
    gap: 15px !important;
  }
}

/* === MOBILE (≤768px) === */
@media (max-width: 768px) {
  html, body {
    font-size: 15px;
    overflow-x: hidden;
  }
  .cxc20p-header {
    padding: 12px 16px !important;
    position: sticky;
    top: 0;
    z-index: 100;
  }
  .cxc20p-logo {
    font-size: 1.3rem;
  }
  .cxc20p-desktop-nav {
    display: none !important;
  }
  .cxc20p-hamburger {
    display: flex !important; /* Show hamburger on mobile */
  }
  .cxc20p-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;
  }
  .cxc20p-hero h1, .cxc20p-hero-text h1 {
    font-size: clamp(1.8rem, 7vw, 3rem) !important;
    line-height: 1.2 !important;
    margin-bottom: 16px !important;
  }
  .cxc20p-hero p, .cxc20p-hero-text p {
    font-size: 1rem !important;
    margin-bottom: 20px !important;
  }
  .cxc20p-hero-image {
    display: none !important; /* Hide image on mobile for simplicity */
  }
  .cxc20p-game-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) !important; /* Responsive grid */
    gap: 12px !important;
    padding: 0 12px !important;
    margin: 40px auto !important;
  }
  .cxc20p-game-card {
    border-radius: 12px !important;
    box-shadow: 8px 8px 0px #000 !important;
  }
  .cxc20p-game-card:hover {
    transform: translateY(4px) scale(1.01) !important;
    box-shadow: 2px 2px 0px #000 !important;
  }
  .cxc20p-game-card img {
    height: 160px !important; /* Smaller image height on mobile */
  }
  .cxc20p-game-card-info {
    padding: 15px !important;
  }
  .cxc20p-game-card h3 {
    font-size: 1.2rem !important;
  }
  .cxc20p-btn {
    padding: 12px 20px !important; /* Smaller button */
    font-size: 0.85rem !important;
  }
  .cxc20p-content-section {
    padding: 40px 16px !important;
    font-size: 1rem !important;
  }
  .cxc20p-content-section h2 {
    font-size: 2rem !important;
    margin-bottom: 20px !important;
  }
  .cxc20p-footer {
    padding: 30px 16px !important;
    font-size: 0.85rem !important;
  }
  .cxc20p-footer ul {
    flex-direction: column !important;
    gap: 10px !important;
  }
  .cxc20p-footer > div > div:nth-of-type(2) {
    padding-top: 10px !important;
    margin-top: 10px !important;
  }
  .cxc20p-footer > div > div:nth-of-type(2) > div:first-of-type {
    padding: 8px 18px !important;
    margin-bottom: 15px !important;
  }
  .cxc20p-footer > div > div:nth-of-type(2) > div:last-of-type {
    text-align: center !important; /* Center regulatory info on small screens */
  }
  canvas {
    max-width: 100% !important;
    height: auto !important;
  }
  img, video, iframe {
    max-width: 100% !important;
  }
}

/* === SMALL MOBILE (≤480px) === */
@media (max-width: 480px) {
  html, body {
    font-size: 14px; /* Slightly smaller base font */
  }
  .cxc20p-logo {
    font-size: 1.2rem;
  }
  .cxc20p-hero h1, .cxc20p-hero-text h1 {
    font-size: clamp(1.6rem, 8vw, 2.4rem) !important;
  }
  .cxc20p-hero p, .cxc20p-hero-text p {
    font-size: 0.95rem !important;
  }
  .cxc20p-game-grid {
    grid-template-columns: 1fr !important; /* Single column on very small screens */
  }
  .cxc20p-game-card {
    border-radius: 10px !important;
    box-shadow: 6px 6px 0px #000 !important;
  }
  .cxc20p-game-card:hover {
    transform: translateY(3px) scale(1.005) !important;
    box-shadow: 1px 1px 0px #000 !important;
  }
  .cxc20p-game-card img {
    height: 180px !important; /* Adjust for single column */
  }
  .cxc20p-btn {
    width: 100%; /* Full width buttons */
    text-align: center;
  }
  .cxc20p-content-section {
    font-size: 0.95rem !important;
  }
  .cxc20p-content-section h2 {
    font-size: 1.8rem !important;
  }
  .cxc20p-footer {
    font-size: 0.8rem !important;
  }
  #cxc20p-disclosure-bar {
    font-size: 0.7rem !important;
    padding: 5px 10px !important;
  }
}

/* === DESKTOP ONLY: Hide hamburger === */
@media (min-width: 769px) {
  .cxc20p-hamburger {
    display: none !important;
  }
  .cxc20p-desktop-nav {
    display: flex !important; /* Ensure desktop nav is visible */
  }
  .cxc20p-mobile-menu {
    display: none !important; /* Ensure mobile menu is hidden on desktop */
  }
}