/* 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: Optima, Candara, 'Gill Sans', sans-serif;
  background-color: #05061a; /* Deep Cosmos BG */
  color: #ede9fe; /* Soft white text */
  scroll-behavior: smooth;
}

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

/* Global Container */
.c55elc-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: #fcd34d; /* Accent Yellow */
}

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

p {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 1rem;
  opacity: 0.9;
}

a {
  color: #8b5cf6; /* Primary Purple */
  text-decoration: none;
  transition: color 0.3s ease, text-decoration 0.3s ease;
}

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

/* Header Styles */
.c55elc-header {
  background: rgba(0, 0, 0, 0.4); /* Dark, slightly transparent */
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  box-sizing: border-box;
}

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

.c55elc-logo {
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
}

.c55elc-logo span {
  font-size: 1.8rem;
  margin-left: 8px;
}

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

.c55elc-desktop-nav a {
  color: #ede9fe;
  font-weight: 600;
  font-size: 1.1rem;
  padding: 8px 16px;
  border-radius: 50px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.c55elc-desktop-nav a:hover {
  background-color: rgba(139, 92, 246, 0.2); /* Primary Purple subtle hover */
  color: #fcd34d; /* Accent Yellow on hover */
  text-decoration: none;
}

.c55elc-header-right {
  display: flex;
  align-items: center;
}

.c55elc-age-flag {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  padding: 5px 12px;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #ede9fe;
  margin-right: 20px;
}

.c55elc-age-flag img {
  width: 20px;
  margin-right: 8px;
  border-radius: 3px;
}

.c55elc-hamburger {
  display: none; /* Hidden by default on desktop */
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 2px solid #ede9fe;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 1.8rem;
  cursor: pointer;
  color: #ede9fe;
  line-height: 1;
  transition: all 0.3s ease;
}

.c55elc-hamburger:hover {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: #fcd34d;
  color: #fcd34d;
}

/* Mobile Menu */
.c55elc-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;
  padding: 40px 20px;
  text-align: center;
}

.c55elc-mobile-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.c55elc-mobile-menu a {
  color: #fff;
  font-size: 1.8rem;
  font-weight: 700;
  padding: 10px 0;
  display: block;
  transition: color 0.3s ease;
}

.c55elc-mobile-menu a:hover {
  color: #fcd34d;
  text-decoration: none;
}

.c55elc-close-menu {
  position: absolute;
  top: 20px;
  right: 24px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  line-height: 1;
  transition: all 0.3s ease;
}

.c55elc-close-menu:hover {
  color: #ec4899; /* Secondary Pink */
  transform: scale(1.1);
}

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

#c55elc-disclosure-bar span {
  white-space: nowrap; /* Prevent breaking words */
}

