@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  color-scheme: dark;
  --bg: #090a10;
  --surface: #171922;
  --surface-2: #202431;
  --text: #f7f8fc;
  --muted: #9ba2b4;
  --blue: #2563eb;
  --blue-2: #397bff;
  --line: rgba(255,255,255,.08);
  --card-grad: linear-gradient(145deg, #1c54c8 0%, #2563eb 52%, #163a98 100%);
  --shadow: 0 16px 36px rgba(0,0,0,.24);
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: Inter, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { color: inherit; cursor: pointer; }
.app-shell {
  max-width: 560px; min-height: 100dvh; margin: 0 auto; padding-bottom: calc(92px + env(safe-area-inset-bottom));
  background: var(--bg); position: relative;
}
.topbar {
  height: 42px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px; color: var(--muted); font-size: 13px; font-weight: 600;
}
.topbar-back, .topbar-more {
  border: 0; background: transparent; font-size: 27px; line-height: 1; padding: 0 4px;
}
.topbar-back { font-size: 30px; }
.hidden { visibility: hidden; }
.screen { display: none; padding: 0 15px 18px; }
.screen.active { display: block; }
.hero {
  min-height: 188px; border-radius: 25px; overflow: hidden; position: relative;
  background: radial-gradient(circle at 78% 20%, rgba(108,165,255,.55), transparent 34%),
              radial-gradient(circle at 14% 110%, rgba(5,23,88,.95), transparent 45%),
              linear-gradient(135deg, #102c83, #1e55ce 55%, #0e2670);
  box-shadow: var(--shadow); isolation: isolate;
}
.hero:before {
  content: ""; position: absolute; inset: 0; opacity: .22;
  background-image: radial-gradient(rgba(255,255,255,.7) .7px, transparent .7px);
  background-size: 13px 13px; mask-image: linear-gradient(90deg, transparent, black);
}
.hero-orbit { position: absolute; border: 1px solid rgba(255,255,255,.13); border-radius: 50%; }
.orbit-one { width: 230px; height: 230px; right: -55px; top: -105px; }
.orbit-two { width: 170px; height: 170px; right: -25px; top: -75px; }
.hero-content { position: relative; z-index: 1; padding: 19px 20px 15px; }
.brand-mark {
  width: 39px; height: 39px; display: grid; place-items: center; border-radius: 13px;
  color: #fff; font-weight: 900; font-size: 16px; letter-spacing: -2px;
  background: linear-gradient(145deg, #dceaff, #4d8cff 55%, #143b9d);
  box-shadow: 0 7px 18px rgba(0,0,0,.25); margin-bottom: 11px;
}
.brand-mark span { color: #122b67; }
.eyebrow { font-size: 9px; letter-spacing: 1.6px; font-weight: 800; color: #a9c8ff; margin: 0 0 5px; }
.hero h1 { font-size: clamp(25px, 7vw, 32px); line-height: 1.08; margin: 0; letter-spacing: -1.2px; }
.hero-subtitle { color: rgba(255,255,255,.83); font-size: 12px; line-height: 1.45; margin: 8px 0 14px; max-width: 275px; }
.hero-bottom { display: flex; align-items: center; justify-content: space-between; }
.hero-badge { font-size: 11px; font-weight: 700; padding: 7px 12px; border-radius: 99px; background: rgba(255,255,255,.17); border: 1px solid rgba(255,255,255,.15); }
.theme-toggle {
  width: 65px; height: 33px; border: 0; border-radius: 99px; padding: 3px;
  display: flex; align-items: center; justify-content: space-around;
  color: #19213a; background: #f5f7ff;
}
.theme-toggle span { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; font-size: 15px; }
.theme-toggle .moon { color: white; background: #2464e9; }
.filter-row { display: flex; gap: 8px; overflow-x: auto; padding: 14px 1px 13px; scrollbar-width: none; }
.filter-row::-webkit-scrollbar { display: none; }
.filter-chip {
  flex: 0 0 auto; border: 1px solid var(--line); border-radius: 99px; padding: 9px 14px;
  background: var(--surface); color: var(--muted); font-size: 12px; font-weight: 700;
}
.filter-chip.selected { color: white; background: var(--blue); border-color: var(--blue); }
.catalog-sections { display: grid; gap: 14px; }
.category-section {
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px;
  padding: 15px 12px 13px; overflow: hidden;
}
.category-heading { display: flex; align-items: center; justify-content: space-between; margin: 0 2px 12px; }
.category-heading h2 { margin: 0; font-size: 19px; letter-spacing: -.6px; }
.category-heading p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.category-symbol {
  width: 48px; height: 42px; display: grid; place-items: center; border-radius: 14px;
  color: #dce9ff; font-size: 25px; background: linear-gradient(145deg, #344a79, #192c57);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.15);
}
.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.product-card {
  min-height: 152px; position: relative; overflow: hidden; border: 1px solid rgba(255,255,255,.12);
  border-radius: 20px; padding: 13px 11px 10px; text-align: left;
  background: var(--card-grad); box-shadow: 0 8px 18px rgba(0,0,0,.16);
  display: flex; flex-direction: column; justify-content: flex-end;
}
.product-card:before {
  content: ""; position: absolute; width: 140px; height: 140px; border-radius: 50%;
  top: -82px; right: -50px; background: rgba(255,255,255,.11); filter: blur(1px);
}
.product-icon {
  position: absolute; top: 10px; left: 12px; font-size: 31px; line-height: 1;
  filter: drop-shadow(0 4px 3px rgba(0,0,0,.28));
}
.product-name { position: relative; font-size: 13px; font-weight: 800; margin: 0 0 4px; }
.product-description { position: relative; color: rgba(255,255,255,.82); font-size: 10px; line-height: 1.35; min-height: 27px; margin: 0 0 10px; }
.product-bottom { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.product-price { display: inline-flex; background: #fff; color: #151923; border-radius: 99px; padding: 6px 10px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.product-rating { font-size: 10px; font-weight: 700; color: #ffe16b; white-space: nowrap; }
.empty-category {
  padding: 22px 14px; text-align: center; border: 1px dashed rgba(255,255,255,.16);
  border-radius: 17px; color: var(--muted); font-size: 12px; line-height: 1.5;
}
.empty-category strong { color: var(--text); display: block; font-size: 13px; margin-bottom: 4px; }
.bottom-nav {
  position: fixed; z-index: 20; bottom: max(12px, env(safe-area-inset-bottom)); left: 50%;
  transform: translateX(-50%); width: min(calc(100% - 30px), 530px);
  min-height: 65px; display: flex; justify-content: space-around; align-items: center;
  padding: 6px 7px; border-radius: 24px; background: rgba(32,35,47,.94);
  border: 1px solid rgba(255,255,255,.09); box-shadow: 0 12px 32px rgba(0,0,0,.38);
  backdrop-filter: blur(16px);
}
.nav-item {
  flex: 1; min-width: 0; border: 0; background: transparent; color: #a8adbb;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  padding: 4px 0; border-radius: 17px;
}
.nav-item > span { width: 29px; height: 29px; display: grid; place-items: center; font-size: 20px; font-weight: 800; border-radius: 50%; }
.nav-item small { font-size: 9px; font-weight: 600; }
.nav-item.active { color: white; }
.nav-item.active > span { background: #2469f4; box-shadow: 0 4px 12px rgba(36,105,244,.35); }
.profile-nav > span { background: linear-gradient(145deg,#6c9dff,#183f9c); color: white; }
.page-heading { padding: 22px 4px 18px; }
.page-heading h1 { font-size: 30px; letter-spacing: -1.2px; margin: 0 0 7px; }
.page-heading p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.help-heading { display: flex; justify-content: space-between; align-items: center; }
.section-title { font-size: 18px; margin: 2px 4px 13px; }
.help-list, .profile-menu { overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; }
.help-item {
  width: 100%; display: flex; align-items: center; gap: 13px; padding: 15px 14px;
  background: transparent; border: 0; border-bottom: 1px solid var(--line); text-align: left; font-size: 13px;
}
.help-item:last-child { border-bottom: 0; }
.help-emoji { width: 28px; text-align: center; font-size: 21px; }
.help-item b { margin-left: auto; color: #81899c; font-size: 21px; font-weight: 400; }
.support-button {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 16px;
  margin-top: 16px; border: 0; border-radius: 20px; background: var(--surface);
  text-align: left; font-size: 13px; font-weight: 700;
}
.support-icon { color: #8db5ff; font-size: 24px; }
.support-button b { margin-left: auto; color: var(--muted); }
.help-search {
  position: fixed; bottom: calc(91px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
  width: min(calc(100% - 30px), 530px); display: flex; align-items: center; gap: 9px;
  border-radius: 99px; padding: 8px 10px 8px 16px; background: var(--surface-2); color: var(--muted);
}
.help-search input { min-width: 0; flex: 1; background: transparent; border: 0; outline: 0; color: var(--text); font-size: 12px; }
.help-search button { border: 0; width: 35px; height: 35px; border-radius: 50%; background: var(--blue); }
.empty-panel {
  padding: 30px 20px; border-radius: 23px; background: var(--surface); border: 1px solid var(--line); text-align: center;
}
.empty-icon { margin: 0 auto 13px; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 18px; background: #1d3d83; color: #b8d2ff; font-size: 27px; }
.empty-panel h2 { font-size: 16px; margin: 0 0 7px; }
.empty-panel p { color: var(--muted); font-size: 12px; line-height: 1.5; margin: 0; }
.profile-card { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 21px; background: var(--surface); border: 1px solid var(--line); }
.profile-avatar { width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center; font-size: 22px; font-weight: 900; background: linear-gradient(145deg,#b6d2ff,#2464e9); color: #10265c; }
.profile-card h2 { margin: 0 0 4px; font-size: 16px; }
.profile-card p { margin: 0; color: var(--muted); font-size: 11px; }
.profile-menu { margin-top: 14px; }
.profile-row { display: flex; align-items: center; gap: 12px; padding: 16px; border-bottom: 1px solid var(--line); font-size: 13px; }
.profile-row:last-child { border-bottom: 0; }
.profile-row b { margin-left: auto; color: var(--muted); font-size: 20px; font-weight: 400; }
.small-note { color: var(--muted); font-size: 11px; line-height: 1.5; padding: 0 4px; }
.product-detail { padding-top: 6px; }
.detail-gallery { display: grid; grid-template-columns: repeat(4,1fr); gap: 7px; margin: 4px 0 17px; }
.detail-gallery div { aspect-ratio: 1.25; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(145deg,#1b4cba,#12275f); font-size: 24px; }
.detail-title { font-size: 25px; letter-spacing: -.8px; margin: 0 0 5px; }
.detail-subtitle { color: var(--muted); font-size: 12px; margin: 0 0 15px; }
.detail-stats { display: flex; justify-content: space-around; background: var(--surface); border-radius: 18px; padding: 14px 4px; margin-bottom: 15px; }
.detail-stats div { text-align: center; font-size: 15px; font-weight: 800; }
.detail-stats small { display: block; color: var(--muted); font-size: 10px; font-weight: 500; margin-top: 3px; }
.detail-tabs { display: flex; gap: 7px; overflow-x: auto; margin-bottom: 12px; }
.detail-tabs button { border: 0; background: var(--surface); color: var(--muted); border-radius: 99px; padding: 9px 12px; white-space: nowrap; font-size: 11px; }
.detail-tabs button.active { background: var(--blue); color: white; }
.detail-description { background: var(--surface); border-radius: 18px; padding: 16px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.detail-buy { width: 100%; border: 0; border-radius: 99px; padding: 15px; margin-top: 14px; background: var(--blue); color: white; font-weight: 800; }
body.light {
  color-scheme: light; --bg: #f2f4f9; --surface: #fff; --surface-2: #fff; --text: #161a25;
  --muted: #6d7484; --line: rgba(20,30,55,.1); --shadow: 0 12px 30px rgba(31,50,90,.1);
}
body.light .topbar { color: #71798b; }
body.light .bottom-nav { background: rgba(255,255,255,.93); border-color: rgba(20,30,55,.08); }
body.light .nav-item.active { color: #1c2a48; }
body.light .help-search { box-shadow: 0 8px 22px rgba(20,30,55,.1); }
body.light .help-search input { color: #161a25; }
body.light .product-card { color: white; }
body.light .profile-avatar { color: #10265c; }
@media (min-width: 520px) {
  .screen { padding-left: 20px; padding-right: 20px; }
  .hero { min-height: 205px; }
  .product-card { min-height: 165px; }
}
