/* ===== HEADER NAV ===== */

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.main-nav {
  display: flex;
  gap: 16px;
}

.main-nav a {
  text-decoration: none;
  font-size: 14px;
  color: #222;
  font-weight: 500;
}

.main-nav a:hover {
  color: #0073e6;
}

/* Mobile */
@media (max-width: 768px) {
  .main-nav {
    gap: 10px;
    font-size: 13px;
    flex-wrap: wrap;
  }
}

/* ===== HOMEPAGE ===== */

.home-intro {
  margin: 20px 0 30px;
}

.home-intro h1 {
  font-size: 24px;
  margin-bottom: 10px;
}

.home-intro p {
  font-size: 15px;
  color: #444;
  max-width: 800px;
}

/* Games Grid */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

.game-card {
  text-decoration: none;
  color: #222;
}

.game-card .thumb img {
  width: 100%;
  border-radius: 6px;
  display: block;
}

.game-card .title {
  margin-top: 6px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
}

/* Categories */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 10px;
}

.category-card {
  display: block;
  padding: 14px;
  background: #f4f6f8;
  border-radius: 6px;
  text-align: center;
  font-weight: 500;
  color: #222;
  text-decoration: none;
}

.category-card:hover {
  background: #e9eef3;
}

/* Sections */
section {
  margin-bottom: 20px;
}

.game-card {
  background: #fff;
  border-radius: 8px;
  padding: 6px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.game-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.15);
}

.game-card .title {
  min-height: 36px;
}

section h2 {
  font-size: 20px;
  margin-bottom: 14px;
  border-left: 4px solid #0073e6;
  padding-left: 10px;
}

/* ===== GLOBAL CONTAINER ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

.home-intro {
  text-align: center;
}

.home-intro p {
  margin-left: auto;
  margin-right: auto;
}

section h2 {
  font-size: 20px;
  margin-bottom: 18px;
  text-align: center;
  position: relative;
}

section h2::after {
  content: "";
  width: 60px;
  height: 3px;
  background: #0073e6;
  display: block;
  margin: 8px auto 0;
  border-radius: 2px;
}

.games-grid {
  justify-items: center;
}

.category-grid {
  justify-items: center;
}


/* ===== LEFT ALIGNED TEXT, CENTERED LAYOUT ===== */

/* Hero / intro text */
.home-intro {
  text-align: left;
}

.home-intro p {
  margin-left: 0;
  margin-right: 0;
}

/* Section titles */
section h2 {
  text-align: left;
}

section h2::after {
  margin-left: 0;
  margin-right: auto;
}

section {
  padding-top: 10px;
}


/* ===== SPACING FIX ===== */

/* Reduce space between sections */
section {
  margin-bottom: 24px;
}

/* Reduce heading spacing */
section h2 {
  margin-bottom: 12px;
}

/* Reduce intro spacing */
.home-intro {
  margin-bottom: 20px;
}

/* Tighten grids */
.games-grid {
  gap: 14px;
}

.category-grid {
  gap: 10px;
}

/* Tighten cards slightly */
.game-card {
  padding: 4px;
}

.game-card .title {
  margin-top: 4px;
  font-size: 13px;
}

/* ===== CATEGORY BOTTOM POLISH ===== */

/* Reduce gap before categories */
.popular-categories {
  margin-top: 16px;
}

/* Make categories look secondary */
.popular-categories h2 {
  font-size: 18px;
  opacity: 0.9;
}

/* Tighter category buttons */
.category-grid {
  gap: 8px;
  margin-top: 10px;
}

.category-card {
  padding: 10px 14px;
  font-size: 14px;
  background: #f7f8fa;
}

/* Add breathing space before footer */
footer {
  margin-top: 30px;
}

/* GAME PLAYER CENTER ALIGN */
.game-player {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

/* IFRAME WRAPPER */
.game-iframe-wrapper {
  width: 100%;
  max-width: 960px;   /* ideal for desktop */
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
}

/* IFRAME ITSELF */
.game-iframe-wrapper iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}



/* PAGE GRID */
.game-page {
  display: grid;
  grid-template-columns: 260px 1fr 300px;
  gap: 20px;
  align-items: start;
}

/* CENTER COLUMN */
.game-main {
  display: flex;
  justify-content: center;
}

/* MOBILE FIX */
@media (max-width: 1024px) {
  .game-page {
    grid-template-columns: 1fr;
  }
}


.game-player {
  width: 100%;
  max-width: 960px;
  text-align: center;
}

.game-actions {
  margin-top: 12px;
  display: flex;
  justify-content: center;
}

#fullscreenBtn {
  padding: 10px 24px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-weight: 600;
}


/* CENTER GAME AREA */
.game-main {
  display: flex;
  justify-content: center;
  margin: 40px 0;
}

.game-player {
  width: 100%;
  max-width: 900px;
  background: #0f0f14;
  border-radius: 18px;
  padding: 20px;
}

/* IFRAME WRAPPER */
.game-iframe-wrapper {
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
}

.game-actions {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

#fullscreenBtn {
  padding: 12px 28px;
  border-radius: 999px;
  background: #6d4cff;
  color: #fff;
  border: none;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

#fullscreenBtn:hover {
  opacity: 0.9;
}

.game-description,
.how-to-play,
.game-faq {
  max-width: 1100px;
  margin: 60px auto;
  line-height: 1.8;
}

.game-description h2,
.how-to-play h2,
.game-faq h2 {
  font-size: 22px;
  margin-bottom: 14px;
}

@media (min-width: 1024px) {
  .content-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
  }
}

.game-title {
  text-align: center;
  margin-top: 30px;
  font-size: 36px;
}