/* Footer Styles */
.c55elc-footer {
  padding: 60px 20px;
  background: rgba(10, 10, 10, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  width: 100%;
  box-sizing: border-box;
}

.c55elc-footer .c55elc-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

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

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

.c55elc-footer ul li {
  opacity: 0.85;
  transition: opacity 0.3s ease;
}

.c55elc-footer ul li:hover {
  opacity: 1;
}

.c55elc-footer ul a {
  color: #ede9fe;
  font-size: 1rem;
  font-weight: 500;
}

.c55elc-footer-contact {
  margin-top: 20px;
  font-size: 0.85em;
  text-align: center;
  opacity: 0.85;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.c55elc-footer-contact span {
  color: #ede9fe;
}

.c55elc-footer > div > div:nth-child(2) { /* Container for the main footer content */
  width: 100%;
  opacity: 0.8;
  font-size: 0.95em;
}

.c55elc-footer h4 {
  margin: 0 0 8px 0;
  color: #fcd34d; /* Accent Yellow */
  font-size: 1.2em;
}

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

.c55elc-footer p a {
  color: #fcd34d;
  text-decoration: underline;
}

.c55elc-footer p a:hover {
  color: #ffffff;
}

.c55elc-footer p strong {
  opacity: 1;
  color: #ffccbc;
}

.c55elc-footer > div > div:nth-child(2) > div:nth-child(2) { /* Regulatory Info Box */
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 15px;
  margin-top: 15px;
  width: 100%;
}

.c55elc-footer > div > div:nth-child(2) > div:nth-child(1) { /* Strictly Free-to-Play Box */
  padding: 20px 0;
  margin-bottom: 15px;
  text-align: center;
  border-bottom: 2px dashed rgba(255, 255, 255, 0.2);
  border-top: 2px dashed rgba(255, 255, 255, 0.2);
}

.c55elc-copyright {
  margin-top: 15px;
  text-align: center;
  font-size: 0.78em;
  opacity: 0.75;
  line-height: 1.55;
  color: #ede9fe;
}

.c55elc-copyright a {
  color: #ede9fe;
  text-decoration: underline;
}

.c55elc-copyright a:hover {
  color: #fcd34d;
}

/* Trust Badges / Chips */
.c55elc-trust-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 20px;
  margin: 5px;
  transition: all 0.3s ease;
}

.c55elc-trust-badge:hover {
  background: rgba(139, 92, 246, 0.6); /* Primary Purple */
  color: #ffffff;
}

.c55elc-trust-badge svg {
  margin-right: 5px;
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* General Content Section Styling */
.c55elc-content-section {
  padding: 80px 20px;
  line-height: 1.8;
  font-size: 1.1rem;
  text-align: left; /* Default to left align for readability */
}

/* Hero Section - Asymmetric Split Layout */
.c55elc-hero {
  display: grid;
  grid-template-columns: minmax(300px, 1.2fr) minmax(300px, 0.8fr);
  align-items: center;
  padding: 140px 5% 100px 5%;
  gap: 60px;
  max-width: 1400px;
  margin: 0 auto;
  min-height: 600px; /* Ensure sufficient height */
  background-size: cover;
  background-position: center;
  background-attachment: fixed; /* For parallax effect */
}

.c55elc-hero-text {
  padding-right: 40px;
  text-align: left; /* Left align text */
}

.c55elc-hero-text h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1.1;
  color: #fcd34d; /* Accent Yellow */
  margin-bottom: 24px;
}

.c55elc-hero-text p {
  font-size: 1.2rem;
  opacity: 0.95;
  margin-bottom: 32px;
  color: #ede9fe;
}

.c55elc-hero-text .c55elc-trust-badge {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  margin-left: 0; /* Reset margin */
  margin-right: 10px;
}

.c55elc-hero-text .c55elc-trust-badge:hover {
  background: rgba(252, 211, 77, 0.7); /* Accent Yellow hover */
}

.c55elc-hero-image-container {
  position: relative;
  display: flex;
  justify-content: flex-end; /* Align image to the right */
}

.c55elc-hero-image {
  width: 100%;
  height: 600px; /* Fixed height for consistency */
  object-fit: cover;
  border-radius: 40px 0 40px 0;
  box-shadow: 20px 20px 0px rgba(0, 0, 0, 0.1); /* Subtle shadow */
  display: block; /* Ensure it's a block element */
}

/* Example of an absolutely positioned element for visual flair */
.c55elc-hero-image-container::after {
  content: '';
  position: absolute;
  top: 15%;
  left: -15%;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(236,72,153,0.6) 0%, rgba(236,72,153,0) 70%); /* Secondary Pink glow */
  border-radius: 50%;
  filter: blur(30px);
  z-index: -1;
}


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

