/* CSS Reset & Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: inherit;
  max-width: 100vw; /* Crucial for preventing horizontal overflow */
}

html, body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  max-width: 100vw;
  overflow-x: hidden; /* Prevent horizontal scroll */
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
  background-color: #0b0d17; /* Space Station Theme BG */
  color: #ffffff;
}

main {
  flex: 1;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden; /* Prevent horizontal scroll */
}

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

/* Container */
.cuof9j-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px; /* Consistent padding for smaller screens */
}

/* Typography & Links */
a {
  color: #3498db;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #2980b9;
  text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
  margin-bottom: 15px;
  font-weight: 700;
}

p {
  margin-bottom: 15px;
  line-height: 1.8;
}

/* Theme Colors */
:root {
  --theme-bg: #0b0d17;
  --theme-primary: #3498db;
  --theme-accent: #e74c3c;
  --theme-text: #ffffff;
  --theme-card-bg: #1a1f2a; /* Darker card background */
  --theme-border-color: rgba(255, 255, 255, 0.15);
}

/* Header */
.cuof9j-header-l-r-r {
  background: rgba(0, 0, 0, 0.2); /* Slightly transparent header */
  backdrop-filter: blur(10px);
  padding: 20px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cuof9j-logo {
  display: flex;
  align-items: center;
  font-size: 1.5em;
  font-weight: 700;
}

.cuof9j-logo span {
  color: var(--theme-text);
}

.cuof9j-desktop-nav ul {
  display: flex;
  gap: 25px;
  align-items: center;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin: 0;
}

.cuof9j-desktop-nav li {
  margin: 0;
}

.cuof9j-desktop-nav a {
  color: var(--theme-text);
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 6px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.cuof9j-desktop-nav a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--theme-primary);
  text-decoration: none;
}

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

.cuof9j-age-flag {
  display: flex;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.1);
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.9em;
  color: var(--theme-text);
}

.cuof9j-hamburger {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  color: var(--theme-text);
  font-size: 2em;
  cursor: pointer;
}

/* Mobile Menu */
.cuof9j-mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(11, 13, 23, 0.95); /* Darker, slightly transparent BG */
  backdrop-filter: blur(15px);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  box-sizing: border-box;
}

.cuof9j-mobile-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: center;
}

.cuof9j-mobile-menu li {
  margin-bottom: 20px;
}

.cuof9j-mobile-menu a {
  color: var(--theme-text);
  font-size: 1.5em;
  font-weight: 700;
  transition: color 0.3s ease;
}

.cuof9j-mobile-menu a:hover {
  color: var(--theme-primary);
}

.cuof9j-close-menu {
  position: absolute;
  top: 30px;
  right: 30px;
  background: none;
  border: none;
  color: var(--theme-text);
  font-size: 2.5em;
  cursor: pointer;
  transition: color 0.3s ease;
}

.cuof9j-close-menu:hover {
  color: var(--theme-accent);
}

/* Footer */
.cuof9j-footer {
  padding: 40px 20px;
  background: rgba(0, 0, 0, 0.2); /* Consistent with header */
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: auto; /* Push footer to bottom */
}

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

.cuof9j-footer a {
  color: var(--theme-text);
  opacity: 0.9;
  font-size: 0.9em;
  transition: opacity 0.3s ease;
}

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

.cuof9j-footer-contact {
  margin-top: 20px;
  font-size: 0.85em;
  text-align: center;
  opacity: 0.85;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--theme-text);
}

.cuof9j-footer-contact span {
  display: block;
}

.cuof9j-copyright {
  margin-top: 15px;
  text-align: center;
  font-size: 0.85em;
  opacity: 0.8;
  color: var(--theme-text);
}

.cuof9j-copyright a {
  color: var(--theme-text);
  text-decoration: underline;
}

/* Hero Section - BACKGROUND-OVERLAY Layout */
.cuof9j-hero {
  position: relative;
  padding: 160px 20px;
  display: flex;
  flex-direction: column; /* Default to column for mobile */
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 70vh;
  background-size: cover;
  background-position: center;
  z-index: 1; /* Ensure content is above overlay */
  color: var(--theme-text);
  box-shadow: inset 0 0 100px rgba(0,0,0,0.5); /* Subtle inner shadow for depth */
}

.cuof9j-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6); /* Dark overlay */
  z-index: 2; /* Overlay is behind content */
  box-shadow: 0 0 50px rgba(0,0,0,0.5); /* Soft outer shadow */
}

.cuof9j-hero .cuof9j-container {
  position: relative; /* Ensure container content is above overlay */
  z-index: 3; /* Content is on top */
}

/* Responsive adjustments for the hero */
@media (min-width: 768px) {
  .cuof9j-hero {
    flex-direction: row; /* Side-by-side on larger screens */
    text-align: left;
    padding: 100px 20px; /* Adjust padding */
  }
  .cuof9j-hero .cuof9j-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }
  .cuof9j-hero-text-content {
    flex: 1;
    max-width: 50%;
    padding-right: 40px; /* Space between text and image */
  }
  .cuof9j-hero-image-content {
    flex: 1;
    max-width: 50%;
    display: flex;
    justify-content: flex-end; /* Align image to the right */
  }
  .cuof9j-hero-image-content img {
    max-width: 90%; /* Slightly smaller image to fit */
    height: auto;
    border-radius: 16px; /* Rounded corners for image */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); /* Shadow for the image */
  }
}

