html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: black;
  font-family: system-ui, sans-serif;
  color: white;
}

#starfield,
#sphericalCanvas,
#gameCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
}

#starfield {
  z-index: 0;
  pointer-events: none;
}

#sphericalCanvas {
  z-index: 1;
  pointer-events: none;
}

#gameCanvas {
  z-index: 2;
  pointer-events: none;
}

#intro {
  position: relative;
  z-index: 3;
  text-align: center;
  margin-top: 20vh;
  transition: opacity 1s ease;
}

#intro.fade-out {
  opacity: 0;
  pointer-events: none;
}

button {
  padding: 0.5rem 1rem;
  font-size: 1rem;
  cursor: pointer;
  background: #ffffff10;
  border: 1px solid #ffffff40;
  color: white;
  border-radius: 4px;
}

button:hover {
  background: #ffffff20;
}

/* Hamburger Button */
#hamburgerBtn {
  position: fixed;
  top: 20px;
  left: 20px;
  width: 35px;
  height: 30px;
  cursor: pointer;
  z-index: 9999;
}

#hamburgerBtn.open .bar {
  opacity: 0.3;
}

#hamburgerBtn .bar {
  width: 100%;
  height: 4px;
  background: white;
  margin: 6px 0;
  transition: 0.3s;
}

/* Slide-Out Menu */
#sideMenu {
  position: fixed;
  top: 5px;
  left: -300px;
  width: 260px;
  height: 100%;
  background: rgba(10, 10, 20, 0.00);
  backdrop-filter: blur(1px);
  padding: 40px 20px;
  transition: left 0.35s ease;
  z-index: 9998;
  color: white;
  border-right: 1px solid rgba(180, 120, 255, 0.35);
  
}

#sideMenu.open {
  left: 0;
}

#sideMenu ul {
  list-style: none;
  padding: 0;
  margin-top: 20px;
}

#sideMenu ul li {
  margin: 18px 0;
}

#sideMenu ul li a {
  color: #ccc;
  text-decoration: none;
  font-size: 18px;
  transition: color 0.2s;
}

#sideMenu ul li a:hover {
  color: white;
}

#gameCatalog {
  position: absolute;
  top: 8%;              /* moved higher */
  left: 50%;
  transform: translateX(-50%);

  width: 70%;
  max-width: 1000px;
  height: 75%;          /* taller */
  padding: 30px;

  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;

  color: white;
  overflow-y: auto;

  display: none;
  opacity: 0;
  transition: opacity 0.6s ease;
}

#gameCatalog.show {
  display: block;
  opacity: 1;
}

/* Centered heading */
#gameCatalog h2 {
  text-align: center;
  margin-top: 0;        /* bring closer to top */
  margin-bottom: 20px;
}

#gameCatalog p {
  text-align: center;
  font-size: 10px;
  margin-top: -10px;        /* bring closer to top */
  margin-bottom: 20px;
}

/* Close button */
#catalogClose {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 22px;
  cursor: pointer;
  color: white;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

#catalogClose:hover {
  opacity: 1;
}

/* Table styling */
#gameCatalog table {
  width: 100%;
  border-collapse: collapse;
}

#gameCatalog th,
#gameCatalog td {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

#gameCatalog tr:hover {
  background: rgba(255,255,255,0.12);
  cursor: pointer;
}

.catalogIcon {
  width: 120px;
  height: 120px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  backdrop-filter: blur(10px);

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 1rem;
  color: white;
  text-align: center;

  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}

.catalogIcon:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-3px);
}

/* Layout for icons */
.catalogGrid {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 20px;
}
