
:root{
  --sky:   #cfe9ff;  /* bright pastel sky blue */
  --sky-2: #0d47a1;  /* softer background blue */
  --ink:   #0a2540;  /* deep pastel charcoal (for text) */
  --muted: #47627f;  /* muted teal/blue-gray */
  --card:  #ffffff;  /* clean white for cards */
  --ring:  #d5e7ff;  /* pastel aqua border/ring */
  --radius: 20px;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color:var(--ink);
  background-color: var(--sky-2);
  /* subtle dotted pattern without using glossy gradients */
  background-image: radial-gradient(#d5e9ff 1px, transparent 1px);
  background-size: 20px 20px;
}
.site-header{
  position: sticky;
  top: 0;
  z-index: 50;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px 16px;
  backdrop-filter: saturate(110%) blur(6px);
  background-color: #ffffff;
  border-bottom: 1px solid var(--sky-2);
}
.brand h1{
  font-size: clamp(22px, 3.6vw, 32px);
  line-height:1.1;
  margin:0 0 4px 0;
  font-weight: 800;
}
.subtitle{
  margin:0;
  color:var(--muted);
  font-size: clamp(12px, 2.4vw, 14px);
}
.icon-btn{
  border:1px solid var(--ring);
  width:38px; height:38px;
  border-radius: 12px;
  display:grid; place-items:center;
  background:#fff;
  cursor:pointer;
  color:var(--ink);
  box-shadow: 0 6px 14px rgba(10,37,64,0.06);
}
.icon-btn:active{transform:translateY(1px)}

.hero{
  display:flex;
  justify-content:center;
  padding:8px 12px 0;
}
.hero-img-wrap{
  width:min(900px, 100%);
  aspect-ratio: 4 / 5;
  overflow:hidden;
  border-radius: var(--radius);
  position: relative;
}
.hero-img{
  width:100%; height:100%; object-fit: cover;
  /* fade bottom part to transparent to blend with page background */
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 60%, rgba(0,0,0,0) 100%);
          mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 60%, rgba(0,0,0,0) 100%);
}

/* Action cards */
.actions{
  width:min(900px, 100%);
  margin: 4px auto 24px;
  display:grid;
  grid-template-columns: 1fr;
  gap:14px;
  padding: 0 12px 12px;
}
.card{
  display:flex;
  align-items:center;
  gap:14px;
  padding:10px;
  text-decoration:none;
  color:inherit;
  background: var(--card);
  border:1px solid var(--ring);
  border-radius: var(--radius);
  box-shadow: 0 10px 24px rgba(10,37,64,0.06);
  transition: transform .08s ease, box-shadow .2s ease;
}
.card:hover{ transform: translateY(-1px); box-shadow: 0 14px 28px rgba(10,37,64,0.10);}
.card .thumb{
  flex:0 0 92px;
  border-radius: 16px;
  overflow:hidden;
  aspect-ratio: 4/5;
  border:1px solid var(--ring);
  background:#f7fbff;
}
.card .thumb img{ width:100%; height:100%; object-fit: cover; display:block; }
.card .text h2{
  margin:2px 0 2px; font-size: clamp(1.4rem, 4vw, 2.5rem); font-weight:800;
}
.card .text p{ margin:0; color:var(--muted); font-size:clamp(0.9rem, 2vw, 1.2rem); }

/* Make PATREON more prominent */
.card.patreon{ border-width:2px; }
.card.patreon .text h2{ font-size:clamp(1.4rem, 4vw, 2.5rem); }

/* Desktop layout */
@media (min-width: 720px){
  .actions{ gap:16px; padding: 0 16px 24px; }
  .card{ padding:14px; gap:16px; }
  .card .thumb{ flex-basis: 120px; }
  .card .text h2{ font-size:clamp(2.7rem, 2.7vw, 3.6rem); }
  .card.patreon .text h2{ font-size:clamp(2.7rem, 2.7vw, 3.6rem); }
  .card .text p { font-size: clamp(1.6rem, 1.8vw, 2.1rem); }
}

/* Keep hero from dominating small screens */
@media (max-width: 480px){
  .hero-img-wrap{ max-height: 55vh; }
}

