:root {
  --bg: #0a0a0f;
  --bg-elevated: #121218;
  --card: #15151d;
  --card-border: rgba(255,255,255,0.08);
  --card-border-hover: rgba(124,92,255,0.5);
  --text: #f2f2f7;
  --text-dim: #9a9aa8;
  --text-faint: #63636f;
  --accent: #7c5cff;
  --accent-2: #5c9dff;
  --accent-soft: rgba(124,92,255,0.15);
  --radius: 18px;
  --radius-sm: 12px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

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

/* Ambient background glow */
.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(600px circle at 15% 0%, rgba(124,92,255,0.16), transparent 60%),
    radial-gradient(700px circle at 85% 15%, rgba(92,157,255,0.12), transparent 60%),
    var(--bg);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  background: rgba(10,10,15,0.7);
  border-bottom: 1px solid var(--card-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 17px;
  color: white;
}

.brand-mark.small { width: 24px; height: 24px; border-radius: 7px; font-size: 13px; margin-right: 8px; vertical-align: middle; }

.brand-name {
  font-weight: 650;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.accent { color: var(--accent-2); background: linear-gradient(135deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.site-nav { display: flex; gap: 28px; }
.site-nav a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  transition: color 0.15s ease;
}
.site-nav a:hover { color: var(--text); }

/* Hero */
.hero {
  padding: 96px 24px 56px;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-bottom: 24px;
  border: 1px solid rgba(124,92,255,0.25);
}

.hero h1 {
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin: 0 0 22px;
}

.hero-sub {
  max-width: 560px;
  margin: 0 auto;
  color: var(--text-dim);
  font-size: 17px;
}

/* Toolbar */
.apps-section { padding: 24px 24px 80px; }

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.search-box {
  position: relative;
  flex: 1 1 260px;
  max-width: 320px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--text-faint);
  pointer-events: none;
}

#search {
  width: 100%;
  padding: 11px 14px 11px 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--card-border);
  background: var(--card);
  color: var(--text);
  font-size: 14.5px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease;
}
#search::placeholder { color: var(--text-faint); }
#search:focus { border-color: var(--accent); }

.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-pill {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: transparent;
  color: var(--text-dim);
  font-size: 13.5px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.filter-pill:hover { color: var(--text); border-color: rgba(255,255,255,0.2); }
.filter-pill.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  border-color: transparent;
}

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 26px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--card-border-hover);
  box-shadow: 0 20px 40px -20px rgba(124,92,255,0.35);
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
}

.icon-tile {
  width: 56px;
  height: 56px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}

.icon-tile svg { width: 28px; height: 28px; }
.icon-tile img { width: 28px; height: 28px; object-fit: contain; border-radius: 6px; }

.badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 5px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.badge.soon { background: rgba(124,92,255,0.16); color: var(--accent-2); border: 1px solid rgba(124,92,255,0.3); }
.badge.new { background: rgba(52,211,153,0.14); color: #34d399; border: 1px solid rgba(52,211,153,0.3); }
.badge.live { background: rgba(52,211,153,0.18); color: #34d399; border: 1px solid rgba(52,211,153,0.4); }

.card h3 {
  font-size: 18.5px;
  font-weight: 650;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}

.card .category {
  font-size: 12.5px;
  color: var(--text-faint);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 12px;
}

.price { float: right; color: var(--accent-2); font-weight: 700; }
.card p.desc {
  color: var(--text-dim);
  font-size: 14.5px;
  margin: 0 0 22px;
  flex-grow: 1;
}

.card-actions {
  display: flex;
  gap: 10px;
}

.btn {
  flex: 1;
  text-align: center;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  font-family: inherit;
  transition: all 0.15s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
}
.btn-primary:hover { filter: brightness(1.1); }
.btn-primary:disabled, .btn-primary.disabled {
  background: var(--bg-elevated);
  color: var(--text-faint);
  cursor: not-allowed;
}

.btn-secondary {
  background: transparent;
  border-color: var(--card-border);
  color: var(--text-dim);
}
.btn-secondary:hover { color: var(--text); border-color: rgba(255,255,255,0.25); }

.empty-state {
  text-align: center;
  color: var(--text-faint);
  padding: 60px 0;
  font-size: 15px;
}
.hidden { display: none !important; }

/* About */
.about {
  padding: 60px 24px 100px;
  border-top: 1px solid var(--card-border);
  text-align: center;
}
.about h2 {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}
.about p {
  max-width: 540px;
  margin: 0 auto;
  color: var(--text-dim);
  font-size: 15.5px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--card-border);
  padding: 28px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-copy { color: var(--text-faint); font-size: 13.5px; }
.footer-links a { color: var(--text-dim); font-size: 13.5px; text-decoration: none; }
.footer-links a:hover { color: var(--text); }

@media (max-width: 560px) {
  .hero { padding: 64px 20px 40px; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .search-box { max-width: none; }
}
