/* ── VARIABLES ── */
:root {
  --gold: #e8c97e;
  --gold-dim: #c8a84e;
  --gold-glow: rgba(232,201,126,0.15);
  --bg: #0a0a0c;
  --surface: #111114;
  --surface2: #18181d;
  --surface3: #1f1f26;
  --border: rgba(255,255,255,0.07);
  --border-gold: rgba(232,201,126,0.25);
  --text: #f0f0f4;
  --text-dim: #a0a0b0;
  --muted: #5a5a6e;
  --red: #e05c5c;
  --blue: #5cb8e0;
  --radius: 16px;
  --radius-sm: 10px;
  --nav-h: 60px;
  --bottom-h: 68px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ── RESET ── */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { height: 100%; }

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100%;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── TOP NAV ── */
.top-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(10,10,12,0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 100;
}

.logo-text {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.logo-text span { color: var(--gold); }

.nav-badge {
  background: var(--gold);
  color: #0a0a0c;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 20px;
}

/* ── MAIN ── */
.main {
  padding-top: var(--nav-h);
  padding-bottom: calc(var(--bottom-h) + var(--safe-bottom) + 8px);
}

/* ── HERO ── */
.hero {
  padding: 28px 20px 20px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--gold-glow);
  border: 1px solid var(--border-gold);
  color: var(--gold);
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 14px;
}

.hero h1 {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
}
.hero h1 em {
  font-style: normal;
  color: var(--gold);
}

.hero-sub {
  color: var(--text-dim);
  font-size: 0.88rem;
  line-height: 1.6;
  max-width: 320px;
}

/* ── STATS ── */
.stats {
  display: flex;
  margin: 0 20px 24px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.stat {
  flex: 1;
  padding: 14px 0;
  text-align: center;
  border-right: 1px solid var(--border);
}
.stat:last-child { border-right: none; }

.stat-num {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 4px;
}
.stat-label {
  font-size: 0.65rem;
  color: var(--muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* ── CHIPS ── */
.chips-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0 20px 20px;
}
.chips-wrap::-webkit-scrollbar { display: none; }

.chips {
  display: flex;
  gap: 8px;
  width: max-content;
}

.chip {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  padding: 9px 16px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
  user-select: none;
}
.chip:active { opacity: 0.7; }
.chip.active {
  background: var(--gold);
  border-color: var(--gold);
  color: #0a0a0c;
}

/* ── SECTION LABEL ── */
.section-label {
  padding: 0 20px 14px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.section-label h2 {
  font-size: 1.05rem;
  font-weight: 700;
}
.section-label span {
  font-size: 0.75rem;
  color: var(--gold);
  font-weight: 600;
}

/* ── CARDS ── */
.cards-list {
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  animation: slideUp 0.3s ease both;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.card:nth-child(2) { animation-delay: 0.05s; }
.card:nth-child(3) { animation-delay: 0.10s; }
.card:nth-child(4) { animation-delay: 0.15s; }

.card-header {
  height: 86px;
  background: var(--surface2);
  display: flex;
  align-items: center;
  padding: 0 18px;
  gap: 14px;
}

.card-emoji-wrap {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--surface3);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  flex-shrink: 0;
}

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

.card-title {
  font-size: 0.93rem;
  font-weight: 700;
  margin-bottom: 5px;
  line-height: 1.3;
}

.badges-row { display: flex; gap: 5px; }

.badge {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 20px;
}
.badge-top { background: rgba(232,201,126,0.12); color: var(--gold); border: 1px solid rgba(232,201,126,0.3); }
.badge-hot { background: rgba(224,92,92,0.12);   color: var(--red);  border: 1px solid rgba(224,92,92,0.3);  }
.badge-new { background: rgba(92,184,224,0.12);  color: var(--blue); border: 1px solid rgba(92,184,224,0.3); }

.card-desc {
  padding: 14px 18px;
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.6;
  border-bottom: 1px solid var(--border);
}

.top-pick-bar {
  margin: 14px 18px 8px;
  background: rgba(232,201,126,0.06);
  border: 1px solid var(--border-gold);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.75rem;
  color: var(--gold);
  font-weight: 600;
}

/* ── STORES ── */
.stores {
  padding: 10px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.store-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s;
}
.store-btn:active { opacity: 0.7; }
.store-btn.is-top { border-color: var(--border-gold); background: rgba(232,201,126,0.04); }

.store-left { display: flex; align-items: center; gap: 10px; }

.store-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--surface3);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.store-name {
  font-size: 0.87rem;
  font-weight: 600;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
}
.top-star { color: var(--gold); font-size: 0.75rem; }

.store-sub {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.visited-tag {
  font-size: 0.6rem;
  color: var(--blue);
  background: rgba(92,184,224,0.1);
  border: 1px solid rgba(92,184,224,0.25);
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 600;
}

.store-arrow {
  color: var(--muted);
  font-size: 1rem;
  flex-shrink: 0;
}

/* ── DIVIDER ── */
.cat-divider {
  height: 1px;
  background: var(--border);
  margin: 24px 20px;
}

/* ── ABOUT ── */
.about-panel {
  margin: 8px 20px 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px;
  text-align: center;
}
.about-panel h2 { font-size: 1rem; font-weight: 700; margin-bottom: 10px; }
.about-panel h2 span { color: var(--gold); }
.about-panel p { font-size: 0.82rem; color: var(--text-dim); line-height: 1.65; }

/* ── HOW IT WORKS ── */
.hiw-section { padding: 24px 20px 0; }
.hiw-section h2 { font-size: 1rem; font-weight: 700; margin-bottom: 14px; }
.hiw-section h2 span { color: var(--gold); }

.hiw-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.hiw-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
}

.hiw-num {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 8px;
}
.hiw-card h3 { font-size: 0.82rem; font-weight: 700; margin-bottom: 5px; }
.hiw-card p  { font-size: 0.75rem; color: var(--text-dim); line-height: 1.6; }

/* ── DISCLOSURE ── */
.disclosure { margin: 20px 20px 0; }
.disclosure p {
  font-size: 0.73rem;
  color: var(--muted);
  line-height: 1.65;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}

/* ── BOTTOM NAV ── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: calc(var(--bottom-h) + var(--safe-bottom));
  background: rgba(10,10,12,0.92);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  padding-top: 8px;
  z-index: 100;
}

.bottom-nav-inner { display: flex; width: 100%; }

.bottom-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 0;
  cursor: pointer;
  transition: opacity 0.15s;
  user-select: none;
  text-decoration: none;
  color: inherit;
}
.bottom-tab:active { opacity: 0.6; }

.bottom-tab-icon { font-size: 1.2rem; line-height: 1; }

.bottom-tab-label {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--muted);
}
.bottom-tab.active .bottom-tab-label { color: var(--gold); }

/* ── POPUP / SHEET ── */
#overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  z-index: 200;
  display: none;
  align-items: flex-end;
  justify-content: center;
}
#overlay.open { display: flex; }

.sheet {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px 22px 0 0;
  width: 100%;
  max-width: 480px;
  padding: 0 0 calc(20px + var(--safe-bottom));
  animation: sheetUp 0.25s ease;
}

@keyframes sheetUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.sheet-handle {
  width: 36px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 12px auto 20px;
}

.sheet-icon { text-align: center; font-size: 2.4rem; margin-bottom: 12px; }

.sheet-title {
  font-size: 1.15rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 4px;
}

.sheet-store {
  text-align: center;
  color: var(--gold);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 16px;
}

.sheet-body { padding: 0 24px; }

.sheet-note {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.83rem;
  line-height: 1.6;
  margin-bottom: 10px;
}

.progress-wrap {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  margin: 16px 0;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: var(--gold);
  width: 0%;
  transition: width 3s linear;
}

.sheet-disclaimer {
  text-align: center;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 20px;
}

.btn-go {
  display: block;
  width: 100%;
  background: var(--gold);
  color: #0a0a0c;
  font-weight: 700;
  font-size: 0.93rem;
  padding: 15px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
  margin-bottom: 10px;
}
.btn-go:active { opacity: 0.85; background: var(--gold-dim); }

.btn-back {
  display: block;
  width: 100%;
  background: transparent;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 10px;
  border: none;
  cursor: pointer;
}

/* ── FOOTER ── */
.main-footer {
  padding: 20px 20px 8px;
  text-align: center;
  font-size: 0.73rem;
  color: var(--muted);
  line-height: 1.7;
}
.main-footer strong { font-weight: 800; }
.main-footer strong span { color: var(--gold); }

/* ── LOAD MORE / SENTINEL ── */
.load-sentinel {
  height: 1px;
  margin: 0 20px;
}
.load-more-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px;
  color: var(--muted);
  font-size: 0.78rem;
}
.spinner-dot {
  width: 6px; height: 6px;
  background: var(--gold);
  border-radius: 50%;
  animation: spinBounce 1.2s ease infinite;
}
.spinner-dot:nth-child(2) { animation-delay: 0.15s; }
.spinner-dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes spinBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40%            { transform: scale(1);   opacity: 1; }
}