.site-footer{
  text-align:center;
  padding: 18px;
  color:var(--card);
  font-size: 12px;
}

/* ====== RANKING / PODIUM ====== */
.ranking{
  width:min(900px, 100%);
  margin: 4px auto 1px;
  padding: 0 12px 1px;
}
.ranking-title{
  margin: 8px 0 14px;
  font-weight: 800;
  font-size: clamp(1.3rem, 3.5vw, 1.8rem);
  color:#ffff
}

/* Podium layout */
.podium{
  display:grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items:end;
  gap:14px;
  margin-bottom: 16px;
}
.podium-col{
  position:relative;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:6px;
  text-align:center;
}
.podium-col .name{
  font-weight: 700;
  font-size: clamp(0.95rem, 2.5vw, 1.05rem);
}
.podium-col .amount{
  color: var(--muted);
  font-size: clamp(0.9rem, 2.2vw, 1rem);
}

/* Podium white background for better readability */
.podium-col {
  background: #fff;          /* white background */
  border-radius: 16px;       /* rounded corners */
  padding: 10px;             /* space around text */
  box-shadow: 0 4px 12px rgba(0,0,0,0.08); /* subtle shadow */
}
.podium-col .name,
.podium-col .amount,
.podium-col .place {
  color: #222;  /* ensure text contrasts with white */
}

/* Podium blocks */
.block{
  width:100%;
  border-radius: 14px 14px 0 0;
  border:1px solid var(--ring);
  box-shadow: 0 6px 18px rgba(10,37,64,0.08) inset;
}
.first .block{ min-height: 140px; }
.second .block{ min-height: 100px; }
.third .block{ min-height: 80px; }

