:root {
  --bg: #eef4fb;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-strong: rgba(255, 255, 255, 0.94);
  --line: rgba(124, 145, 176, 0.18);
  --text: #11213f;
  --muted: #66758d;
  --primary: #1b63ff;
  --primary-soft: #edf4ff;
  --primary-2: #72b1ff;
  --shadow: 0 24px 60px rgba(22, 51, 102, 0.12);
  --hero: linear-gradient(135deg, #071730 0%, #123f97 58%, #4588ff 100%);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --font-main: "Segoe UI Variable", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(86, 136, 255, 0.12), transparent 30%),
    linear-gradient(180deg, #f7faff 0%, var(--bg) 100%);
  color: var(--text);
  font-family: var(--font-main);
}

body {
  min-width: 320px;
}

.hidden {
  display: none !important;
}

.page-shell {
  max-width: 1480px;
  margin: 0 auto;
  padding: 24px;
}

a.topnav-link,
.action-link {
  text-decoration: none;
}

.glass-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 22px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark,
.header-avatar,
.profile-avatar {
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
}

.brand-mark {
  width: 54px;
  height: 54px;
  font-size: 18px;
}

.brand-title {
  font-size: 18px;
  font-weight: 800;
}

.brand-subtitle {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.topnav {
  display: flex;
  gap: 10px;
  flex: 1;
  justify-content: center;
}

.topnav-link,
.ghost-mini-button,
.primary-mini-button,
.search-button,
.ghost-button,
.download-button,
.favorite-toggle-button {
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.topnav-link {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  background: transparent;
  color: #6c7a92;
  font-weight: 700;
}

.topnav-link.active,
.topnav-link:hover {
  background: rgba(27, 99, 255, 0.1);
  color: var(--primary);
}

.user-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.header-avatar {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  font-size: 15px;
}

.header-nickname {
  font-size: 14px;
  font-weight: 700;
}

.header-phone {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.primary-mini-button,
.ghost-mini-button,
.ghost-button {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 700;
}

.primary-mini-button {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  box-shadow: 0 14px 24px rgba(27, 99, 255, 0.18);
}

.ghost-mini-button,
.ghost-button {
  background: var(--primary-soft);
  color: var(--primary);
}

.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 420px);
  gap: 24px;
  margin-top: 18px;
  padding: 12px;
  border-radius: 40px;
  background: var(--hero);
  color: #fff;
  box-shadow: var(--shadow);
}

.subpage-hero {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 24px;
  margin-top: 18px;
  padding: 30px 34px;
  border-radius: 34px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(244, 248, 255, 0.94));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.subpage-hero h1 {
  margin: 16px 0 10px;
  font-size: 42px;
}

.subpage-hero p {
  margin: 0;
  max-width: 760px;
  color: var(--muted);
  line-height: 1.8;
}

.hero-stat-grid.compact {
  grid-template-columns: repeat(2, minmax(180px, 220px));
  align-self: center;
}

.compact-card {
  min-height: 110px;
  background: rgba(27, 99, 255, 0.06);
  border-color: rgba(27, 99, 255, 0.1);
  color: var(--text);
}

.hero-stat-label.dark {
  color: var(--muted);
}

.hero-copy,
.hero-stat-grid {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero-badge.dark {
  border-color: rgba(27, 99, 255, 0.12);
  background: rgba(27, 99, 255, 0.08);
  color: var(--primary);
}

.hero h1 {
  margin: 18px 0 14px;
  font-size: clamp(36px, 4vw, 58px);
  line-height: 1.04;
}

.hero p {
  max-width: 680px;
  margin: 0;
  font-size: 17px;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.82);
}

.hero-stat-grid {
  display: grid;
  gap: 16px;
}

.hero-stat-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 118px;
  padding: 24px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(16px);
}

.hero-stat-label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.72);
}

.hero-stat-card strong {
  margin-top: 10px;
  font-size: 34px;
  font-weight: 800;
}

.hero-glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(6px);
}

.hero-glow-left {
  top: -50px;
  left: -60px;
  width: 220px;
  height: 220px;
  background: rgba(118, 187, 255, 0.28);
}

.hero-glow-right {
  right: 120px;
  bottom: -70px;
  width: 240px;
  height: 240px;
  background: rgba(255, 208, 122, 0.18);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(380px, 0.84fr);
  gap: 24px;
  margin-top: 24px;
  align-items: start;
}

.catalog-panel,
.user-panel,
.detail-panel {
  padding: 28px;
}

.sidebar-stack {
  display: grid;
  gap: 24px;
}

