:root {
  --bg: #f7f8fd;
  --surface: #ffffff;
  --surface-soft: #fafafa;
  --surface-tint: #f5f3ff;
  --ink: #181d27;
  --ink-soft: #3f3f46;
  --muted: #717680;
  --muted-soft: #a8abb3;
  --line: #e9eaeb;
  --line-strong: #dfe0e2;
  --primary: #562aff;
  --primary-2: #7669ff;
  --primary-soft: #f0edff;
  --primary-border: #ddd6fe;
  --aura-blue: #b4e9ff;
  --aura-coral: #ffc0bc;
  --dark: #09090b;
  --dark-2: #181d27;
  --tag: #f5f3ff;
  --shadow-sm: 0 1px 2px rgba(24, 29, 39, 0.06);
  --shadow: 0 16px 40px rgba(24, 29, 39, 0.08);
  --shadow-lg: 0 24px 64px rgba(24, 29, 39, 0.12);
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-full: 999px;
  --brand: var(--primary);
  --brand-dark: var(--primary);
  --brand-ink: #3d23bf;
  --brand-soft: var(--primary-soft);
  --brand-faint: #faf9ff;
  --shell-width: 1720px;
  --shell-gutter: 28px;
  --rail-width: 270px;
  --right-panel-width: 318px;
  color-scheme: light;
  font-family:
    Inter,
    "PingFang SC",
    "Microsoft YaHei",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, #ffffff 0, var(--bg) 420px),
    var(--bg);
  color: var(--ink);
}

body.is-refreshing {
  cursor: progress;
}

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

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--primary-2);
  outline-offset: 2px;
}

.page-loader {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 100;
  height: 3px;
  overflow: hidden;
  background: rgba(240, 237, 255, 0.68);
  opacity: 1;
  transition: opacity 220ms ease;
}

.page-loader span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 42%;
  min-width: 180px;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, transparent, var(--primary), #ff8bc0, transparent);
  box-shadow: 0 0 20px rgba(86, 42, 255, 0.24);
  animation: page-loader-run 1.05s ease-in-out infinite;
}

body.app-ready:not(.is-refreshing) .page-loader {
  opacity: 0;
  pointer-events: none;
}

body.is-refreshing .content-column,
body.is-refreshing .category-rail {
  opacity: 0.72;
  transition: opacity 120ms ease;
}

body.is-refreshing .product-card {
  transform: translateY(1px);
}

@keyframes page-loader-run {
  0% {
    transform: translateX(-110%);
  }

  55% {
    transform: translateX(95vw);
  }

  100% {
    transform: translateX(110vw);
  }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr) 132px;
  align-items: center;
  min-height: 64px;
  width: 100%;
  margin: 0;
  padding: 0 36px 0 28px;
  border-bottom: 1px solid rgba(233, 234, 235, 0.86);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
}

.category-rail {
  position: fixed;
  top: 64px;
  bottom: 0;
  left: 0;
  z-index: 18;
  display: flex;
  flex-direction: column;
  width: var(--rail-width);
  height: calc(100vh - 64px);
  padding: 18px 14px;
  border: 1px solid rgba(233, 234, 235, 0.92);
  border-left: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 76% 8%, rgba(118, 105, 255, 0.12), transparent 30%),
    rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(18px);
  align-self: start;
  overflow: hidden;
}

.rail-head {
  padding: 4px 6px 14px;
}

.rail-kicker {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-full);
  background: var(--brand-faint);
  color: var(--brand-ink);
  font-size: 11px;
  font-weight: 850;
}

.rail-head h2 {
  margin: 10px 0 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.2;
  font-weight: 950;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: max-content;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--dark);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(9, 9, 11, 0.16);
}

.brand-name {
  font-size: 23px;
  font-weight: 900;
}

.brand-chip {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-xs);
  background: var(--brand-faint);
  color: var(--brand-ink);
  font-size: 11px;
  font-weight: 800;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 3.8vw, 60px);
  color: #585c66;
  font-size: 14px;
  font-weight: 750;
  scrollbar-width: none;
}

.top-nav::-webkit-scrollbar {
  display: none;
}

.top-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  height: 34px;
  border-radius: var(--radius-full);
}

.top-nav a:hover,
.top-nav a.is-active {
  background: var(--primary-soft);
  color: var(--brand-ink);
}

.login-link {
  justify-self: end;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.login-link:hover {
  color: var(--ink);
}

.auth-area {
  position: relative;
  justify-self: end;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

.user-menu {
  position: relative;
}

.avatar-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(233, 234, 235, 0.95);
  border-radius: var(--radius-full);
  background: #fff;
  box-shadow: 0 10px 26px rgba(24, 29, 39, 0.09);
}

.avatar-button:hover,
.avatar-button[aria-expanded="true"] {
  border-color: var(--primary-border);
  box-shadow: 0 14px 32px rgba(24, 29, 39, 0.13);
}

.avatar-button img {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  object-fit: cover;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 40;
  display: grid;
  gap: 6px;
  width: 148px;
  padding: 8px;
  border: 1px solid rgba(233, 234, 235, 0.95);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.user-dropdown[hidden] {
  display: none;
}

.user-dropdown button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 850;
  text-align: left;
}

.user-dropdown button:hover {
  background: var(--primary-soft);
  color: var(--brand-ink);
}

body.modal-open {
  overflow: hidden;
}

main {
  display: grid;
  grid-template-columns: var(--rail-width) minmax(0, 1fr);
  gap: 24px;
  width: 100%;
  margin: 0;
  padding: 24px 28px 56px 0;
}

.content-column {
  min-width: 0;
  grid-column: 2;
  padding: 0 clamp(16px, 1.55vw, 32px);
}

.ui-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.ui-tag {
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-xs);
  background: var(--tag);
  color: var(--brand-ink);
  font-size: 12px;
  font-weight: 750;
}

