:root {
  --bg: #07090D;
  --surface: #10131A;
  --text: #F5F6F8;
  --text-muted: #7A8291;
  --line: #1C2129;
  --gold: #E8B34C;
  --font-display: 'Space Grotesk', sans-serif;
  --font-numeral: 'Bebas Neue', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; }
html { color-scheme: dark; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }

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

/* ---------- Ambient texture & light ---------- */

.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.glow {
  position: fixed;
  z-index: 0;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  opacity: 0.35;
  animation: drift 22s ease-in-out infinite alternate;
}
.glow-a { width: 480px; height: 480px; top: -140px; left: -120px; background: #FF3D68; }
.glow-b { width: 420px; height: 420px; top: 120px; right: -160px; background: #22D3EE; animation-delay: -8s; }

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(40px, 60px) scale(1.12); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

/* everything visible sits above the ambient layers */
.shell-header, .hero, main, .shell-footer { position: relative; z-index: 2; }

/* ---------- Header ---------- */

.shell-header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  justify-content: space-between;
  align-items: center;
  max-width: 1040px;
  margin: 0 auto;
  padding: 2rem 1.5rem 0;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.06em;
}
.wordmark-jump { color: var(--text); }
.wordmark-store { color: var(--text-muted); }

.ig-link {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  border-bottom: 1px solid transparent;
}
.ig-link:hover { color: var(--gold); border-bottom-color: var(--gold); }

/* ---------- Hero ---------- */

.hero {
  max-width: 1040px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 3rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 7vw, 4.4rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0;
  animation: fadeUp 0.6s ease both;
}

.hero-accent {
  background: linear-gradient(90deg, #FF3D68, #22D3EE);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  margin: 1.2rem 0 0;
  max-width: 42ch;
  color: var(--text-muted);
  font-size: 1.05rem;
  animation: fadeUp 0.6s ease 0.1s both;
}

.handle { color: var(--text); font-weight: 600; }

/* ---------- Main / banners ---------- */

#view {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
  min-height: 40vh;
}

.banner-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.banner {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 220px;
  padding: 2rem 2.4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  cursor: pointer;
  text-align: left;
  width: 100%;
  color: inherit;
  font: inherit;
  animation: fadeUp 0.55s ease both;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.banner:nth-child(1) { animation-delay: 0.1s; }
.banner:nth-child(2) { animation-delay: 0.2s; }
.banner:nth-child(3) { animation-delay: 0.3s; }

.banner:hover {
  transform: translateY(-3px);
  border-color: var(--accent, var(--line));
  box-shadow: 0 18px 50px -20px var(--accent-glow, transparent);
}

.banner-wash {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 15% 30%, var(--accent-soft, transparent), transparent 55%);
  pointer-events: none;
}

.banner-ghost {
  position: absolute;
  top: -0.6rem;
  right: 1.5rem;
  font-family: var(--font-numeral);
  font-size: 9rem;
  line-height: 1;
  color: var(--accent, var(--text));
  opacity: 0.08;
  pointer-events: none;
  user-select: none;
}

.banner-content {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1.6rem;
  z-index: 1;
}

.banner-glyph {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  color: var(--accent, var(--text));
  transition: transform 0.25s ease;
}
.banner:hover .banner-glyph { transform: scale(1.08) rotate(-4deg); }

.banner-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.65rem;
  margin: 0 0 0.25rem;
}

.banner-tagline {
  color: var(--text-muted);
  font-size: 0.98rem;
  margin: 0 0 0.9rem;
}

.banner-meta {
  display: flex;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-muted);
}
.banner-meta span { border: 1px solid var(--line); padding: 0.15rem 0.55rem; }

.banner-empty {
  min-height: 140px;
  border-style: dashed;
  align-items: center;
  justify-content: center;
  cursor: default;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.banner-empty:hover { transform: none; box-shadow: none; border-color: var(--line); }

/* ---------- Detail view ---------- */

.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 1.5rem 0;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.92rem;
  cursor: pointer;
  padding: 0;
}
.detail-back:hover { color: var(--text); }

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 3rem 2.4rem;
  border: 1px solid var(--line);
  margin-bottom: 2rem;
}

