:root {
  --bg: #0a0a0b;
  --bg-card: #131316;
  --border: #1f1f23;
  --border-hover: #2c2c33;
  --fg: #f5f5f7;
  --fg-muted: #8a8a93;
  --accent-1: #ff7a59;
  --accent-2: #ec4899;
}

body.theme-red {
  --accent-1: #ef4444;
  --accent-2: #f97316;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

body {
  background:
    radial-gradient(ellipse at 50% -10%, color-mix(in srgb, var(--accent-1) 18%, transparent), transparent 50%),
    radial-gradient(ellipse at 80% 100%, color-mix(in srgb, var(--accent-2) 12%, transparent), transparent 50%),
    var(--bg);
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 24px 64px;
}

.crumb {
  font-size: 13px;
  color: var(--fg-muted);
  margin-bottom: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: color 0.12s ease;
}
.crumb:hover { color: var(--fg); }
.crumb svg { width: 14px; height: 14px; }

/* ---- Hero (detail page) ---- */
.hero {
  text-align: center;
}
.icon {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 20px 60px -10px color-mix(in srgb, var(--accent-1) 35%, transparent);
  margin-bottom: 28px;
  overflow: hidden;
  color: #fff;
}
.icon svg { width: 52px; height: 52px; }
.icon img { width: 64px; height: 64px; image-rendering: -webkit-optimize-contrast; }

h1 {
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.tagline {
  font-size: 18px;
  color: var(--fg-muted);
  max-width: 460px;
  margin: 0 auto 40px;
  line-height: 1.5;
}

/* ---- Download buttons ---- */
.downloads {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  color: var(--fg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
  min-width: 240px;
  justify-content: flex-start;
  text-align: left;
}
.btn:hover {
  border-color: var(--border-hover);
  background: #18181c;
  transform: translateY(-1px);
}
.btn svg { flex-shrink: 0; width: 28px; height: 28px; }
.btn .label-block { display: flex; flex-direction: column; line-height: 1.15; }
.btn .small {
  font-size: 11px;
  color: var(--fg-muted);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.btn .big { font-size: 16px; font-weight: 600; }
.btn.primary {
  border-color: var(--accent-1);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent-1) 12%, transparent), color-mix(in srgb, var(--accent-2) 8%, transparent));
}

.hint {
  text-align: center;
  font-size: 13px;
  color: var(--fg-muted);
  margin-top: 20px;
}
.hint a { color: var(--fg); text-decoration: underline; text-decoration-color: #444; text-underline-offset: 3px; }
.hint a:hover { text-decoration-color: var(--fg); }

/* ---- Notes card (detail page) ---- */
.notes {
  margin-top: 56px;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--fg-muted);
}
.notes h3 {
  color: var(--fg);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}
.notes p + p { margin-top: 10px; }
.notes code {
  background: #0a0a0b;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12.5px;
  color: var(--fg);
}
.notes details { margin-top: 14px; }
.notes summary { color: var(--fg); cursor: pointer; font-weight: 500; }
.notes ul { margin: 10px 0 0 18px; }
.notes strong { color: var(--fg); }

/* ---- Catalog (home) ---- */
.catalog-header {
  text-align: center;
  margin-bottom: 48px;
}
.catalog-header h1 {
  font-size: 40px;
  margin-bottom: 10px;
}
.catalog-header p {
  font-size: 16px;
  color: var(--fg-muted);
  max-width: 420px;
  margin: 0 auto;
}

.app-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.app-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  text-decoration: none;
  color: var(--fg);
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}
.app-card:hover {
  border-color: var(--border-hover);
  background: #16161a;
  transform: translateY(-1px);
}

.app-card .tile {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.app-card .tile svg { width: 32px; height: 32px; }
.app-card .tile img { width: 44px; height: 44px; }

.app-card .body { flex: 1; min-width: 0; }
.app-card .body .name {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 4px;
}
.app-card .body .desc {
  font-size: 13.5px;
  color: var(--fg-muted);
  line-height: 1.45;
}

.platforms {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  margin-left: auto;
  align-items: center;
}
.platforms .pill {
  font-size: 11px;
  font-weight: 500;
  padding: 4px 9px;
  border-radius: 999px;
  background: #1f1f23;
  color: var(--fg-muted);
  letter-spacing: 0.02em;
}
.app-card .chevron {
  color: var(--fg-muted);
  margin-left: 8px;
  flex-shrink: 0;
  transition: transform 0.14s ease, color 0.14s ease;
}
.app-card:hover .chevron {
  color: var(--fg);
  transform: translateX(2px);
}
.app-card .chevron svg { width: 18px; height: 18px; }

/* ---- Footer ---- */
footer {
  margin-top: 64px;
  font-size: 13px;
  color: var(--fg-muted);
  text-align: center;
}
footer a { color: var(--fg-muted); text-decoration: none; }
footer a:hover { color: var(--fg); }

@media (max-width: 600px) {
  h1 { font-size: 34px; }
  .btn { min-width: 100%; }
  .app-card { padding: 16px; gap: 14px; }
  .app-card .tile { width: 52px; height: 52px; }
  .app-card .tile svg { width: 26px; height: 26px; }
  .platforms { display: none; }
  .catalog-header h1 { font-size: 32px; }
}