.hero {
  display: grid;
  justify-items: center;
  padding: 18px 0 46px;
  text-align: center;
}

.hero h1 {
  margin: 0;
  color: var(--ink);
  font-size: 48px;
  line-height: 1.14;
  font-weight: 950;
}

.hero h1 span {
  display: inline-flex;
  align-items: center;
  min-width: 92px;
  height: 40px;
  padding: 0 14px;
  border-radius: 13px;
  background: var(--dark);
  color: #e3ddff;
  font-size: 22px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 14px 36px rgba(86, 42, 255, 0.18);
  vertical-align: 0.04em;
}

.hero p {
  margin: 16px 0 0;
  color: var(--ink-soft);
  font-size: 15px;
}

.hero p strong {
  font-weight: 850;
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr 42px;
  align-items: center;
  width: min(640px, 100%);
  height: 58px;
  margin-top: 38px;
  padding: 0 9px 0 20px;
  border-color: var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.search-panel:focus-within {
  border-color: var(--primary-border);
  box-shadow: 0 20px 48px rgba(86, 42, 255, 0.14);
}

.search-panel input {
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
}

.search-panel input::placeholder {
  color: var(--muted-soft);
}

.search-panel button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: var(--dark);
  color: #e3ddff;
  font-size: 22px;
  line-height: 1;
}

.discover-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--right-panel-width);
  gap: 24px;
  align-items: start;
  scroll-margin-top: 86px;
}

.filter-sidebar.ui-card {
  position: sticky;
  top: 84px;
  display: grid;
  gap: 18px;
  align-self: start;
  min-width: 0;
  max-height: calc(100vh - 104px);
  padding: 0;
  border: 0;
  overflow: auto;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.filter-sidebar::-webkit-scrollbar {
  width: 0;
}

.sidebar-block {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(14px);
}

.sidebar-block + .sidebar-block {
  border-top: 1px solid var(--line);
}

#hot {
  border-color: transparent;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 192, 188, 0.22), transparent 28%),
    linear-gradient(135deg, #09090b 0%, #1a1a2e 58%, #2a2b3d 100%);
  box-shadow: none;
}

#hot .mini-heading h2 {
  color: #fff;
}

#hot .mini-heading span {
  color: rgba(255, 255, 255, 0.62);
}

#ranking {
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff 0%, #fbfbff 100%);
}

.mini-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.mini-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
}

.mini-heading span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.category-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  width: 100%;
  min-width: 0;
}

.category-rail .category-tabs {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  overflow-y: auto;
  padding: 2px 2px 12px;
  scrollbar-width: none;
}

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

.category-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.category-rail .category-tab {
  justify-content: flex-start;
  gap: 10px;
  min-height: 42px;
  padding: 0 10px;
  border-radius: 14px;
  color: #444852;
  font-size: 14px;
  text-align: left;
}

.category-rail .category-label {
  flex: 1 1 auto;
}

.category-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  flex: 0 0 auto;
}

.category-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.rail-shortcuts {
  display: grid;
  gap: 10px;
  margin-top: auto;
  padding: 12px 2px 2px;
  border-top: 1px solid rgba(233, 234, 235, 0.92);
}

.rail-shortcut {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 10px;
  border: 1px solid rgba(86, 42, 255, 0.14);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  box-shadow: 0 12px 30px rgba(24, 29, 39, 0.07);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.rail-shortcut::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.rail-shortcut-ai::before {
  background: linear-gradient(135deg, rgba(86, 42, 255, 0.12), rgba(0, 194, 255, 0.1));
}

.rail-shortcut-tools::before {
  background: linear-gradient(135deg, rgba(255, 93, 143, 0.1), rgba(86, 42, 255, 0.1));
}

.rail-shortcut:hover {
  border-color: var(--primary-border);
  box-shadow: 0 16px 38px rgba(86, 42, 255, 0.14);
  transform: translateY(-2px);
}

.rail-shortcut:hover::before {
  opacity: 1;
}

.rail-shortcut > * {
  position: relative;
  z-index: 1;
}

.rail-shortcut-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: #0b0b14;
  color: #fff;
}