.single-column-layout,
.profile-layout {
  margin-top: 24px;
}

.wide-panel {
  padding: 28px;
}

.toolbar {
  display: flex;
  gap: 14px;
  align-items: center;
}

.search-box {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 0 18px;
  border: 1px solid rgba(53, 95, 170, 0.08);
  border-radius: 18px;
  background: var(--panel-strong);
}

.search-icon {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7e8aa0;
}

.search-box input,
.form-label input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 15px;
}

.search-button {
  min-width: 128px;
  min-height: 58px;
  padding: 0 24px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 18px 30px rgba(27, 99, 255, 0.2);
}

.search-button.full-width {
  width: 100%;
}

.primary-mini-button:hover,
.ghost-mini-button:hover,
.search-button:hover,
.ghost-button:hover,
.download-button:hover,
.favorite-toggle-button:hover {
  transform: translateY(-1px);
}

.category-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.compact-head {
  margin-top: 26px;
}

.category-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.category-summary-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(58, 95, 173, 0.08);
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.category-summary-card:hover,
.category-summary-card.active {
  transform: translateY(-3px);
  border-color: rgba(27, 99, 255, 0.22);
  box-shadow: 0 18px 32px rgba(35, 74, 147, 0.1);
}

.category-summary-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  flex: none;
}

.category-summary-card strong {
  display: block;
  font-size: 16px;
}

.category-summary-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.category-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(58, 95, 173, 0.08);
  color: #6d7a92;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.category-pill.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  box-shadow: 0 14px 24px rgba(27, 99, 255, 0.18);
}

.section-head,
.panel-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
}

.panel-head {
  margin-top: 0;
  align-items: start;
}

.panel-head.compact {
  margin-top: 22px;
}

.section-head h2,
.panel-head h2,
.panel-head h3,
.detail-copy h2,
.detail-section h3 {
  margin: 0;
}

.section-head p,
.panel-head p,
.login-empty-copy p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.tool-grid.wide-gap {
  margin-top: 24px;
}

.tool-card,
.comment-card,
.favorite-item,
.profile-card,
.login-empty {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(58, 95, 173, 0.08);
}

.tool-card {
  position: relative;
  padding: 22px;
  border-radius: 24px;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.tool-card:hover,
.tool-card.active {
  transform: translateY(-4px);
  border-color: rgba(27, 99, 255, 0.22);
  box-shadow: 0 22px 38px rgba(35, 74, 147, 0.12);
}

.tool-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tool-icon,
.detail-icon {
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
}

.tool-icon {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  font-size: 24px;
}

.tool-badge,
.detail-category {
  display: inline-flex;
  align-items: center;
}

.tool-badge {
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(27, 99, 255, 0.1);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
}

.tool-card h3 {
  margin: 18px 0 10px;
  font-size: 22px;
}

.tool-card p {
  margin: 0;
  min-height: 68px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.tool-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  color: #6f7f97;
  font-size: 13px;
}

.empty-state,
.detail-loading,
.mini-empty {
  display: grid;
  place-items: center;
  min-height: 200px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px dashed rgba(58, 95, 173, 0.18);
  color: var(--muted);
  text-align: center;
}

.empty-state {
  min-height: 320px;
}

.login-empty,
.profile-card {
  padding: 20px;
  border-radius: 22px;
}

.login-empty {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.profile-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.profile-avatar {
  width: 60px;
  height: 60px;
  font-size: 22px;
}

.profile-name {
  font-size: 18px;
  font-weight: 800;
}

.profile-phone {
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.profile-page-top {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  gap: 20px;
}

.profile-main-card {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 22px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(27, 99, 255, 0.08), rgba(114, 177, 255, 0.14));
}

.large-avatar {
  width: 82px;
  height: 82px;
  font-size: 28px;
  border-radius: 24px;
}

.profile-main-name {
  font-size: 24px;
  font-weight: 800;
}

.profile-main-phone {
  margin-top: 8px;
  color: var(--muted);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  margin-top: 14px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(18, 179, 154, 0.12);
  color: #119279;
  font-size: 13px;
  font-weight: 700;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.quick-action-card {
  display: block;
  padding: 22px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(58, 95, 173, 0.08);
  color: var(--text);
}

.quick-action-card strong {
  display: block;
  font-size: 18px;
}

.quick-action-card span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.7;
}

.profile-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 22px;
}

.data-list {
  display: grid;
  gap: 14px;
}

.data-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(58, 95, 173, 0.08);
}

.data-row:last-child {
  border-bottom: none;
}

.data-row span {
  color: var(--muted);
}

