:root {
  --bg: #0f1724;
  --glass: rgba(255,255,255,0.06);
  --accent: #ffd166;
  --accent-2: #00d4ff;
  --muted: rgba(255,255,255,0.65);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  font-family: Inter, sans-serif;
  background: radial-gradient(1200px 600px at 10% 20%, rgba(0,212,255,0.06), transparent),
              radial-gradient(900px 400px at 90% 80%, rgba(255,209,102,0.04), transparent),
              var(--bg);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  overflow: hidden;
}

.stage { width: 100%; max-width: 1100px; }
.header { text-align: center; margin-bottom: 18px; }
.title { font-size: 2rem; margin-bottom: 6px; letter-spacing: 0.6px; }
.subtitle { color: var(--muted); font-size: 0.95rem; }

.container {
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.02));
  border-radius: 16px;
  padding: 28px;
  backdrop-filter: blur(6px);
  box-shadow: 0 8px 30px rgba(2,6,23,0.7);
}

.podium-wrap { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.podium { display: flex; align-items: flex-end; gap: 18px; min-height: 320px; }

.podium-item {
  width: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 18px;
  border-radius: 12px;
  position: relative;
  transform-origin: 50% 100%;
  transition: transform 600ms cubic-bezier(.2,.9,.3,1), box-shadow 400ms;
  animation: floatUp 900ms cubic-bezier(.2,.9,.3,1) both;
}

.podium-item .medal {
  position: absolute; top: -18px; left: 50%;
  transform: translateX(-50%);
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}

.podium-item .name { margin-top: 10px; font-weight: 700; font-size: 1.05rem; }
.podium-item .score { color: var(--muted); font-size: 0.95rem; }

.podium-item.first { height: 260px; background: rgba(255,255,255,0.04); box-shadow: 0 18px 40px rgba(0,0,0,0.6); }
.podium-item.first .medal { background: linear-gradient(180deg,#ffe29f,#ffd166); color: #111; }

.podium-item.second { height: 210px; background: rgba(255,255,255,0.03); }
.podium-item.second .medal { background: linear-gradient(180deg,#e4e7ff,#9db0ff); color: #082; }

.podium-item.third { height: 170px; background: rgba(255,255,255,0.02); }
.podium-item.third .medal { background: linear-gradient(180deg,#ffd6e2,#ff9fb1); color: #111; }

@keyframes floatUp { from { transform: translateY(40px) scale(.98); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }
.podium-item.first { animation-delay: 160ms; }
.podium-item.second { animation-delay: 60ms; }
.podium-item.third { animation-delay: 260ms; }

.podium-item:hover { transform: translateY(-8px) scale(1.02); box-shadow: 0 26px 60px rgba(2,6,23,0.7); }

.countdown { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.time {
  font-size: 1.6rem; font-weight: 700;
  background: linear-gradient(90deg,var(--accent),var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.progress { width: 420px; height: 8px; background: rgba(255,255,255,0.06); border-radius: 999px; overflow: hidden; }
.progress > div { height: 100%; width: 100%; background: linear-gradient(90deg,var(--accent),var(--accent-2)); }

.controls { display: flex; gap: 12px; justify-content: center; margin-top: 6px; }
.btn {
  padding: 10px 18px; border-radius: 10px;
  border: none; cursor: pointer; font-weight: 600;
  background: linear-gradient(90deg,var(--accent),#ffbe5c);
  box-shadow: 0 6px 18px rgba(255,189,92,0.12);
}
.btn.outline { background: transparent; border: 1px solid rgba(255,255,255,0.2); color: var(--muted); }

.footer { text-align: center; margin-top: 14px; color: rgba(255,255,255,0.5); font-size: 0.85rem; }

#confetti-canvas { position: fixed; left: 0; top: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 1000; }

@media (max-width: 880px) {
  .podium { flex-direction: column; }
  .podium-item { width: 86%; max-width: 420px; }
  .progress { width: 86%; }
}
