body {
  background: linear-gradient(120deg, #171a21 0%, #1b2838 100%);
  font-family: 'Segoe UI', Arial, sans-serif;
  color: #c7d5e0;
  margin: 0;
  padding: 24px;
  min-height: 100vh;
  letter-spacing: 0.01em;
  scrollbar-width: thin;
  scrollbar-color: #2a475e #171a21;
  scroll-behavior: smooth;
}

h1 {
  text-align: center;
  margin-bottom: 38px;
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #66c0f4;
  text-shadow: 0 2px 12px #000b, 0 1px 0 #222;
  line-height: 1.2;
}

.library {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
  max-width: 1400px;
  margin: 0 auto;
  padding-bottom: 40px;
  width: 100%;
}

.game {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  cursor: pointer;
  background: #23262e;
  border: 2px solid #101822;
  box-shadow: 0 8px 32px rgba(0,0,0,0.7), 0 1.5px 4px rgba(102,192,244,0.08);
  transition: 
    transform 0.18s cubic-bezier(.4,2,.6,1), 
    box-shadow 0.18s, 
    border-color 0.18s;
  outline: none;
}
.game:hover,
.game:focus-visible {
  transform: translateY(-8px) scale(1.035);
  box-shadow: 0 16px 48px #66c0f455, 0 2px 8px #000b;
  border-color: #66c0f4;
  z-index: 2;
}
.game:focus-visible {
  box-shadow: 0 0 0 3px #66c0f4cc, 0 16px 48px #66c0f455, 0 2px 8px #000b;
}

.game img {
  width: 100%;
  min-height: 180px;
  max-height: 240px;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  transition: 
    transform 0.32s cubic-bezier(.4,2,.6,1),
    filter 0.32s;
  filter: brightness(0.93) saturate(1.08) contrast(1.08);
  box-shadow: 0 2px 12px #000b;
  position: relative;
  background: #222;
}

.game img::after {
  content: "";
  display: block;
  position: absolute;
  left: 0; top: 0; right: 0; bottom: 0;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(255,255,255,0.09) 0%, rgba(255,255,255,0.01) 80%);
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

.game:hover img,
.game:focus-visible img {
  transform: scale(1.045);
  filter: brightness(1.09) saturate(1.16) contrast(1.13);
}

.info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(0deg, rgba(27,40,56,0.98) 85%, rgba(27,40,56,0.2) 100%);
  padding: 18px 14px 14px 14px;
  text-align: left;
  opacity: 0;
  transition: opacity 0.32s cubic-bezier(.4,2,.6,1);
  font-size: 1.08rem;
  color: #eaf6fb;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
  pointer-events: none;
  box-shadow: 0 2px 12px #000b;
  line-height: 1.5;
  backdrop-filter: blur(2px);
}

.game:hover .info,
.game:focus-visible .info {
  opacity: 1;
  pointer-events: auto;
}

.info strong {
  color: #66c0f4;
  font-weight: 600;
  font-size: 1.13em;
  display: block;
  margin-bottom: 4px;
  text-shadow: 0 1px 2px #000b;
  letter-spacing: 0.01em;
}

.info span {
  color: #b8c6d1;
  font-size: 0.98em;
  text-shadow: 0 1px 2px #000b;
}

::-webkit-scrollbar {
  width: 10px;
  background: #171a21;
}
::-webkit-scrollbar-thumb {
  background: #2a475e;
  border-radius: 8px;
  border: 2px solid #171a21;
}
::-webkit-scrollbar-thumb:hover {
  background: #66c0f4;
}

@media (max-width: 600px) {
  body {
    padding: 8px;
  }
  .library {
    gap: 14px;
    padding-bottom: 16px;
  }
  .game img {
    min-height: 120px;
    max-height: 160px;
  }
  .info {
    font-size: 0.98rem;
    padding: 12px 8px 10px 8px;
  }
}