/* leaderboard-main.css — Template 2: Neon Glass & Elegance */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-base:       #020204;
  --bg-panel:      rgba(15, 15, 20, 0.6);
  --bg-panel-hover:rgba(25, 25, 32, 0.8);
  
  --glass-border:  rgba(255, 255, 255, 0.08);
  --glass-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  
  --text-primary:  #ffffff;
  --text-secondary:#94a3b8;
  --text-tertiary: #475569;
  
  --accent-1:      #818cf8; /* Indigo */
  --accent-2:      #c084fc; /* Purple */
  --accent-glow:   rgba(129, 140, 248, 0.3);
  
  --rank-1:        #facc15;
  --rank-2:        #e2e8f0;
  --rank-3:        #f97316;
}

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

html, body {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  overflow-x: hidden;
  position: relative;
}

/* ── Ambient Background Glows ── */
body::before, body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

body::before {
  top: -10%; left: -10%;
  width: 50vw; height: 50vw;
  background: radial-gradient(circle, var(--accent-1), transparent 60%);
}

body::after {
  bottom: -20%; right: -10%;
  width: 60vw; height: 60vw;
  background: radial-gradient(circle, var(--accent-2), transparent 60%);
}

a { text-decoration: none; color: inherit; }

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.leaderboard-main {
  padding: 140px 0 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── Sleek Dropdown Switcher ── */
.site-dropdown-wrapper {
  position: relative;
  margin-bottom: 60px;
  z-index: 100;
}

.dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-panel);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-highlight), 0 4px 20px rgba(0,0,0,0.5);
  padding: 8px 24px 8px 8px;
  border-radius: 100px;
  backdrop-filter: blur(20px);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown-trigger:hover {
  background: var(--bg-panel-hover);
  border-color: rgba(255,255,255,0.15);
}

.dropdown-trigger img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.dropdown-trigger span {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.dropdown-chevron {
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-left: 8px;
  transition: transform 0.3s;
}

.site-dropdown-wrapper:hover .dropdown-chevron {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 8px;
  min-width: 220px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 20px 40px rgba(0,0,0,0.8), var(--glass-highlight);
}

.site-dropdown-wrapper:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 12px;
  transition: background 0.2s;
}

.dropdown-item:hover {
  background: rgba(255,255,255,0.06);
}

.dropdown-item.active {
  background: rgba(129, 140, 248, 0.15);
  border: 1px solid rgba(129, 140, 248, 0.3);
}

.dropdown-item img {
  width: 24px; height: 24px; border-radius: 50%;
}

.dropdown-item span {
  font-size: 0.9rem; font-weight: 500;
}

/* ── Typography & Header ── */
.site-header {
  text-align: center;
  margin-bottom: 60px;
  width: 100%;
}

.leaderboard-subtitle {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--accent-1);
  text-transform: uppercase;
  letter-spacing: 4px;
  margin-bottom: 16px;
}

.leaderboard-title {
  font-size: clamp(3.5rem, 8vw, 6rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
  background: linear-gradient(135deg, #ffffff 0%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5));
}

.last-updated {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  font-weight: 400;
}

/* ── Minimal Countdown ── */
.countdown-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-bottom: 80px;
}

#leaderboard-countdown {
  display: flex;
  align-items: baseline;
  gap: 16px;
  background: var(--bg-panel);
  padding: 16px 32px;
  border-radius: 100px;
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}

.countdown-block {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.countdown-num {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.countdown-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: lowercase;
}

.countdown-separator {
  font-size: 1.5rem;
  color: var(--text-tertiary);
  margin: 0 4px;
}

.join-btn {
  padding: 14px 36px;
  border-radius: 100px;
  font-size: 0.95rem;
  font-weight: 600;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  color: #fff;
  border: none;
  box-shadow: 0 10px 30px var(--accent-glow), var(--glass-highlight);
  transition: transform 0.3s, box-shadow 0.3s;
}

.join-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(192, 132, 252, 0.4), var(--glass-highlight);
}

/* ── PODIUM: Acrylic Pillars ── */
.podium-section {
  width: 100%;
  margin-bottom: 60px;
  display: flex;
  justify-content: center;
}

.podium-stage {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 24px;
  width: 100%;
  max-width: 900px;
  padding: 0 20px;
}

.podium-slot {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  max-width: 260px;
}

.podium-slot.rank-1 { z-index: 3; }
.podium-slot.rank-2 { z-index: 2; }
.podium-slot.rank-3 { z-index: 1; }

/* The Floating Crown */
.floating-crown {
  font-size: 2.2rem;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 16px rgba(250, 204, 21, 0.6));
  animation: floatCrown 3s ease-in-out infinite;
}

@keyframes floatCrown {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50%      { transform: translateY(-10px) rotate(2deg); }
}

.avatar-container {
  position: relative;
  margin-bottom: -40px; /* Pull into pillar */
  z-index: 5;
}

.podium-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--bg-base);
  box-shadow: 0 10px 20px rgba(0,0,0,0.5);
  background: var(--bg-panel);
}

.podium-slot.rank-1 .podium-avatar {
  width: 110px; height: 110px;
}

.rank-badge-glass {
  position: absolute;
  bottom: 0; right: -8px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(10,10,15,0.9);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 800;
}
.podium-slot.rank-1 .rank-badge-glass { width: 36px; height: 36px; font-size: 1rem; color: var(--rank-1); border-color: rgba(250, 204, 21, 0.3); }
.podium-slot.rank-2 .rank-badge-glass { color: var(--rank-2); border-color: rgba(226, 232, 240, 0.2); }
.podium-slot.rank-3 .rank-badge-glass { color: var(--rank-3); border-color: rgba(249, 115, 22, 0.3); }

