/* CSS Reset & Global Styles */
*, *::before, *::after {
  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;
  font-family: Calibri, Candara, Segoe, sans-serif;
  background-color: #06020e; /* Neon Tokyo BG */
  color: #ffe8f8; /* Neon Tokyo 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: #00ffff; /* Neon Tokyo Secondary */
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #ffff00; /* Neon Tokyo Accent */
}

/* Variables for Theme Colors */
:root {
  --body-bg-color: #06020e;
  --primary-color: #ff0080; /* Neon Tokyo Primary */
  --secondary-color: #00ffff; /* Neon Tokyo Secondary */
  --accent-color: #ffff00; /* Neon Tokyo Accent */
  --text-color: #ffe8f8;
  --text-muted-color: rgba(255, 232, 248, 0.7);
  --card-bg-color: rgba(0, 0, 0, 0.4);
  --border-color-soft: rgba(255, 255, 255, 0.1);
  --border-color-hard: #000;
}

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

/* Header */
.chihpb-header-l-r-r {
  background: rgba(0, 0, 0, 0.5); /* Semi-transparent dark */
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px;
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  box-sizing: border-box;
}

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

.chihpb-logo span {
  margin-left: 8px;
}

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

.chihpb-desktop-nav a {
  color: var(--text-color);
  font-weight: 500;
  transition: color 0.3s ease, text-decoration 0.3s ease;
}

.chihpb-desktop-nav a:hover {
  color: var(--accent-color);
  text-decoration: underline;
}

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

.chihpb-age-flag {
  display: flex;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.1);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-color);
}

.chihpb-hamburger {
  display: none; /* Hidden by default on desktop */
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 2px solid var(--text-color);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--text-color);
  transition: all 0.3s ease;
}

.chihpb-hamburger:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--text-color);
}

.chihpb-mobile-menu {
  display: none; /* Hidden by default */
  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;
  gap: 30px;
}

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

.chihpb-mobile-menu a {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-color);
  transition: color 0.3s ease;
}

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

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

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

/* Disclosure Bar */
#chihpb-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;
  position: sticky;
  top: 65px; /* Below header */
  z-index: 999;
}

/* Footer */
.chihpb-footer {
  padding: 50px 20px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.3), transparent);
  margin-top: auto; /* Push footer to bottom */
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.chihpb-footer h3 {
  margin-bottom: 20px;
  opacity: 0.8;
  font-size: 1.8rem;
  color: var(--primary-color);
}

.chihpb-footer ul {
  display: flex;
  gap: 25px;
  list-style: none;
  padding: 0;
  margin-bottom: 30px;
  flex-wrap: wrap;
  justify-content: center;
  border-bottom: 1px solid rgba(150, 150, 150, 0.2);
  padding-bottom: 20px;
}

.chihpb-footer li {
  font-size: 1rem;
}

.chihpb-footer a {
  color: var(--text-color);
  opacity: 0.9;
  transition: color 0.3s ease;
}

.chihpb-footer a:hover {
  color: var(--accent-color);
}

.chihpb-footer-contact p {
  margin-bottom: 5px;
  font-size: 0.95em;
  text-align: left;
}

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

.chihpb-footer > div > div:first-of-type {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 15px;
  margin-top: 15px;
  width: 100%;
}

.chihpb-footer h4 {
  margin: 0 0 5px 0;
  color: #ffeb3b;
  font-size: 1.1em;
  text-transform: uppercase;
}

.chihpb-footer p:not(.chihpb-copyright) {
  margin: 10px 0;
  font-weight: bold;
  font-size: 1.2em;
  color: var(--text-color);
}

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

.chihpb-footer a[rel="nofollow"] {
  text-decoration: underline;
  color: inherit;
}

.chihpb-footer > div > div:nth-of-type(2) {
  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;
}

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

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