.detail-hero-wash {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, var(--accent-soft, transparent), transparent 60%);
  pointer-events: none;
}

.detail-hero-content { position: relative; display: flex; align-items: center; gap: 1.6rem; }
.detail-glyph { width: 64px; height: 64px; color: var(--accent, var(--text)); flex-shrink: 0; }
.detail-name { font-family: var(--font-display); font-weight: 700; font-size: 2.1rem; margin: 0 0 0.35rem; }
.detail-tagline { color: var(--text-muted); margin: 0; font-size: 1.05rem; }

.detail-description { max-width: 62ch; font-size: 1.03rem; margin: 0 0 1.75rem; color: var(--text); }

.detail-features { list-style: none; padding: 0; margin: 0 0 2rem; display: grid; gap: 0.65rem; }
.detail-features li { padding-left: 1.1rem; border-left: 2px solid var(--accent, var(--line)); font-size: 0.98rem; }

.detail-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 0.9rem 0;
  margin-bottom: 1.75rem;
}
.detail-meta-row strong { color: var(--text); font-weight: 500; }

.download-btn {
  display: inline-block;
  padding: 0.85rem 1.8rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  color: #07090D;
  background: var(--accent, var(--gold));
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.download-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 34px -14px var(--accent-glow, transparent); }

.fetch-status {
  margin: 0.6rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  min-height: 1em;
}
.fetch-status:empty { display: none; }

.detail-note {
  margin: 0.9rem 0 0;
  font-size: 0.86rem;
  color: var(--text-muted);
}
.detail-note a { color: var(--gold); border-bottom: 1px solid transparent; }
.detail-note a:hover { border-bottom-color: var(--gold); }

.install-guide { margin-top: 2.5rem; }
.install-guide h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  margin: 0 0 1rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.install-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.install-steps li {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  background: var(--surface);
}
.install-steps p { margin: 0; font-size: 0.92rem; color: var(--text-muted); line-height: 1.5; }
.install-steps strong { color: var(--text); }
.install-num {
  flex-shrink: 0;
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--accent, var(--line));
  color: var(--accent, var(--text));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
}

/* ---------- Footer ---------- */

.shell-footer {
  max-width: 1040px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3.5rem;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 0.88rem;
}

@media (max-width: 720px) {
  .shell-header { padding: 1.5rem 1.25rem 0; }
  .hero { padding: 2.5rem 1.25rem 2rem; }
  #view { padding: 0 1.25rem 3rem; }
  .banner { padding: 1.5rem 1.75rem; min-height: 190px; }
  .detail-hero { padding: 2rem 1.75rem; }
}

@media (max-width: 560px) {
  .shell-header { gap: 0.5rem 0.75rem; }
  .wordmark { font-size: 1rem; }
  .hero { padding: 2rem 1.1rem 1.75rem; }
  .hero-sub { font-size: 0.98rem; }
  .banner { padding: 1.4rem 1.25rem; min-height: auto; }
  .banner-content { gap: 1rem; }
  .banner-glyph { width: 44px; height: 44px; }
  .banner-name { font-size: 1.35rem; }
  .banner-ghost { font-size: 5.5rem; top: -0.3rem; right: 1rem; }
  .banner-meta { flex-wrap: wrap; gap: 0.5rem; }
  .detail-hero { padding: 1.75rem 1.25rem; }
  .detail-hero-content { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .detail-name { font-size: 1.7rem; }
  .detail-meta-row { gap: 0.9rem 1.2rem; }
  .download-btn { width: 100%; text-align: center; }
  .install-steps li { padding: 0.8rem; }
}

@media (max-width: 380px) {
  .hero h1 { font-size: 2.1rem; }
  .banner-ghost { display: none; }
  .ig-link { font-size: 0.78rem; }
}