.c55elc-game-card {
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex; /* Use flex to position content */
  flex-direction: column;
  justify-content: flex-end;
  background-color: rgba(139, 92, 246, 0.1); /* Primary Purple tint */
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.c55elc-game-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.c55elc-game-card .game-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

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

.c55elc-game-card .game-info {
  position: relative;
  z-index: 2;
  padding: 20px;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 70%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%; /* Ensure it takes full height for gradient */
  color: #fff;
}

.c55elc-game-card .game-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #fcd34d; /* Accent Yellow */
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.c55elc-game-card .game-description {
  font-size: 0.9rem;
  opacity: 0.85;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

/* Special Styling for First Card (Bento Box Effect) */
@media (min-width: 768px) {
  .c55elc-game-card:first-child {
    grid-column: span 2;
    grid-row: span 2;
  }
  .c55elc-game-card:first-child .game-info {
    padding: 30px;
  }
  .c55elc-game-card:first-child .game-title {
    font-size: 2rem;
  }
  .c55elc-game-card:first-child .game-description {
    font-size: 1rem;
  }
}

/* Button Styles */
.c55elc-btn {
  display: inline-block;
  padding: 15px 32px;
  border-radius: 50px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  background: linear-gradient(45deg, #fcd34d 0%, #facc15 100%); /* Accent Yellow gradient */
  color: #05061a; /* Dark text for contrast */
  box-shadow: 0 10px 20px rgba(252, 211, 77, 0.3); /* Accent Yellow shadow */
}

.c55elc-btn:hover {
  background: linear-gradient(45deg, #facc15 0%, #fcd34d 100%); /* Reversed gradient */
  box-shadow: 0 15px 25px rgba(252, 211, 77, 0.4);
  transform: translateY(-3px) scale(1.03);
}

/* Page Specific Section - e.g., About Us */
.c55elc-about-section {
  background: rgba(255, 255, 255, 0.03); /* Subtle background for distinction */
  border-radius: 24px;
  margin: 60px auto;
  max-width: 1200px;
  padding: 60px 40px;
  box-shadow: 0 0 50px rgba(139, 92, 246, 0.1); /* Primary Purple subtle glow */
}

.c55elc-about-section h2 {
  text-align: center;
  color: #ec4899; /* Secondary Pink */
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 30px;
}

.c55elc-about-section p {
  text-align: justify; /* Justify text for formal look */
  font-size: 1.15rem;
  opacity: 0.9;
}

.c55elc-about-section p:not(:last-child) {
  margin-bottom: 20px;
}

/* === MOBILE FIXES AND RESPONSIVENESS === */

/* === TABLET (≤1024px) === */
@media (max-width: 1024px) {
  .c55elc-hero {
    grid-template-columns: 1fr !important;
    flex-direction: column !important;
    padding: 80px 5% 60px !important;
    text-align: center !important;
    gap: 40px !important;
    min-height: unset !important;
    background-attachment: scroll !important; /* Disable fixed background on tablet */
  }
  .c55elc-hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.5rem) !important;
    margin-bottom: 16px !important;
  }
  .c55elc-hero p {
    font-size: 1.1rem !important;
  }
  .c55elc-hero-text {
    padding-right: 0 !important; /* Remove padding when stacked */
  }
  .c55elc-hero-image-container {
    justify-content: center !important; /* Center image */
    margin-top: 20px;
  }
  .c55elc-hero-image {
    height: 400px !important; /* Adjust height for tablet */
    border-radius: 24px 24px 0 0 !important; /* Adjust border-radius */
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15) !important; /* Adjust shadow */
  }
  .c55elc-hero .c55elc-trust-badge {
    margin: 5px auto !important; /* Center badges */
  }
  .c55elc-game-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) !important;
    gap: 20px !important;
    margin-top: 40px !important;
    margin-bottom: 40px !important;
  }
  .c55elc-game-card {
    border-radius: 16px !important;
  }
  .c55elc-game-card img {
    height: 180px !important;
  }
  .c55elc-btn {
    padding: 12px 28px !important;
    font-size: 0.85rem !important;
  }
  .c55elc-content-section {
    padding: 60px 20px !important;
    font-size: 1.05rem !important;
  }
  .c55elc-footer {
    padding: 40px 20px !important;
  }
  .c55elc-footer ul {
    gap: 20px !important;
  }
  .c55elc-footer p {
    font-size: 0.95rem !important;
  }
  /* Hide hamburger on tablet if desktop nav is visible */
  .c55elc-hamburger {
    display: none !important;
  }
  .c55elc-desktop-nav {
    display: flex !important; /* Ensure desktop nav is visible */
  }
}