/* Content Section */
.chihpb-content-section {
  padding: 80px 20px;
  line-height: 1.8;
  font-size: 1.1rem;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.chihpb-content-section h2 {
  font-size: 2.5rem;
  margin-bottom: 30px;
  color: var(--primary-color);
  text-shadow: 0 0 15px rgba(255, 0, 128, 0.5);
}

.chihpb-content-section p {
  margin-bottom: 20px;
  opacity: 0.9;
}

/* Hero Layout - REVERSE-STACKED */
.chihpb-hero {
  display: flex;
  flex-wrap: wrap-reverse;
  justify-content: center;
  align-items: center;
  padding: 20px 5%;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  min-height: 600px; /* Ensure ample height for visual impact */
  gap: 60px;
  background-attachment: fixed; /* Parallax effect */
  background-size: cover;
  background-position: center center;
  border-radius: 24px;
}

.chihpb-hero-image {
  flex: 1;
  min-width: 350px;
  max-width: 500px; /* Slightly reduced max-width for better balance */
  z-index: 1;
  position: relative; /* For pseudo-elements */
}

.chihpb-hero-image img {
  width: 100%;
  aspect-ratio: 1/1; /* Square aspect ratio for hero image */
  object-fit: cover;
  border-radius: 50%;
  border: 15px solid var(--body-bg-color);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3), 0 0 0 15px var(--secondary-color); /* Double glow effect */
}

.chihpb-hero-text {
  flex: 1.5;
  min-width: 350px;
  padding-left: 50px;
  z-index: 2;
  text-align: left;
}

.chihpb-hero-text h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1.1;
  margin-bottom: 20px;
  color: var(--primary-color);
  text-shadow: 0 0 25px rgba(255, 0, 128, 0.6);
}

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

.chihpb-hero-cta-container {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-top: 30px;
}

/* Button Style */
.chihpb-btn {
  display: inline-block;
  padding: 15px 35px;
  border-radius: 50px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  font-size: 1.05rem;
  transition: all 0.3s ease, transform 0.2s ease-out;
  border: none;
  cursor: pointer;
  text-align: center;
  box-shadow: 0 10px 25px rgba(255, 0, 128, 0.4);
  background: linear-gradient(45deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: #fff;
}

.chihpb-btn:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 15px 35px rgba(255, 0, 128, 0.6), 0 5px 15px rgba(0, 255, 255, 0.3);
  color: #fff; /* Ensure text remains white on hover */
}

.chihpb-btn-secondary {
  background: transparent;
  border: 2px solid var(--secondary-color);
  color: var(--secondary-color);
}

.chihpb-btn-secondary:hover {
  background: var(--secondary-color);
  color: var(--body-bg-color);
  box-shadow: 0 10px 25px rgba(0, 255, 255, 0.4);
  transform: translateY(-5px) scale(1.05);
}

/* Game Grid - NEO-BRUTALIST ARCHITECTURE */
.chihpb-game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 40px;
  max-width: 1300px;
  margin: 60px auto;
  padding: 0 20px;
}

.chihpb-game-card {
  background-color: var(--card-bg-color);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 6px solid #000; /* Hard Black Border */
  box-shadow: 12px 12px 0px #000; /* Hard Drop Shadow */
  display: flex;
  flex-direction: column; /* For content inside card */
}

.chihpb-game-card:hover {
  transform: translateY(-8px) scale(1.02); /* Slight lift and scale */
  box-shadow: 20px 20px 0px #000; /* Increased drop shadow on hover */
}

.chihpb-game-card img {
  width: 100%;
  height: 240px; /* Consistent image height */
  object-fit: cover;
  border-bottom: 6px solid var(--border-color-hard); /* Match card border */
  filter: grayscale(20%) contrast(120%); /* Slightly stylized image */
}

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

.chihpb-game-card-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--accent-color);
  text-shadow: 0 0 10px rgba(255, 235, 59, 0.7);
}

.chihpb-game-card-description {
  font-size: 0.95rem;
  color: var(--text-muted-color);
  opacity: 0.9;
  margin-bottom: 15px;
}

.chihpb-game-card-play-btn {
  margin-top: auto; /* Pushes button to bottom if content is short */
  background: linear-gradient(45deg, var(--secondary-color) 0%, var(--accent-color) 100%);
  color: #06020e; /* Dark text for contrast */
  box-shadow: 0 8px 20px rgba(0, 255, 255, 0.4);
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 600;
}

.chihpb-game-card-play-btn:hover {
  background: linear-gradient(45deg, var(--accent-color) 0%, var(--secondary-color) 100%);
  box-shadow: 0 12px 30px rgba(255, 235, 59, 0.5);
  color: #06020e;
  transform: translateY(-3px) scale(1.03);
}