/* The Glass Pillar */
.glass-pillar {
  width: 100%;
  background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.01) 100%);
  border: 1px solid var(--glass-border);
  border-bottom: none;
  border-radius: 24px 24px 0 0;
  padding: 60px 16px 30px;
  backdrop-filter: blur(12px);
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 -10px 40px rgba(0,0,0,0.3);
}

/* Glowing top edge */
.glass-pillar::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
}

.podium-slot.rank-1 .glass-pillar { height: 260px; }
.podium-slot.rank-1 .glass-pillar::before { background: var(--rank-1); box-shadow: 0 0 20px var(--rank-1); }

.podium-slot.rank-2 .glass-pillar { height: 210px; }
.podium-slot.rank-2 .glass-pillar::before { background: var(--rank-2); box-shadow: 0 0 20px rgba(226, 232, 240, 0.4); }

.podium-slot.rank-3 .glass-pillar { height: 180px; }
.podium-slot.rank-3 .glass-pillar::before { background: var(--rank-3); box-shadow: 0 0 20px var(--rank-3); }

.pillar-name {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.podium-slot.rank-1 .pillar-name { font-size: 1.3rem; }

.pillar-data {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.data-pill {
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.data-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.data-val {
  font-size: 0.9rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.data-pill.highlight {
  background: rgba(129, 140, 248, 0.1);
  border-color: rgba(129, 140, 248, 0.3);
}
.data-pill.highlight .data-val { color: var(--accent-1); }
.podium-slot.rank-1 .data-pill.highlight .data-val { color: var(--rank-1); }

/* ── Floating List (Replacing Table) ── */
.list-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Header row for list */
.list-header-row {
  display: grid;
  grid-template-columns: 80px 1fr 140px 140px;
  padding: 0 24px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.list-header-row div:nth-child(3),
.list-header-row div:nth-child(4) { text-align: right; }

.list-row {
  position: relative;
  display: grid;
  grid-template-columns: 80px 1fr 140px 140px;
  align-items: center;
  background: var(--bg-panel);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 16px 24px;
  transition: all 0.3s ease;
  backdrop-filter: blur(12px);
  overflow: hidden;
    opacity: 0;
  animation: fadeUpRow 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  animation-delay: var(--delay, 0s);

}

@keyframes fadeUpRow {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.list-row:hover {
  transform: scale(1.01) translateX(4px);
  background: var(--bg-panel-hover);
  border-color: rgba(255,255,255,0.15);
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.row-rank {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-tertiary);
  opacity: 0.8;
  font-style: italic;
}

.row-user {
  display: flex;
  align-items: center;
  gap: 16px;
}

.row-user img {
  width: 44px; height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.row-user span {
  font-size: 1.05rem;
  font-weight: 600;
}

.row-stat {
  text-align: right;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  font-size: 1rem;
}

.row-stat.prize {
  color: var(--accent-2);
}

/* ── Minimalist Alert ── */
.info-alert {
  margin-top: 60px;
  width: 100%;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  gap: 20px;
}

.alert-icon {
  width: 40px; height: 40px;
  background: rgba(255,255,255,0.05);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.alert-content p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.alert-content p:last-child { margin-bottom: 0; }
.alert-content strong { color: var(--text-primary); font-weight: 600; }

/* ── Ghost Button ── */
.btn-ghost {
  display: inline-block;
  margin-top: 60px;
  padding: 12px 32px;
  border-radius: 100px;
  border: 1px solid var(--text-tertiary);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s;
}

.btn-ghost:hover {
  background: #fff;
  color: #000;
  border-color: #fff;
}

/* ── Responsiveness ── */
@media (max-width: 900px) {
  .list-header-row { display: none; }
  .list-row {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 20px;
  }
  .row-rank { position: absolute; top: 10px; right: 20px; font-size: 3rem; opacity: 0.5; }
  .row-stat { text-align: left; display: flex; justify-content: space-between; padding-top: 12px; border-top: 1px solid var(--glass-border); }
  .row-stat::before { content: attr(data-label); color: var(--text-secondary); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; }
}

@media (max-width: 768px) {
  .leaderboard-title { font-size: clamp(2.8rem, 12vw, 4rem); }
  .podium-stage { gap: 12px; align-items: flex-end; }
  .podium-slot { max-width: none; }
  
  .glass-pillar { padding: 40px 10px 20px; }
  .podium-slot.rank-1 .glass-pillar { height: 220px; }
  .podium-slot.rank-2 .glass-pillar { height: 180px; }
  .podium-slot.rank-3 .glass-pillar { height: 150px; }
  
  .podium-avatar { width: 60px; height: 60px; }
  .podium-slot.rank-1 .podium-avatar { width: 80px; height: 80px; }
  .floating-crown { font-size: 1.6rem; }
  .pillar-name { font-size: 0.9rem; }
  .podium-slot.rank-1 .pillar-name { font-size: 1.05rem; }
  .data-pill { flex-direction: column; gap: 4px; padding: 8px 4px; }
  
  #leaderboard-countdown { padding: 12px 20px; gap: 10px; }
  .countdown-num { font-size: 1.5rem; }
  .countdown-label { font-size: 0.7rem; }
}

@media (max-width: 600px) {
  .podium-stage { flex-direction: column; align-items: center; gap: 40px; }
  .podium-slot { width: 100%; max-width: 320px; }
  .podium-slot.rank-1 { order: -1; }
  .glass-pillar { height: auto !important; border-radius: 24px; border-bottom: 1px solid var(--glass-border); padding-bottom: 30px; }
}