/* NexaStore — design tokens
   Type is system-ui on purpose: zero font downloads, which matters
   on the same low-bandwidth Android connections this store is built for. */

:root{
  --bg: #14101f;
  --surface: #1e1730;
  --surface-2: #271f3d;
  --border: #382c56;
  --gold: #f2b134;
  --jade: #2ec4b6;
  --crimson: #e84855;
  --cream: #f5efe6;
  --muted: #a99fc0;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 14px;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin: 0;
  background: var(--bg);
  color: var(--cream);
  font-family: var(--sans);
  line-height: 1.5;
}
a{ color: inherit; text-decoration: none; }
img{ max-width: 100%; display: block; }
button{ font-family: inherit; cursor: pointer; }

:focus-visible{
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce){
  *{ animation: none !important; transition: none !important; }
}

.wrap{ max-width: 1160px; margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.site-header{
  position: sticky; top: 0; z-index: 20;
  background: rgba(20,16,31,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .bar{
  display: flex; align-items: center; gap: 16px;
  padding: 14px 20px;
}
.logo{
  font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em;
  white-space: nowrap;
}
.logo span{ color: var(--gold); }
.search{
  flex: 1; display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 9px 16px; min-width: 0;
}
.search input{
  flex: 1; background: none; border: none; color: var(--cream);
  font-size: 0.95rem; min-width: 0;
}
.search input::placeholder{ color: var(--muted); }
.search input:focus{ outline: none; }
.header-cta{
  background: var(--gold); color: #14101f; font-weight: 700;
  border: none; border-radius: 999px; padding: 9px 18px;
  font-size: 0.9rem; white-space: nowrap;
}

/* ---------- Hero ---------- */
.hero{
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(circle at 15% 20%, rgba(46,196,182,0.10), transparent 45%),
    radial-gradient(circle at 85% 0%, rgba(242,177,52,0.10), transparent 40%);
}
.hero .eyebrow{
  color: var(--jade); font-family: var(--mono); font-size: 0.78rem;
  letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 14px;
}
.hero h1{
  font-size: clamp(2rem, 5.5vw, 3.4rem);
  font-weight: 800; letter-spacing: -0.03em; line-height: 1.04;
  margin: 0 0 16px;
  max-width: 14ch;
}
.hero p{
  color: var(--muted); font-size: 1.05rem; max-width: 42ch; margin: 0 0 28px;
}
.hero-stats{
  display: flex; gap: 28px; flex-wrap: wrap; margin-top: 32px;
}
.hero-stats div{ font-family: var(--mono); }
.hero-stats b{ display: block; font-size: 1.4rem; color: var(--gold); }
.hero-stats span{ color: var(--muted); font-size: 0.78rem; }

/* ---------- Category rail ---------- */
.stalls{
  display: flex; gap: 10px; overflow-x: auto; padding: 20px 0 24px;
  scrollbar-width: none;
}
.stalls::-webkit-scrollbar{ display: none; }
.stall{
  flex: 0 0 auto;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 9px 18px; font-size: 0.88rem;
  color: var(--muted); white-space: nowrap;
}
.stall.active{ background: var(--gold); color: #14101f; border-color: var(--gold); font-weight: 700; }

/* ---------- Section headers ---------- */
.section{ padding: 36px 0; }
.section-head{
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 18px; gap: 12px;
}
.section-head h2{ font-size: 1.25rem; margin: 0; letter-spacing: -0.01em; }
.section-head a{ color: var(--jade); font-size: 0.85rem; font-weight: 600; }

/* ---------- App grid & cards ---------- */
.grid{
  display: grid; gap: 16px;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 640px){ .grid{ grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 920px){ .grid{ grid-template-columns: repeat(4, 1fr); } }

.card{
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 10px;
  transition: border-color 0.15s, transform 0.15s;
}
.card:hover{ border-color: var(--gold); transform: translateY(-2px); }
.card .icon{
  width: 52px; height: 52px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.1rem; color: #14101f;
}
.card h3{ font-size: 0.95rem; margin: 0; line-height: 1.3; }
.card .tagline{ color: var(--muted); font-size: 0.78rem; flex: 1; }
.card .meta{ display: flex; align-items: center; gap: 6px; font-size: 0.75rem; color: var(--muted); }
.card .meta .rating{ color: var(--gold); }

/* Data cost badge — the signature element */
.data-cost{
  display: flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 0.68rem;
  background: rgba(46,196,182,0.10); color: var(--jade);
  border: 1px solid rgba(46,196,182,0.3);
  border-radius: 8px; padding: 5px 8px; width: fit-content;
}
.data-cost.heavy{ background: rgba(232,72,85,0.10); color: var(--crimson); border-color: rgba(232,72,85,0.3); }
.data-cost.medium{ background: rgba(242,177,52,0.10); color: var(--gold); border-color: rgba(242,177,52,0.3); }

/* ---------- Trending list ---------- */
.trend-list{ list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.trend-list li{
  display: flex; align-items: center; gap: 14px;
  padding: 12px 8px; border-radius: 10px;
}
.trend-list li:hover{ background: var(--surface); }
.trend-list .rank{ font-family: var(--mono); color: var(--muted); width: 20px; text-align: right; font-size: 0.9rem; }
.trend-list .icon{ width: 40px; height: 40px; border-radius: 10px; flex: 0 0 auto; display:flex;align-items:center;justify-content:center;font-weight:800;color:#14101f; }
.trend-list .info{ flex: 1; min-width: 0; }
.trend-list .info h4{ margin: 0; font-size: 0.88rem; }
.trend-list .info p{ margin: 0; font-size: 0.74rem; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer{
  border-top: 1px solid var(--border); padding: 32px 0; margin-top: 24px;
  color: var(--muted); font-size: 0.82rem;
}
.site-footer .wrap{ display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* ---------- Buttons ---------- */
.btn{
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; padding: 11px 20px; font-weight: 700; font-size: 0.9rem;
  border: none;
}
.btn-primary{ background: var(--gold); color: #14101f; }
.btn-ghost{ background: var(--surface); color: var(--cream); border: 1px solid var(--border); }
.btn-jade{ background: var(--jade); color: #14101f; }

/* ---------- App detail page ---------- */
.app-hero{
  display: flex; gap: 20px; padding: 40px 0; border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.app-hero .icon-lg{
  width: 96px; height: 96px; border-radius: 20px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 2rem; color: #14101f;
}
.app-hero .info{ flex: 1; min-width: 200px; }
.app-hero h1{ margin: 0 0 6px; font-size: 1.6rem; letter-spacing: -0.02em; }
.app-hero .dev{ color: var(--muted); font-size: 0.9rem; margin: 0 0 14px; }
.app-hero .actions{ display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; align-items: center; }

.stat-row{ display: flex; gap: 24px; flex-wrap: wrap; padding: 20px 0; border-bottom: 1px solid var(--border); }
.stat-row div b{ display: block; font-size: 1.1rem; }
.stat-row div span{ color: var(--muted); font-size: 0.75rem; font-family: var(--mono); }

.shots{ display: flex; gap: 12px; overflow-x: auto; padding: 20px 0; scrollbar-width: none; }
.shots::-webkit-scrollbar{ display: none; }
.shots .shot{
  flex: 0 0 auto; width: 180px; height: 320px; border-radius: 14px;
  background: var(--surface-2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 0.75rem; text-align: center; padding: 12px;
}

.desc{ max-width: 68ch; color: var(--cream); }
.desc h2{ font-size: 1.05rem; margin: 28px 0 10px; }

/* ---------- Console / upload form ---------- */
.console-shell{ display: grid; gap: 24px; grid-template-columns: 1fr; padding: 32px 0; }
@media (min-width: 860px){ .console-shell{ grid-template-columns: 380px 1fr; } }
.panel{
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
}
.panel h2{ margin: 0 0 4px; font-size: 1.05rem; }
.panel .hint{ color: var(--muted); font-size: 0.8rem; margin: 0 0 18px; }
.field{ margin-bottom: 16px; }
.field label{ display: block; font-size: 0.8rem; color: var(--muted); margin-bottom: 6px; }
.field input, .field select, .field textarea{
  width: 100%; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 12px; color: var(--cream); font-size: 0.9rem;
  font-family: inherit;
}
.field textarea{ resize: vertical; min-height: 70px; }
.dropzone{
  border: 1.5px dashed var(--border); border-radius: 12px; padding: 22px;
  text-align: center; color: var(--muted); font-size: 0.85rem; margin-bottom: 16px;
}
.dropzone strong{ color: var(--cream); display: block; margin-bottom: 4px; }

.status-pill{
  font-family: var(--mono); font-size: 0.68rem; padding: 4px 10px;
  border-radius: 999px; text-transform: uppercase; letter-spacing: 0.04em;
}
.status-pending{ background: rgba(242,177,52,0.12); color: var(--gold); }
.status-approved{ background: rgba(46,196,182,0.12); color: var(--jade); }
.status-rejected{ background: rgba(232,72,85,0.12); color: var(--crimson); }

.my-apps-row{
  display: flex; align-items: center; gap: 14px; padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.my-apps-row:last-child{ border-bottom: none; }
.my-apps-row .icon{ width: 44px; height: 44px; border-radius: 10px; flex: 0 0 auto; display:flex;align-items:center;justify-content:center;font-weight:800;color:#14101f; }
.my-apps-row .info{ flex: 1; min-width: 0; }
.my-apps-row .info h4{ margin: 0; font-size: 0.9rem; }
.my-apps-row .info p{ margin: 0; font-size: 0.75rem; color: var(--muted); }

.owner-toggle{
  display: flex; align-items: center; justify-content: space-between;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 14px; margin-bottom: 18px; font-size: 0.82rem;
}