/* Trust Badges */
.chihpb-trust-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 255, 255, 0.15);
  color: var(--secondary-color);
  padding: 6px 14px;
  border-radius: 25px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-right: 8px;
  border: 1px solid rgba(0, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.chihpb-trust-badge svg {
  margin-right: 5px;
  width: 16px;
  height: 16px;
  fill: var(--secondary-color);
}

/* === TABLET (≤1024px) === */
@media (max-width: 1024px) {
  .chihpb-hero {
    grid-template-columns: 1fr !important;
    flex-direction: column !important;
    padding: 80px 5% 60px !important;
    gap: 40px !important;
    min-height: unset !important;
  }
  .chihpb-hero h1 {
    font-size: clamp(1.8rem, 5vw, 3rem) !important;
    text-align: center !important;
  }
  .chihpb-hero p {
    text-align: center !important;
  }
  .chihpb-hero-image {
    max-width: 350px; /* Smaller on tablet */
    margin: 0 auto;
  }
  .chihpb-hero-text {
    padding-left: 0 !important;
    text-align: center !important;
  }
  .chihpb-hero-cta-container {
    justify-content: center !important;
  }
  .chihpb-game-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important;
    gap: 24px !important;
    margin-top: 40px;
  }
}

/* === MOBILE (≤768px) === */
@media (max-width: 768px) {
  html, body {
    font-size: 15px;
  }
  .chihpb-header {
    padding: 12px 16px !important;
    position: sticky;
    top: 0;
    z-index: 100;
  }
  .chihpb-desktop-nav {
    display: none !important;
  }
  .chihpb-hamburger {
    display: flex !important;
  }
  .chihpb-hero {
    padding: 60px 16px 40px !important;
    text-align: center !important;
    gap: 24px !important;
    min-height: unset !important;
    background-attachment: scroll !important; /* Disable parallax on mobile */
    border-radius: 0; /* Full width */
  }
  .chihpb-hero h1, .chihpb-hero-text h1 {
    font-size: clamp(1.6rem, 7vw, 2.4rem) !important;
    line-height: 1.2 !important;
    margin-bottom: 16px !important;
  }
  .chihpb-hero p, .chihpb-hero-text p {
    font-size: 1rem !important;
  }
  .chihpb-hero-image {
    display: none !important; /* Hide image on small mobile */
  }
  .chihpb-hero img {
    display: none !important;
  }
  .chihpb-hero-cta-container {
    flex-direction: column !important;
    gap: 15px !important;
    margin-top: 20px;
  }
  .chihpb-btn, .chihpb-btn-secondary {
    width: 100% !important;
    max-width: 300px; /* Limit button width */
  }
  .chihpb-game-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    padding: 0 12px !important;
    margin-top: 30px;
  }
  .chihpb-game-card {
    border-radius: 12px !important;
    border-width: 4px;
    box-shadow: 8px 8px 0px #000;
  }
  .chihpb-game-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 12px 12px 0px #000;
  }
  .chihpb-game-card img {
    height: 140px !important;
    border-bottom-width: 4px;
  }
  .chihpb-game-card-content {
    padding: 15px !important;
  }
  .chihpb-game-card-title {
    font-size: 1.2rem !important;
  }
  .chihpb-game-card-description {
    font-size: 0.9rem !important;
  }
  .chihpb-game-card-play-btn {
    padding: 8px 15px !important;
    font-size: 0.85rem !important;
  }
  .chihpb-content-section {
    padding: 40px 16px !important;
    font-size: 1rem !important;
  }
  .chihpb-content-section h2 {
    font-size: 2rem !important;
  }
  .chihpb-footer {
    padding: 30px 16px !important;
    font-size: 0.85rem !important;
  }
  .chihpb-footer h3 {
    font-size: 1.5rem !important;
  }
  .chihpb-footer ul {
    flex-direction: column !important;
    gap: 10px !important;
  }
  .chihpb-footer p {
    text-align: center !important;
  }
  .chihpb-footer > div > div:nth-of-type(2) {
    text-align: center !important;
  }
  canvas {
    max-width: 100% !important;
    height: auto !important;
  }
  img, video, iframe {
    max-width: 100% !important;
  }
  #chihpb-disclosure-bar {
    font-size: 0.7rem;
    padding: 5px 10px;
    top: 55px; /* Adjust for thinner header */
  }
}

/* === SMALL MOBILE (≤480px) === */
@media (max-width: 480px) {
  .chihpb-hero h1, .chihpb-hero-text h1 {
    font-size: clamp(1.4rem, 8vw, 2rem) !important;
  }
  .chihpb-game-grid {
    grid-template-columns: 1fr !important; /* Single column on very small screens */
  }
  .chihpb-game-card img {
    height: 180px !important;
  }
  .chihpb-btn, .chihpb-btn-secondary {
    font-size: 1rem !important;
    padding: 12px 24px !important;
  }
}

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