/**
 * Homepage "Latest Winners" carousel — matches arcade gold aesthetic; data from /api/winners/homepage
 */
#hp-winners-section.winners-section,
.winners-section#hp-winners-section {
  padding: 3rem 0;
  background: var(--bg-color);
  overflow-x: hidden;
}

@media (max-width: 576px) {
  #hp-winners-section.winners-section {
    padding: 2rem 0;
  }
}

.hp-winners-showcase {
  font-family: "Barlow", "Inter", sans-serif;
  --hp-gold: #f5c000;
  --hp-gold2: #c8920a;
  --hp-gold-light: #fff47c;
  --hp-gold-grad: linear-gradient(
    90deg,
    #fff47c,
    #c8920ae0 10%,
    #fff47c 22%,
    #c8920ac7 32%,
    #fff47c,
    #c8920adb,
    #fff47c,
    #c8920acc 80%,
    #fff47c
  );
  --hp-card: #0e0c00;
  --hp-border: rgba(200, 146, 10, 0.35);
  max-width: 1100px;
  margin: 0 auto;
}

.hp-section-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 10px;
}

.hp-trophy-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  box-shadow: 0 0 20px rgba(200, 146, 10, 0.5);
  background: linear-gradient(145deg, rgba(245, 192, 0, 0.25), rgba(30, 24, 0, 0.9));
  border: 1px solid var(--hp-border);
}

.hp-section-title {
  font-family: "Barlow Condensed", "Rajdhani", sans-serif;
  font-weight: 900;
  font-size: clamp(26px, 4vw, 42px);
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--hp-gold);
  font-style: italic;
  margin: 0;
  line-height: 1.1;
}

.hp-section-rule {
  width: 70px;
  height: 3px;
  background: var(--hp-gold-grad);
  border-radius: 99px;
  margin: 0 auto 36px;
}

.hp-live-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 32px;
}

.hp-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #23a704;
  border-radius: 99px;
  padding: 5px 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: white;
  text-transform: uppercase;
}

.hp-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffc107;
  box-shadow: 0 0 6px #ffc107;
  animation: hp-pulse 1.4s ease-in-out infinite;
}

@keyframes hp-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.7);
  }
}

.hp-carousel-outer {
  position: relative;
  overflow: hidden;
  -webkit-mask: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
  mask: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
}

/* JS sets --hp-loop to the exact px distance for ONE repeat (flex gap breaks translateX(-50%) math). */
.hp-carousel-track {
  direction: ltr;
  display: flex;
  gap: 16px;
  width: max-content;
  --hp-loop: 0px;
  will-change: transform;
}

.hp-carousel-track:hover {
  animation-play-state: paused;
}

@keyframes hp-scroll {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(var(--hp-loop), 0, 0);
  }
}

.hp-winner-card {
  flex-shrink: 0;
  width: 200px;
  background: linear-gradient(160deg, #1a1600 0%, #0d0b00 100%);
  border: 1.5px solid var(--hp-border);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  transition: border-color 0.25s, box-shadow 0.25s;
  cursor: default;
}

.hp-winner-card:hover {
  border-color: var(--hp-gold);
  box-shadow: 0 0 28px rgba(200, 146, 10, 0.35), 0 8px 32px rgba(0, 0, 0, 0.6);
}

.hp-winner-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--hp-gold-grad);
  opacity: 0;
  transition: opacity 0.25s;
  z-index: 1;
  pointer-events: none;
}

.hp-winner-card:hover::before {
  opacity: 1;
}

.hp-card-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, #1e1a00 0%, #0a0800 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.hp-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hp-img-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  opacity: 0.35;
}

.hp-img-placeholder svg {
  width: 40px;
  height: 40px;
}

.hp-img-placeholder span {
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #fff;
}

.hp-card-body {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hp-winner-name {
  font-family: "Barlow Condensed", "Rajdhani", sans-serif;
  font-weight: 800;
  font-size: 15px;
  color: #fff;
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hp-prize-name {
  font-size: 11px;
  font-weight: 600;
  color: rgba(200, 146, 10, 0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.3px;
}

.hp-time-ago {
  font-size: 10px;
  color: #888;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.hp-stats-strip {
  display: flex;
  justify-content: center;
  gap: clamp(20px, 4vw, 60px);
  margin-top: 36px;
  padding: 20px 0;
  border-top: 1px solid var(--hp-border);
  flex-wrap: wrap;
}

.hp-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.hp-stat-val {
  font-family: "Barlow Condensed", "Rajdhani", sans-serif;
  font-weight: 900;
  font-size: clamp(22px, 3vw, 32px);
  color: var(--hp-gold);
  text-shadow: 0 0 20px rgba(245, 192, 0, 0.35);
  letter-spacing: -0.5px;
}

.hp-stat-lbl {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #666;
  text-transform: uppercase;
}

.light-theme .hp-winner-card {
  background: linear-gradient(160deg, #faf8f0 0%, #f0ebe0 100%);
  border-color: rgba(0, 0, 0, 0.12);
}

.light-theme .hp-winner-name {
  color: #1a1a1a;
}

.light-theme .hp-time-ago {
  color: #555;
}

.light-theme .hp-stat-lbl {
  color: #555;
}

@media (max-width: 576px) {
  .hp-winner-card {
    width: 168px;
  }

  .hp-carousel-outer {
    -webkit-mask: linear-gradient(90deg, transparent 0%, #000 5%, #000 95%, transparent 100%);
    mask: linear-gradient(90deg, transparent 0%, #000 5%, #000 95%, transparent 100%);
  }
}
