/* ======================================
   BASE COLORS & FONTS
   ====================================== */
:root {
  /* Switch to a more muted, modern palette */
  --primary-color: #1E293B;
  /* A dark slate/blue */
  --secondary-color: #3B82F6;
  /* A bright accent blue */
  --background-color: #F8FAFC;
  /* Light gray/blue background */
  --text-color: #1F2937;
  /* Dark gray for text */
  --accent-color: #EF4444;
  /* Red accent color (optional) */

  /* Font sizing & spacing variables (optional) */
  --base-font-size: 16px;
  --base-line-height: 1.6;
  --heading-font-family: "Poppins", sans-serif;
  /* Modern heading font */
  --body-font-family: "Inter", sans-serif;
  /* Modern body font */
}

/* Import modern Google Fonts (Optional) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Poppins:wght@600;700&display=swap');

/* Reset some default browser styles */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  background-color: var(--background-color);
  font-family: var(--body-font-family);
  color: var(--text-color);
  font-size: var(--base-font-size);
  line-height: var(--base-line-height);
  overflow-x: hidden;
}

/* Site wrapper for full-page layout */
.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ======================================
     NAVIGATION
     ====================================== */
nav {
  background-color: var(--primary-color);
  padding: 1rem 2rem;
  display: flex;
  /* align-items: center; */
  justify-content: space-between;
}

/* Brand (logo) */
.nav-brand {
  display: flex;
  /* align-items: center; */
  color: #fff;
  font-size: 1.25rem;
  font-weight: 600;
  text-decoration: none;
  gap: 0.5rem;
}

.nav-brand img {
  width: 40px;
  height: auto;
}

.nav-links {
  display: flex;
  gap: 1rem;
}

.nav-links a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  transition: color 0.3s, background-color 0.3s;
  border-radius: 0.375rem;
  /* 6px for a smoother, modern radius */
}

.nav-links a:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Mobile navigation */
@media (max-width: 768px) {
  nav {
    flex-wrap: wrap;
    /* justify-content: center; */
  }

  .nav-links {
    flex-wrap: wrap;
    /* justify-content: center; */
    margin-top: 1rem;
  }
}

/* ======================================
     HERO SECTION
     ====================================== */
.hero-section {
  background-color: var(--primary-color);
  color: #fff;
  padding: 1rem 2rem;
  text-align: center;
}

