:root {
  color-scheme: light;
  --lakers-purple: #552583;
  --lakers-purple-deep: #2a0f4d;
  --lakers-gold: #fdb927;
  --lakers-gold-soft: #ffe3a5;
  --bg-start: #f7f0ff;
  --bg-end: #fff3d2;
  --card-bg: rgba(255, 255, 255, 0.9);
  --text-main: #1f1a2b;
  --text-subtle: #5f556d;
  --accent: var(--lakers-purple);
  --accent-warm: var(--lakers-gold);
  --shadow: 0 32px 80px rgba(24, 12, 40, 0.18);
  --focus-ring: 0 0 0 3px rgba(85, 37, 131, 0.25);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Sora", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at 15% 10%, rgba(85, 37, 131, 0.18), transparent 45%),
    radial-gradient(circle at 90% 85%, rgba(253, 185, 39, 0.22), transparent 50%),
    linear-gradient(160deg, var(--bg-start) 0%, var(--bg-end) 100%);
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.55) 0, rgba(255, 255, 255, 0.55) 2px, transparent 5px),
    radial-gradient(circle at 78% 26%, rgba(255, 255, 255, 0.45) 0, rgba(255, 255, 255, 0.45) 2px, transparent 6px),
    radial-gradient(circle at 32% 78%, rgba(255, 255, 255, 0.4) 0, rgba(255, 255, 255, 0.4) 3px, transparent 8px);
  opacity: 0.45;
  filter: blur(0.5px);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0) 0%, rgba(20, 8, 36, 0.14) 70%);
  pointer-events: none;
  z-index: 1;
}

#confetti {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px 48px;
  position: relative;
  z-index: 2;
}

.winner-card {
  width: min(720px, 92vw);
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 22px 32px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  position: relative;
  border: 1px solid rgba(85, 37, 131, 0.12);
  align-items: center;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}

.winner-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  background: linear-gradient(90deg, transparent, rgba(253, 185, 39, 0.8), rgba(85, 37, 131, 0.8), transparent);
  opacity: 0.6;
  z-index: 0;
}

.winner-card::after {
  content: "";
  position: absolute;
  inset: -40% -30% auto auto;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(253, 185, 39, 0.25), transparent 70%);
  opacity: 0.7;
  pointer-events: none;
  z-index: 0;
}

.winner-card > * {
  position: relative;
  z-index: 1;
}

@supports (backdrop-filter: blur(18px)) {
  .winner-card {
    backdrop-filter: blur(18px);
  }
}

.hero {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  text-align: center;
}

.hero-text {
  max-width: 28rem;
}

.avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, #efe2ff, #ffe9c6);
  border: 3px solid var(--lakers-gold);
  box-shadow: 0 16px 32px rgba(85, 37, 131, 0.2);
  display: block;
  object-fit: cover;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.68rem;
  color: var(--lakers-purple);
  font-weight: 600;
}

.name {
  margin: 8px 0 0;
  font-size: clamp(2rem, 4vw, 2.9rem);
  font-weight: 700;
  line-height: 1.1;
}

.tagline {
  margin: 8px 0 0;
  font-size: 1.05rem;
  color: var(--text-subtle);
  line-height: 1.7;
  max-width: 28rem;
}

.section-title {
  margin: 0 0 12px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-subtle);
  font-weight: 600;
}

.profiles-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(85, 37, 131, 0.25);
  text-decoration: none;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.95);
  font-weight: 600;
  font: inherit;
  cursor: pointer;
  appearance: none;
  box-shadow: 0 10px 22px rgba(85, 37, 131, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.pill:hover,
.pill:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
  transform: translateY(-1px);
  background: #fff;
  box-shadow: 0 14px 26px rgba(85, 37, 131, 0.18);
}

.pill:focus-visible {
  box-shadow: var(--focus-ring), 0 14px 26px rgba(85, 37, 131, 0.18);
}

.celebrate-button {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid var(--lakers-purple);
  background: radial-gradient(circle at 30% 30%, #ffe7a3 0%, #fdb927 45%, #d59a1c 100%);
  color: var(--lakers-purple);
  font-size: 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 20;
  box-shadow: 0 14px 28px rgba(85, 37, 131, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.celebrate-button:hover,
.celebrate-button:focus-visible {
  filter: brightness(1.05);
  transform: translateY(-2px);
  outline: none;
  box-shadow: 0 18px 36px rgba(85, 37, 131, 0.35);
}

.celebrate-button:focus-visible {
  box-shadow: var(--focus-ring), 0 18px 36px rgba(85, 37, 131, 0.35);
}

@media (prefers-reduced-motion: no-preference) {
  body::before {
    animation: drift 18s ease-in-out infinite;
  }

  .winner-card {
    animation: float 12s ease-in-out infinite;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pill,
  .celebrate-button {
    transition: none;
  }
}

@keyframes drift {
  0% {
    transform: translate3d(0, 0, 0);
    opacity: 0.45;
  }
  50% {
    transform: translate3d(24px, -16px, 0);
    opacity: 0.6;
  }
  100% {
    transform: translate3d(0, 0, 0);
    opacity: 0.45;
  }
}

@keyframes float {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
  100% {
    transform: translateY(0);
  }
}

@media (min-width: 720px) {
  .winner-card {
    padding: 36px 42px 40px;
  }

  .avatar {
    width: 140px;
    height: 140px;
  }

}
