:root {
  --bg: #08111d;
  --panel: rgba(17, 24, 41, 0.62);
  --panel-border: rgba(255, 255, 255, 0.06);
  --text: #edf3ff;
  --muted: #98a6c2;
  --accent: #7c8cff;
  --accent-2: #56d6c6;
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(124, 140, 255, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(86, 214, 198, 0.12), transparent 24%),
    linear-gradient(180deg, #050913 0%, var(--bg) 100%);
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  width: min(1240px, calc(100% - 24px));
  margin: 0 auto;
  padding: 22px 0 40px;
}

.store-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  padding: 4px 2px;
}

.brand {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.store-subtitle {
  color: var(--muted);
  margin-top: 2px;
  font-size: 0.82rem;
}

.header-pill {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 0.78rem;
}

.hero,
.product-shell,
.readme-block {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero {
  border-radius: 18px;
  padding: 14px 16px;
  margin-bottom: 12px;
}

.product-shell {
  border-radius: 18px;
  overflow: hidden;
  padding: 16px;
}

.catalog-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.catalog-note {
  margin: 0;
  color: var(--muted);
  max-width: 56ch;
  font-size: 0.82rem;
}

.eyebrow,
.section-heading span,
.readme-head span {
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.68rem;
  font-weight: 700;
}

h1 {
  margin: 10px 0 12px;
  font-size: clamp(1.55rem, 2.8vw, 2.35rem);
  line-height: 1.08;
  max-width: 12ch;
}

.lead {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
  max-width: 68ch;
}

.section-heading h2 {
  margin: 6px 0 0;
  font-size: 0.98rem;
}

.script-description {
  margin: 10px 0 14px;
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.82rem;
  max-width: 72ch;
}

.scripts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.script-card {
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.script-card-top {
  min-height: 0;
  position: relative;
  background:
    radial-gradient(circle at top, rgba(124, 140, 255, 0.18), transparent 45%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
  padding: 0;
}

.script-card-body {
  padding: 16px;
}

.product-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.tag {
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.74rem;
  font-weight: 600;
}

.script-image-wrap {
  width: 100%;
  display: block;
}

.script-image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: center;
  border-radius: 16px 16px 0 0;
  box-shadow: none;
  background: transparent;
}

.image-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  display: grid;
  place-items: center;
  color: var(--muted);
}

.script-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 12px;
}

.button {
  padding: 9px 12px;
  border-radius: 999px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
}

.button.primary {
  background: linear-gradient(135deg, var(--accent), #9f6bff);
}

.meta-item {
  min-width: 120px;
  padding: 9px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.meta-item span {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  margin-bottom: 4px;
}

.meta-item strong {
  font-size: 0.76rem;
  word-break: break-word;
}

.readme-block {
  margin-top: 0;
  padding: 12px;
  border-radius: 0 0 16px 16px;
  background: rgba(0, 0, 0, 0.12);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.readme-head {
  margin-bottom: 6px;
}

.status {
  margin: 6px 0 10px;
  color: var(--muted);
  font-size: 0.76rem;
}

.readme {
  overflow-x: auto;
  font-size: 0.8rem;
  line-height: 1.55;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 4px;
}

.readme-inline {
  margin-top: 10px;
  border-radius: 14px;
}

.empty-state {
  color: var(--muted);
  padding: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.8rem;
}

.readme h1,
.readme h2,
.readme h3,
.readme h4 {
  line-height: 1.2;
}

.readme a {
  color: #9dd8ff;
}

.readme pre {
  padding: 12px;
  border-radius: 12px;
  overflow-x: auto;
  background: rgba(255, 255, 255, 0.04);
}

.readme img {
  max-width: 100%;
}

code {
  background: rgba(255, 255, 255, 0.08);
  padding: 0.12rem 0.3rem;
  border-radius: 6px;
  font-size: 0.9em;
}

@media (max-width: 720px) {
  .page {
    width: min(100% - 14px, 1240px);
    padding: 10px 0 22px;
  }

  .hero,
  .product-shell,
  .readme-block {
    padding: 12px;
    border-radius: 14px;
  }

  .store-header {
    grid-template-columns: 1fr;
    display: grid;
  }

  .store-header {
    margin-bottom: 8px;
  }

  .header-pill {
    justify-self: start;
  }

  .product-shell {
    padding: 12px;
  }

  .scripts-grid {
    grid-template-columns: 1fr;
  }

  .script-card-top {
    min-height: 0;
  }

  .script-card-body {
    padding: 12px;
  }

  h1 {
    max-width: none;
  }

  .meta-item {
    min-width: 100%;
  }
}
