body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 20px;
  background-color: #f5f5f5;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

h1 {
  text-align: center;
  color: #333;
  margin-bottom: 40px;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  padding: 20px 0;
}

.game-card {
  background: white;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
}

.game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  text-decoration: none;
  color: inherit;
}

.game-icon {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 15px;
  background-color: #eee;
}

.game-name {
  font-size: 18px;
  font-weight: bold;
  color: #333;
  margin: 0;
}

.no-games {
  text-align: center;
  color: #666;
  font-size: 18px;
  margin-top: 50px;
}

.loading {
  text-align: center;
  color: #666;
  font-size: 18px;
  margin-top: 50px;
}

/* Unity Game Resizing Styles */

/* Hide Unity WebGL logo but preserve loading bar elements */
#unity-webgl-logo,
.unity-webgl-logo,
#webgl-logo,
.webgl-logo,
#unity-footer {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
}

/* Make Unity canvas responsive - work with Unity's existing structure */
#unity-container.unity-desktop {
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: auto !important;
  height: auto !important;
}

#unity-logo {
  display: none !important;
}

#unity-canvas {
  max-width: 100dvw !important;
  max-height: 100dvh !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
}

/* Fix mobile responsiveness to center properly and use full space */
#unity-container.unity-mobile {
  position: fixed !important;
  width: 100dvw !important;
  height: 100dvh !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  top: 0 !important;
  left: 0 !important;
  transform: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.unity-mobile #unity-canvas {
  max-width: 100dvw !important;
  max-height: 100dvh !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  position: relative !important;
  top: auto !important;
  left: auto !important;
  transform: none !important;
}

/* Responsive design for mobile devices */
@media (max-width: 768px) {
  body {
    padding: 15px;
  }

  .container {
    padding: 15px;
  }

  h1 {
    font-size: 2rem;
  }

  .games-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .game-card {
    padding: 20px;
  }

  .game-icon {
    height: 120px;
  }
}

@media (max-width: 480px) {
  .game-card {
    padding: 15px;
  }

  .game-icon {
    height: 100px;
  }

  .game-name {
    font-size: 16px;
  }
}
