:root {
  --bg: #050713;
  --surface: #070b18;
  --surface-2: #101a38;
  --card: rgba(17, 25, 54, 0.92);
  --ink: #f8fbff;
  --text: #f8fbff;
  --muted: rgba(248, 251, 255, 0.64);
  --line: rgba(120, 169, 255, 0.2);
  --blue: #28bdf6;
  --deep-blue: #122456;
  --gold: #ffd747;
  --green: #48df82;
  --orange: #ff8c32;
  --shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: hidden;
  overscroll-behavior: none;
  background: var(--bg);
}

body {
  margin: 0;
  width: 100%;
  max-width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 20% 0%, rgba(40, 189, 246, 0.2), transparent 34%),
    radial-gradient(circle at 88% 12%, rgba(255, 215, 71, 0.12), transparent 28%),
    linear-gradient(180deg, #101a3a 0%, #070914 52%, #03050b 100%);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  width: 100%;
  max-width: min(620px, 100%);
  height: 100dvh;
  min-height: 100svh;
  margin: 0 auto;
  overflow-x: clip;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0 0 calc(88px + env(safe-area-inset-bottom, 0px));
  background:
    radial-gradient(circle at 22% 0%, rgba(40, 189, 246, 0.16), transparent 33%),
    linear-gradient(180deg, rgba(16, 26, 58, 0.98), rgba(4, 7, 17, 0.98));
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

.hidden {
  display: none !important;
}

.search-top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 12px 8px;
  background: rgba(12, 19, 42, 0.94);
  border-bottom: 1px solid rgba(120, 169, 255, 0.13);
  backdrop-filter: blur(18px);
}

