/* ═══════════════════════════════════════════════════════════
   V3 — Heating Up Styles (Redesigned)
   Ranked event cards with vote momentum, venue, type badges,
   animated gradient progress bars with bloom
   ═══════════════════════════════════════════════════════════ */

/* ─── List container ───────────────────────────────────── */
.hu-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 80px 16px 100px;
  max-width: 680px;
  margin: 0 auto;
}

/* ─── Card ─────────────────────────────────────────────── */
.hu-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: stretch;
  overflow: hidden;
  transition: transform .12s ease, box-shadow .12s ease;
  cursor: pointer;
  position: relative;
}

.hu-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .5);
}

/* ─── Blurred background image (visible on expand) ─────── */
.hu-card .hu-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  filter: blur(28px) saturate(1.3) brightness(.35);
  opacity: 0;
  transition: opacity .4s ease;
  pointer-events: none;
  transform: scale(1.15);
}

.hu-card.expanded .hu-bg {
  opacity: 1;
}

/* ─── Thumbnail ────────────────────────────────────────── */
.hu-card .hu-thumb {
  width: 110px;
  min-height: 90px;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
  background-color: var(--surface2);
  position: relative;
  z-index: 1;
}

/* ─── Rank number ──────────────────────────────────────── */
.hu-rank {
  font-size: 22px;
  font-weight: 800;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

/* ─── Info area ────────────────────────────────────────── */
.hu-card .hu-info {
  flex: 1;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  position: relative;
  z-index: 1;
}

/* ─── Title row with type badge ───────────────────────── */
.hu-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hu-card .hu-title {
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

/* ─── Type badge (matches Timeline style) ─────────────── */
.hu-type-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}
.hu-type-festival  { background: rgba(250,204,21,.15); color: #facc15; }
.hu-type-club      { background: rgba(168,85,247,.15); color: #a855f7; }
.hu-type-show      { background: rgba(124,156,255,.15); color: #7c9cff; }
.hu-type-day       { background: rgba(251,146,60,.15); color: #fb923c; }
.hu-type-boat      { background: rgba(56,189,248,.15); color: #38bdf8; }
.hu-type-community { background: rgba(74,222,128,.15); color: #4ade80; }
.hu-type-food      { background: rgba(251,146,60,.15); color: #fb923c; }
.hu-type-dance     { background: rgba(244,114,182,.15); color: #f472b6; }
.hu-type-wellness  { background: rgba(45,212,191,.15); color: #2dd4bf; }
.hu-type-art       { background: rgba(196,181,253,.15); color: #c4b5fd; }
.hu-type-outdoor   { background: rgba(74,222,128,.15); color: #4ade80; }

/* ─── Venue line ──────────────────────────────────────── */
.hu-venue {
  font-size: 12px;
  color: var(--text-dim, #adb5c7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hu-card .hu-meta {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hu-card.expanded .hu-meta {
  color: #bbb;
}

/* ─── Animated gradient progress bar ──────────────────── */
@keyframes huBarShimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.hu-card .hu-bar {
  height: 6px;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  margin-top: 6px;
  position: relative;
  background: rgba(255,255,255,.04);
}

.hu-card .hu-bar div {
  height: 100%;
  position: relative;
}

/* Green — going */
.hu-card .hu-bar div:nth-child(1) {
  background: linear-gradient(90deg, #22c55e, #4ade80, #86efac, #4ade80);
  background-size: 200% 100%;
  animation: huBarShimmer 3s ease-in-out infinite;
  box-shadow: 0 0 8px rgba(74,222,128,.4), 0 0 16px rgba(74,222,128,.15);
  border-radius: 4px 0 0 4px;
}

/* Yellow — maybe */
.hu-card .hu-bar div:nth-child(2) {
  background: linear-gradient(90deg, #eab308, #facc15, #fde68a, #facc15);
  background-size: 200% 100%;
  animation: huBarShimmer 3s ease-in-out infinite .5s;
  box-shadow: 0 0 8px rgba(250,204,21,.35), 0 0 14px rgba(250,204,21,.1);
}

/* Red — can't */
.hu-card .hu-bar div:nth-child(3) {
  background: linear-gradient(90deg, #ef4444, #f87171, #fca5a5, #f87171);
  background-size: 200% 100%;
  animation: huBarShimmer 3s ease-in-out infinite 1s;
  box-shadow: 0 0 8px rgba(248,113,113,.35), 0 0 14px rgba(248,113,113,.1);
  border-radius: 0 4px 4px 0;
}

/* Bloom glow beneath bar for top 3 */
.hu-card.rank-1 .hu-bar {
  box-shadow: 0 2px 12px rgba(74,222,128,.2);
}
.hu-card.rank-2 .hu-bar {
  box-shadow: 0 2px 10px rgba(74,222,128,.12);
}
.hu-card.rank-3 .hu-bar {
  box-shadow: 0 2px 8px rgba(74,222,128,.08);
}

/* ─── Voter chips ──────────────────────────────────────── */
.hu-card .hu-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 4px;
}

.hu-card .hu-chips .chip {
  font-size: 10px;
  padding: 2px 6px;
}

/* ─── Podium treatments (top 3) ────────────────────────── */
@keyframes goldPulse {
  0%, 100% {
    box-shadow: 0 0 12px rgba(255, 200, 60, .15), 0 0 40px rgba(255, 180, 40, .08), inset 0 1px 0 rgba(255, 220, 100, .1);
  }
  50% {
    box-shadow: 0 0 20px rgba(255, 200, 60, .3), 0 0 60px rgba(255, 180, 40, .15), inset 0 1px 0 rgba(255, 220, 100, .15);
  }
}

.hu-card.rank-1 {
  border-color: rgba(255, 195, 40, .35);
  background: linear-gradient(135deg, rgba(255, 200, 60, .08) 0%, var(--surface) 40%, var(--surface) 60%, rgba(255, 180, 40, .05) 100%);
  animation: goldPulse 3s ease-in-out infinite;
}

.hu-card.rank-1 .hu-rank {
  color: #ffc830;
  text-shadow: 0 0 12px rgba(255, 200, 60, .5);
  font-size: 26px;
}

.hu-card.rank-1 .hu-title {
  color: #ffe08a;
}

.hu-card.rank-2 {
  border-color: rgba(192, 192, 210, .2);
}

.hu-card.rank-2 .hu-rank {
  color: #c0c0d2;
  font-size: 24px;
}

.hu-card.rank-3 {
  border-color: rgba(205, 140, 80, .18);
}

.hu-card.rank-3 .hu-rank {
  color: #cd8c50;
  font-size: 23px;
}

/* ─── Expand-in-place ──────────────────────────────────── */
.hu-card .hu-expand {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s cubic-bezier(.2, .8, .2, 1), padding .35s ease;
  padding: 0 14px;
}

.hu-card.expanded .hu-expand {
  max-height: 600px;
  padding: 10px 14px 14px;
}

.hu-card.expanded {
  border-color: var(--accent);
  box-shadow: 0 8px 32px rgba(124, 156, 255, .15);
}

.hu-card .hu-expand .hu-desc {
  font-size: 13px;
  color: #dde1ec;
  line-height: 1.5;
  margin-bottom: 10px;
}

/* ─── Tags in expanded view ───────────────────────────── */
.hu-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.hu-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 100px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-dim, #adb5c7);
}

/* ─── Action buttons (View Event / Get Tickets) ───────── */
.hu-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.hu-view-btn {
  flex: 1;
  padding: 9px 12px;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: filter .15s;
}
.hu-view-btn:hover { filter: brightness(1.15); }
.hu-ticket-btn {
  flex: 1;
  padding: 9px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim, #adb5c7);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: all .15s;
}
.hu-ticket-btn:hover { border-color: var(--accent); color: var(--text); }

/* ─── Vote buttons inside expanded card ────────────────── */
.hu-card .hu-expand .hu-votes {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.hu-card .hu-expand .hu-votes .vbtn {
  flex: 1;
  padding: 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(0, 0, 0, .35);
  color: var(--text);
  cursor: pointer;
  text-align: center;
  transition: background .15s, border-color .15s;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}

.hu-card .hu-expand .hu-votes .vbtn:hover {
  background: rgba(255, 255, 255, .1);
}

.hu-card .hu-expand .hu-votes .vbtn.active {
  border-color: var(--accent);
  background: rgba(124, 156, 255, .2);
}

/* ─── Mobile adjustments ───────────────────────────────── */
@media (max-width: 760px) {
  .hu-list {
    padding-top: 70px;
    padding-bottom: 120px;
    gap: 14px;
    padding-left: 14px;
    padding-right: 14px;
  }

  .hu-card {
    border-radius: 16px;
  }

  .hu-rank {
    width: 36px;
    font-size: 18px;
  }

  .hu-card .hu-info {
    padding: 14px 14px 14px 0;
  }

  .hu-card .hu-title {
    font-size: 15px;
  }

  .hu-card .hu-meta {
    font-size: 12px;
    margin-top: 3px;
  }

  .hu-card .hu-bar {
    margin-top: 8px;
    height: 6px;
    border-radius: 4px;
  }
}
