:root {
  --bg: #0f1526;
  --bg-grad-1: #1a2340;
  --bg-grad-2: #0c1020;
  --card-bg: #1c2740;
  --text: #f2f5ff;
  --muted: #aab4d6;
  --accent: #ffb454;
  --accent-2: #6fd3ff;
  --shadow: rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  min-height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 600px at 50% -10%, var(--bg-grad-1), var(--bg-grad-2));
  background-attachment: fixed;
  padding-bottom: 40px;
}

/* Hero */
.hero {
  text-align: center;
  padding: 56px 20px 32px;
}

.hero-title {
  font-size: clamp(2rem, 6vw, 3.4rem);
  font-weight: 800;
  letter-spacing: 1px;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--accent);
}

.hero-subtitle {
  margin-top: 10px;
  color: var(--muted);
  font-size: clamp(0.95rem, 2.5vw, 1.15rem);
}

/* Library grid */
.library {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 20px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}

/* Game card */
.game-card {
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  box-shadow: 0 10px 30px var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.game-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px var(--shadow);
}

.game-card:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.game-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #111a2e;
  display: block;
}

.game-body {
  padding: 16px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.game-title {
  font-size: 1.2rem;
  font-weight: 700;
}

.game-desc {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
  flex: 1;
}

.play-btn {
  margin-top: 6px;
  align-self: stretch;
  text-align: center;
  background: linear-gradient(120deg, var(--accent), #ff8c42);
  color: #1a1205;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 10px;
  transition: filter 0.15s ease;
}

.game-card:hover .play-btn {
  filter: brightness(1.06);
}

/* Empty state */
.empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  padding: 60px 20px;
}

/* Footer */
.footer {
  text-align: center;
  margin-top: 40px;
  color: var(--muted);
  font-size: 0.85rem;
}
