@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #F5F6FA;
  min-height: 100vh;
  color: #1A1A2E;
}

/* Loading */
.loading {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
}
.spinner {
  width: 40px; height: 40px;
  border: 4px solid #E3F2FD;
  border-top-color: #1565C0;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { color: #999; font-size: 14px; }

/* Error */
.error-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  color: #999;
}

/* Banner */
.banner {
  height: 280px;
  background: linear-gradient(135deg, #1565C0, #42A5F5);
  position: relative;
  overflow: hidden;
}
.banner img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.05), rgba(0,0,0,0.65));
}
.banner-content {
  position: absolute;
  bottom: 24px;
  left: 24px;
  right: 24px;
  color: #fff;
}
.badge-type {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.2);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  margin-bottom: 10px;
  backdrop-filter: blur(8px);
}
.banner-title {
  font-size: 28px;
  font-weight: 900;
  line-height: 1.15;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.banner-creator {
  font-size: 14px;
  color: rgba(255,255,255,0.8);
  margin-top: 6px;
}

/* Content */
.content {
  max-width: 640px;
  margin: -32px auto 0;
  padding: 0 16px 40px;
  position: relative;
  z-index: 2;
}

/* Countdown */
.countdown-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #1565C0, #0D47A1);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(21,101,192,0.3);
}
.countdown-item { text-align: center; }
.cd-value {
  display: block;
  font-size: 28px;
  font-weight: 900;
  color: #fff;
  line-height: 1;
  min-width: 48px;
}
.cd-label {
  font-size: 10px;
  color: rgba(255,255,255,0.6);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.countdown-sep {
  font-size: 24px;
  font-weight: 300;
  color: rgba(255,255,255,0.3);
  margin-top: -8px;
}

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.stat {
  background: #fff;
  border-radius: 14px;
  padding: 16px 12px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.stat-value {
  font-size: 22px;
  font-weight: 900;
  color: #1565C0;
}
.stat-label {
  font-size: 11px;
  color: #999;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-top: 2px;
}

/* Card */
.card {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.card-title {
  font-size: 12px;
  font-weight: 700;
  color: #1565C0;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 14px;
}

/* Info rows */
.info-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
}
.info-row:last-child { border-bottom: none; }
.info-icon {
  width: 32px; height: 32px;
  background: #E3F2FD;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.info-label { font-size: 11px; color: #999; }
.info-value { font-size: 14px; font-weight: 600; }

/* Description */
.description {
  font-size: 14px;
  color: #555;
  line-height: 1.7;
  white-space: pre-wrap;
}

/* Distances */
.distances-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.distance-chip {
  background: #E3F2FD;
  color: #1565C0;
  font-size: 14px;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 10px;
}

/* Price */
.price-tag {
  display: inline-block;
  background: #E8F5E9;
  color: #2E7D32;
  font-size: 18px;
  font-weight: 800;
  padding: 8px 20px;
  border-radius: 10px;
  margin-bottom: 16px;
}
.price-tag.paid {
  background: #E3F2FD;
  color: #1565C0;
}

/* Leaderboard */
.leaderboard-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
}
.leaderboard-row:last-child { border-bottom: none; }
.rank {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
}
.rank-1 { background: #FFF8E1; color: #FFB300; }
.rank-2 { background: #ECEFF1; color: #90A4AE; }
.rank-3 { background: #FBE9E7; color: #CD7F32; }
.rank-other { background: #F5F6FA; color: #999; }
.lb-name { flex: 1; font-size: 14px; font-weight: 600; }
.lb-time { font-size: 14px; font-weight: 800; color: #1565C0; font-variant-numeric: tabular-nums; }

/* Rules */
.rule-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
}
.rule-label { color: #999; }
.rule-value { font-weight: 700; }
.rule-value.danger { color: #E53935; }

/* CTA */
.cta-section {
  text-align: center;
  padding: 24px 0 10px;
}
.cta-btn {
  display: inline-block;
  background: #1565C0;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  padding: 16px 48px;
  border-radius: 14px;
  transition: transform 0.2s;
  box-shadow: 0 4px 12px rgba(21,101,192,0.3);
}
.cta-btn:hover { transform: scale(1.03); }
.cta-sub {
  font-size: 13px;
  color: #999;
  margin-top: 12px;
}
.stores { display: flex; gap: 16px; justify-content: center; margin-top: 8px; }
.stores a { color: #1565C0; text-decoration: underline; font-size: 13px; font-weight: 600; }

/* Footer */
footer {
  text-align: center;
  padding: 24px;
  font-size: 12px;
  color: #bbb;
}
footer a { color: #1565C0; text-decoration: none; }

@media (max-width: 480px) {
  .banner { height: 220px; }
  .banner-title { font-size: 22px; }
  .content { padding: 0 12px 32px; }
  .cd-value { font-size: 22px; }
}