.search-box {
  min-width: 0;
  height: 42px;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.search-mark {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border: 2px solid rgba(248, 251, 255, 0.66);
  border-radius: 50%;
  position: relative;
}

.search-mark::after {
  content: "";
  position: absolute;
  right: -6px;
  bottom: -5px;
  width: 8px;
  height: 2px;
  border-radius: 2px;
  background: rgba(248, 251, 255, 0.66);
  transform: rotate(45deg);
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-size: 14px;
  font-weight: 800;
}

.search-box input::placeholder {
  color: rgba(248, 251, 255, 0.55);
}

.icon-button {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  color: #eafbff;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 28%, rgba(255, 215, 71, 0.18), transparent 38%),
    linear-gradient(145deg, rgba(72, 52, 8, 0.9), rgba(11, 16, 38, 0.96));
  border: 1px solid rgba(255, 215, 71, 0.48);
  box-shadow: 0 0 18px rgba(255, 215, 71, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.notify-button svg {
  width: 22px;
  height: 22px;
  display: block;
  color: var(--gold);
  filter: drop-shadow(0 0 7px rgba(255, 215, 71, 0.35));
}

.notify-button path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.15;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.category-band,
.content-section {
  padding: 14px 12px 18px;
}

.category-band {
  background: transparent;
  padding-top: 12px;
  padding-bottom: 8px;
}

.content-section {
  background: transparent;
}

.content-section + .content-section {
  padding-top: 8px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
}

.section-title h1,
.section-title h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(20px, 5.6vw, 27px);
  line-height: 1.08;
  font-weight: 950;
  letter-spacing: 0;
}

.section-title span {
  min-width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #071224;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  font-size: 13px;
  font-weight: 950;
}

.category-grid {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(2, 86px);
  grid-auto-columns: 74px;
  gap: 8px 12px;
  margin: 0 -12px;
  padding: 0 12px 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.category-grid::-webkit-scrollbar,
.horizontal-list::-webkit-scrollbar {
  display: none;
}

.category-item {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  background: transparent;
  scroll-snap-align: start;
}

.category-icon {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #eafbff;
  background:
    radial-gradient(circle at 50% 38%, rgba(40, 189, 246, 0.42), transparent 43%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.1), transparent 58%),
    linear-gradient(145deg, rgba(31, 63, 126, 0.98), rgba(6, 11, 29, 0.98));
  border: 1px solid rgba(40, 189, 246, 0.38);
  box-shadow:
    0 0 18px rgba(40, 189, 246, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -10px 18px rgba(0, 0, 0, 0.22);
}

.category-icon svg {
  width: 25px;
  height: 25px;
  display: block;
}

.category-icon path,
.category-icon rect,
.category-icon circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.category-item.active .category-icon {
  color: #071224;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  border-color: rgba(255, 215, 71, 0.72);
  box-shadow: 0 0 18px rgba(255, 215, 71, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.category-title {
  max-width: 94px;
  min-height: 36px;
  color: var(--ink);
  font-size: 11px;
  line-height: 1.08;
  font-weight: 850;
  text-align: center;
  overflow-wrap: anywhere;
}

.horizontal-list {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(184px, 42%);
  gap: 10px;
  margin: 0 -14px;
  padding: 0 14px 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.featured-list,
.top-list,
.regular-grid {
  display: grid;
  gap: 12px;
}

.featured-list {
  grid-template-columns: 1fr;
}

.top-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.top-list .listing-card:first-child {
  grid-column: 1 / -1;
}

.regular-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.listing-card {
  min-width: 0;
  overflow: hidden;
  position: relative;
  border-radius: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.recent-card {
  scroll-snap-align: start;
}

.vip-card,
.top-card:first-child {
  display: grid;
  grid-template-columns: 43% minmax(0, 1fr);
  min-height: 154px;
}

.vip-card {
  border-color: rgba(255, 215, 71, 0.54);
  box-shadow: 0 12px 32px rgba(255, 140, 50, 0.16);
}

.is-top {
  border-color: rgba(40, 189, 246, 0.42);
}

.listing-media {
  position: relative;
  min-height: 132px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.66), transparent 30%),
    linear-gradient(145deg, #12305e 0%, #071224 62%, #02050c 100%);
}

.regular-card .listing-media,
.recent-card .listing-media,
.top-card:not(:first-child) .listing-media {
  aspect-ratio: 1.18;
}

.item-symbol {
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  color: #071224;
  background: linear-gradient(135deg, #f7fdff, #72e7ff);
  font-size: 28px;
  font-weight: 1000;
  box-shadow: 0 12px 30px rgba(40, 189, 246, 0.3);
}

.is-vip .item-symbol {
  background: linear-gradient(135deg, #fff8ad, #ffb12d);
}

.listing-badge {
  position: absolute;
  left: 8px;
  top: 8px;
  padding: 5px 8px;
  border-radius: 999px;
  color: #071224;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  font-size: 10px;
  font-weight: 950;
}

.is-top .listing-badge {
  background: linear-gradient(135deg, #dff8ff, var(--blue));
}

.listing-body {
  min-width: 0;
  position: relative;
  padding: 12px;
}

.listing-body h3 {
  min-height: 48px;
  margin: 0 36px 9px 0;
  color: #fff;
  font-size: 18px;
  line-height: 1.16;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.regular-card .listing-body h3,
.recent-card .listing-body h3,
.top-card:not(:first-child) .listing-body h3 {
  min-height: 62px;
  font-size: 16px;
}

.listing-body strong {
  display: block;
  margin-bottom: 14px;
  color: var(--gold);
  font-size: 23px;
  line-height: 1.05;
  font-weight: 950;
  overflow-wrap: anywhere;
}

.listing-body p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.2;
  font-weight: 550;
}

.favorite-button {
  position: absolute;
  right: 12px;
  top: 14px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 30px;
  line-height: 1;
}

.load-sentinel {
  height: 1px;
}

.list-end {
  margin: 14px 0 0;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
  font-weight: 700;
}

.simple-header {
  padding: 20px 14px 10px;
  background: transparent;
}

.simple-header h2 {
  margin: 0;
  color: var(--ink);
  font-size: 30px;
}

.empty-state,
.profile-card,
.profile-stats {
  margin: 14px;
  border-radius: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.empty-state {
  padding: 22px;
  color: var(--muted);
  font-weight: 700;
}

.profile-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  background:
    radial-gradient(circle at 8% 20%, rgba(40, 189, 246, 0.16), transparent 34%),
    linear-gradient(145deg, rgba(19, 31, 68, 0.96), rgba(8, 12, 31, 0.98));
  border-color: rgba(80, 137, 255, 0.32);
}

.profile-card img {
  width: 78px;
  height: 78px;
  flex: 0 0 78px;
  border-radius: 50%;
  object-fit: cover;
  background: #071224;
  border: 3px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 24px rgba(40, 189, 246, 0.34);
}

.profile-info {
  min-width: 0;
  flex: 1;
}

.profile-card h3 {
  margin: 0 0 4px;
  color: #fff;
  font-size: 22px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.profile-card p {
  margin: 0 0 10px;
  color: var(--muted);
  font-weight: 750;
  overflow-wrap: anywhere;
}

.profile-details {
  display: grid;
  gap: 7px;
  margin: 0;
}

.profile-details div {
  min-width: 0;
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
}

.profile-details dt,
.profile-details dd {
  margin: 0;
}

.profile-details dt {
  color: var(--blue);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.profile-details dd {
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  text-align: center;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.profile-stats strong,
.profile-stats span {
  display: block;
}

.profile-stats strong {
  color: #fff;
  font-size: 20px;
  line-height: 1;
}

.profile-stats span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.profile-stats > div {
  min-height: 64px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  border-radius: 12px;
  border: 1px solid rgba(80, 137, 255, 0.32);
  background: linear-gradient(145deg, rgba(28, 50, 105, 0.88), rgba(9, 14, 34, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 10px 22px rgba(0, 0, 0, 0.2);
}

.profile-stats > .stat-gold {
  border-color: rgba(255, 215, 71, 0.55);
  background: linear-gradient(145deg, rgba(78, 55, 7, 0.94), rgba(22, 17, 5, 0.96));
  box-shadow: 0 0 20px rgba(255, 215, 71, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.13);
}

.profile-stats > .stat-gold strong,
.profile-stats > .stat-gold span {
  color: var(--gold);
}


.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 50;
  width: 100%;
  max-width: 620px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: center;
  transform: translateX(-50%);
  padding: 8px 8px calc(9px + env(safe-area-inset-bottom, 0px));
  background: rgba(4, 7, 17, 0.96);
  border-top: 1px solid rgba(40, 189, 246, 0.2);
  box-shadow: 0 -10px 26px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.nav-item {
  min-width: 0;
  min-height: 58px;
  display: grid;
  place-items: center;
  gap: 4px;
  color: rgba(248, 251, 255, 0.48);
  background: transparent;
  font-size: 13px;
  font-weight: 650;
}

.nav-item.active {
  color: #fff;
  font-weight: 850;
}

.nav-icon-img,
.nav-symbol {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block;
  filter: saturate(0) brightness(0.45);
}

.nav-symbol {
  width: auto;
  height: auto;
  font-size: 28px;
  line-height: 1;
}

.nav-item.active .nav-icon-img {
  filter: none;
}

.create-nav {
  min-height: 64px;
}

.create-nav span {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  font-size: 34px;
  line-height: 1;
  box-shadow: 0 10px 24px rgba(255, 140, 50, 0.28);
}

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  align-items: end;
  background: rgba(2, 5, 12, 0.58);
}

.sheet {
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  padding: 10px 14px calc(16px + env(safe-area-inset-bottom, 0px));
  border-radius: 18px 18px 0 0;
  background: #0b1024;
  border: 1px solid rgba(40, 189, 246, 0.2);
}

.sheet-handle {
  width: 46px;
  height: 5px;
  margin: 2px auto 14px;
  border-radius: 999px;
  background: #c6d1d3;
}

.sheet-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.sheet-title h2 {
  margin: 0;
  color: #fff;
}

.sheet-title button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 900;
}

.sheet label {
  display: grid;
  gap: 7px;
  margin-bottom: 11px;
  color: #fff;
  font-size: 13px;
  font-weight: 850;
}

.sheet input,
.sheet select,
.sheet textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  outline: 0;
}

.publish-button {
  width: 100%;
  min-height: 48px;
  border-radius: 8px;
  color: #071224;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  font-weight: 950;
}

@media (max-width: 390px) {
  .search-box {
    height: 40px;
  }

  .search-box input {
    font-size: 13px;
  }

  .category-grid {
    grid-auto-columns: 72px;
    grid-template-rows: repeat(2, 84px);
  }

  .category-icon {
    width: 52px;
    height: 52px;
    flex-basis: 52px;
  }

  .category-title {
    font-size: 10px;
  }

  .horizontal-list {
    grid-auto-columns: 184px;
  }

  .listing-body h3,
  .regular-card .listing-body h3,
  .recent-card .listing-body h3,
  .top-card:not(:first-child) .listing-body h3 {
    font-size: 15px;
  }

  .listing-body strong {
    font-size: 20px;
  }
}