.rail-shortcut-tools .rail-shortcut-icon {
  background: linear-gradient(135deg, #ff5d8f, #562aff);
}

.rail-shortcut-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.rail-shortcut strong,
.rail-shortcut em {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rail-shortcut strong {
  font-size: 14px;
  line-height: 1.2;
  font-weight: 950;
}

.rail-shortcut em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.rail-shortcut b {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 9px;
  background: var(--primary-soft);
  color: var(--brand-ink);
  font-size: 16px;
  line-height: 1;
}

.category-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 22px;
  padding: 0 8px;
  border-radius: var(--radius-full);
  background: #fff;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.category-tab:hover,
.category-tab.is-active {
  border-color: var(--primary-border);
  background: var(--primary-soft);
  color: var(--brand-ink);
}

.category-tab:hover .category-icon,
.category-tab.is-active .category-icon {
  border-color: var(--primary-border);
  background: #fff;
  color: var(--brand-ink);
  box-shadow: 0 8px 22px rgba(86, 42, 255, 0.1);
}

.category-tab:hover .category-count,
.category-tab.is-active .category-count {
  color: var(--brand-ink);
}

.hot-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  scrollbar-width: none;
}

.hot-tags::-webkit-scrollbar {
  display: none;
}

.hot-tag {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 12px;
  font-weight: 780;
}

.hot-tag:hover,
.hot-tag.is-active {
  border-color: rgba(255, 255, 255, 0.74);
  background: #fff;
  color: var(--dark);
}

.product-section,
.submit-section {
  scroll-margin-top: 86px;
}

.product-section {
  min-width: 0;
}

.section-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  padding: 3px 0 0;
}

.section-title-wrap {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.section-title-wrap h2,
.submit-section h2 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.2;
  font-weight: 950;
}

.section-title-wrap h2 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.section-title-wrap h2::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 26px;
  border-radius: var(--radius-full);
  background: var(--primary);
  box-shadow: inset 0 -9px 0 rgba(255, 192, 188, 0.9);
}

#result-count {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.filter-actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.sort-control {
  position: relative;
  z-index: 6;
}

.sort-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 138px;
  height: 42px;
  padding: 0 14px 0 17px;
  border: 1px solid rgba(221, 214, 254, 0.9);
  border-radius: var(--radius-full);
  outline: none;
  background:
    linear-gradient(180deg, #ffffff 0%, #fbfaff 100%);
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  box-shadow:
    0 10px 24px rgba(86, 42, 255, 0.08),
    inset 0 0 0 1px rgba(255, 255, 255, 0.76);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.sort-chevron {
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--brand-ink);
  border-bottom: 2px solid var(--brand-ink);
  transform: translateY(-2px) rotate(45deg);
  transition: transform 160ms ease;
}

.sort-trigger:hover,
.sort-trigger[aria-expanded="true"] {
  border-color: var(--primary-border);
  box-shadow:
    0 14px 30px rgba(86, 42, 255, 0.12),
    inset 0 0 0 1px rgba(255, 255, 255, 0.86);
  transform: translateY(-1px);
}

.sort-trigger[aria-expanded="true"] .sort-chevron {
  transform: translateY(2px) rotate(225deg);
}

.sort-trigger:focus-visible {
  border-color: var(--primary-border);
  box-shadow:
    0 0 0 4px rgba(86, 42, 255, 0.1),
    0 14px 30px rgba(86, 42, 255, 0.12);
}

.sort-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  display: grid;
  gap: 6px;
  width: 238px;
  padding: 8px;
  border: 1px solid rgba(221, 214, 254, 0.92);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 24px 60px rgba(24, 29, 39, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top right;
  transition:
    opacity 140ms ease,
    transform 140ms ease;
  backdrop-filter: blur(18px);
}

.sort-menu.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.sort-option {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.sort-option strong {
  font-size: 13px;
  line-height: 1.2;
  font-weight: 900;
}

.sort-option span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  font-weight: 650;
}

.sort-option:hover,
.sort-option.is-active {
  border-color: var(--primary-border);
  background: var(--primary-soft);
  color: var(--brand-ink);
}

.sort-option.is-active span {
  color: #6f61d6;
}

.subnav-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  margin: 0 0 18px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-sm);
}

.subnav-button {
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.subnav-button:hover,
.subnav-button.is-active {
  border-color: var(--primary-border);
  background: var(--primary-soft);
  color: var(--brand-ink);
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 28px;
  padding: 0 7px 0 10px;
  border: 0;
  color: var(--brand-ink);
  font-weight: 850;
  transition:
    background 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.filter-chip:hover {
  background: #ece8ff;
  transform: translateY(-1px);
}

.filter-chip-close {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: var(--radius-full);
  background: rgba(86, 42, 255, 0.1);
  color: var(--brand-ink);
  font-size: 13px;
  font-weight: 950;
  line-height: 1;
}

.filter-chip:hover .filter-chip-close {
  background: var(--brand-ink);
  color: #fff;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 28px 22px;
}

.skeleton-glow {
  position: relative;
  overflow: hidden;
  background: #f0f1f5;
}

.skeleton-glow::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.68) 48%, transparent 100%);
  transform: translateX(-110%);
  animation: skeleton-sweep 1.45s ease-in-out infinite;
}

@keyframes skeleton-sweep {
  100% {
    transform: translateX(110%);
  }
}

.category-skeleton-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 10px;
}

