


/* ===============================
   GLOBAL
=============================== */

h1 {
  font-display: swap;
}




body {
  margin: 0;
  background: #0b0f1a;
  color: #ffffff;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ===============================
   HEADER (CATEGORY | LOGO | SEARCH)
=============================== */

header {
  background: linear-gradient(90deg, #020a18, #050d25);
  position: sticky;

  top: env(safe-area-inset-top); /* ✅ REAL FIX */
  padding-top: 8px;             /* ✅ VISUAL GAP */

  z-index: 1000;
  width: 100%;
}

.header-bar {
  max-width: 1280px;
  margin: 0 auto;

  padding: 14px 16px 12px; /* ✅ ADDED TOP GAP */

  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}


header::after {
  content: "";
  display: block;
  height: 1px;
  background: rgba(255,255,255,0.05);
}

/* LEFT NAV */
.nav-left {
  display: flex;
  gap: 14px;
}

.nav-left a {
  color: #5ffcff;
  font-size: 14px;
  transition: color .2s ease;
}

.nav-left a:hover {
  color: #ffffff;
}

/* CENTER LOGO */
.logo-center {
  font-size: 22px;
  font-weight: bold;
  color: #ff4d4d;
  text-align: center;
  white-space: nowrap;
}

/* RIGHT SEARCH */
.header-search {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.header-search input {
  background: #0f1324;
  border: none;
  padding: 8px 14px;
  border-radius: 20px;
  color: #fff;
  width: 180px;
}

.header-search button {
  background: #7f00ff;
  border: none;
  padding: 8px 14px;
  border-radius: 20px;
  color: #fff;
  cursor: pointer;
}

/* MOBILE HEADER */
@media (max-width: 768px) {
  .header-bar {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .nav-left {
    justify-content: center;
    flex-wrap: wrap;
  }

  .logo-center {
    order: -1;
  }

  .header-search {
    justify-content: center;
  }

  .header-search input {
    width: 100%;
    max-width: 240px;
  }
}

/* ===============================
   CENTERED PAGE LAYOUT
=============================== */

.page-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 1600px) {
  .page-wrap {
    max-width: 1400px;
  }
}

/* ===============================
   HOME HERO (TITLE AREA)
=============================== */

.home-hero {
  padding: 36px 16px 28px;
}

.home-hero h1 {
  max-width: 1280px;
  margin: 0 auto;
  font-size: 34px;
  font-weight: 700;
  line-height: 1.2;
}

@media (min-width: 1024px) {
  .home-hero {
    padding-bottom: 40px;
  }
}

@media (max-width: 768px) {
  .home-hero h1 {
    font-size: 26px;
  }
}

@media (max-width: 480px) {
  .home-hero {
    padding: 24px 16px 20px;
  }

  .home-hero h1 {
    font-size: 22px;
  }
}

/* ===============================
   HOMEPAGE GRID
=============================== */

main.grid {
  display: grid;
  gap: 22px;
  padding: 0;
  margin-top: 20px;
}

@media (min-width: 1200px) {
  main.grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

@media (max-width: 1199px) {
  main.grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (max-width: 992px) {
  main.grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 600px) {
  main.grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===============================
   GAME CARDS
=============================== */

.card {
  background: #0f1324;
  border-radius: 16px;
  overflow: hidden;
  padding-bottom: 6px;
  transition: transform .2s ease, box-shadow .2s ease;
}

.card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

@media (min-width: 1200px) {
  .card img {
    aspect-ratio: 16 / 10;
  }
}

.card h3 {
  margin: 8px 10px 6px;
  font-size: 14px;
  color: #c8b6ff;
  line-height: 1.3;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 20px rgba(130,80,255,.45);
}

.card:hover h3 {
  color: #ffffff;
}

/* ===============================
   GAME FRAME
=============================== */

.game-frame {
  position: relative;
  max-width: 1100px;
  margin: 20px auto 14px;
  height: 74vh;
  background: #000;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(130,80,255,.35);
}

.game-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 768px) {
  .game-frame {
    max-width: 95%;
    height: 56vh;
  }
}

@media (max-width: 480px) {
  .game-frame {
    max-width: 100%;
    height: 44vh;
    border-radius: 14px;
  }
}

/* ===============================
   GAME ACTIONS
=============================== */

.actions {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px auto 28px;
  max-width: 1100px;
}

.actions button,
.actions span {
  background: #00ffff;
  color: #000;
  border: none;
  padding: 6px 12px;
  font-size: 14px;
  border-radius: 8px;
}

.actions button:hover {
  background: #7f00ff;
  color: #fff;
}

/* ===============================
   CONTENT SECTIONS
=============================== */

.game-section {
  padding: 30px 16px;
}

.game-section h2 {
  margin-bottom: 15px;
  font-size: 22px;
}

.game-section p {
  line-height: 1.6;
  color: #d6d6e0;
}

/* ===============================
   RELATED / POPULAR GRID
=============================== */

.game-row {
  display: grid;
  gap: 14px;
}

@media (min-width: 1024px) {
  .game-row {
    grid-template-columns: repeat(7, 1fr);
  }
}

@media (max-width: 1023px) {
  .game-row {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 600px) {
  .game-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===============================
   MINI CARDS
=============================== */

.mini-card {
  background: #0f1324;
  border-radius: 12px;
  overflow: hidden;
  text-align: center;
  transition: transform .2s ease, box-shadow .2s ease;
}

.mini-card img {
  width: 100%;
  height: 100px;
  object-fit: cover;
}

.mini-card span {
  display: block;
  padding: 8px;
  font-size: 13px;
  color: #dddddd;
}

.mini-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 20px rgba(130,80,255,.4);
}

/* ===============================
   LOAD MORE
=============================== */

.load-more-wrap {
  text-align: center;
  margin: 30px 0;
}

#loadMoreBtn {
  background: linear-gradient(135deg, #7f00ff, #e100ff);
  color: #fff;
  border: none;
  padding: 12px 34px;
  font-size: 16px;
  border-radius: 30px;
  cursor: pointer;
  box-shadow: 0 0 25px rgba(160,80,255,.4);
}

#loadMoreBtn:hover {
  opacity: 0.9;
}

/* ===============================
   FOOTER
=============================== */

footer {
  background: #020a18;
  padding: 28px 16px;
}

footer .footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

footer a {
  color: #aaaaaa;
  font-size: 14px;
}

footer a:hover {
  color: #ffffff;
}

.footer-copy {
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
  color: #777;
}

/* ===============================
   SEO TEXT (ALIGNED WITH GAMES)
=============================== */

.seo {
  padding: 30px 16px 0;
  color: #bbbbbb;
  font-size: 14px;
  line-height: 1.6;

  max-width: 1280px;     /* SAME AS PAGE */
  margin: 0 auto;        /* SAME CONTAINER */
  text-align: left;      /* ⬅ IMPORTANT */
}


/* ===============================
   ADS
=============================== */

.ad {
  text-align: center;
  margin: 16px auto;
  max-width: 1100px;
  color: #aaa;
  font-size: 14px;
}


/* ===============================
   MORE CATEGORIES DROPDOWN
=============================== */

.nav-more {
  position: relative;
}

.more-btn {
  color: #5ffcff;
  font-size: 14px;
  cursor: pointer;
  padding: 6px 2px;
}

.more-btn:hover {
  color: #ffffff;
}

.more-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: #0f1324;
  border-radius: 12px;
  padding: 10px 0;
  width: 240px;
  max-height: 420px;
  overflow-y: auto;
  display: none;
  box-shadow: 0 15px 40px rgba(0,0,0,0.6);
  z-index: 3000;
}

.more-dropdown a {
  display: block;
  padding: 8px 16px;
  font-size: 14px;
  color: #dddddd;
  white-space: nowrap;
}

.more-dropdown a:hover {
  background: rgba(127,0,255,0.15);
  color: #ffffff;
}

/* Desktop hover */
.nav-more:hover .more-dropdown {
  display: block;
}

/* Mobile tap */
@media (max-width: 768px) {
  .nav-more {
    width: 100%;
    text-align: center;
  }

  .more-dropdown {
    position: static;
    width: 100%;
    max-height: 300px;
    display: none;
  }

  .nav-more.open .more-dropdown {
    display: block;
  }
}

/* ===============================
   FORCE MOBILE VIEW FIX
=============================== */

@media (max-width: 768px) {

  /* Header layout fix */
  .header-bar {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 10px;
  }

  /* Categories */
  .nav-left {
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
  }

  /* Logo */
  .logo-center {
    order: -1;
    font-size: 20px;
  }

  /* Search */
  .header-search {
    width: 100%;
    justify-content: center;
  }

  .header-search input {
    width: 90%;
    max-width: 260px;
  }

  /* More categories dropdown full width */
  .more-dropdown {
    width: 100% !important;
    max-height: 300px;
  }
}

@media (max-width: 600px) {
  body {
    overflow-x: hidden;
  }

  main.grid {
    padding-left: 0;
    padding-right: 0;
  }
}

.card {
  display: none;
}

.card {
  display: block;
}



/* ===============================
   CONTACT FORM
=============================== */

.contact-form label {
  display: block;
  margin-bottom: 14px;
  font-size: 14px;
  color: #ddd;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 10px 12px;
  margin-top: 6px;
  border-radius: 8px;
  border: none;
  background: #0f1324;
  color: #fff;
  font-size: 14px;
}

.contact-form textarea {
  resize: vertical;
}

.contact-form button {
  margin-top: 10px;
  background: linear-gradient(135deg,#7f00ff,#e100ff);
  border: none;
  padding: 10px 28px;
  border-radius: 30px;
  color: #fff;
  font-size: 15px;
  cursor: pointer;
}

.contact-form button:hover {
  opacity: 0.9;
}

.home-intro {
  max-width: 900px;
  margin: 10px auto 24px;
  color: #d6d6e0;
  font-size: 16px;
  line-height: 1.6;
}

.game-title {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #ffffff;
  text-align: center;
  line-height: 1.4;
}

.card:hover .game-title {
  color: #a78bfa;
}

/* Accessibility fix: Footer contrast */
footer,
.footer-copy {
  color: #e5e7eb; /* light gray */
}

footer a {
  color: #ffffff;
}

footer a:hover {
  color: #a78bfa;
}

.game-categories {
  margin: 24px 0;
}

.game-categories h3 {
  font-size: 18px;
  margin-bottom: 10px;
  color: #ffffff;
}

.category-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-tag {
  background: linear-gradient(135deg, #7b2cff, #a855f7);
  color: #fff;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.category-tag:hover {
  background: linear-gradient(135deg, #9333ea, #c084fc);
  transform: translateY(-1px);
}




.game-title-main {
  display: block;
  width: 100%;
  max-width: 900px;

  margin: 24px auto 16px auto; /* 👈 THIS centers it */
  padding: 0 16px;

  text-align: center;
  font-size: 32px;
  font-weight: 700;
  color: #ffffff;
}



/* GAME FRAME */
.game-frame {
  position: relative;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto 30px;
  aspect-ratio: 16 / 9;
  border-radius: 24px;
  background: radial-gradient(
    circle at center,
    #9b6bff 0%,
    #7a4dff 35%,
    #3a1b7a 70%,
    #12002b 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 60px rgba(155, 107, 255, 0.45);
  overflow: hidden;
}

/* PLAY BUTTON */
.play-btn {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 20px 50px;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #00ffd5, #7cf7ff);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow:
    0 0 25px rgba(0, 255, 213, 0.6),
    0 0 60px rgba(0, 255, 213, 0.4);
  transition: all 0.25s ease;
}

/* HOVER EFFECT */
.play-btn:hover {
  transform: scale(1.08);
  box-shadow:
    0 0 40px rgba(0, 255, 213, 0.8),
    0 0 90px rgba(0, 255, 213, 0.6);
}

/* SUBTLE PULSE ANIMATION */
.play-btn::after {
  content: "";
  position: absolute;
  inset: -15px;
  border-radius: inherit;
  background: rgba(0, 255, 213, 0.15);
  animation: pulse 2.2s infinite;
  z-index: -1;
}

@keyframes pulse {
  0%   { transform: scale(0.95); opacity: 0.7; }
  70%  { transform: scale(1.15); opacity: 0; }
  100% { transform: scale(1.15); opacity: 0; }
}



.site-logo {
  height: 42px;
  width: auto;
  display: block;
}

@media (max-width: 768px) {
  .site-logo {
    height: 36px;
  }
}
