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

body {
  font-family: 'Lato', sans-serif;
  background-color: #000000;
  color: #ffffff;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ===== PAGE LAYOUT ===== */
.page-main {
  padding: 64px 32px 100px;
}

.page-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ===== LOGO ===== */
.logo {
  height: 48px;
  width: auto;
  margin-bottom: 40px;
}

/* ===== HEADINGS ===== */
.page-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 48px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-align: center;
  margin-bottom: 16px;
}

.page-subtitle {
  font-size: 16px;
  color: #9F9F9F;
  text-align: center;
  margin-bottom: 48px;
  line-height: 1.6;
  max-width: 460px;
}

/* ===== SEARCH BAR ===== */
.search-wrapper {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin-bottom: 56px;
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #9F9F9F;
  pointer-events: none;
}

#searchInput {
  width: 100%;
  padding: 15px 20px 15px 50px;
  background: #101010;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  color: #ffffff;
  font-family: 'Lato', sans-serif;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#searchInput:focus {
  border-color: rgba(211, 64, 55, 0.6);
  box-shadow: 0 0 0 3px rgba(211, 64, 55, 0.1);
}

#searchInput::placeholder {
  color: #9F9F9F;
}

/* ===== RESULTS GRID ===== */
#results {
  width: 100%;
}

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

/* ===== GAME CARD ===== */
.game-card {
  background: #101010;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.game-card:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 32px rgba(211, 64, 55, 0.2);
  border-color: rgba(211, 64, 55, 0.4);
}

.card-image {
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #101010;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.game-card:hover .card-image img {
  transform: scale(1.04);
}

.card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #101010;
  font-family: 'Montserrat', sans-serif;
  font-size: 36px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.12);
  letter-spacing: 3px;
}

.card-body {
  padding: 14px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.card-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.45;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ===== VOTE BUTTON ===== */
.vote-btn {
  width: 100%;
  padding: 10px 12px;
  background: #D34037;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  font-family: 'Lato', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.03em;
  transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
  margin-top: auto;
}

.vote-btn:hover:not(:disabled) {
  background: #b83030;
  box-shadow: 0 0 18px rgba(211, 64, 55, 0.4);
}

.vote-btn:active:not(:disabled) {
  transform: scale(0.97);
}

.vote-btn:disabled {
  cursor: not-allowed;
}

.vote-btn.voted {
  background: #1a6b35;
  box-shadow: none;
}

/* ===== STATUS MESSAGES ===== */
.status {
  text-align: center;
  color: #9F9F9F;
  font-size: 15px;
  padding: 48px 0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .page-main {
    padding: 48px 20px 72px;
  }

  .page-title {
    font-size: 32px;
  }

  .results-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .page-title {
    font-size: 26px;
  }

  .results-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}
