/* ===============================
   GLOBAL
=============================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

body {
  background: #000;
  color: #fff;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ===============================
   HEADER
=============================== */
header {
  text-align: center;
  padding: 40px 20px 20px;
}

header h1 {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: 1px;
}

header p {
  color: #aaa;
  margin-top: 10px;
  font-size: 1rem;
}

/* ===============================
   TOP BAR: TAGS + SEARCH
=============================== */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 20px auto;
  padding: 0 20px;
  flex-wrap: wrap;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag {
  background: #111;
  border: 1px solid #222;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: 0.2s;
}

.tag:hover,
.tag.active {
  background: #fff;
  color: #000;
}

.search-box input {
  padding: 8px 14px;
  border-radius: 20px;
  border: none;
  background: #111;
  color: #fff;
  outline: none;
  width: 220px;
}

/* ===============================
   GAMES GRID
=============================== */
.games-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr); /* 10 per riga */
  gap: 12px;
  padding: 20px;
}

/* Link invisibile (serve solo per JS) */
.game-box a {
  display: none;
}
  
.game-box img {
  width: 100%;
  aspect-ratio: 1 / 1;   /* FORZA IL QUADRATO */
  object-fit: cover;    /* TAGLIA SENZA STORTARE */
  display: block;
  border-radius: 15px;
}




/*.game-box a {
  display: block;
  text-align: center;
  padding: 8px;
  
  margin: 0 10px 10px 10px;
  border-radius: 10px;
  transition: 0.2s;
}
*/

/* ===============================
   PAGINATION
=============================== */

#pagination {
  display: flex;
  justify-content: center; /* centro pagina */
  align-items: center;
  gap: 12px;
  margin: 40px auto;
  width: 100%;
}

/* Bottoni numeri */
#pagination button {
  background: transparent;   /* NO sfondo */
  border: none;              /* NO bordo */
  color: white;              /* bianco */
  font-size: 1rem;
  cursor: pointer;
  padding: 5px 8px;
  transition: 0.2s;
}

/* Hover */
#pagination button:hover {
  opacity: 0.7;
  text-decoration: underline;
}

/* Pagina attiva */
#pagination .active-page {
  font-weight: bold;
  text-decoration: underline;
}




/* ===============================
   FOOTER
=============================== */
footer {
  text-align: center;
  padding: 40px 20px;
  color: #777;
  font-size: 0.9rem;
  border-top: 1px solid #222;
  margin-top: 40px;
}

/* ===============================
   FOOTER LINKS
=============================== */

.footer-links {
  margin-top: 12px;
  font-size: 0.85rem;
}

.footer-links a {
  color: #fff;
  text-decoration: none;
  margin: 0 6px;
  transition: 0.2s;
}

.footer-links a:hover {
  text-decoration: underline;
  opacity: 0.8;
}




/* ===============================
   HAMBURGER MENU
=============================== */

.hamburger {
  position: fixed;
  top: 20px;
  left: 20px;
  width: 30px;
  height: 22px;
  cursor: pointer;
  z-index: 1001;
}

.hamburger span {
  display: block;
  height: 3px;
  background: white;
  margin: 5px 0;
  border-radius: 2px;
  transition: 0.3s;
}

/* Side menu */

.side-menu {
  position: fixed;
  top: 0;
  left: -260px;
  width: 260px;
  height: 100%;
  background: #0b0b0b;
  padding: 60px 20px;
  transition: 0.3s ease;
  z-index: 1000;
}

.side-menu.open {
  left: 0;
}

.side-menu h2 {
  margin-bottom: 25px;
  font-size: 1.4rem;
  text-align: center;
}

.side-menu a {
  display: block;
  padding: 12px 0;
  color: white;
  font-size: 1rem;
  border-bottom: 1px solid #222;
  transition: 0.2s;
}

.side-menu a:hover {
  opacity: 0.7;
}

/* Overlay */

.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  opacity: 0;
  pointer-events: none;
  transition: 0.3s;
  z-index: 999;
}

.menu-overlay.show {
  opacity: 1;
  pointer-events: auto;
}




/* ===============================
   RESPONSIVE
=============================== */
@media (max-width: 768px) {
  .search-box input {
    width: 150px;
  }
}

@media (max-width: 768px) {
  .games-grid {
    grid-template-columns: repeat(5, 1fr); /* mobile: 5 */
  }
}

@media (max-width: 480px) {
  .games-grid {
    grid-template-columns: repeat(3, 1fr); /* telefoni piccoli */
  }
}