/* Metals */
.block-gold{
  background: linear-gradient(180deg, #FFD54F 0%, #F9A825 100%);
  border-color: #FBC02D;
}
.block-silver{
  background: linear-gradient(180deg, #ECEFF1 0%, #B0BEC5 100%);
  border-color: #CFD8DC;
}
.block-bronze{
  background: linear-gradient(180deg, #D7A46E 0%, #B67C3B 100%);
  border-color: #C28E57;
}

.place{
  margin-top: 4px;
  font-weight: 800;
  color: var(--ink);
}

/* Crowns (SVG as background) */
.crown{
  width: 22px; height: 16px;
  background-repeat:no-repeat;
  background-position:center;
  background-size:contain;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.2));
}
.crown.big{ width: 28px; height: 20px; }

/* gold crown for 1st, silver for 2nd, bronze for 3rd via parent selectors */
.first .crown{
  background-image: url("data:image/svg+xml;utf8,<svg width='96' height='64' viewBox='0 0 96 64' xmlns='http://www.w3.org/2000/svg'><path d='M8 48 0 8l24 16 24-24 24 24 24-16-8 40H8Z' fill='%23F9A825'/><path d='M8 48h80v8H8z' fill='%23FBC02D'/></svg>");
}
.second .crown{
  background-image: url("data:image/svg+xml;utf8,<svg width='96' height='64' viewBox='0 0 96 64' xmlns='http://www.w3.org/2000/svg'><path d='M8 48 0 8l24 16 24-24 24 24 24-16-8 40H8Z' fill='%20%23B0BEC5'/><path d='M8 48h80v8H8z' fill='%23CFD8DC'/></svg>");
}
.third .crown{
  background-image: url("data:image/svg+xml;utf8,<svg width='96' height='64' viewBox='0 0 96 64' xmlns='http://www.w3.org/2000/svg'><path d='M8 48 0 8l24 16 24-24 24 24 24-16-8 40H8Z' fill='%23B67C3B'/><path d='M8 48h80v8H8z' fill='%23C28E57'/></svg>");
}

/* Leaderboard list (4th and below) */
.leaderboard{
  background: var(--card);
  border:1px solid var(--ring);
  border-radius: var(--radius);
  box-shadow: 0 10px 24px rgba(10,37,64,0.06);
  overflow:hidden;
}
.leaderboard-list{
  list-style: decimal;
  margin:0;
  padding: 8px 0;
}
.leaderboard-list li{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding: 10px 14px;
  border-bottom:1px dashed var(--ring);
}
.leaderboard-list li:last-child{ border-bottom:none; }
.leaderboard-list .who{
  display:flex; align-items:center; gap:8px; min-width: 0;
}
.leaderboard-list .who .crown{
  width:18px; height:14px; flex:0 0 18px;
}
.leaderboard-list .name{
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.leaderboard-list .money{
  font-weight: 700;
}

/* Responsive tweaks */
@media (max-width:720px){
  .podium{ gap:10px; }
  .first .block{ min-height: 120px; }
  .second .block{ min-height: 90px; }
  .third .block{ min-height: 70px; }
}
/* ===== Milestone Tracker ===== */
.milestone{
  width:min(900px, 100%);
  margin: 12px auto;
  padding: 0 12px;
}
.milestone-title{
  margin: 3px 0 9px;
  font-weight: 800;
  font-size: clamp(1.2rem, 3.2vw, 1.6rem);
  color:#ffff
}

.milestone-card{
  background: var(--card, #fff);
  border: 1px solid var(--ring, #e5e7eb);
  border-radius: var(--radius, 16px);
  padding: 14px;
  box-shadow: 0 10px 24px rgba(10,37,64,0.06);
}

.milestone-header{
  display:flex; align-items:center; justify-content:space-between;
  gap: 10px; margin-bottom: 10px;
}
.milestone-status{
  display:flex; align-items:baseline; flex-wrap:wrap; gap: 6px;
  font-weight: 700;
}
.ms-figure{ font-size: clamp(1.15rem, 3vw, 1.35rem); }
.ms-unit{ color: var(--muted, #64748b); font-weight: 600; }
.ms-sep{ color: var(--muted, #64748b); }
.ms-goal-label{ color: var(--ink, #0f172a); font-weight: 700; }

.ms-sticker{
  font-size: 1.25rem;
  transform: rotate(-8deg);
}

/* Progress bar */
.ms-progress{
  position: relative;
  height: 14px;
  background: linear-gradient(180deg, #f7fafc, #eef2f7);
  border: 1px solid var(--ring, #e5e7eb);
  border-radius: 999px;
  overflow: hidden;
}
.ms-progress-fill{
  height: 100%;
  width: 0%;
  background: repeating-linear-gradient(
    45deg,
    #ffb3c1 0 12px,
    #ffd6e0 12px 24px
  ); /* cute pink stripes */
  border-right: 1px solid rgba(0,0,0,0.1);
  display:flex; align-items:center; justify-content:flex-end;
  transition: width .6s ease;
}
.ms-sparkle{ margin-right: 6px; font-size: .9rem; opacity:.9; }

/* Steps */
.ms-steps{
  list-style:none; margin: 10px 0 0; padding: 0;
  display:grid; grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.ms-steps .step{
  display:flex; align-items:center; gap:8px;
  background: #fff;
  border: 1px dashed var(--ring, #e5e7eb);
  border-radius: 12px; padding: 8px 10px;
  min-width: 0;
}
.ms-steps .step .dot{
  width:14px; height:14px; border-radius:50%;
  background:#ffd6e0; box-shadow: 0 0 0 2px #fff inset;
  flex: 0 0 14px;
}
.ms-steps .step .label{
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-weight: 600; color: var(--ink, #0f172a);
}

/* States */
.ms-steps .step.completed{
  background: #f0fff4; border-color: #bbf7d0;
}
.ms-steps .step.completed .dot{ background:#34d399; }

.ms-steps .step.current{
  background: #fff7ed; border-color: #fed7aa;
  animation: msPulse 1.5s ease-in-out infinite;
}
.ms-steps .step.current .dot{ background:#fb923c; }

@keyframes msPulse{
  0%,100%{ box-shadow: 0 0 0 0 rgba(251,146,60,.35); }
  50%{ box-shadow: 0 0 0 6px rgba(251,146,60,.0); }
}

/* Note */
.ms-note{
  margin-top: 10px;
  font-size: .95rem;
  color: var(--muted, #64748b);
}

/* Responsive */
@media (max-width:720px){
  .ms-steps{
    grid-template-columns: repeat(2, 1fr);
  }
}
