@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;800;900&display=swap');

/* General Styles */
body {
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  background: #222;
  color: #eee;
}

/* Header and Footer (used on index and multi-page views) */
header,
footer {
  text-align: center;
  padding: 10px;
  background: #333;
}

footer {
  font-size: 0.8em;
}

/* Home Page Game Grid (for index page view) */
.game-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(75px, 1fr));
  gap: 20px;
  padding: 20px;
}

.game-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 150px;
  background: #444;
  text-decoration: none;
  color: #eee;
  font-size: 1.2em;
  border: 2px solid #666;
  transition: transform 0.2s ease, background 0.2s ease;
}

.game-tile:hover {
  transform: scale(1.05);
  background: #555;
}

/* Search Icon & Input (Header) */
.header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.header-title {
  margin: 0;
}

.search-icon-container {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  display: none;
  position: absolute;
  right: 35px;
  top: 50%;
  transform: translateY(-50%);
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 6px 8px;
  font-size: 16px;
  background: #fff;
  z-index: 10;
  width: 180px;
}

.search-icon {
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  margin-left: 10px;
  outline: none;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-icon svg {
  width: 24px;
  height: 24px;
  /* Set icon color to white */
  stroke: #fff;
  fill: none;
}

@media (max-width: 600px) {
  .search-input {
    width: 120px;
  }
}

/* Subpage Home Button (for game pages with navigation) */
.home-button {
  position: absolute;
  top: 10px;
  left: 10px;
}

.home-button a {
  text-decoration: none;
  background: #444;
  padding: 10px 15px;
  color: #eee;
  border: 2px solid #666;
}

/* Game Container and Border (for game page view) */
.game-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: calc(100vh - 60px);
}

.game-border {
  position: relative;
  width: 80%;
  max-width: 800px;
  border: 8px solid #666;
  box-shadow: 0 0 10px #000;
  background: #000;
}

.game-border iframe {
  width: 100%;
  height: 450px;
  display: block;
}

/* Fullscreen styling with vendor prefixes targeting the game element.
   In fullscreen, the border and box shadow are removed.
*/
.game-border:fullscreen,
.game-border:-webkit-full-screen,
.game-border:-moz-full-screen,
.game-border:-ms-fullscreen {
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
  border-width: 0;
  box-shadow: none;
}

/* Fullscreen Button */
#fullscreenBtn {
  position: absolute;
  right: 10px;
  bottom: 10px;
  background: #444;
  color: #eee;
  border: none;
  padding: 8px 12px;
  cursor: pointer;
  border: 2px solid #666;
}

#fullscreenBtn:hover {
  background: #555;
}

/* Additional rules for game-only views (if needed)
   Uncomment or apply these styles when you want to hide other elements.
*/
/*
body.game-only {
  background: #000;
  overflow: hidden;
}

header,
footer,
.home-button,
.game-grid {
  display: none;
}
*/

/* ====== Copilot: Category section styling ====== */
.game-categories {
  width: 100%;
  margin: 0 auto;
  padding: 0 0 30px 0;
  max-width: 1100px;
}

.game-category {
  margin-bottom: 2em;
}

.game-category h2 {
  margin-bottom: 0.5em;
  margin-top: 1.5em;
  color: #fff;
  font-weight: 700;
  font-size: 1.6em;
  letter-spacing: 1px;
  border-left: 5px solid #666;
  padding-left: 12px;
}

/* Optional: add a little vertical space between categories on small screens */
@media (max-width: 700px) {
  .game-category {
    margin-bottom: 1.2em;
  }
  .game-category h2 {
    font-size: 1.2em;
    padding-left: 7px;
    margin-top: 1em;
  }
}

