@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&family=Nunito+Sans:wght@400;600;700&display=swap');
body {
  background: #fefefe;
  font-family: 'Nunito Sans', sans-serif;
  margin: 0;
}

header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 2px solid #f0ede8;
  background-color: #f6f6f6;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.site-title {
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: 2rem;
  color: #333;
  letter-spacing: -0.5px;
  padding: 10px;
}

.site-title a {
  text-decoration: none;
  color: #333;
}
.site-title span {
  color: #ff6b6b;
}

nav {
  white-space: nowrap;
}

nav a {
  background-color: black;
  color: white;
  border-radius: 10px;
  margin-right: 20px;
  text-decoration: none;
  font-weight: bold;
  padding: 5px 10px;
}

main {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px;
}

h1 {
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
}

.error {
  color: #ff6b6b;
  font-family: 'Nunito', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 30px;
}

.backlog-games {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 10px;
}

.game-card {
  margin: auto;
  position: relative;
  border-radius: 20px;
  overflow: hidden;
}

.game-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 12px 14px;
  color: white;
  font-weight: 700;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.95) 0%,
    rgba(0, 0, 0, 0.7) 60%,
    rgba(0, 0, 0, 0.1) 90%,
    transparent 100%
  );
}
.card-title {
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.card-platform {
  background-color: rgba(255, 255, 255, 0.4);
  font-size: 0.875rem;
  padding: 5px;
  border-radius: 10px;
  display: inline-block;
}

.game-layout {
  display: grid;
  grid-template-columns: 1fr;
  margin-top: 30px;
}

.game-layout img {
  margin: 0 auto;
}

.game-header {
  display: flex;
  align-items: center;
  gap: 20px;
}

.game-header .game-platform {
  background-color: rgb(109 118 130 / 20%);
  padding: 5px;
  border-radius: 10px;
  font-weight: 700;
}

.game-form label {
  display: block;
  font-family: 'Nunito', sans-serif;
  font-size: 1.125rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #999;
  margin-bottom: 8px;
}

.game-form .req {
  color: #ff6b6b;
}

.game-form input,
.game-form select,
.game-form textarea,
.game-form option {
  border-radius: 4px;
  width: 100%;
  max-width: 300px;
  padding: 13px 16px;
  border-radius: 14px;
  font-family: 'Nunito Sans', sans-serif;
  font-size: 1rem;
  color: #333;
  background: #fafaf8;
  border: 2px solid #999;
}

.game-form button {
  background-color: #ff6b6b;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  border-radius: 10px;
  border: none;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  width: 300px;
  padding: 10px;
}

.game-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.game-actions .btn {
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
}

.game-actions .btn-edit {
  background-color: rgba(109, 118, 130, 0.2);
  color: #333;
}

.game-actions .btn-delete {
  background-color: #ff6b6b;
  color: white;
}

.game-form .form-group {
  margin-bottom: 30px;
}

@media (min-width: 600px) {
  .backlog-games {
    grid-template-columns: repeat(4, 1fr);
  }

  .game-layout {
    grid-template-columns: 1fr 2fr;
  }
}

@media (min-width: 900px) {
  .backlog-games {
    grid-template-columns: repeat(6, 1fr);
  }
}
