:root {
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: radial-gradient(circle at top, #1a2238, #090b15 60%, #06070f);
  color: #f3f5ff;
}

.page {
  margin: 0 auto;
  max-width: 1200px;
  min-height: 100vh;
  padding: 1.25rem;
}

.hero {
  margin-bottom: 1.5rem;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.25rem);
  letter-spacing: 0.02em;
}

.hero p {
  margin: 0.35rem 0 0;
  color: #c6cce8;
}

.section {
  margin-top: 1.5rem;
}

.section h2 {
  margin: 0 0 0.7rem;
  font-size: 1.3rem;
}

.featured .game-content {
  padding: 1rem 1.1rem 1.2rem;
  justify-content: center;
}

.featured .game-name {
  font-size: clamp(1.4rem, 3vw, 2.1rem);
}

.featured .game-desc {
  font-size: 1rem;
}

/* Decorative "play" pill; the whole card is the link, so this adds no new interactive element. */
.featured .game-content::after {
  content: "Pelaa \25B6";
  align-self: flex-start;
  margin-top: 0.6rem;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  font-weight: 800;
  color: #081227;
  background: #7cf9c4;
}

.grid {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.game-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  border-radius: 0.95rem;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(46, 55, 90, 0.95), rgba(19, 24, 43, 0.95));
  border: 1px solid rgba(156, 174, 255, 0.23);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.game-card:hover {
  transform: translateY(-2px);
  border-color: rgba(166, 201, 255, 0.7);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.45);
}

.game-card:focus-visible {
  outline: 3px solid #86d2ff;
  outline-offset: 2px;
}

.cover-image,
.cover-tile {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.cover-tile {
  display: grid;
  place-items: center;
}

.cover-tile span {
  font-size: clamp(2.1rem, 6vw, 3.2rem);
  font-weight: 800;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}

.tone-0 { background: linear-gradient(135deg, #4f7cff, #6549f4); }
.tone-1 { background: linear-gradient(135deg, #f857a6, #ff5858); }
.tone-2 { background: linear-gradient(135deg, #42e695, #3bb2b8); }
.tone-3 { background: linear-gradient(135deg, #f6d365, #fda085); }
.tone-4 { background: linear-gradient(135deg, #00c6ff, #0072ff); }
.tone-5 { background: linear-gradient(135deg, #c471f5, #fa71cd); }
.tone-6 { background: linear-gradient(135deg, #43cea2, #185a9d); }
.tone-7 { background: linear-gradient(135deg, #ee9ca7, #ffdde1); }

.game-content {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.8rem 0.85rem 1rem;
}

.game-topline {
  min-height: 1.4rem;
}

.badge {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #081227;
  background: #7cf9c4;
}

.game-name {
  font-size: 1.06rem;
  font-weight: 700;
}

.game-desc {
  color: #d7dcf5;
  font-size: 0.92rem;
  line-height: 1.4;
}

.empty-state {
  margin-top: 2rem;
  padding: 1.2rem;
  border-radius: 0.9rem;
  border: 1px dashed rgba(186, 196, 241, 0.45);
  background: rgba(17, 22, 41, 0.5);
}

footer {
  margin-top: 2rem;
  color: #c2cae8;
  font-size: 0.92rem;
}

@media (min-width: 640px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

}

@media (min-width: 800px) {
  .featured {
    display: grid;
    grid-template-columns: 3fr 2fr;
    align-items: stretch;
  }

  .featured .cover-image,
  .featured .cover-tile {
    height: 100%;
    max-height: 22rem;
  }

  .featured .game-content {
    padding: 1.5rem 1.6rem;
  }
}