.data-row strong {
  font-weight: 800;
}

.profile-preview-section {
  margin-top: 22px;
}

.about-copy {
  display: grid;
  gap: 12px;
}

.about-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.9;
  font-size: 14px;
}

.no-margin {
  margin-top: 0;
}

.profile-stat {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(27, 99, 255, 0.06);
}

.profile-stat span {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.profile-stat strong {
  display: block;
  margin-top: 8px;
  font-size: 18px;
}

.favorite-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.favorite-item {
  display: flex;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  cursor: pointer;
}

.favorite-item-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  flex: none;
}

.favorite-item strong {
  display: block;
  font-size: 14px;
}

.favorite-item p {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}

.detail-content {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.detail-hero {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 22px;
  border-radius: 26px;
  background: linear-gradient(135deg, rgba(7, 22, 47, 0.97) 0%, rgba(18, 61, 146, 0.94) 56%, rgba(61, 124, 255, 0.92) 100%);
  color: #fff;
}

.detail-icon {
  width: 78px;
  height: 78px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 28px;
  flex: none;
}

.detail-category {
  margin-bottom: 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.detail-copy p {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.75;
}

.detail-action-row {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}

.tag-list,
.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-item,
.scene-pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
}

.tag-item {
  background: rgba(27, 99, 255, 0.1);
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
}

.favorite-toggle-button {
  min-width: 108px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--primary);
  font-size: 14px;
  font-weight: 800;
}

.favorite-toggle-button.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
}

.detail-section {
  padding: 22px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(58, 95, 173, 0.08);
}

.detail-section h3 {
  font-size: 18px;
  margin-bottom: 14px;
}

.detail-intro {
  margin: 0;
  color: var(--muted);
  line-height: 1.86;
}

.bullet-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.bullet-list li {
  position: relative;
  padding-left: 18px;
  color: #4f617e;
  line-height: 1.75;
}

.bullet-list li::before {
  content: "";
  position: absolute;
  top: 11px;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
}

.scene-pill {
  background: #f2f6ff;
  color: #2d61e8;
  font-size: 13px;
  font-weight: 700;
}

.comment-list {
  display: grid;
  gap: 12px;
}

.comment-card {
  padding: 16px 18px;
  border-radius: 18px;
  background: #f8fbff;
}

.comment-card strong {
  display: block;
  color: #245fe6;
  font-size: 14px;
}

.comment-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.75;
  font-size: 14px;
}

.download-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px;
  border-radius: 26px;
  background: linear-gradient(135deg, rgba(27, 99, 255, 0.1), rgba(114, 177, 255, 0.18));
}

.download-caption {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  color: #6f7f97;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.download-card strong {
  display: block;
  font-size: 18px;
}

.download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  font-weight: 800;
  box-shadow: 0 18px 28px rgba(27, 99, 255, 0.18);
}

.download-button.disabled {
  pointer-events: none;
  background: rgba(117, 130, 155, 0.2);
  color: #79879e;
  box-shadow: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
}

.modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(8, 18, 40, 0.42);
  backdrop-filter: blur(10px);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(92vw, 520px);
  padding: 28px;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(15, 42, 96, 0.22);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 999px;
  background: rgba(17, 33, 63, 0.06);
  color: #465673;
  font-size: 22px;
  cursor: pointer;
}

.modal-head h2 {
  margin: 18px 0 10px;
}

.modal-head p,
.login-tip {
  color: var(--muted);
  line-height: 1.7;
}

.form-grid {
  display: grid;
  gap: 16px;
  margin: 22px 0;
}

.form-label {
  display: grid;
  gap: 8px;
}

.form-label span {
  font-size: 14px;
  font-weight: 700;
}

.form-label input {
  min-height: 52px;
  padding: 0 16px;
  border-radius: 16px;
  border: 1px solid rgba(58, 95, 173, 0.12);
  background: #f8fbff;
}

.code-row {
  display: flex;
  gap: 12px;
}

.login-tip {
  margin-top: 14px;
  text-align: center;
  font-size: 13px;
}

@media (max-width: 1280px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .category-summary-grid,
  .profile-page-top,
  .profile-detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .page-shell {
    padding: 16px;
  }

  .topbar,
  .hero,
  .subpage-hero,
  .toolbar,
  .download-card,
  .section-head,
  .panel-head,
  .detail-action-row,
  .login-empty,
  .code-row {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar,
  .hero,
  .subpage-hero {
    display: flex;
  }

  .topnav {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

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

  .quick-actions {
    grid-template-columns: 1fr;
  }
}
