:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #eef3ff;
  background: #08101f;
  font-synthesis: none;
  --surface: rgba(17, 28, 49, .82);
  --surface-strong: #111c31;
  --surface-soft: rgba(255, 255, 255, .055);
  --border: rgba(255, 255, 255, .11);
  --muted: #9ca9bf;
  --accent: #6ea8fe;
  --accent-strong: #8ab8ff;
  --success: #79d9a2;
  --shadow: 0 24px 70px rgba(0, 0, 0, .28);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: #08101f; }
body {
  margin: 0;
  min-height: 100vh;
  color: #eef3ff;
  background:
    radial-gradient(circle at 12% 0%, rgba(54, 118, 255, .2), transparent 36rem),
    radial-gradient(circle at 95% 20%, rgba(122, 76, 255, .13), transparent 34rem),
    #08101f;
}
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.shell { width: min(1220px, calc(100% - 32px)); margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }
.topbar { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--border); }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: linear-gradient(145deg, #447ef0, #8559f4); color: white; font-weight: 900; box-shadow: 0 10px 28px rgba(68,126,240,.28); }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 17px; letter-spacing: .01em; }
.brand small { color: var(--muted); margin-top: 2px; }
.identity { display: flex; align-items: center; gap: 12px; }
.identity-copy { text-align: right; }
.identity-copy strong, .identity-copy small { display: block; }
.identity-copy small { color: var(--muted); margin-top: 2px; }

main { flex: 1; padding: 58px 0 42px; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 32px; margin-bottom: 34px; }
.eyebrow { margin: 0 0 10px; color: var(--accent-strong); font-size: 12px; font-weight: 800; letter-spacing: .16em; }
h1 { max-width: 820px; margin: 0; font-size: clamp(38px, 5vw, 68px); line-height: .98; letter-spacing: -.045em; }
.hero-copy { max-width: 760px; margin: 20px 0 0; color: var(--muted); font-size: 17px; line-height: 1.65; }
.hero-status { border: 1px solid var(--border); background: var(--surface-soft); color: var(--muted); padding: 10px 14px; border-radius: 999px; white-space: nowrap; }
.hero-status.online { color: var(--success); border-color: rgba(121,217,162,.28); background: rgba(121,217,162,.07); }

.signin-card { display: flex; align-items: center; justify-content: space-between; gap: 24px; border: 1px solid var(--border); border-radius: 24px; padding: 28px; background: var(--surface); backdrop-filter: blur(18px); box-shadow: var(--shadow); }
.signin-card h2, .section-head h2 { margin: 0; font-size: 24px; }
.signin-card p { max-width: 720px; margin: 8px 0 0; color: var(--muted); line-height: 1.6; }

.button { border: 1px solid var(--border); border-radius: 11px; padding: 10px 14px; color: #eef3ff; background: rgba(255,255,255,.055); transition: transform .15s ease, border-color .15s ease, background .15s ease; }
.button:hover { transform: translateY(-1px); border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.09); }
.button.primary { border-color: transparent; color: white; background: linear-gradient(135deg, #4a86ff, #7659ed); }
.button.large { padding: 13px 18px; }

.toolbar { display: flex; align-items: center; gap: 16px; margin-bottom: 34px; }
.search { flex: 1; }
.search input { width: 100%; min-height: 48px; border: 1px solid var(--border); outline: none; border-radius: 14px; padding: 0 16px; color: #eef3ff; background: rgba(10, 18, 34, .78); }
.search input:focus { border-color: rgba(110,168,254,.62); box-shadow: 0 0 0 4px rgba(110,168,254,.08); }
.categories { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.category { border: 1px solid var(--border); border-radius: 999px; padding: 9px 13px; color: var(--muted); background: rgba(255,255,255,.035); }
.category.active { color: white; border-color: rgba(110,168,254,.4); background: rgba(110,168,254,.12); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 18px; }
.count { color: var(--muted); }

.app-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.app-card { position: relative; min-height: 238px; display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 22px; padding: 22px; background: var(--surface); box-shadow: 0 15px 50px rgba(0,0,0,.16); overflow: hidden; }
.app-card::after { content: ""; position: absolute; inset: auto -25% -55% 20%; height: 130px; border-radius: 50%; background: radial-gradient(circle, var(--card-glow, rgba(110,168,254,.24)), transparent 68%); pointer-events: none; }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.app-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; font-size: 22px; font-weight: 800; background: rgba(255,255,255,.07); border: 1px solid var(--border); }
.favorite { width: 36px; height: 36px; border: 0; border-radius: 10px; color: var(--muted); background: transparent; font-size: 22px; }
.favorite.active { color: #ffd66b; }
.app-card h3 { margin: 22px 0 8px; font-size: 21px; }
.app-card p { margin: 0; color: var(--muted); line-height: 1.55; }
.card-footer { margin-top: auto; padding-top: 22px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.badges { display: flex; gap: 7px; flex-wrap: wrap; }
.badge { padding: 6px 9px; border-radius: 999px; color: var(--muted); background: rgba(255,255,255,.055); font-size: 12px; }
.open-app { text-decoration: none; color: var(--accent-strong); font-weight: 750; white-space: nowrap; }
.empty { padding: 48px 20px; text-align: center; border: 1px dashed var(--border); border-radius: 18px; color: var(--muted); }

footer { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; }
.toast { position: fixed; right: 22px; bottom: 22px; max-width: min(440px, calc(100vw - 44px)); padding: 13px 16px; border: 1px solid var(--border); border-radius: 12px; background: #17233a; box-shadow: var(--shadow); }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; align-items: start; }
  .hero-status { justify-self: start; }
  .app-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .toolbar { align-items: stretch; flex-direction: column; }
  .categories { justify-content: flex-start; }
}
@media (max-width: 620px) {
  .shell { width: min(100% - 22px, 1220px); }
  .topbar { align-items: flex-start; padding: 16px 0; }
  .identity-copy { display: none; }
  main { padding-top: 36px; }
  .signin-card { align-items: stretch; flex-direction: column; }
  .app-grid { grid-template-columns: 1fr; }
  footer { align-items: flex-start; flex-direction: column; justify-content: center; }
}

@media (prefers-color-scheme: light) {
  :root { color: #172033; background: #f3f6fb; --surface: rgba(255,255,255,.86); --surface-strong: #fff; --surface-soft: rgba(20,35,60,.045); --border: rgba(19,34,56,.12); --muted: #66738a; --shadow: 0 24px 70px rgba(24,45,80,.12); }
  html, body { color: #172033; background: #f3f6fb; }
  body { background: radial-gradient(circle at 12% 0%, rgba(54,118,255,.12), transparent 36rem), radial-gradient(circle at 95% 20%, rgba(122,76,255,.09), transparent 34rem), #f3f6fb; }
  .button { color: #172033; }
  .button.primary { color: white; }
  .search input { color: #172033; background: rgba(255,255,255,.88); }
  .category.active { color: #172033; }
  .toast { background: white; }
}
