/* CSS Reset & Base Styles */
* {
  box-sizing: inherit;
  max-width: 100vw;
  margin: 0;
  padding: 0;
}

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: Arial, Helvetica, sans-serif;
  background-color: #04111f; /* Pirate Cove BG */
  color: #fdf2cc; /* Pirate Cove Text */
  line-height: 1.6;
}

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

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

a {
  color: #d4a017; /* Pirate Cove Pri */
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #ff6b35; /* Pirate Cove Acc */
  text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
  color: #fdf2cc; /* Pirate Cove Text */
  font-weight: 700;
  margin-bottom: 1.2em;
}

h1 { font-size: clamp(2rem, 6vw, 3.5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h3 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h4 { font-size: clamp(1.4rem, 2.5vw, 1.8rem); }

p {
  margin-bottom: 1em;
  font-size: 1.1rem;
}

strong {
  color: #fdf2cc;
}

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

/* Header */
.co8iud-header {
  padding: 20px;
  background: rgba(0, 0, 0, 0.5); /* Glassmorphism */
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background-color 0.3s ease;
}

.co8iud-header .co8iud-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.co8iud-logo {
  display: flex;
  align-items: center;
  font-size: 1.8rem;
  font-weight: 700;
  color: #d4a017; /* Pirate Cove Pri */
  letter-spacing: 1px;
  text-transform: uppercase;
}

.co8iud-logo svg {
  vertical-align: middle;
  margin-right: 10px;
  transform: scale(1.2);
}

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

.co8iud-desktop-nav a {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fdf2cc; /* Pirate Cove Text */
  padding: 8px 12px;
  border-radius: 30px;
  transition: background-color 0.3s ease, color 0.3s ease;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.co8iud-desktop-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background-color: #ff6b35; /* Pirate Cove Acc */
  transition: width 0.3s ease;
}

.co8iud-desktop-nav a:hover {
  color: #fff;
  background-color: rgba(212, 160, 23, 0.2); /* Slight highlight */
}

.co8iud-desktop-nav a:hover::after {
  width: 100%;
}

.co8iud-age-flag {
  display: flex;
  align-items: center;
  font-size: 1rem;
  font-weight: 600;
  color: #fdf2cc;
  margin-right: 20px;
}

.co8iud-hamburger {
  display: none;
  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: #fdf2cc;
  transition: background-color 0.3s ease, color 0.3s ease;
}
.co8iud-hamburger:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.co8iud-mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.92);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease;
}

.co8iud-mobile-menu.active {
  display: flex;
  opacity: 1;
}

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

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

.co8iud-mobile-menu a {
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
}

.co8iud-close-menu {
  position: absolute;
  top: 20px;
  right: 24px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  transition: transform 0.3s ease;
}
.co8iud-close-menu:hover {
  transform: rotate(180deg);
}

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

/* Footer */
.co8iud-footer {
  padding: 60px 20px;
  background: rgba(10, 10, 10, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: auto; /* Pushes footer to bottom */
}

.co8iud-footer .co8iud-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.co8iud-footer-logo-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 30px;
}

.co8iud-footer-logo-section .co8iud-logo {
  transform: scale(0.8);
  margin-bottom: 15px;
}

.co8iud-footer-nav ul {
  display: flex;
  gap: 30px;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
  justify-content: center;
}

.co8iud-footer-nav a {
  font-size: 0.95em;
  color: #fdf2cc;
  opacity: 0.9;
}

.co8iud-footer-content {
  width: 100%;
  opacity: 0.8;
  font-size: 0.95em;
}

.co8iud-footer-contact p {
  font-size: 0.9em;
  text-align: left;
  opacity: 0.9;
  margin-bottom: 0;
}

.co8iud-footer-contact p strong {
  color: #fdf2cc;
}

.co8iud-footer-disclaimer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 15px;
  margin-top: 15px;
  width: 100%;
}

.co8iud-footer-disclaimer h4 {
  margin: 0 0 8px 0;
  color: #ffcc00;
  font-size: 1.2em;
}

.co8iud-footer-disclaimer p {
  margin: 0;
  opacity: 0.9;
  font-size: 1em;
}

.co8iud-footer-notice {
  margin-bottom: 10px;
  font-size: 0.9em;
  text-align: justify;
}

.co8iud-footer-notice strong {
  color: #fdf2cc;
}

.co8iud-footer-responsible-gaming {
  font-size: 0.85em;
  opacity: 0.8;
  text-align: justify;
}

