:root {
  --bg: #0f0a14;
  --bg-card: #1a1224;
  --pink: #ff6eb4;
  --pink-glow: #ff6eb480;
  --purple: #b388ff;
  --gold: #ffd54f;
  --silver: #b0bec5;
  --bronze: #ffab91;
  --text: #f5eef8;
  --text-muted: #a898b8;
  --border: #2d2040;
  --radius: 20px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Outfit", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
}

.bg-hearts {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 20%, #ff6eb415 0%, transparent 40%),
    radial-gradient(circle at 85% 70%, #b388ff12 0%, transparent 35%),
    radial-gradient(circle at 50% 50%, #ff6eb408 0%, transparent 50%);
  z-index: 0;
}

.hero {
  text-align: center;
  padding: 3rem 1.5rem 2rem;
  position: relative;
  z-index: 1;
}

.hero-tag {
  font-family: "Space Mono", monospace;
  font-size: 0.75rem;
  color: var(--pink);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 0.75rem;
}

.hero h1 {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--pink), var(--purple), var(--pink));
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s linear infinite;
}

@keyframes shimmer {
  to { background-position: 200% center; }
}

.hero-sub {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-top: 0.5rem;
}

main {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
  z-index: 1;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.section-head h2 {
  font-size: 1.35rem;
  font-weight: 700;
}

.section-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  width: 100%;
  margin-top: -0.5rem;
}

.live-dot {
  font-family: "Space Mono", monospace;
  font-size: 0.7rem;
  color: #4caf50;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.live-dot::before {
  content: "";
  width: 8px;
  height: 8px;
  background: #4caf50;
  border-radius: 50%;
  animation: pulse 1.5s ease infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

/* Hot streak */
.hot-streak {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  border-color: #ff6eb440;
  background: linear-gradient(135deg, #1a1224, #251a30);
  position: relative;
  overflow: hidden;
}

.glow-pink::after {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 200px;
  height: 200px;
  background: var(--pink-glow);
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}

.streak-flame {
  font-size: 3rem;
  animation: wiggle 0.8s ease-in-out infinite alternate;
  flex-shrink: 0;
}

@keyframes wiggle {
  from { transform: rotate(-8deg) scale(1); }
  to { transform: rotate(8deg) scale(1.1); }
}

.badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--pink), #ff4081);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  margin-bottom: 0.5rem;
}

.streak-content h2 {
  font-size: clamp(1.1rem, 4vw, 1.4rem);
  font-weight: 700;
  line-height: 1.3;
}

.streak-content h2 span {
  color: var(--pink);
  font-family: "Space Mono", monospace;
}

.streak-quote {
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.9rem;
  margin-top: 0.4rem;
}

/* Leaderboard */
.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.player-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: #120d18;
  border-radius: 14px;
  border: 1px solid transparent;
  transition: transform 0.2s, border-color 0.2s;
}

.player-row:hover {
  transform: translateX(4px);
  border-color: var(--border);
}

.player-row.rank-1 {
  background: linear-gradient(135deg, #2a1f00, #1a1224);
  border-color: #ffd54f40;
}

.rank-badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
}

.rank-1 .rank-badge { background: var(--gold); color: #1a1200; }
.rank-2 .rank-badge { background: var(--silver); color: #1a1a1a; }
.rank-3 .rank-badge { background: var(--bronze); color: #2a1500; }
.rank-4 .rank-badge { background: var(--border); color: var(--text-muted); }

.player-info h3 {
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.player-title {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
}

.player-stats {
  text-align: right;
}

.simp-days {
  font-family: "Space Mono", monospace;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--pink);
}

.simp-days-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.gap-bar {
  grid-column: 1 / -1;
  margin-top: -0.25rem;
}

.gap-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.gap-track {
  height: 6px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.gap-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--purple), var(--pink));
  transition: width 1s ease;
}

.crown {
  font-size: 1.2rem;
}

/* Stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.stat-card {
  text-align: center;
  padding: 1.25rem;
  transition: transform 0.2s;
}

.stat-card:hover {
  transform: translateY(-3px);
}

.stat-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.stat-value {
  font-family: "Space Mono", monospace;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--purple);
}

/* Records */
.records-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.record-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem;
  background: #120d18;
  border-radius: 12px;
  border-left: 3px solid var(--pink);
}

.record-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.record-body {
  flex: 1;
  min-width: 0;
}

.record-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.record-holder {
  font-size: 0.8rem;
  color: var(--pink);
  margin-top: 0.15rem;
}

.record-value {
  font-family: "Space Mono", monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Fun facts */
.fun-facts h2 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.fun-facts ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.fun-facts li {
  padding: 0.75rem 1rem;
  background: #120d18;
  border-radius: 10px;
  font-size: 0.95rem;
  color: var(--text-muted);
  position: relative;
  padding-left: 2rem;
}

.fun-facts li::before {
  content: "💕";
  position: absolute;
  left: 0.75rem;
}

.fun-facts li strong {
  color: var(--text);
}

footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  position: relative;
  z-index: 1;
}

@media (max-width: 500px) {
  .player-row {
    grid-template-columns: auto 1fr;
  }

  .player-stats {
    grid-column: 2;
    text-align: left;
  }
}
