* {
  box-sizing: border-box;
}

:root {
  --blue: #1498ff;
  --blue-dark: #0c63d7;
  --violet: #7a6cff;
  --green: #19c37d;
  --mint: #eafaf1;
  --gold: #ffb640;
  --orange: #ff6b45;
  --ink: #202633;
  --muted: #7b8494;
  --line: #e8edf5;
  --bg: #f4f7fb;
  --card: #ffffff;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #edf2f8;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

.stage {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 22px;
}

.phone {
  position: relative;
  width: 375px;
  min-height: 812px;
  overflow: hidden;
  background: var(--bg);
  border-radius: 28px;
  box-shadow: 0 22px 70px rgba(23, 37, 84, 0.18);
}

.screen {
  min-height: 812px;
  padding: 12px 14px 86px;
}

.status {
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
  font-size: 13px;
  font-weight: 700;
}

.status-icons {
  display: flex;
  gap: 4px;
  align-items: center;
}

.signal,
.wifi,
.battery {
  display: inline-block;
  background: #111827;
}

.signal {
  width: 16px;
  height: 10px;
  clip-path: polygon(0 100%, 20% 65%, 20% 100%, 35% 100%, 35% 45%, 55% 45%, 55% 100%, 70% 100%, 70% 20%, 90% 20%, 90% 100%);
}

.wifi {
  width: 15px;
  height: 10px;
  border-radius: 12px 12px 2px 2px;
  clip-path: polygon(0 36%, 50% 0, 100% 36%, 86% 52%, 50% 28%, 14% 52%);
}

.battery {
  width: 22px;
  height: 10px;
  border-radius: 2px;
  position: relative;
}

.battery::after {
  content: "";
  position: absolute;
  right: -3px;
  top: 3px;
  width: 2px;
  height: 4px;
  border-radius: 1px;
  background: #111827;
}

.nav-title {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  font-size: 17px;
  font-weight: 700;
}

.nav-title .left,
.nav-title .right {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #1f2937;
  font-size: 14px;
  font-weight: 500;
}

.nav-title .left {
  left: 2px;
  font-size: 22px;
}

.nav-title .right {
  right: 2px;
}

.card {
  background: var(--card);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(21, 40, 72, 0.06);
}

.soft-card {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 16px;
  box-shadow: 0 10px 34px rgba(12, 99, 215, 0.08);
}

.gradient-hero {
  color: #fff;
  background:
    radial-gradient(circle at 82% 22%, rgba(255,255,255,.28), transparent 28%),
    linear-gradient(135deg, #1197ff 0%, #596cff 52%, #9a73ff 100%);
  border-radius: 16px;
  box-shadow: 0 12px 34px rgba(20, 152, 255, 0.22);
}

.green-hero {
  color: #fff;
  background:
    radial-gradient(circle at 80% 18%, rgba(255,255,255,.24), transparent 30%),
    linear-gradient(135deg, #13b887 0%, #18a6e8 54%, #756cff 100%);
  border-radius: 16px;
  box-shadow: 0 12px 34px rgba(25, 195, 125, 0.22);
}

.gold-hero {
  background:
    radial-gradient(circle at 72% 14%, rgba(255,255,255,.42), transparent 22%),
    linear-gradient(135deg, #ffe0a4 0%, #ffc267 48%, #e99f39 100%);
  color: #5f3b09;
  border-radius: 16px;
  box-shadow: 0 12px 34px rgba(255, 182, 64, 0.24);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 2px 10px;
  font-size: 16px;
  font-weight: 700;
}

.section-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.progress {
  overflow: hidden;
  height: 8px;
  background: #e9eef7;
  border-radius: 999px;
}

.progress > i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--green));
}

.bottom-nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 74px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  background: rgba(255,255,255,.96);
  border-top: 1px solid rgba(232,237,245,.88);
}

.bottom-nav div {
  text-align: center;
  color: #596275;
  font-size: 10px;
}

.bottom-nav b {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  margin: 0 auto 4px;
  border-radius: 9px;
  color: #566173;
  font-size: 13px;
}

.bottom-nav .active {
  color: var(--blue);
  font-weight: 700;
}

.bottom-nav .active b,
.bottom-nav .scan b {
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--violet));
}

.bottom-nav .scan b {
  width: 44px;
  height: 44px;
  margin-top: -18px;
  border-radius: 50%;
  font-size: 18px;
  box-shadow: 0 9px 22px rgba(20, 152, 255, .32);
}

.tabs {
  display: flex;
  gap: 8px;
  overflow: hidden;
  padding: 4px 0 12px;
}

.tab {
  flex: 1;
  min-width: 0;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #fff;
  color: #667085;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(21, 40, 72, 0.05);
}

.tab.active {
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--violet));
}

.medal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.medal-card {
  min-height: 172px;
  padding: 12px;
  position: relative;
  overflow: hidden;
}

.medal-card.unlocked {
  background:
    radial-gradient(circle at 78% 10%, rgba(255, 214, 92, .22), transparent 27%),
    #fff;
}

.medal-card.unlocked::after {
  content: "";
  position: absolute;
  inset: -60px;
  background: linear-gradient(105deg, transparent 38%, rgba(255,255,255,.72) 48%, transparent 58%);
  transform: translateX(-42%);
  animation: shine 3.8s infinite;
}