.co8iud-footer-responsible-gaming a {
  color: #fdf2cc; /* Inherit footer text color */
  text-decoration: underline;
}
.co8iud-footer-responsible-gaming a:hover {
  color: #ff6b35;
}

.co8iud-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;
}

.co8iud-regulatory-info strong {
  display: block;
  margin-bottom: 4px;
  opacity: 0.9;
  color: #fdf2cc;
}

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

/* Buttons */
.co8iud-btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: 0.85rem;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  background-image: linear-gradient(to right, #ff6b35, #e65c00); /* Pirate Cove Acc gradient */
  color: #04111f; /* Pirate Cove BG as text color for contrast */
  box-shadow: 0 5px 20px rgba(255, 107, 53, 0.4); /* Accent color shadow */
}

.co8iud-btn:hover {
  background-image: linear-gradient(to right, #e65c00, #ff6b35);
  box-shadow: 0 8px 30px rgba(255, 107, 53, 0.5);
  transform: translateY(-2px) scale(1.02);
}

/* Hero Section - CINEMATIC-CENTERED */
.co8iud-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 160px 5% 100px 5%;
  gap: 60px;
  margin: 0 auto;
  min-height: 70vh; /* Ensure it takes up significant space */
  background-color: #04111f; /* Pirate Cove BG */
  background-attachment: fixed; /* Parallax effect */
  position: relative;
  overflow: hidden; /* Crucial for fixed background */
}

.co8iud-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(4, 17, 31, 0.7), rgba(4, 17, 31, 0.9)); /* Overlay for text readability */
  z-index: 1;
}

.co8iud-hero-text {
  position: relative;
  z-index: 2;
  max-width: 800px;
  color: #fdf2cc;
}

.co8iud-hero-text h1 {
  font-size: clamp(2.5rem, 7vw, 4rem);
  line-height: 1.1;
  margin-bottom: 20px;
  text-shadow: 0 5px 25px rgba(0, 0, 0, 0.3);
}

.co8iud-hero-text p {
  font-size: 1.2rem;
  opacity: 0.95;
  margin-bottom: 30px;
}

.co8iud-hero-image-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1600px;
  border-radius: 32px; /* Large radius */
  overflow: hidden;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.15);
}

.co8iud-hero-image-container img {
  width: 100%;
  height: 45vh; /* Responsive height */
  min-height: 400px; /* Minimum height */
  object-fit: cover;
  display: block; /* Ensure no extra space below image */
}

/* Game Grid - BENTO-BOX-GRID */
.co8iud-game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  grid-auto-rows: 350px; /* Fixed row height for consistency */
  gap: 30px;
  margin: 60px auto;
  max-width: 1400px;
  padding: 0 20px;
}

/* Game Card - Premium Look */
.co8iud-game-card {
  border-radius: 24px; /* Large radius */
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.co8iud-game-card:hover {
  transform: translateY(-10px) scale(1.03);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.35);
}

