:root {
  color-scheme: dark;
  --text: #f7f8ff;
  --muted: #b9c1d6;
  --panel: rgba(255, 255, 255, .12);
  --panel-strong: rgba(255, 255, 255, .18);
  --line: rgba(255, 255, 255, .18);
  --shadow: 0 24px 70px rgba(0, 0, 0, .38);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(15, 20, 34, .88), rgba(20, 24, 42, .8)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1400' height='900' viewBox='0 0 1400 900'%3E%3Cdefs%3E%3ClinearGradient id='a' x1='0' x2='1' y1='0' y2='1'%3E%3Cstop stop-color='%23174cff'/%3E%3Cstop offset='.34' stop-color='%23ff3b6b'/%3E%3Cstop offset='.68' stop-color='%23ffb000'/%3E%3Cstop offset='1' stop-color='%2307b884'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='1400' height='900' fill='%23101822'/%3E%3Cpath d='M0 170C190 52 323 250 510 126c145-97 250-154 431-68 167 80 262 4 459-58v900H0z' fill='url(%23a)' opacity='.78'/%3E%3Cpath d='M0 575c155-125 302-97 448-14 172 97 300 120 482 1 163-108 288-116 470-44v382H0z' fill='%2308d3ff' opacity='.28'/%3E%3C/svg%3E");
  background-size: cover;
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.5), transparent 76%);
}

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

button,
input {
  font: inherit;
}

.page-shell {
  position: relative;
  width: min(1180px, calc(100% - 28px));
  min-height: 100dvh;
  margin: 0 auto;
  padding: 18px 0 56px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-size: 1.28rem;
  font-weight: 850;
}

.brand img {
  width: 44px;
  height: 44px;
  filter: drop-shadow(0 12px 24px rgba(0,0,0,.35));
}

.search {
  width: min(360px, 44vw);
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: rgba(12, 15, 27, .44);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
  backdrop-filter: blur(20px);
}

.search span {
  color: var(--muted);
  font-size: 1.15rem;
}

.search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.search input::placeholder {
  color: rgba(247, 248, 255, .72);
}

.hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0 0 6px;
  color: #c9f5ff;
  font-size: .83rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2.65rem, 8vw, 6.5rem);
  line-height: .94;
  letter-spacing: 0;
  text-wrap: balance;
}

.hero-copy {
  max-width: 520px;
  margin: 14px 0 0;
  color: rgba(247, 248, 255, .82);
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.38;
  text-shadow: 0 2px 14px rgba(0,0,0,.38);
}

.category-tabs {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 0 18px;
  scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--text);
  background: rgba(14, 18, 31, .42);
  cursor: pointer;
  white-space: nowrap;
  backdrop-filter: blur(18px);
}

.tab.is-active {
  color: #10131f;
  background: #ffffff;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 28px 22px;
  padding-top: 10px;
}

.app {
  display: grid;
  justify-items: center;
  gap: 10px;
  min-width: 0;
  text-align: center;
}

.app:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 7px;
  border-radius: 8px;
}

.app-icon {
  position: relative;
  width: clamp(74px, 9vw, 96px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 24%;
  overflow: hidden;
  color: #fff;
  font-size: clamp(1.8rem, 3.4vw, 2.65rem);
  font-weight: 900;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.36),
    inset 0 -18px 34px rgba(0,0,0,.18),
    0 18px 34px rgba(0,0,0,.34);
  transition: transform .18s ease, box-shadow .18s ease;
}

.app:hover .app-icon,
.app:focus-visible .app-icon {
  transform: translateY(-5px) scale(1.04);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.44),
    inset 0 -18px 34px rgba(0,0,0,.2),
    0 24px 46px rgba(0,0,0,.42);
}

.app-icon .icon-scene {
  position: relative;
  z-index: 1;
  width: 78%;
  height: 78%;
  display: block;
}

.app-icon .icon-scene svg {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 4px 9px rgba(0,0,0,.28));
}

.app-icon::after {
  content: "";
  position: absolute;
  inset: 8%;
  border-radius: 22%;
  border: 1px solid rgba(255,255,255,.2);
  pointer-events: none;
}

.app-name {
  width: min(116px, 100%);
  min-height: 2.4em;
  color: #fff;
  font-size: .92rem;
  font-weight: 720;
  line-height: 1.18;
  text-shadow: 0 2px 10px rgba(0,0,0,.6);
  overflow-wrap: anywhere;
}

.empty-state {
  margin: 36px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  text-align: center;
  background: rgba(10, 14, 24, .42);
  backdrop-filter: blur(18px);
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 22px, 520px);
    padding-top: 12px;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
    margin-bottom: 20px;
  }

  .search {
    width: 100%;
  }

  .app-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