@keyframes shine {
  0%, 48% { transform: translateX(-42%); }
  78%, 100% { transform: translateX(42%); }
}

.medal-icon {
  width: 64px;
  height: 64px;
  margin: 2px auto 10px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 25px;
  color: #fff;
  background: linear-gradient(135deg, #c78945, #ffce73);
  box-shadow: inset 0 -8px 18px rgba(99, 55, 7, .18), 0 10px 24px rgba(255, 182, 64, .22);
  position: relative;
  z-index: 1;
}

.medal-icon.silver {
  background: linear-gradient(135deg, #b9c6d6, #f7fbff);
  color: #4a607a;
}

.medal-icon.gold {
  background: linear-gradient(135deg, #ffb640, #fff1a6);
  color: #7a4900;
}

.medal-icon.platinum {
  background: linear-gradient(135deg, #a8d3ff, #f5fcff);
  color: #185e9d;
}

.medal-icon.diamond {
  background: linear-gradient(135deg, #76fbff, #8870ff 52%, #ff85ca);
  color: #fff;
}

.medal-icon.locked {
  color: #a8b0bf;
  background: #e2e7ef;
  box-shadow: none;
  filter: grayscale(1);
}

.medal-name {
  position: relative;
  z-index: 1;
  text-align: center;
  font-size: 14px;
  font-weight: 800;
}

.medal-meta {
  position: relative;
  z-index: 1;
  margin-top: 5px;
  color: var(--muted);
  text-align: center;
  font-size: 11px;
  line-height: 1.45;
}

.mini-progress {
  position: relative;
  z-index: 1;
  margin-top: 10px;
}

.pulse-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 0 rgba(255, 107, 69, .45);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  70% { box-shadow: 0 0 0 10px rgba(255, 107, 69, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 107, 69, 0); }
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.pill.blue {
  color: var(--blue-dark);
  background: #e8f4ff;
}

.pill.green {
  color: #0b8f5d;
  background: #e8f8ef;
}

.pill.orange {
  color: #d9552f;
  background: #fff0ea;
}

.primary-btn,
.ghost-btn {
  height: 46px;
  border: 0;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 800;
}

.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--violet));
  box-shadow: 0 10px 24px rgba(20,152,255,.28);
}

.ghost-btn {
  color: #526071;
  background: #f1f4f9;
}

.map {
  position: relative;
  height: 168px;
  overflow: hidden;
  border-radius: 16px;
  background:
    linear-gradient(28deg, transparent 45%, #d9e4ef 46%, #d9e4ef 49%, transparent 50%),
    linear-gradient(117deg, transparent 48%, #d7e3ef 49%, #d7e3ef 52%, transparent 53%),
    linear-gradient(0deg, #f8fafc 24%, #eef4f9 25%, #eef4f9 27%, #f8fafc 28%, #f8fafc 68%, #eef4f9 69%, #eef4f9 71%, #f8fafc 72%);
}

.route-line {
  position: absolute;
  left: 86px;
  top: 53px;
  width: 154px;
  height: 68px;
  border-left: 4px solid var(--blue);
  border-bottom: 4px solid var(--blue);
  transform: skewX(-18deg);
}

.pin {
  position: absolute;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #fff;
  border: 3px solid #fff;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 5px 15px rgba(17, 24, 39, .18);
}

.pin.start {
  left: 72px;
  top: 43px;
  background: var(--green);
}

.pin.end {
  right: 95px;
  top: 92px;
  background: var(--blue);
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.stat {
  padding: 12px 8px;
  text-align: center;
}

.stat b {
  display: block;
  font-size: 20px;
  line-height: 1.1;
}

.stat span {
  color: var(--muted);
  font-size: 11px;
}

.coupon {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
}

.coupon-mark {
  width: 70px;
  min-height: 62px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--orange), #ff9d3a);
}

.coupon-info {
  flex: 1;
  min-width: 0;
}

.coupon-info b {
  display: block;
  font-size: 14px;
  margin-bottom: 5px;
}

.coupon-info span {
  color: var(--muted);
  font-size: 11px;
}

.qr {
  width: 92px;
  height: 92px;
  padding: 8px;
  background:
    linear-gradient(90deg, #111 8px, transparent 8px) 0 0 / 21px 21px,
    linear-gradient(#111 8px, transparent 8px) 0 0 / 21px 21px,
    #fff;
  border: 8px solid #fff;
  box-shadow: 0 8px 18px rgba(17,24,39,.12);
}

.index-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 18px;
  width: min(980px, 100%);
}

.index-card {
  display: block;
  padding: 18px;
  color: var(--ink);
  text-decoration: none;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 16px 44px rgba(23, 37, 84, 0.1);
}

.index-card b {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
}

.index-card span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

@media (max-width: 520px) {
  .stage {
    padding: 0;
    background: var(--bg);
  }

  .phone {
    width: 100vw;
    min-height: 100vh;
    border-radius: 0;
    box-shadow: none;
  }

  .screen {
    min-height: 100vh;
  }

  .index-grid {
    grid-template-columns: 1fr;
    padding: 16px;
  }
}
