/* ============================================================
   Alpha Drops — iOS minimalist design system (light mode only)
   ============================================================ */
:root {
  --bg: #f2f2f7;
  --card: #ffffff;
  --text: #1c1c1e;
  --text-2: #3a3a3c;
  --text-3: #8e8e93;
  --separator: #e5e5ea;
  --accent: #007aff;
  --green: #34c759;
  --orange: #ff9500;
  --red: #ff3b30;
  --radius: 16px;
  --nav-blur: rgba(242, 242, 247, 0.78);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.05);
  --spring: cubic-bezier(0.32, 0.72, 0, 1);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--nav-blur);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid var(--separator);
}
.nav-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.2px;
  flex: 1;
}
.nav-title .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  margin-right: 8px;
  vertical-align: 1px;
  transition: background 0.3s;
}
.nav-title .dot.off { background: var(--red); }

.bnb-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--card);
  border: 0.5px solid var(--separator);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.bnb-pill .sym {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f0b90b, #e0a400);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}

.icon-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 0.5px solid var(--separator);
  background: var(--card);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: transform 0.18s var(--spring), background 0.18s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  flex: none;
}
.icon-btn:active { transform: scale(0.88); background: #f2f2f7; }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn.spinning svg { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.back-btn {
  text-decoration: none;
  color: var(--accent);
  font-size: 16px;
  display: flex; align-items: center; gap: 2px;
}
.back-btn svg { width: 20px; height: 20px; }

/* ---------- Page layout ---------- */
.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 8px 16px 64px;
}
.hero {
  padding: 18px 4px 6px;
}
.hero h1 {
  margin: 0;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.8px;
}
.hero .sub {
  margin: 4px 0 0;
  color: var(--text-3);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.section { margin-top: 26px; }
.section-label {
  font-size: 12.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-3);
  margin: 0 4px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.section-label .count {
  background: var(--text);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 8px;
  letter-spacing: 0;
  text-transform: none;
}
.section-link {
  font-size: 14px;
  color: var(--accent);
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 10px;
  overflow: hidden;
  transition: transform 0.18s var(--spring), box-shadow 0.25s;
  animation: rise 0.5s var(--spring) backwards;
}
.card.tappable { cursor: pointer; }
.card.tappable:active { transform: scale(0.985); }
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.airdrop { padding: 14px 16px; }
.airdrop-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.token-badge {
  width: 46px; height: 46px;
  border-radius: 50%;
  flex: none;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.3px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.18);
}
.airdrop-main { flex: 1; min-width: 0; }
.airdrop-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
  display: flex;
  align-items: baseline;
  gap: 7px;
}
.airdrop-name .sym { white-space: nowrap; }
.airdrop-name .full {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.airdrop-meta {
  margin-top: 2px;
  font-size: 13px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.pill {
  flex: none;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.2px;
}
.pill.live     { background: rgba(52,199,89,0.14);  color: #1f9d44; }
.pill.soon     { background: rgba(255,149,0,0.14);  color: #c77400; }
.pill.ended    { background: rgba(142,142,147,0.14); color: var(--text-3); }
.pill .blink {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  margin-right: 5px;
  animation: blink 1.6s ease-in-out infinite;
}
@keyframes blink { 50% { opacity: 0.25; } }

.airdrop-stats {
  display: flex;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 0.5px solid var(--separator);
}
.stat { flex: 1; }
.stat + .stat { border-left: 0.5px solid var(--separator); padding-left: 14px; }
.stat .k {
  font-size: 11px;
  color: var(--text-3);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.stat .v {
  font-size: 16px;
  font-weight: 700;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.2px;
}
.stat .v.accent { color: var(--accent); }

.countdown {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--orange);
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  gap: 6px;
}
.countdown::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--orange);
  animation: blink 1.6s ease-in-out infinite;
}

/* expandable details */
.details-toggle {
  width: 100%;
  border: none;
  background: none;
  padding: 10px 16px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-family: inherit;
}
.details-toggle svg {
  width: 14px; height: 14px;
  transition: transform 0.3s var(--spring);
}
.details-toggle.open svg { transform: rotate(180deg); }
.details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s var(--spring);
}
.details.open { max-height: 480px; }
.details-inner {
  padding: 2px 16px 16px;
  border-top: 0.5px solid var(--separator);
}
.drow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  font-size: 13.5px;
  border-bottom: 0.5px solid #f2f2f7;
}
.drow:last-child { border-bottom: none; }
.drow .k { color: var(--text-3); flex: none; }
.drow .v {
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
}
.contract-row { cursor: pointer; }
.contract-row .v {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 6px;
}
.contract-row .v svg { width: 14px; height: 14px; flex: none; }
.tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(52,199,89,0.13);
  color: #1f9d44;
  margin-left: 4px;
}
.tag.no { background: rgba(142,142,147,0.13); color: var(--text-3); }

/* ---------- Top-volume strip ---------- */
.strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 4px 12px;
  margin: 0 -4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.strip::-webkit-scrollbar { display: none; }
.strip-card {
  flex: none;
  width: 148px;
  background: var(--card);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 12px 14px;
  animation: rise 0.5s var(--spring) backwards;
}
.strip-card .rank {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-3);
  letter-spacing: 0.5px;
}
.strip-card .tok {
  font-size: 17px;
  font-weight: 800;
  margin-top: 4px;
  letter-spacing: -0.3px;
}
.strip-card .vol {
  font-size: 12.5px;
  color: var(--text-3);
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}
.strip-card .trades {
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}

/* ---------- Skeletons ---------- */
.skel {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  margin-bottom: 10px;
}
.skel-line {
  border-radius: 8px;
  background: linear-gradient(90deg, #ececf1 25%, #f7f7fa 50%, #ececf1 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Empty / error states ---------- */
.state-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px 20px;
  text-align: center;
  animation: rise 0.5s var(--spring) backwards;
}
.state-ring {
  width: 56px; height: 56px;
  border-radius: 50%;
  margin: 0 auto 14px;
  background: #f2f2f7;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3);
}
.state-ring svg { width: 26px; height: 26px; }
.state-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.2px;
}
.state-card p {
  margin: 0 0 16px;
  font-size: 13.5px;
  color: var(--text-3);
}
.retry-btn {
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  padding: 10px 26px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.18s var(--spring), opacity 0.18s;
}
.retry-btn:active { transform: scale(0.94); opacity: 0.85; }

.spinner {
  width: 34px; height: 34px;
  margin: 26px auto;
  border-radius: 50%;
  border: 3px solid #e5e5ea;
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}

/* ---------- Search (history) ---------- */
.search-wrap {
  position: sticky;
  top: 59px;
  z-index: 40;
  padding: 10px 0;
  background: var(--nav-blur);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}
.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #e9e9ee;
  border-radius: 12px;
  padding: 9px 12px;
}
.search-box svg { width: 16px; height: 16px; color: var(--text-3); flex: none; }
.search-box input {
  border: none;
  background: none;
  outline: none;
  font-size: 16px;
  font-family: inherit;
  width: 100%;
  color: var(--text);
}
.search-box input::placeholder { color: var(--text-3); }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 36px;
  transform: translateX(-50%) translateY(20px);
  background: rgba(28, 28, 30, 0.92);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s var(--spring);
  z-index: 100;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.updated {
  text-align: center;
  font-size: 12px;
  color: var(--text-3);
  margin-top: 22px;
  font-variant-numeric: tabular-nums;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