.skeleton-dot,
.skeleton-avatar {
  width: 28px;
  height: 28px;
  border-radius: 10px;
}

.skeleton-line {
  display: block;
  width: 100%;
  height: 10px;
  border-radius: var(--radius-full);
}

.skeleton-count {
  width: 30px;
  height: 22px;
  border-radius: var(--radius-full);
}

.subnav-skeleton-chip {
  display: inline-flex;
  width: 74px;
  height: 30px;
  border-radius: var(--radius-full);
}

.resource-skeleton-card {
  min-width: 0;
  overflow: hidden;
  border-color: rgba(233, 234, 235, 0.9);
  background: rgba(255, 255, 255, 0.92);
}

.resource-skeleton-shot {
  aspect-ratio: 1.55;
  margin: 12px 12px 0;
  border-radius: 14px;
}

.resource-skeleton-body {
  display: grid;
  gap: 12px;
  padding: 16px 15px 18px;
}

.skeleton-title {
  width: 42%;
  height: 18px;
}

.skeleton-text {
  width: 92%;
  height: 12px;
}

.skeleton-short {
  width: 70%;
}

.resource-skeleton-tags {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.skeleton-tag {
  width: 64px;
  height: 24px;
  border-radius: var(--radius-xs);
}

.hot-tag-skeleton {
  display: inline-flex;
  width: 70px;
  height: 30px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.16);
}

.ranking-skeleton-row {
  display: grid;
  grid-template-columns: 24px 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.75);
}

.skeleton-rank {
  width: 22px;
  height: 14px;
  border-radius: var(--radius-full);
}

.ranking-skeleton-row .skeleton-avatar {
  width: 34px;
  height: 34px;
  border-radius: 12px;
}

.skeleton-stack {
  display: grid;
  gap: 8px;
}

.skeleton-mini {
  width: 54%;
  height: 9px;
}

.product-card {
  min-width: 0;
  overflow: hidden;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease;
}

.product-card:hover {
  border-color: var(--primary-border);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.product-shot {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1.55;
  margin: 12px 12px 0;
  overflow: hidden;
  border-radius: 14px;
  background: #f1f2f6;
}

.product-shot::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.72) 50%, transparent 100%);
  transform: translateX(-110%);
  animation: skeleton-sweep 1.55s ease-in-out infinite;
}

.product-shot img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 220ms ease;
}

.product-shot img.is-loaded {
  opacity: 1;
}

.shot-brand {
  position: absolute;
  left: 9px;
  bottom: 9px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: calc(100% - 18px);
  padding: 5px 8px;
  border: 1px solid rgba(233, 234, 235, 0.92);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 18px rgba(24, 29, 39, 0.08);
  backdrop-filter: blur(8px);
}

.shot-brand .logo-badge {
  width: 22px;
  height: 22px;
  border-radius: 7px;
}

