/* Main content */
main {
  position: relative;
  z-index: 1;
  margin-left: 90px;
  width: calc(100% - 90px);
  padding: 3rem 2rem 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-header {
  width: 100%;
  max-width: 1100px;
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  margin-bottom: 3rem;
}

.page-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.page-title {
  display: flex;
  align-items: center;
  font-size: clamp(2rem, 6vw, 3.6rem);
  letter-spacing: -0.02em;
}

.page-badge {
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  opacity: 0.7;
  font-size: 0.95rem;
}

.games-search-wrapper {
  width: min(680px, 100%);
}

.games-search-form {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.03), transparent);
  padding: 0.5rem 0.7rem 0.5rem 1.4rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.games-search-form:focus-within {
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.02);
}

.games-search-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  font-family: "Lexend", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.98rem;
  outline: none;
}

.games-search-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.games-search-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 150ms ease-in-out, box-shadow 150ms ease-in-out;
}

.games-search-button:hover,
.games-search-button:focus-visible {
  opacity: 1;
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.25);
}

.games-grid {
  width: 100%;
  max-width: 1100px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 260px));
  gap: 1.2rem;
  justify-content: center;
}

.game-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: flex-end;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.game-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  border-color: rgba(255, 255, 255, 0.25);
}

.game-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-card-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 0.8rem 1rem;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.85) 100%);
  transform: translateY(100%);
  transition: transform 200ms ease;
}

.game-card:hover .game-card-overlay {
  transform: translateY(0);
}

.game-card-title {
  font-weight: 600;
}