.co8iud-game-card img {
  width: 100%;
  height: 100%; /* Fill the card */
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

.co8iud-game-card-info {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 20px;
  z-index: 2;
  /* Frosted glass effect */
  backdrop-filter: blur(15px);
  background: rgba(0, 0, 0, 0.6);
  border-radius: 0 0 24px 24px; /* Match card radius */
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 40%; /* Make sure text has space */
  box-sizing: border-box;
}

.co8iud-game-card-info h3 {
  font-size: 1.4rem;
  margin-bottom: 8px;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.co8iud-game-card-info p {
  font-size: 0.95rem;
  opacity: 0.85;
  color: #eee;
  text-shadow: 0 1px 5px rgba(0,0,0,0.5);
}

/* Special grid item for Bento-Box */
@media (min-width: 769px) {
  .co8iud-game-grid .co8iud-game-card:first-child {
    grid-column: span 2;
    grid-row: span 2;
  }
  .co8iud-game-grid .co8iud-game-card:first-child .co8iud-game-card-info {
    height: 50%; /* Larger info area for the featured card */
  }
}

/* Content Section */
.co8iud-content-section {
  padding: 80px 20px;
  line-height: 1.8;
  font-size: 1.1rem;
  background-color: rgba(255, 255, 255, 0.03); /* Subtle background change */
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.co8iud-content-section p {
  max-width: 800px; /* Limit width for readability */
  margin-left: auto;
  margin-right: auto;
}

.co8iud-content-section h2,
.co8iud-content-section h3 {
  text-align: center;
}

/* === Responsive Breakpoints === */

/* === TABLET (≤1024px) === */
@media (max-width: 1024px) {
  .co8iud-hero {
    grid-template-columns: 1fr !important;
    flex-direction: column !important;
    padding: 80px 5% 60px !important;
    gap: 40px !important;
    min-height: unset !important;
    background-attachment: scroll !important; /* Disable parallax on tablet */
  }
  .co8iud-hero h1 {
    font-size: clamp(1.8rem, 5vw, 3rem) !important;
  }
  .co8iud-hero-image-container {
    max-width: 800px; /* Constrain image size */
    height: 35vh !important;
    min-height: 300px !important;
  }
  .co8iud-game-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) !important;
    gap: 20px !important;
    margin: 40px auto !important;
  }
  .co8iud-game-card img {
    height: 100% !important; /* Let image fill the adjusted card */
  }
  .co8iud-game-card-info {
    height: 45%;
  }
}

/* === MOBILE (≤768px) === */
@media (max-width: 768px) {
  html, body {
    font-size: 15px;
    overflow-x: hidden;
  }
  .co8iud-header {
    padding: 12px 16px !important;
    position: sticky;
    top: 0;
    z-index: 100;
  }
  .co8iud-logo {
    font-size: 1.5rem;
  }
  .co8iud-desktop-nav {
    display: none !important;
  }
  .co8iud-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;
    color: #fdf2cc;
    transition: background-color 0.3s ease, color 0.3s ease;
  }
  .co8iud-hamburger:hover {
    background-color: rgba(255, 255, 255, 0.1);
  }
  .co8iud-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;
  }
  .co8iud-hero h1,
  .co8iud-hero-text h1 {
    font-size: clamp(1.6rem, 7vw, 2.4rem) !important;
    line-height: 1.2 !important;
    margin-bottom: 16px !important;
  }
  .co8iud-hero p,
  .co8iud-hero-text p {
    font-size: 1rem !important;
  }
  .co8iud-hero-image-container {
    display: none !important; /* Hide image on mobile for cleaner UI */
  }
  .co8iud-game-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    padding: 0 12px !important;
    margin: 40px auto !important;
    grid-auto-rows: 280px; /* Adjust row height for mobile */
  }
  .co8iud-game-card {
    border-radius: 12px !important;
  }
  .co8iud-game-card img {
    height: 100% !important; /* Let image fill the adjusted card */
  }
  .co8iud-game-card-info {
    height: 50%; /* Increased info height on mobile */
    padding: 15px;
  }
  .co8iud-game-card-info h3 {
    font-size: 1.2rem;
  }
  .co8iud-game-card-info p {
    font-size: 0.9rem;
  }
  .co8iud-btn {
    padding: 12px 24px !important;
    font-size: 0.85rem !important;
  }
  .co8iud-content-section {
    padding: 40px 16px !important;
    font-size: 1rem !important;
  }
  .co8iud-content-section p {
    text-align: justify; /* Ensure text flows well */
  }
  .co8iud-footer {
    padding: 30px 16px !important;
    font-size: 0.85rem !important;
  }
  .co8iud-footer ul {
    flex-direction: column !important;
    gap: 10px !important;
  }
  .co8iud-footer-nav a {
    font-size: 1rem;
  }
  .co8iud-regulatory-info {
    text-align: left;
  }
  .co8iud-footer-disclaimer h4 {
    font-size: 1.1em;
  }
}

/* === SMALL MOBILE (≤480px) === */
@media (max-width: 480px) {
  .co8iud-hero h1,
  .co8iud-hero-text h1 {
    font-size: clamp(1.4rem, 8vw, 2rem) !important;
  }
  .co8iud-hero-text p {
    font-size: 0.95rem !important;
  }
  .co8iud-game-grid {
    grid-template-columns: 1fr !important;
    grid-auto-rows: 300px; /* Even taller for single column */
  }
  .co8iud-game-card img {
    height: 100% !important;
  }
  .co8iud-game-card-info {
    height: 55%; /* Maximize info area */
  }
  .co8iud-game-card-info h3 {
    font-size: 1.3rem;
  }
  .co8iud-game-card-info p {
    font-size: 1rem;
  }
}

/* === DESKTOP ONLY: Hide hamburger === */
@media (min-width: 769px) {
  .co8iud-hamburger {
    display: none !important;
  }
  .co8iud-desktop-nav {
    display: flex !important;
  }
}