.shot-brand strong {
  overflow: hidden;
  color: #4b5563;
  font-size: 11px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shot-fallback {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: #fff;
  color: var(--brand-ink);
  box-shadow: 0 8px 22px rgba(24, 29, 39, 0.08);
  font-size: 22px;
  font-weight: 900;
}

@media (prefers-reduced-motion: reduce) {
  .page-loader span,
  .skeleton-glow::after,
  .product-shot::before {
    animation: none;
  }
}

.product-body {
  display: grid;
  gap: 10px;
  padding: 15px 15px 17px;
}

.product-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.product-title h3 {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.2;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-title a {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
  flex: 0 0 auto;
}

.product-title a:hover {
  background: var(--dark);
  color: #e3ddff;
}

.product-summary {
  display: -webkit-box;
  min-height: 42px;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.55;
}

.product-desc {
  display: -webkit-box;
  min-height: 46px;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

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

.product-tag {
  height: 24px;
  max-width: 92px;
  padding: 0 9px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-action-bar {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.resource-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(233, 234, 235, 0.86);
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.92);
  color: #30343d;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(24, 29, 39, 0.12);
  backdrop-filter: blur(12px);
  transition:
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.resource-action svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linejoin: round;
}

.like-action {
  min-width: 54px;
  padding: 0 10px;
}

.favorite-action {
  width: 38px;
}

.resource-action:hover {
  border-color: rgba(255, 255, 255, 0.96);
  background: #fff;
  color: var(--ink);
  box-shadow: 0 14px 30px rgba(24, 29, 39, 0.16);
  transform: translateY(-2px) scale(1.02);
}

.resource-action.is-active {
  border-color: rgba(86, 42, 255, 0.2);
  background: #fff;
}

.like-action.is-active {
  color: #e60023;
}

.favorite-action.is-active {
  color: var(--brand-ink);
}

.resource-action.is-active svg {
  fill: currentColor;
}

.resource-action strong {
  min-width: 1.2em;
  color: currentColor;
  font-size: 11px;
  font-weight: 950;
}

.empty-state {
  margin: 30px 0 0;
  padding: 32px;
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
  text-align: center;
}

.ranking-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 0;
  margin: 0;
  min-width: 0;
  list-style: none;
}

.rank-row {
  min-width: 0;
  padding: 0;
  border-color: var(--line);
  box-shadow: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.rank-row:hover {
  border-color: var(--primary-border);
  box-shadow: 0 10px 24px rgba(24, 29, 39, 0.08);
  transform: translateY(-1px);
}

.rank-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-width: 0;
  padding: 10px;
  border-radius: inherit;
}

.rank-row:nth-child(1) {
  border-color: var(--dark);
  background: var(--dark);
}

.rank-row:nth-child(1) .rank-name {
  color: #fff;
}

.rank-row:nth-child(1) .rank-category {
  color: rgba(255, 255, 255, 0.58);
}

.rank-row:nth-child(1) .rank-score,
.rank-row:nth-child(1) .rank-number {
  color: #ddd6fe;
}

.rank-row:nth-child(2),
.rank-row:nth-child(3) {
  border-color: var(--primary-border);
  background: var(--brand-faint);
}

.rank-main {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.rank-number {
  color: var(--muted-soft);
  font-size: 11px;
  font-weight: 900;
}

.logo-badge {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  color: var(--brand-ink);
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 900;
}

.logo-badge > span {
  position: relative;
  z-index: 1;
}

.logo-badge img {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  padding: 4px;
  background: #fff;
  object-fit: contain;
  opacity: 0;
  transition: opacity 160ms ease;
}

.logo-badge img.is-loaded {
  opacity: 1;
}

.rank-name {
  display: block;
  overflow: hidden;
  max-width: 112px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-category {
  display: block;
  overflow: hidden;
  max-width: 112px;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-score {
  color: var(--brand-ink);
  font-size: 12px;
  font-weight: 900;
}

.favorites-section {
  scroll-margin-top: 86px;
  display: grid;
  gap: 20px;
  margin-top: 42px;
  padding: 28px;
}

.favorites-section[hidden] {
  display: none;
}

.favorites-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-full);
  background: var(--brand-faint);
  color: var(--brand-ink);
  font-size: 11px;
  font-weight: 850;
}

.favorites-head h2 {
  margin: 10px 0 0;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.2;
  font-weight: 950;
}

.favorites-head p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.favorites-count {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 12px;
  border-radius: var(--radius-full);
  background: var(--primary-soft);
  color: var(--brand-ink);
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.favorite-grid {
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
}

.favorites-main {
  display: block;
  width: min(1360px, calc(100% - 48px));
  margin: 0 auto;
  padding: 36px 0 64px;
}

.favorites-page-panel {
  display: grid;
  gap: 24px;
  padding: 28px;
}

.favorites-page-panel .empty-state {
  margin-top: 0;
}

.favorite-category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 38px;
}

.favorite-category-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 13px 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  background: #fff;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 850;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.favorite-category-button strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 22px;
  padding: 0 7px;
  border-radius: var(--radius-full);
  background: var(--surface-tint);
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
}

.favorite-category-button:hover,
.favorite-category-button.is-active {
  border-color: var(--primary-border);
  background: var(--primary-soft);
  color: var(--brand-ink);
  transform: translateY(-1px);
}

.favorite-category-button:hover strong,
.favorite-category-button.is-active strong {
  background: #fff;
  color: var(--brand-ink);
}

.favorites-page .product-grid {
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
}

.favorites-page .site-footer {
  width: min(1360px, calc(100% - 48px));
}

.collection-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  width: min(1480px, calc(100% - 48px));
  margin: 0 auto;
  padding: 36px 0 64px;
}

.collection-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 164px;
  padding: 30px;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 12%, rgba(86, 42, 255, 0.14), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(247, 248, 253, 0.92));
}

.collection-hero h1 {
  margin: 8px 0 10px;
  color: var(--ink);
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1;
  font-weight: 950;
  letter-spacing: 0;
}

.collection-hero p {
  max-width: 620px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.7;
  font-weight: 700;
}

.collection-panel {
  display: grid;
  gap: 24px;
  padding: 28px;
}

.collection-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.collection-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.2;
  font-weight: 950;
}

.collection-head p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.collection-count {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  border-radius: var(--radius-full);
  background: var(--primary-soft);
  color: var(--brand-ink);
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.collection-grid {
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
}

.collection-page .site-footer {
  width: min(1480px, calc(100% - 48px));
}

.page-return {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  background: #fff;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 850;
}

.page-return:hover {
  border-color: var(--primary-border);
  color: var(--brand-ink);
}

.submit-section {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1fr);
  gap: 30px;
  align-items: center;
  margin-top: 42px;
  padding: 28px;
}

.submit-section p {
  margin: 10px 0 0;
  color: var(--muted);
}

.submit-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
}

.submit-form input {
  height: 42px;
  min-width: 0;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: 0;
}

.submit-form input:focus {
  border-color: var(--primary-border);
}

.submit-form input.is-invalid {
  border-color: rgba(230, 0, 35, 0.42);
  background: rgba(230, 0, 35, 0.035);
}

.submit-form button {
  height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  background: var(--dark);
  color: #e3ddff;
  font-weight: 850;
}