/* Game Grid - NEO-BRUTALIST GRID Layout */
.cuof9j-game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px; /* Add padding for smaller screens */
}

/* Game Card - NEO-BRUTALIST GRID */
.cuof9j-game-card {
  background-color: var(--theme-card-bg);
  border: 4px solid #000000; /* Thick black border */
  box-shadow: 6px 6px 0px #000000; /* Hard shadow */
  border-radius: 8px; /* Slightly rounded corners */
  overflow: hidden; /* Ensure content stays within bounds */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  cursor: pointer; /* Indicate it's clickable */
}

.cuof9j-game-card:hover {
  transform: translateY(-5px); /* Slight lift on hover */
  box-shadow: 10px 10px 0px #000000; /* Deeper shadow on hover */
}

.cuof9j-game-card img {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
  border-bottom: 4px solid #000000; /* Consistent border */
  display: block; /* Ensure it behaves as a block element */
}

.cuof9j-game-card-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1; /* Allows content to fill available space */
  justify-content: space-between; /* Push footer-like info to bottom */
  text-align: center;
}

.cuof9j-game-card-content h3 {
  font-size: 1.4em;
  margin-bottom: 10px;
  color: var(--theme-primary);
}

.cuof9j-game-card-content p {
  font-size: 0.95em;
  margin-bottom: 15px;
  opacity: 0.8;
  flex-grow: 1; /* Allow description to take space */
}

.cuof9j-game-card-play-btn {
  background-color: var(--theme-accent);
  color: var(--theme-text);
  padding: 12px 20px;
  border: none;
  border-radius: 6px;
  font-size: 1.1em;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  margin-top: 15px;
  text-transform: uppercase;
  align-self: center; /* Center button */
}

.cuof9j-game-card-play-btn:hover {
  background-color: #c0392b;
  transform: translateY(-2px);
}

/* Content Section Styling */
.cuof9j-content-section {
  padding: 80px 20px;
  line-height: 1.8;
  font-size: 1.1rem;
  background-color: var(--theme-card-bg); /* Distinct background for content areas */
  border-radius: 24px; /* Large rounded corners */
  margin: 40px auto; /* Centered with space */
  max-width: 900px; /* Limit width for readability */
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3); /* Soft, expansive shadow */
  display: flex;
  flex-direction: column;
  align-items: center; /* Center content within the section */
  text-align: left; /* Default text alignment */
}

.cuof9j-content-section h2 {
  font-size: 2.2em;
  margin-bottom: 25px;
  text-align: center;
  color: var(--theme-primary);
}

.cuof9j-content-section p, .cuof9j-content-section ul, .cuof9j-content-section ol {
  max-width: 800px; /* Ensure text paragraphs are readable */
  margin-left: auto;
  margin-right: auto;
}

.cuof9j-content-section ul, .cuof9j-content-section ol {
  margin-left: 40px; /* Indent lists */
  margin-right: 0;
  max-width: calc(800px + 40px); /* Adjust max-width for indent */
}

.cuof9j-content-section li {
  margin-bottom: 12px;
}

.cuof9j-content-section strong {
  color: var(--theme-primary);
}

/* Trust Signals - Embedded in Footer */
/* Styles for footer trust signals are within the footer HTML structure */

/* Responsive Adjustments */
@media (max-width: 768px) {
  .cuof9j-desktop-nav {
    display: none; /* Hide desktop nav on mobile */
  }

  .cuof9j-hamburger {
    display: block; /* Show hamburger menu */
  }

  .cuof9j-header-l-r-r .cuof9j-container {
    flex-wrap: nowrap; /* Prevent wrapping in header on small screens */
  }

  .cuof9j-hero {
    padding: 100px 20px; /* Reduced padding */
  }

  .cuof9j-hero-text-content,
  .cuof9j-hero-image-content {
    max-width: 100%; /* Stacked layout */
    padding-right: 0;
    margin-top: 20px; /* Space between stacked elements */
  }
  .cuof9j-hero-image-content img {
      max-width: 80%; /* Smaller image for mobile stacking */
      margin: 0 auto; /* Center the image */
  }

  .cuof9j-game-grid {
    grid-template-columns: 1fr; /* Single column for games on mobile */
  }

  .cuof9j-footer ul {
    flex-direction: column; /* Stack footer links */
    gap: 10px;
  }

  .cuof9j-content-section {
    padding: 60px 20px;
    margin: 30px auto;
  }

  .cuof9j-content-section h2 {
    font-size: 1.8em;
  }
}

@media (max-width: 480px) {
  .cuof9j-logo span {
    font-size: 1.2em;
  }

  .cuof9j-age-flag {
    font-size: 0.8em;
    padding: 4px 8px;
  }

  .cuof9j-mobile-menu a {
    font-size: 1.3em;
  }

  .cuof9j-close-menu {
    font-size: 2em;
    top: 20px;
    right: 20px;
  }
  
  .cuof9j-game-card {
    min-width: 100%; /* Ensure cards take full width */
  }
  .cuof9j-game-card-play-btn {
    font-size: 1em;
    padding: 10px 15px;
  }
}