body {
  background: #1c1917;
  color: #ffffff;
}

.ranking-page {
  margin-top: 88px;
  padding: 28px 16px 60px;
}

.ranking-container {
  max-width: 1200px;
  margin: 0 auto;
}

.ranking-filters {
  margin-bottom: 18px;
  background: #252525;
  border: 1px solid #343434;
  border-radius: 14px;
  padding: 16px;
}

.ranking-filters-form {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 12px;
  align-items: end;
}

.ranking-filter-input-wrap label {
  display: block;
  font-size: 12px;
  color: #9ca3af;
  margin-bottom: 6px;
}

.ranking-filter-input-wrap input,
.ranking-filter-input-wrap select {
  width: 100%;
  background: #1f1f1f;
  border: 1px solid #333;
  border-radius: 10px;
  color: #fff;
  padding: 10px 12px;
  min-height: 42px;
}

.ranking-filter-actions {
  display: flex;
  gap: 8px;
}

.ranking-filter-actions button,
.ranking-filter-actions a {
  background: #fa4149;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}

.ranking-filter-actions a {
  background: #333;
}

.ranking-hero {
  background: #252525;
  border: 1px solid #343434;
  border-radius: 14px;
  padding: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.ranking-hero-title-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ranking-hero-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: #fa4149;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.ranking-hero h1 {
  margin: 0;
  font-size: 28px;
}

.ranking-hero p {
  margin: 2px 0 0;
  color: #9ca3af;
}

.ranking-hero-stats {
  display: flex;
  gap: 28px;
  text-align: right;
}

.ranking-hero-stat-value {
  display: block;
  font-size: 22px;
  font-weight: 700;
}

.ranking-hero-stat-label {
  color: #9ca3af;
  font-size: 13px;
}

.ranking-section {
  margin-top: 40px;
}

.ranking-section-header {
  text-align: center;
  margin-bottom: 22px;
}

.ranking-section-header h2 {
  margin: 0;
  font-size: 30px;
}

.ranking-section-header p {
  margin: 8px 0 0;
  color: #9ca3af;
}

.ranking-podium {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
}

.podium-card {
  position: relative;
  width: 340px;
  background: #252525;
  border: 1px solid #343434;
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.2s ease;
}

.podium-card:hover {
  transform: translateY(-4px);
}

.podium-card.first {
  width: 360px;
}

.podium-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  background: #fa4149;
  color: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 700;
  font-size: 14px;
}

.podium-image {
  width: 100%;
  height: 210px;
  object-fit: cover;
  display: block;
}

.podium-image.placeholder,
.ranking-image.placeholder {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #1f1f1f;
  color: #777;
}

.podium-content {
  padding: 16px;
}

.podium-content h3 {
  margin: 0;
  font-size: 22px;
}

.podium-car {
  margin: 6px 0 12px;
  color: #9ca3af;
}

.podium-stats {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #d1d5db;
  font-size: 14px;
}

.podium-hp {
  margin-top: 12px;
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(250, 65, 73, 0.15);
  color: #fa4149;
  font-weight: 600;
  font-size: 13px;
}

.podium-action,
.ranking-action {
  display: inline-block;
  margin-top: 14px;
  text-decoration: none;
  background: #fa4149;
  color: #fff;
  border-radius: 8px;
  padding: 8px 16px;
  font-weight: 600;
}

.ranking-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ranking-item {
  background: #252525;
  border: 1px solid #343434;
  border-radius: 14px;
  padding: 14px;
  display: grid;
  grid-template-columns: auto 132px 1fr auto;
  gap: 14px;
  align-items: center;
}

.ranking-rank {
  width: 54px;
  height: 54px;
  border-radius: 10px;
  background: #1c1917;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #d1d5db;
}

.ranking-image {
  width: 132px;
  height: 92px;
  border-radius: 10px;
  object-fit: cover;
  display: block;
}

.ranking-main h3 {
  margin: 0;
  font-size: 22px;
}

.ranking-car {
  margin: 4px 0 2px;
  color: #9ca3af;
}

.ranking-owner {
  margin: 0;
  color: #6b7280;
}

.ranking-side {
  text-align: right;
}

.ranking-rating {
  font-size: 20px;
  font-weight: 700;
}

.ranking-votes {
  margin-top: 4px;
  color: #9ca3af;
  font-size: 13px;
}

.ranking-hp {
  margin-top: 8px;
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(250, 65, 73, 0.15);
  color: #fa4149;
  font-weight: 600;
  font-size: 13px;
}

.ranking-empty {
  text-align: center;
  background: #252525;
  border: 1px solid #343434;
  border-radius: 14px;
  padding: 30px 18px;
  color: #9ca3af;
}

@media (max-width: 992px) {
  .ranking-filters-form {
    grid-template-columns: 1fr 1fr;
  }

  .ranking-filter-actions {
    grid-column: span 2;
  }

  .ranking-item {
    grid-template-columns: auto 1fr;
  }

  .ranking-image-link {
    order: 3;
    grid-column: span 2;
  }

  .ranking-image {
    width: 100%;
    height: 170px;
  }

  .ranking-main {
    order: 2;
  }

  .ranking-side {
    order: 4;
    grid-column: span 2;
    text-align: left;
  }
}

@media (max-width: 768px) {
  .ranking-filters-form {
    grid-template-columns: 1fr;
  }

  .ranking-filter-actions {
    grid-column: auto;
  }

  .ranking-page {
    margin-top: 74px;
  }

  .ranking-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .ranking-hero-stats {
    text-align: left;
    gap: 18px;
  }

  .podium-card,
  .podium-card.first {
    width: 100%;
    max-width: 420px;
  }
}