.submit-status {
  grid-column: 1 / -1;
  min-height: 22px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.submit-status.is-error {
  color: #d21d3f;
}

.submit-status.is-success {
  color: #15945f;
}

.app-toast {
  position: fixed;
  left: 50%;
  top: 86px;
  z-index: 80;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  max-width: min(460px, calc(100vw - 40px));
  padding: 12px 20px 12px 14px;
  border: 1px solid rgba(86, 42, 255, 0.14);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 247, 255, 0.92)),
    #fff;
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.35;
  box-shadow:
    0 30px 90px rgba(45, 34, 108, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.88);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -28px);
  transition:
    opacity 180ms ease,
    transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
  backdrop-filter: blur(18px);
}

.app-toast::before {
  content: "✓";
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #6d5dfc, #a78bfa);
  color: #fff;
  font-size: 16px;
  font-weight: 950;
  box-shadow: 0 10px 24px rgba(86, 42, 255, 0.24);
}

.app-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.app-toast.is-success {
  border-color: rgba(86, 42, 255, 0.14);
  color: var(--ink);
}

.app-toast.is-error {
  border-color: rgba(210, 29, 63, 0.2);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 245, 247, 0.92)),
    #fff;
  color: #a31632;
}

.app-toast.is-error::before {
  content: "!";
  background: linear-gradient(135deg, #ff5f7a, #d21d3f);
  box-shadow: 0 10px 24px rgba(210, 29, 63, 0.2);
}

.login-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.login-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.login-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(24, 29, 39, 0.28);
  backdrop-filter: blur(10px);
}

.login-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(250px, 0.86fr) minmax(360px, 1fr);
  gap: 28px;
  width: min(920px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 30px;
  border: 1px solid rgba(233, 234, 235, 0.9);
  border-radius: 26px;
  background:
    radial-gradient(circle at 13% 2%, rgba(221, 214, 254, 0.62), transparent 30%),
    radial-gradient(circle at 86% 12%, rgba(31, 220, 128, 0.14), transparent 30%),
    #fff;
  box-shadow: var(--shadow-lg);
}

.login-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
}

.login-close:hover {
  color: var(--ink);
  border-color: var(--primary-border);
}

.login-copy {
  align-self: center;
  padding-right: 8px;
}

.login-kicker {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-full);
  background: var(--primary-soft);
  color: var(--brand-ink);
  font-size: 12px;
  font-weight: 900;
}

.login-copy h2 {
  margin: 16px 0 10px;
  color: var(--ink);
  font-size: 34px;
  line-height: 1.12;
  font-weight: 950;
}

.login-copy p {
  max-width: 340px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.login-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.login-benefits span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 0 11px;
  border: 1px solid rgba(86, 42, 255, 0.1);
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 850;
  box-shadow: 0 10px 24px rgba(86, 42, 255, 0.06);
}

.login-methods {
  display: grid;
  gap: 14px;
}

.login-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  padding: 5px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(247, 248, 252, 0.9)),
    #f7f7fb;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 12px 28px rgba(20, 24, 36, 0.06);
}

.login-switch-button {
  display: inline-flex;
  min-width: 0;
  height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 950;
  transition:
    background 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.login-switch-button:hover {
  color: var(--ink);
}

.login-switch-button.is-active {
  background: #111318;
  color: #fff;
  box-shadow: 0 14px 32px rgba(15, 17, 23, 0.18);
}

.login-switch-button.is-active:hover {
  color: #fff;
}

.method-icon {
  position: relative;
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 9px;
  background: rgba(86, 42, 255, 0.1);
}

.method-icon::before,
.method-icon::after {
  content: "";
}

.method-icon-phone::before {
  width: 9px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.method-icon-phone::after {
  position: absolute;
  bottom: 4px;
  width: 3px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
}

.method-icon-wechat::before,
.method-icon-wechat::after {
  position: absolute;
  border-radius: 999px;
  background: currentColor;
}

.method-icon-wechat::before {
  width: 13px;
  height: 10px;
  left: 4px;
  top: 5px;
}

.method-icon-wechat::after {
  width: 10px;
  height: 8px;
  right: 3px;
  bottom: 4px;
  opacity: 0.7;
}

.login-switch-button.is-active .method-icon {
  background: rgba(255, 255, 255, 0.14);
}

.login-method-panel {
  animation: loginPanelIn 220ms ease both;
}

.login-method-panel[hidden] {
  display: none;
}

@keyframes loginPanelIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.wechat-login-card,
.phone-login-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-sm);
}

.wechat-login-card {
  position: relative;
  overflow: hidden;
  border-color: rgba(24, 201, 105, 0.16);
  background:
    radial-gradient(circle at 86% -20%, rgba(29, 208, 113, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(250, 252, 255, 0.94));
}

.wechat-login-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  content: "";
  background: linear-gradient(90deg, #17181d, #20c46b, #745dff);
}

.wechat-login-head,
.phone-login-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wechat-mark {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 15px;
  background: #111318;
  color: #30d678;
  box-shadow: 0 16px 32px rgba(15, 18, 27, 0.16);
}

.wechat-mark svg {
  width: 25px;
  height: 25px;
  fill: currentColor;
}

.wechat-login-head strong,
.wechat-login-head span,
.phone-login-head strong,
.phone-login-head span {
  display: block;
}

.wechat-login-head strong,
.phone-login-head strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 950;
}

