/* ------------------------------------
   GLOBAL
------------------------------------- */
html,
body {
  margin: 0;
  padding: 0;
  background: #111;
  color: #eee;
  font-family: Arial, sans-serif;
}

a {
  text-decoration: none;
  color: #f5b700;
}

/* ------------------------------------
 HEADER
------------------------------------- */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #222;
  padding: 15px 25px;
  border-bottom: 1px solid #333;
  position: sticky;
  top: 0;
  z-index: 10;
}

header .logo {
  font-size: 22px;
  font-weight: bold;
  color: #f5b700;
}

header nav a {
  margin-left: 20px;
  color: #f5b700;
}

/* ------------------------------------
 LAYOUT WRAPPER
------------------------------------- */
#layout {
  display: grid;
  grid-template-columns: 240px 1fr 240px; /* SIDEBAR - MAIN - SIDEBAR */
  width: 100%;
  flex: 1;
  /* height: calc(100vh - 120px); */
}

/* Left sidebar */
.sidebar-left {
  background: #1a1a1a;
  padding: 20px;
  border-right: 1px solid #333;
}

/* Right sidebar */
.sidebar-right {
  background: #1a1a1a;
  padding: 20px;
  border-left: 1px solid #333;
}

/* ------------------------------------
 SIDEBAR
------------------------------------- */
aside {
  background: #1a1a1a;
  padding: 20px;
  border-right: 1px solid #333;
}

aside h3 {
  margin-top: 0;
  color: #f5b700;
}

aside ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

aside li {
  margin-bottom: 10px;
}

aside a {
  color: #ccc;
  font-size: 15px;
}

/* ------------------------------------
 MAIN CONTENT
------------------------------------- */
main {
  padding: 25px;
  overflow-y: auto;
}

h1 {
  margin-top: 0;
}

/* ------------------------------------
 FOOTER
------------------------------------- */
footer {
  background: #222;
  text-align: center;
  padding: 15px;
  border-top: 1px solid #333;
  color: #666;
}

/* ------------------------------------
 INDEX PAGE CARD GRID
------------------------------------- */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  /* grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); */
  gap: 20px;
  margin-top: 30px;
}

.card {
  background: #222;
  border: 1px solid #444;
  padding: 20px;
  text-align: center;
  color: #f5b700;
  border-radius: 8px;
  transition: 0.2s ease;
}

.card:hover {
  background: #333;
  transform: translateY(-3px);
}

/* ------------------------------------
   GAME LIBRARY GRID
------------------------------------- */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  /* grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); */
  gap: 25px;
  margin-top: 30px;
}

/* Entire card is a clickable link */
.game-card {
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Hover effect */
.game-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.45);
  border-color: #555;
}

/* Screenshot */
.game-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
}

/* Text section */
.game-card-content {
  padding: 15px;
}

.game-card-content h3 {
  margin: 0 0 10px 0;
  font-size: 18px;
  color: #f5b700;
}

.game-card-content p {
  margin: 0;
  font-size: 14px;
  color: #ccc;
  line-height: 1.4;
}

/* Mobile tweaks */
@media (max-width: 600px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
  .game-card img {
    height: 140px;
  }
}

/* ==========================================================
 RESPONSIVE BREAKPOINTS
========================================================== */

/* ---------- TABLET (<900px) ---------- */
@media (max-width: 900px) {
  /* #layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    height: auto;
  } */
  #layout {
    grid-template-columns: 240px 1fr; /* left + main */
  }
  .sidebar-right {
    display: none;
  }

  aside {
    border-right: none;
    border-bottom: 1px solid #333;
  }

  header nav a {
    margin-left: 12px;
  }
}

/* ---------- MOBILE (<600px) ---------- */
@media (max-width: 600px) {
  header {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }

  #layout {
    display: block;
  }
  .sidebar-left,
  .sidebar-right {
    display: none;
  }

  main {
    padding: 15px;
  }

  aside {
    padding: 15px;
    font-size: 14px;
  }

  h1 {
    font-size: 22px;
  }

  .card {
    padding: 15px;
    font-size: 16px;
  }

  footer {
    padding: 12px;
    font-size: 14px;
  }
}