/* ── SKELETON ── */
.skeleton {
  background: linear-gradient(90deg, var(--surface2) 25%, var(--surface3) 50%, var(--surface2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 6px;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.card-skeleton {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 14px;
}
.card-skeleton-header {
  height: 86px;
  background: var(--surface2);
  display: flex;
  align-items: center;
  padding: 0 18px;
  gap: 14px;
}
.sk-emoji { width: 52px; height: 52px; border-radius: 12px; }
.sk-lines { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.sk-line  { height: 12px; }
.sk-line.w60 { width: 60%; }
.sk-line.w40 { width: 40%; }
.card-skeleton-body { padding: 14px 18px; display: flex; flex-direction: column; gap: 10px; }
.sk-store { height: 52px; border-radius: var(--radius-sm); }

/* ── EMPTY STATE ── */
.empty-state {
  margin: 0 20px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
}
.empty-icon  { font-size: 2.8rem; margin-bottom: 14px; }
.empty-title { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.empty-desc  { font-size: 0.82rem; color: var(--text-dim); line-height: 1.6; }


@media (min-width: 768px) {
  .main {
    max-width: 700px;
    margin: 0 auto;
  }

  .top-nav {
    max-width: 800px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 0 0 16px 16px;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
  }

  .bottom-nav {
    max-width: 860px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 16px 16px 0 0;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
  }
}