.wechat-login-head span,
.phone-login-head span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.wechat-qr-frame {
  position: relative;
  display: grid;
  width: 212px;
  height: 212px;
  place-items: center;
  justify-self: center;
  margin: 6px 0 2px;
  padding: 12px;
  border: 1px solid rgba(17, 19, 24, 0.08);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(247, 248, 252, 0.92)),
    #fff;
  box-shadow:
    inset 0 0 0 8px rgba(247, 248, 252, 0.72),
    0 24px 60px rgba(20, 24, 36, 0.1);
}

.wechat-qr-frame::before,
.wechat-qr-frame::after {
  position: absolute;
  width: 34px;
  height: 34px;
  border-color: #16181d;
  content: "";
}

.wechat-qr-frame::before {
  top: 15px;
  left: 15px;
  border-top: 3px solid;
  border-left: 3px solid;
  border-radius: 11px 0 0;
}

.wechat-qr-frame::after {
  right: 15px;
  bottom: 15px;
  border-right: 3px solid;
  border-bottom: 3px solid;
  border-radius: 0 0 11px;
}

.wechat-qr-frame img {
  width: 100%;
  height: 100%;
  border-radius: 16px;
  object-fit: cover;
}

.wechat-qr-placeholder {
  display: grid;
  grid-template-columns: repeat(5, 22px);
  grid-auto-rows: 22px;
  gap: 8px;
  place-content: center;
  width: 100%;
  height: 100%;
  border-radius: 18px;
  background:
    linear-gradient(90deg, rgba(245, 246, 250, 0.96), rgba(255, 255, 255, 0.96)),
    #fff;
}

.wechat-qr-placeholder i {
  border-radius: 7px;
  background: #15171d;
}

.wechat-qr-placeholder i:nth-child(2) {
  grid-column: 4;
  background: #21c76d;
}

.wechat-qr-placeholder i:nth-child(3) {
  grid-column: 2;
  grid-row: 3;
  background: #6d5cff;
}

.wechat-qr-placeholder i:nth-child(4) {
  grid-column: 5;
  grid-row: 4;
  background: #15171d;
}

