html, body {
  margin: 0;
  padding: 0;
  background: white;
  font-family: Arial, sans-serif;
  height: 100%; /* ✅ Forzamos altura completa */
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

header {
  width: 100%;
  background: #20232a;
  padding: 1rem;
  text-align: center;
  color: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

main {
  flex: 1;
  width: 100%; /* ✅ Muy importante para que el centrado funcione */
  display: flex;
  flex-direction: column; /* si no está definido */
  align-items: flex-start;       /* ✅ No empuja hacia el medio vertical */
  padding: 2rem 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  padding: 2rem;
  max-width: 1200px;
  margin: auto;
}

.game-card {
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.2s;
  max-width: 220px;      /* ✅ límite visual */
}

.game-card:hover {
    transform: scale(1.03);
}

.game-card img {
  width: 100%;
  height: 160px;
  object-fit: contain;
  background: #fff;
  padding: 10px;
}

.game-card h3 {
  margin: 0;
  padding: 1rem;
  font-size: 1rem;
  text-align: center;
}

footer {
  text-align: center;
  padding: 2rem;
  color: #666;
  font-size: 0.9rem;
}

#unity-container {
  position: relative;
  width: 100%;
  background: black;
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

canvas#unity-canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
  background: black;
}

#unity-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40px;
  background: #fff;
  color: #111;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}