/* === MOBILE (≤768px) === */
@media (max-width: 768px) {
  html, body {
    font-size: 15px; /* Base font size for mobile */
    overflow-x: hidden;
  }
  .c55elc-header {
    padding: 12px 16px !important;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.7); /* Slightly more opaque header */
    backdrop-filter: blur(15px);
  }
  .c55elc-logo span {
    font-size: 1.4rem;
  }
  .c55elc-desktop-nav {
    display: none !important; /* Hide desktop nav */
  }
  .c55elc-hamburger {
    display: flex !important; /* Show hamburger */
    font-size: 1.5rem;
    padding: 5px 8px;
    border-width: 1px;
  }
  .c55elc-header-right {
    gap: 10px;
  }
  .c55elc-age-flag {
    padding: 4px 10px;
    font-size: 0.85rem;
  }
  .c55elc-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;
  }
  .c55elc-hero h1, .c55elc-hero-text h1 {
    font-size: clamp(1.8rem, 7vw, 2.8rem) !important;
    line-height: 1.2 !important;
    margin-bottom: 16px !important;
  }
  .c55elc-hero p, .c55elc-hero-text p {
    font-size: 1rem !important;
    margin-bottom: 24px !important;
  }
  .c55elc-hero-image-container {
    margin-top: 10px;
    order: 1; /* Move image below text */
  }
  .c55elc-hero-image {
    height: 280px !important; /* Smaller image on mobile */
    border-radius: 12px 12px 0 0 !important; /* Adjust border-radius */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2) !important; /* Adjust shadow */
  }
  .c55elc-hero .c55elc-trust-badge {
    font-size: 0.75rem;
    padding: 5px 10px;
    margin: 4px auto !important;
  }
  .c55elc-game-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    padding: 0 12px !important;
    margin-top: 30px !important;
    margin-bottom: 30px !important;
  }
  .c55elc-game-card {
    border-radius: 12px !important;
  }
  .c55elc-game-card img {
    height: 150px !important; /* Smaller card image */
  }
  .c55elc-game-card .game-info {
    padding: 15px !important;
  }
  .c55elc-game-card .game-title {
    font-size: 1.2rem !important;
  }
  .c55elc-game-card .game-description {
    font-size: 0.85rem !important;
  }
  .c55elc-btn {
    padding: 10px 20px !important;
    font-size: 0.8rem !important;
  }
  .c55elc-content-section {
    padding: 40px 16px !important;
    font-size: 1rem !important;
    line-height: 1.7;
  }
  .c55elc-about-section {
    padding: 40px 20px !important;
    margin: 30px auto !important;
    border-radius: 16px !important;
  }
  .c55elc-about-section h2 {
    font-size: 2rem !important;
  }
  .c55elc-about-section p {
    font-size: 1.1rem !important;
  }
  .c55elc-footer {
    padding: 30px 16px !important;
    font-size: 0.85rem !important;
  }
  .c55elc-footer ul {
    flex-direction: column !important;
    gap: 10px !important;
    margin-bottom: 20px !important;
  }
  .c55elc-footer ul a {
    font-size: 1rem !important;
  }
  .c55elc-footer > div > div:nth-child(2) > div:nth-child(1),
  .c55elc-footer > div > div:nth-child(2) > div:nth-child(2) {
    padding: 15px 0 !important;
  }
  .c55elc-footer h4 {
    font-size: 1.1rem !important;
  }
  .c55elc-footer p {
    font-size: 0.9rem !important;
    text-align: left !important; /* Align footer text left on mobile */
  }
  .c55elc-copyright {
    font-size: 0.75em !important;
  }
  /* Ensure header elements don't overflow vertically */
  .c55elc-container {
    max-width: 100% !important;
  }
  /* Ensure any canvas elements fit */
  canvas {
    max-width: 100% !important;
    height: auto !important;
  }
}

/* === SMALL MOBILE (≤480px) === */
@media (max-width: 480px) {
  .c55elc-hero h1, .c55elc-hero-text h1 {
    font-size: clamp(1.6rem, 8vw, 2.4rem) !important;
  }
  .c55elc-hero p {
    font-size: 0.95rem !important;
  }
  .c55elc-hero-image {
    height: 220px !important; /* Even smaller for very small screens */
  }
  .c55elc-game-grid {
    grid-template-columns: 1fr !important; /* Single column on smallest screens */
  }
  .c55elc-game-card {
    border-radius: 12px !important;
  }
  .c55elc-game-card img {
    height: 180px !important; /* Adjusted height for single column cards */
  }
  .c55elc-btn {
    padding: 10px 18px !important;
    font-size: 0.75rem !important;
  }
  .c55elc-header-right {
    flex-wrap: nowrap; /* Prevent wrapping of age flag and hamburger */
  }
  .c55elc-logo span {
    display: none; /* Hide text logo on very small screens if needed */
  }
  .c55elc-logo svg {
    margin-right: 0;
  }
}

/* === DESKTOP ONLY: Specific overrides === */
@media (min-width: 769px) {
  .c55elc-hamburger {
    display: none !important; /* Ensure hamburger is hidden on desktop */
  }
  .c55elc-desktop-nav {
    display: flex !important; /* Ensure desktop nav is visible */
  }
  .c55elc-hero-image-container::after {
    /* Styles for visual flair on desktop */
    content: '';
    position: absolute;
    top: 10%;
    left: -10%;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(236,72,153,0.7) 0%, rgba(236,72,153,0) 70%);
    border-radius: 50%;
    filter: blur(40px);
    z-index: -1;
  }
}

/* Ensure footer sticks to the bottom */
html {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
body {
  flex: 1;
  display: flex;
  flex-direction: column;
}
main {
  flex: 1;
}