.wechat-qr-placeholder span {
  grid-column: 1 / -1;
  align-self: end;
  justify-self: center;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.wechat-qr-frame.is-loading .wechat-qr-placeholder {
  animation: qrPulse 1s ease-in-out infinite;
}

@keyframes qrPulse {
  50% {
    opacity: 0.66;
    transform: scale(0.985);
  }
}

.wechat-login-status {
  min-height: 40px;
  margin: 0;
  padding: 11px 12px;
  border-radius: 14px;
  background: rgba(241, 244, 248, 0.86);
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  line-height: 1.55;
}

.wechat-login-status.is-success {
  background: #ecfdf3;
  color: #027a48;
}

.wechat-login-status.is-error {
  background: #fff1f0;
  color: #b42318;
}

.wechat-login-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.wechat-login-actions span {
  color: var(--muted-soft);
  font-size: 12px;
  font-weight: 760;
}

.wechat-refresh-button {
  height: 36px;
  padding: 0 13px;
  border: 1px solid rgba(86, 42, 255, 0.14);
  border-radius: 12px;
  background: #fff;
  color: var(--brand-ink);
  font-size: 13px;
  font-weight: 900;
}

.wechat-refresh-button:hover {
  border-color: var(--primary-border);
  background: var(--primary-soft);
}

.wechat-refresh-button:disabled {
  cursor: not-allowed;
  opacity: 0.64;
}

.phone-login-card {
  gap: 12px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.phone-field {
  display: grid;
  gap: 8px;
}

.phone-field > span {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 850;
}

.phone-field input {
  width: 100%;
  height: 46px;
  min-width: 0;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: 0;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 750;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.phone-field input:focus {
  border-color: var(--primary-border);
  box-shadow: 0 0 0 4px rgba(86, 42, 255, 0.09);
}

.phone-field input::placeholder {
  color: var(--muted-soft);
}

.code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px;
  gap: 8px;
}

.send-code-button {
  height: 46px;
  padding: 0 12px;
  border: 1px solid var(--primary-border);
  border-radius: 13px;
  background: var(--primary-soft);
  color: var(--brand-ink);
  font-size: 13px;
  font-weight: 900;
}

.send-code-button:disabled {
  cursor: not-allowed;
  opacity: 0.64;
}

.phone-login-meta {
  min-height: 36px;
  padding: 10px 11px;
  border-radius: 12px;
  background: var(--brand-faint);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  font-weight: 700;
}

.phone-login-meta.is-error {
  background: #fff1f0;
  color: #b42318;
}

.phone-login-meta.is-success {
  background: #ecfdf3;
  color: #027a48;
}

.phone-login-button {
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: var(--dark);
  color: #e3ddff;
  font-weight: 900;
}

.phone-login-button:hover {
  box-shadow: 0 14px 30px rgba(9, 9, 11, 0.16);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  width: min(var(--shell-width), calc(100% - (var(--shell-gutter) * 2)));
  margin: 0 auto;
  padding: 24px 0 34px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 1180px) {
  :root {
    --shell-gutter: 18px;
    --rail-width: 236px;
    --right-panel-width: 280px;
  }

  .site-header {
    grid-template-columns: auto 1fr auto;
    padding: 0 24px 0 18px;
  }

  .top-nav {
    gap: 14px;
  }

  main,
  .discover-layout {
    gap: 18px;
  }
}

@media (max-width: 940px) {
  :root {
    --rail-width: 0px;
    --right-panel-width: 100%;
    --shell-gutter: 14px;
  }

  .category-rail {
    position: sticky;
    top: 92px;
    right: auto;
    bottom: auto;
    left: auto;
    z-index: 18;
    width: auto;
    height: auto;
    margin: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
  }

  .rail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 2px 10px;
  }

  .rail-head h2 {
    margin: 0;
    font-size: 16px;
  }

  .category-rail .category-tabs {
    display: flex;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .rail-shortcuts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 10px;
    padding-top: 10px;
  }

  .rail-shortcut {
    min-height: 56px;
  }

  .category-rail .category-tab {
    width: auto;
    min-width: max-content;
    flex: 0 0 auto;
  }

  main {
    grid-template-columns: 1fr;
    gap: 24px;
    width: 100%;
    margin: 0;
    padding-right: 14px;
    padding-left: 14px;
    padding-top: 18px;
  }

  .content-column {
    grid-column: 1;
  }

  .site-footer {
    width: min(760px, calc(100% - 28px));
    margin: 0 auto;
  }

  .site-header {
    width: 100%;
    margin: 0;
    grid-template-columns: 1fr auto;
    row-gap: 8px;
    min-height: 92px;
    padding: 10px 16px;
  }

  .top-nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    gap: 10px;
    overflow-x: auto;
  }

  .top-nav a {
    min-width: 66px;
  }

  .login-link {
    font-size: 12px;
  }

  .discover-layout,
  .submit-section {
    grid-template-columns: 1fr;
  }

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

  .login-panel {
    grid-template-columns: 1fr;
    width: min(520px, 100%);
    max-height: calc(100vh - 36px);
    overflow-y: auto;
  }

  .login-copy {
    padding-right: 0;
  }

  .login-copy h2 {
    font-size: 28px;
  }

  .wechat-qr-frame {
    width: 196px;
    height: 196px;
  }

  .filter-sidebar.ui-card {
    position: static;
    order: -1;
    max-height: none;
    overflow: visible;
  }

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

  .section-bar {
    margin-top: 6px;
  }

  .submit-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  main,
  .site-footer {
    width: 100%;
    margin-right: 0;
    margin-left: 0;
  }

  .category-rail {
    top: 92px;
    margin: 0;
  }

  .brand-name {
    font-size: 20px;
  }

  .brand-chip {
    display: none;
  }

  .hero {
    padding: 12px 0 32px;
  }

  .hero h1 {
    font-size: 30px;
  }

  .hero h1 span {
    min-width: 78px;
    height: 34px;
    font-size: 18px;
  }

  .hero p {
    font-size: 13px;
    line-height: 1.7;
  }

  .search-panel {
    grid-template-columns: 1fr 38px;
    height: 54px;
    margin-top: 28px;
  }

  .search-panel button {
    width: 38px;
    height: 38px;
  }

  .sidebar-block {
    padding: 15px;
  }

  .hot-tags {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .hot-tag {
    flex: 0 0 auto;
  }

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

  .rank-link {
    padding: 9px;
  }

  .rank-main {
    gap: 7px;
  }

  .rank-name,
  .rank-category {
    max-width: 76px;
  }

  .rank-score {
    display: none;
  }

  .section-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .favorites-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .filter-actions {
    width: 100%;
    flex-direction: column;
  }

  .sort-control,
  .sort-trigger,
  .sort-menu {
    width: 100%;
  }

  .sort-menu {
    right: auto;
    left: 0;
  }

  .product-grid,
  .favorite-grid {
    grid-template-columns: 1fr;
  }

  .collection-main {
    width: calc(100% - 28px);
    padding: 22px 0 48px;
  }

  .collection-hero,
  .collection-head {
    align-items: stretch;
    flex-direction: column;
  }

  .collection-hero,
  .collection-panel {
    padding: 20px;
  }

  .collection-grid {
    grid-template-columns: 1fr;
  }

  .collection-page .site-footer {
    width: calc(100% - 28px);
  }

  .subnav-row {
    gap: 8px;
  }

  .login-modal {
    padding: 12px;
  }

  .login-panel {
    gap: 18px;
    padding: 22px;
    border-radius: 22px;
  }

  .login-benefits {
    margin-top: 16px;
  }

  .login-switch-button {
    height: 42px;
    font-size: 13px;
  }

  .method-icon {
    width: 20px;
    height: 20px;
  }

  .wechat-login-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .wechat-refresh-button {
    width: 100%;
  }

  .code-row {
    grid-template-columns: 1fr;
  }

  .send-code-button {
    width: 100%;
  }
}