.hero-section h1 {
  font-family: var(--heading-font-family);
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero-section p {
  font-size: 1.125rem;
  /* 18px */
  max-width: 600px;
  margin: 0.75rem auto;
  line-height: 1.5;
}

/* ======================================
     MAIN CONTENT
     ====================================== */
.main-content {
  flex: 1;
  padding: 2rem;
}

/* ======================================
     HOME CONTENT - Horizontal Sections
     ====================================== */
.home-content {
  display: flex;
  flex-direction: column;
}

.content-section {
  width: 100%;
  padding: 3rem 1rem;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  /* centers .content-wrapper horizontally */
}

.blue-bg {
  background-color: var(--secondary-color);
  color: #fff;
}

.white-bg {
  background-color: #fff;
  color: var(--text-color);
}

.content-wrapper {
  display: flex;
  align-items: center;
  max-width: 1200px;
  width: 100%;
  gap: 2rem;
}

.content-image,
.content-text {
  flex: 1;
}

.content-image img {
  width: 100%;
  height: auto;
  border-radius: 0.5rem;
}

.content-text h2 {
  font-family: var(--heading-font-family);
  font-weight: 600;
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.content-text p {
  margin-bottom: 1rem;
  line-height: 1.6;
  font-size: 1rem;
}

/* Invert text on blue section for contrast */
.blue-bg .content-text h2,
.blue-bg .content-text p {
  color: #fff;
}

/* Responsive: stack image & text vertically on smaller screens */
@media (max-width: 768px) {
  .content-wrapper {
    flex-direction: column;
    text-align: center;
  }
}

/* ======================================
     LATEST RELEASE SECTION
     ====================================== */
.latest-release-section {
  background-color: var(--primary-color);
  color: #fff;
  text-align: center;
  padding: 3rem 1rem;
}

.release-wrapper {
  max-width: 900px;
  margin: 0 auto;
}

.release-text h2 {
  font-family: var(--heading-font-family);
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.release-text p {
  font-size: 1.125rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

/* ======================================
     GAME SECTION
     ====================================== */
.game-section {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.game-container {
  max-width: 500px;
  width: 100%;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

#phaser-container {
  aspect-ratio: 2 / 3;
  width: 100%;
  max-width: 100%;
  max-height: 100%;
}

/* ======================================
     FOOTER
     ====================================== */
footer {
  background-color: var(--primary-color);
  color: #fff;
  padding: 2rem 1rem;
  text-align: center;
  font-size: 0.9rem;
}

footer p {
  margin: 0.25rem 0;
}

footer a {
  color: #fff;
  text-decoration: underline;
}

/* ======================================
     BUTTON STYLES
     ====================================== */
button {
  background-color: var(--secondary-color);
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0.375rem;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
  font-family: var(--body-font-family);
}

button:hover {
  background-color: var(--primary-color);
  transform: translateY(-1px);
}

button:active {
  background-color: var(--accent-color);
  transform: translateY(0);
}

/* ======================================
     GENERIC CONTENT CARDS (Optional usage)
     ====================================== */
.content-card {
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
  padding: 2rem;
  margin: 2rem auto;
  max-width: 800px;
}

.content-card h2 {
  margin-bottom: 0.75rem;
  font-family: var(--heading-font-family);
  font-size: 1.5rem;
}

.content-card p {
  margin-bottom: 1rem;
  line-height: 1.6;
}

/* ======================================
   GAME LIST & CARD ENHANCEMENTS
   ====================================== */

/* Use a grid layout or keep the flex layout.
   Below is a grid example that flows better on mobile. 
   If you'd rather keep your flex-based layout, just
   comment out the grid lines and keep the rest. */
.game-list {
  display: grid;
  /* Each card will auto-size up to min 250px, then fill the row */
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  justify-items: center;
  /* centers the cards in each grid cell */
  margin-top: 2rem;
  /* keep or adjust as needed */
}

/* Trendy card hover effect and a more square shape. */
.game-card {
  width: 100%;
  /* Let the grid determine width, or keep a fixed width if you prefer */
  max-width: 350px;
  /* an upper limit to match your design */
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
  background: #fff;

  /* Add an interactive feel on hover */
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.game-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}

/* Make images fill a consistent height, 
     cropped as a "rounded square" on top corners. */
.game-card img {
  width: 100%;
  height: 200px;
  /* or 220px/250px if you want a taller image */
  object-fit: cover;
  border-radius: 1rem 1rem 0 0;
  /* top corners only */
}

/* Keep minimal textual info so it's mostly visual. */
.game-card-content {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  /* If you want even less text:
       remove or comment out the paragraph, or 
       set .game-card-content p { display: none; } */
}

/* Adjust text & button styling to keep it clean and short. */
.game-card-content h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.3;
}

.game-card-content p {
  margin: 0;
  /* Minimizing spacing */
  font-size: 0.9rem;
  color: #666;
  line-height: 1.4;
  /* If you want to hide text completely, comment out or remove. */
}

.game-card-content button {
  align-self: flex-start;
  margin-top: 0.5rem;
}


/* Hide default checkbox input used for toggle */
#menu-toggle {
  display: none;
}

/* Hide hamburger by default on desktop */
.menu-icon {
  display: none;
}

@media (max-width: 768px) {

  /* Wrapper for the 3 lines (hamburger) */
  .menu-icon {
    display: block;
    position: relative;
    width: 30px;
    /* total width of the hamburger */
    height: 24px;
    /* total height to hold the 3 lines */
    cursor: pointer;
    /* Optional: remove top/bottom margin if you want it perfectly centered */
  }

  /* Each bar is absolutely positioned at a known top Y */
  .menu-icon div {
    position: absolute;
    left: 0;
    width: 100%;
    /* 30px in this example */
    height: 3px;
    /* thickness of each bar */
    background-color: #fff;
    transform-origin: center;
    /* pivot around the bar’s center */
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  /* Top bar at top=0, middle bar at top=10px, bottom bar at top=20px */
  .menu-icon div:nth-child(1) {
    top: 0px;
  }

  .menu-icon div:nth-child(2) {
    top: 10px;
  }

  .menu-icon div:nth-child(3) {
    top: 20px;
  }

  /* When checked, top bar slides down half the total space (10px) and rotates 45deg */
  #menu-toggle:checked~.menu-icon div:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
  }

  /* Middle bar disappears */
  #menu-toggle:checked~.menu-icon div:nth-child(2) {
    opacity: 0;
  }

  /* Bottom bar slides up 10px and rotates -45deg */
  #menu-toggle:checked~.menu-icon div:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
  }

  /* Hide the nav-links by default on mobile */
  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    margin-top: 1rem;
  }

  /* Show links when #menu-toggle is checked */
  #menu-toggle:checked~.nav-links {
    display: flex;
  }
}