:root {
  --primary: #0f6bff;
  --primary-strong: #0052d9;
  --primary-soft: #eaf1ff;
  --accent: #12b6cb;
  --accent-warm: #ff7a45;
  --gradient-brand: linear-gradient(135deg, #0f6bff 0%, #4f46e5 50%, #7c3aed 100%);
  --gradient-soft: linear-gradient(180deg, #ffffff 0%, #f6f8ff 100%);
  --ink: #0f172a;
  --ink-soft: #1f2a44;
  --muted: #667085;
  --weak: #98a2b3;
  --line: #e8edf5;
  --line-soft: #f1f4fb;
  --panel: #ffffff;
  --soft: #f5f8fc;
  --hot: #ff6b38;
  --good: #16a074;
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 4px 12px -2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 12px 32px -8px rgba(15, 23, 42, 0.10);
  --shadow-lg: 0 24px 56px -12px rgba(15, 23, 42, 0.18);
  --shadow-brand: 0 16px 38px -8px rgba(15, 107, 255, 0.22);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 15% 10%, rgba(15, 107, 255, 0.11), transparent 30rem),
    radial-gradient(circle at 80% 0%, rgba(18, 182, 203, 0.09), transparent 28rem),
    #f7f9fd;
  color: var(--ink);
  font-family:
    Inter,
    "PingFang SC",
    "Microsoft YaHei",
    "Noto Sans SC",
    Arial,
    sans-serif;
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: 0;
}

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

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

img {
  max-width: 100%;
}

.loading-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  gap: 14px;
  color: var(--muted);
}

.loading-screen img {
  width: 88px;
}

.app-shell {
  min-height: 100vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(232, 237, 245, 0.9);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(100%, 1440px);
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.brand-logo {
  width: 168px;
  max-width: min(36vw, 168px);
  height: auto;
  display: block;
}

.favorite-entry {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.brand-pill {
  height: 42px;
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid #d6e2f4;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  color: #1f2a44;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 8px 22px rgba(21, 72, 158, 0.08);
}

.brand-pill svg {
  width: 18px;
  height: 18px;
  color: var(--primary);
}

.favorite-pill {
  flex: 0 0 auto;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.favorite-pill:hover {
  border-color: #bdd2f5;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 10px 26px rgba(21, 72, 158, 0.14);
  transform: translateY(-1px);
}

.favorite-pill:focus-visible {
  outline: 0;
  border-color: #9bc0ff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 0 0 4px rgba(15, 107, 255, 0.12);
}

.favorite-tooltip {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  width: 252px;
  padding: 10px 12px;
  border: 1px solid rgba(191, 211, 245, 0.92);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  color: #475467;
  font-size: 12px;
  line-height: 1.5;
  box-shadow: 0 16px 36px rgba(17, 38, 84, 0.14);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(-4px);
  transition: opacity 150ms ease, transform 150ms ease;
  z-index: 6;
}

.favorite-tooltip::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -7px;
  width: 12px;
  height: 12px;
  border-left: 1px solid rgba(191, 211, 245, 0.92);
  border-top: 1px solid rgba(191, 211, 245, 0.92);
  background: rgba(255, 255, 255, 0.98);
  transform: translateX(-50%) rotate(45deg);
}

.favorite-entry:hover .favorite-tooltip,
.favorite-entry:focus-within .favorite-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.app-toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 120;
  max-width: min(90vw, 420px);
  padding: 12px 16px;
  border: 1px solid rgba(191, 211, 245, 0.95);
  border-radius: 14px;
  background: rgba(20, 27, 45, 0.94);
  color: #f8fbff;
  font-size: 13px;
  line-height: 1.5;
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.24);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(14px);
  transition: opacity 180ms ease, transform 180ms ease;
}

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

.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 2px;
}

.header-nav a,
.header-nav button {
  height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  color: #344054;
  border-radius: 8px;
  background: transparent;
  white-space: nowrap;
}

.header-nav a:hover,
.header-nav button:hover {
  background: #f2f6ff;
  color: var(--primary);
}

.header-search {
  width: min(280px, 28vw);
  position: relative;
}

.header-search svg {
  position: absolute;
  left: 13px;
  top: 50%;
  width: 17px;
  height: 17px;
  color: var(--weak);
  transform: translateY(-50%);
  pointer-events: none;
}

.header-search input {
  width: 100%;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px 0 40px;
  background: #fff;
  color: var(--ink);
  outline: 0;
}

.header-search input:focus,
.hero-search input:focus {
  border-color: rgba(15, 107, 255, 0.45);
  box-shadow: 0 0 0 4px rgba(15, 107, 255, 0.11);
}

.hero-icon-scroll {
  width: 100vw;
  flex-shrink: 0;
  position: relative;
  left: 50%;
  z-index: 3;
  overflow: hidden;
  margin-bottom: 22px;
  padding: 4px 0;
  transform: translateX(-50%);
}

.hero-icon-scroll::before,
.hero-icon-scroll::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 10;
  width: 250px;
  pointer-events: none;
}

.hero-icon-scroll::before {
  left: 0;
  background: linear-gradient(90deg, #f5f8fc 0, rgba(245, 248, 252, 0.96) 30%, rgba(245, 248, 252, 0.72) 68%, transparent);
}

.hero-icon-scroll::after {
  right: 0;
  background: linear-gradient(270deg, #f5f8fc 0, rgba(245, 248, 252, 0.96) 30%, rgba(245, 248, 252, 0.72) 68%, transparent);
}

.icon-scroll-row {
  width: max-content;
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  backface-visibility: hidden;
  animation: scrollIcons 25s linear infinite;
  transform: translateZ(0);
  will-change: transform;
}

.icon-scroll-row:last-child {
  margin-bottom: 0;
}

.icon-scroll-row.row-0 {
  animation-direction: normal;
  animation-duration: 25s;
}

.icon-scroll-row.row-1 {
  animation-direction: reverse;
  animation-duration: 30s;
}

.hero-icon-scroll:hover .icon-scroll-row {
  animation-play-state: paused;
}

.icon-scroll-item {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 5px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.icon-scroll-item:hover {
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transform: scale(1.12);
}

.icon-scroll-item img {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: cover;
  background: #f5f5f5;
}

.icon-placeholder,
.detail-logo-fallback,
.card-logo-fallback {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  font-weight: 800;
}

.icon-placeholder {
  width: 32px;
  height: 32px;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 12px;
  text-transform: uppercase;
}

@keyframes scrollIcons {
  0% {
    transform: translateX(0) translateZ(0);
  }

  100% {
    transform: translateX(-33.33%) translateZ(0);
  }
}

.hero {
  margin-top: -1px;
  overflow: hidden;
  padding: 14px 24px 36px;
  background:
    linear-gradient(135deg, rgba(238, 251, 255, 0.92), rgba(239, 246, 255, 0.92) 52%, rgba(255, 251, 240, 0.86)),
    #eef7ff;
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  width: min(980px, 100%);
  margin: 0 auto;
  text-align: center;
}

.hero h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 850;
}

.hero h1 span {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.hero-copy {
  margin: 16px auto 0;
  max-width: 640px;
  color: #667085;
  font-size: 16px;
}

.hero-stats {
  margin-top: 12px;
  color: #344054;
  font-weight: 700;
}

.hero-stats strong {
  color: var(--primary);
  font-size: 20px;
}

.hero-search {
  width: min(840px, 100%);
  margin: 42px auto 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 22px 70px rgba(44, 96, 170, 0.16);
}

.search-input-wrap {
  min-width: 0;
  position: relative;
}

.search-input-wrap svg {
  position: absolute;
  left: 16px;
  top: 50%;
  width: 21px;
  height: 21px;
  color: var(--weak);
  transform: translateY(-50%);
}

.hero-search input {
  width: 100%;
  height: 52px;
  padding: 0 16px 0 50px;
  border: 1px solid transparent;
  border-radius: 8px;
  outline: 0;
  color: var(--ink);
  background: #fff;
}

.ai-button {
  height: 52px;
  min-width: 124px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 22px;
  border-radius: 8px;
  background: #1d1b20;
  color: #fff;
  font-weight: 800;
}

.ai-button:hover {
  background: #111318;
}

.ai-button svg {
  width: 18px;
  height: 18px;
}

.hot-tags {
  margin: 26px auto 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  color: #667085;
}

.hot-tag-label {
  margin-right: 4px;
}

.tag-chip {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #344054;
  transition: 0.18s ease;
}

.tag-chip:hover {
  color: var(--primary);
  border-color: rgba(15, 107, 255, 0.25);
  transform: translateY(-1px);
}

.content-shell {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 22px 24px 64px;
  display: grid;
  grid-template-columns: 284px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 14px;
}

.sidebar-card,
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}

.sidebar-card {
  overflow: hidden;
}

.sidebar-head {
  height: 58px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.sidebar-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.sidebar-head span {
  height: 25px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 6px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 12px;
  font-weight: 800;
}

.category-list {
  display: grid;
  gap: 3px;
  padding: 10px;
  max-height: calc(100vh - 210px);
  overflow: auto;
}

.category-button {
  width: 100%;
  min-height: 46px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  color: var(--ink-soft);
  background: transparent;
  text-align: left;
  font-weight: 650;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.category-button:hover {
  background: var(--primary-soft);
  color: var(--primary);
  transform: translateX(2px);
}

.category-button.active {
  color: #fff;
  background: var(--gradient-brand);
  box-shadow: var(--shadow-brand);
}

.category-button.internal-entry {
  margin: 4px 0 8px;
  border: 1px solid rgba(15, 107, 255, 0.18);
  background: linear-gradient(135deg, #f8fbff, #eef5ff);
}

.category-button.internal-entry:hover {
  border-color: var(--primary);
  color: #fff;
  background: var(--gradient-brand);
}

.category-icon {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--primary-soft);
  color: var(--primary);
  transition: background 0.18s ease, color 0.18s ease;
}

.category-icon svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  stroke-width: 2;
}

.category-button:hover .category-icon,
.category-button.active .category-icon {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.category-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.category-count {
  min-width: 30px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--line-soft);
  font-size: 11.5px;
  font-weight: 800;
  transition: background 0.18s ease, color 0.18s ease;
}

.category-button:hover .category-count {
  color: var(--primary);
  background: rgba(255, 255, 255, 0.85);
}

.category-button.active .category-count {
  color: var(--primary);
  background: #fff;
}

.main-column {
  min-width: 0;
  display: grid;
  gap: 18px;
}

.internal-page {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 28px 24px 72px;
}

.internal-page-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(15, 107, 255, 0.18);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(225, 240, 255, 0.95), transparent 50%),
    radial-gradient(110% 130% at 100% 0%, rgba(238, 232, 255, 0.85), transparent 50%),
    linear-gradient(180deg, #ffffff 0%, #fafcff 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    var(--shadow-md);
  padding: 30px 32px;
}

.internal-page-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-brand);
  opacity: 0.9;
}

.internal-page-title {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 18px;
}

.internal-page-mark {
  width: 64px;
  height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: #fff;
  background: var(--gradient-brand);
  box-shadow: 0 18px 40px -8px rgba(15, 107, 255, 0.45);
}

.internal-page-mark svg {
  width: 30px;
  height: 30px;
}

.internal-page-title h1 {
  margin: 0;
  font-size: 34px;
  font-weight: 850;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.internal-page-title p {
  margin: 8px 0 0;
  max-width: 760px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.internal-page-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.internal-page-actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

.internal-page-actions .soft-button {
  min-height: 40px;
  white-space: nowrap;
}

.internal-page-stats span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  border: 1px solid rgba(15, 107, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  color: #475467;
  font-size: 13px;
  backdrop-filter: blur(8px);
}

.internal-page-stats strong {
  color: var(--primary);
  font-weight: 850;
  font-size: 15px;
}

.internal-page-section {
  margin-top: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.internal-section-head {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.internal-section-head h2 {
  margin: 0;
  font-size: 18px;
}

.internal-section-head span {
  color: var(--muted);
  font-size: 13px;
}

.internal-page-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
}

.internal-page-card {
  min-width: 0;
  min-height: 104px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.internal-page-card:hover {
  border-color: rgba(15, 107, 255, 0.28);
  box-shadow: 0 16px 38px rgba(15, 107, 255, 0.09);
  transform: translateY(-2px);
}

.internal-page-card.disabled {
  cursor: default;
}

.internal-page-icon {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--primary);
  background: #eef5ff;
}

.internal-page-icon svg {
  width: 24px;
  height: 24px;
}

.internal-page-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.internal-page-copy strong {
  overflow: hidden;
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.internal-page-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.internal-page-tag {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--primary);
  background: #eef5ff;
  font-size: 12px;
  font-weight: 800;
}

.panel {
  overflow: hidden;
}

.panel-head {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.panel-title {
  min-width: 0;
}

.panel-title h2 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  letter-spacing: 0;
}

.panel-title p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.dot {
  width: 10px;
  height: 10px;
  border: 3px solid #dbeafe;
  border-radius: 999px;
  background: var(--primary);
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.soft-button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border-radius: 8px;
  background: #f2f6ff;
  color: var(--primary);
  font-weight: 750;
}

.soft-button:hover {
  background: #e7f0ff;
}

.section-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 18px 0;
}

.section-tab {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: #f5f7fb;
  color: #344054;
  font-weight: 750;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.section-tab:hover {
  background: #e7f0ff;
  color: var(--primary);
}

.section-tab.active {
  background: linear-gradient(135deg, var(--primary) 0%, #1f7bff 100%);
  color: #fff;
  box-shadow: 0 10px 22px -12px rgba(15, 107, 255, 0.65);
  transform: translateY(-1px);
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  padding: 18px;
}

.tool-card {
  position: relative;
  min-height: 184px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  color: inherit;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.22s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.22s ease;
}

.tool-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.6), transparent 30%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.22s ease;
}

.tool-card:hover {
  border-color: rgba(15, 107, 255, 0.32);
  box-shadow: var(--shadow-brand);
  transform: translateY(-6px);
}

.tool-card:hover::before {
  opacity: 1;
}

.tool-card-top {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.card-logo {
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  object-fit: contain;
  padding: 8px;
  box-shadow: var(--shadow-xs);
  transition: transform 0.22s ease;
}

.tool-card:hover .card-logo {
  transform: scale(1.06) rotate(-2deg);
}

.card-logo-fallback {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
}

.tool-card h3 {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.tool-card-url {
  margin-top: 3px;
  overflow: hidden;
  color: var(--weak);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.external-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  color: var(--muted);
  background: var(--line-soft);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.tool-card:hover .external-icon {
  background: var(--gradient-brand);
  color: #fff;
  transform: translate(2px, -2px);
}

.external-icon svg {
  width: 17px;
  height: 17px;
}

.tool-desc {
  margin: 0;
  min-height: 44px;
  display: -webkit-box;
  overflow: hidden;
  color: #5b667a;
  font-size: 13.5px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.meta-row {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--line-soft);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.badge.hot {
  background: linear-gradient(135deg, #ff6b38 0%, #ff9560 100%);
  color: #fff;
  box-shadow: 0 4px 10px -2px rgba(255, 107, 56, 0.4);
}

.badge.new {
  background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
  color: #fff;
  box-shadow: 0 4px 10px -2px rgba(16, 185, 129, 0.4);
}

.badge.featured {
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: 0 4px 10px -2px rgba(15, 107, 255, 0.4);
}

.empty-state {
  padding: 64px 20px;
  text-align: center;
  color: var(--muted);
  display: grid;
  gap: 6px;
  justify-items: center;
}

.empty-state strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
}

.empty-state span {
  font-size: 14px;
  color: var(--muted);
}

.footer {
  padding: 34px 24px 46px;
  border-top: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
}

.footer-inner {
  width: min(1200px, 100%);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
}

.footer strong {
  color: var(--ink);
}

.detail-page {
  width: min(1160px, 100%);
  margin: 0 auto;
  padding: 28px 24px 68px;
}

.admin-page {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 28px 24px 72px;
}

.admin-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(15, 107, 255, 0.16);
  border-radius: 18px;
  background:
    radial-gradient(130% 150% at 0% 0%, rgba(225, 240, 255, 0.95), transparent 45%),
    radial-gradient(120% 140% at 100% 0%, rgba(224, 248, 251, 0.8), transparent 42%),
    linear-gradient(180deg, #ffffff 0%, #fafcff 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 22px 56px -28px rgba(15, 72, 170, 0.34);
  padding: 26px 26px 24px;
  animation: admin-rise 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.admin-hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent) 72%, transparent);
  opacity: 0.85;
}

.admin-hero > * {
  position: relative;
}

.admin-hero-top {
  margin-top: 18px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.admin-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.admin-hero-top h1 {
  margin: 0;
  font-size: 30px;
  letter-spacing: -0.5px;
}

.admin-hero-top p {
  margin: 8px 0 0;
  max-width: 760px;
  color: var(--muted);
  line-height: 1.55;
}

.admin-save-button[disabled] {
  opacity: 0.7;
  cursor: wait;
}

.admin-save-button {
  background: linear-gradient(135deg, var(--primary) 0%, #1f7bff 100%);
  box-shadow: 0 14px 28px -14px rgba(15, 107, 255, 0.6);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.admin-save-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px -14px rgba(15, 107, 255, 0.66);
  filter: saturate(1.05);
}

.admin-logout-button {
  border: 1px solid #d6e2f4;
  background: rgba(255, 255, 255, 0.7);
}

.admin-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.admin-stats span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 13px;
  border: 1px solid rgba(15, 107, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: #475467;
  font-size: 13px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 6px 16px -10px rgba(15, 72, 170, 0.2);
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.admin-stats span:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 107, 255, 0.3);
}

.admin-stats strong {
  color: var(--primary);
  font-weight: 850;
}

.admin-panel-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.admin-layout {
  margin-top: 22px;
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.admin-sidebar {
  position: sticky;
  top: 92px;
}

.admin-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 14px 40px -22px rgba(28, 43, 73, 0.3);
  transition: box-shadow 0.2s ease;
}

.admin-panel:hover {
  box-shadow: 0 18px 48px -22px rgba(15, 72, 170, 0.32);
}

.admin-sidebar-controls {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.admin-search {
  width: 100%;
}

.admin-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.admin-site-list {
  display: grid;
  gap: 10px;
  max-height: calc(100vh - 280px);
  overflow: auto;
  padding: 14px;
}

.admin-site-item {
  width: 100%;
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  text-align: left;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.admin-site-item:hover,
.admin-site-item.active {
  border-color: rgba(15, 107, 255, 0.32);
  box-shadow: 0 18px 38px -20px rgba(15, 107, 255, 0.42);
  transform: translateY(-1px);
}

.admin-site-item.active {
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.7), rgba(255, 255, 255, 0.96));
}

.admin-site-item-top {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.admin-site-logo,
.admin-site-logo-fallback {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

.admin-site-logo {
  border: 1px solid var(--line);
  background: #fff;
  object-fit: contain;
  padding: 6px;
}

.admin-site-item-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.admin-site-item-copy strong,
.admin-site-item-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-site-item-copy small {
  color: var(--muted);
}

.admin-site-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--weak);
  font-size: 12px;
}

.admin-editor {
  min-width: 0;
  display: grid;
  gap: 18px;
  animation: admin-rise 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 0.06s;
}

.admin-login-page {
  position: relative;
  width: min(1120px, 100%);
  min-height: calc(100vh - 72px);
  margin: 0 auto;
  padding: 56px 24px 80px;
  display: grid;
  place-items: center;
  isolation: isolate;
}

.admin-login-page::before,
.admin-login-page::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(8px);
  pointer-events: none;
}

.admin-login-page::before {
  top: -40px;
  left: 8%;
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(15, 107, 255, 0.18), transparent 62%);
}

.admin-login-page::after {
  right: 4%;
  bottom: 10%;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(18, 182, 203, 0.16), transparent 62%);
}

.admin-login-card {
  position: relative;
  width: min(440px, 100%);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(15, 107, 255, 0.16);
  border-radius: 20px;
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(239, 246, 255, 0.92), transparent 46%),
    radial-gradient(120% 120% at 100% 0%, rgba(225, 248, 251, 0.85), transparent 42%),
    linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 28px 70px -28px rgba(15, 72, 170, 0.42),
    0 12px 32px -18px rgba(17, 38, 84, 0.18);
  padding: 32px 30px 28px;
  animation: admin-rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.admin-login-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent) 70%, transparent);
  opacity: 0.85;
}

.admin-login-card .back-link {
  position: relative;
  z-index: 1;
}

.admin-login-head {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin-top: 26px;
}

.admin-login-head h1 {
  margin: 0;
  font-size: 27px;
  letter-spacing: -0.4px;
}

.admin-login-head p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
}

.admin-login-mark {
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: linear-gradient(145deg, var(--primary) 0%, #2f86ff 55%, var(--accent) 130%);
  color: #fff;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.4) inset,
    0 12px 26px -10px rgba(15, 107, 255, 0.6);
}

.admin-login-mark svg {
  width: 27px;
  height: 27px;
}

.admin-login-form {
  display: grid;
  gap: 16px;
  margin-top: 26px;
}

.admin-login-form .admin-field {
  animation: admin-rise 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.admin-login-form .admin-field:nth-child(1) { animation-delay: 0.08s; }
.admin-login-form .admin-field:nth-child(2) { animation-delay: 0.16s; }

.admin-login-error {
  padding: 11px 14px;
  border: 1px solid #fecdd3;
  border-radius: 10px;
  background: #fff1f2;
  color: #be123c;
  font-size: 13px;
  font-weight: 700;
}

.admin-login-submit {
  min-height: 42px;
  margin-top: 6px;
  padding: 0 26px;
  justify-self: start;
  font-size: 14px;
  background: linear-gradient(135deg, var(--primary) 0%, #1f7bff 100%);
  box-shadow: 0 10px 20px -12px rgba(15, 107, 255, 0.55);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.admin-login-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px -12px rgba(15, 107, 255, 0.62);
  filter: saturate(1.05);
}

.admin-login-submit[disabled] {
  opacity: 0.75;
  cursor: wait;
  transform: none;
}

.admin-login-hint {
  display: grid;
  gap: 6px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed rgba(15, 107, 255, 0.16);
  color: var(--weak);
  font-size: 12px;
}

@keyframes admin-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .admin-login-card,
  .admin-login-form .admin-field,
  .admin-hero,
  .admin-editor {
    animation: none;
  }
}

.admin-login-loading {
  min-height: 320px;
}

.admin-login-loading .loading-screen {
  min-height: 276px;
}

.admin-form {
  display: grid;
  gap: 18px;
}

.admin-status-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 18px 18px;
}

.admin-status-copy {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.admin-status-copy span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.admin-status-copy small {
  color: var(--muted);
  font-size: 13px;
}

.admin-status-badge {
  width: fit-content;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.admin-status-badge.active {
  background: #ecfdf3;
  color: #067647;
}

.admin-status-badge.inactive {
  background: #fff1f3;
  color: #be123c;
}

.admin-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-inline-button {
  border: 1px solid transparent;
}

.admin-inline-button.active {
  background: #0f6bff;
  color: #fff;
}

.admin-inline-button-warn.active {
  background: #e11d48;
  color: #fff;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 18px;
}

.admin-field,
.admin-toggle {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.admin-field-wide {
  grid-column: 1 / -1;
}

.admin-field span,
.admin-toggle span {
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}

.admin-field input,
.admin-field select,
.admin-field textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 13px;
  background: #fdfeff;
  color: var(--ink);
  outline: 0;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.admin-field input:hover,
.admin-field select:hover,
.admin-field textarea:hover {
  border-color: rgba(15, 107, 255, 0.28);
}

.admin-field textarea {
  min-height: 120px;
  resize: vertical;
}

.admin-field input:focus,
.admin-field select:focus,
.admin-field textarea:focus {
  border-color: rgba(15, 107, 255, 0.5);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(15, 107, 255, 0.12);
}

.admin-toggle {
  min-height: 42px;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  align-self: end;
}

.admin-toggle input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
  align-items: stretch;
}

.detail-summary,
.detail-side,
.detail-content {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 36px rgba(28, 43, 73, 0.05);
}

.detail-summary {
  padding: 28px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--primary);
  font-weight: 800;
}

.back-link svg {
  width: 18px;
  height: 18px;
}

.detail-title-row {
  margin-top: 28px;
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.detail-logo {
  width: 66px;
  height: 66px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  object-fit: contain;
}

.detail-logo-fallback {
  width: 66px;
  height: 66px;
  border-radius: 8px;
  font-size: 22px;
}

.detail-summary h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: 0;
}

.detail-category {
  margin-top: 6px;
  color: var(--muted);
}

.detail-description {
  margin: 24px 0 0;
  color: #475467;
  font-size: 17px;
}

.detail-actions {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-link,
.secondary-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 850;
}

.primary-link {
  background: var(--primary);
  color: #fff;
}

.primary-link:hover {
  background: var(--primary-strong);
}

.secondary-link {
  background: #f2f6ff;
  color: var(--primary);
}

.secondary-link:hover {
  background: #e7f0ff;
}

.detail-side {
  padding: 20px;
}

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

.info-item {
  display: grid;
  gap: 4px;
}

.info-item span {
  color: var(--weak);
  font-size: 12px;
}

.info-item strong,
.info-item a {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-weight: 780;
}

.info-item a {
  color: var(--primary);
}

.detail-content {
  margin-top: 22px;
  padding: 30px;
}

.detail-content h2,
.detail-content h3,
.detail-content h4 {
  color: #111827;
  letter-spacing: 0;
}

.detail-content h2 {
  margin: 0 0 18px;
  font-size: 24px;
}

.detail-content h3 {
  margin: 24px 0 12px;
  font-size: 20px;
}

.detail-content p,
.detail-content li {
  color: #475467;
  font-size: 16px;
}

.detail-content a {
  color: var(--primary);
  font-weight: 750;
}

.detail-content img {
  border-radius: 8px;
}

.screenshot-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.screenshot-grid img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.mobile-category-toggle {
  display: none;
}

@media (max-width: 1160px) {
  .tool-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-layout {
    grid-template-columns: 320px minmax(0, 1fr);
  }
}

@media (max-width: 980px) {
  .site-header {
    height: auto;
  }

  .header-inner {
    min-height: 66px;
    padding: 10px 16px;
    flex-wrap: wrap;
  }

  .brand-pill {
    display: none;
  }

  .brand-logo {
    width: 154px;
    max-width: 42vw;
  }

  .header-nav {
    order: 3;
    width: 100%;
    overflow: auto;
    padding-bottom: 2px;
  }

  .header-search {
    margin-left: auto;
    width: min(52vw, 320px);
  }

  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
  }

  .admin-site-list {
    max-height: none;
  }

  .content-shell {
    grid-template-columns: 1fr;
    padding: 16px 16px 54px;
  }

  .sidebar {
    position: static;
  }

  .category-list {
    max-height: none;
    display: flex;
    overflow: auto;
    padding: 10px;
  }

  .category-button {
    width: auto;
    min-width: max-content;
  }

  .mobile-category-toggle {
    display: inline-flex;
  }

  .detail-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 14px;
  }

  .app-toast {
    bottom: 18px;
    font-size: 12px;
    padding: 11px 14px;
  }

  .hero {
    padding: 24px 16px 30px;
  }

  .hero-icon-scroll {
    margin-bottom: 18px;
  }

  .hero-icon-scroll::before,
  .hero-icon-scroll::after {
    width: 80px;
  }

  .icon-scroll-row {
    gap: 6px;
    margin-bottom: 6px;
  }

  .icon-scroll-item {
    width: 38px;
    height: 38px;
    padding: 4px;
  }

  .icon-scroll-item img,
  .icon-placeholder {
    width: 28px;
    height: 28px;
  }

  .hero-search {
    grid-template-columns: 1fr;
    margin-top: 30px;
  }

  .ai-button {
    width: 100%;
  }

  .tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 14px;
  }

  .admin-page {
    padding: 18px 16px 52px;
  }

  .admin-hero {
    padding: 20px;
  }

  .admin-hero-top {
    flex-direction: column;
  }

  .admin-hero-actions {
    width: 100%;
    justify-content: stretch;
  }

  .admin-hero-actions .primary-link,
  .admin-hero-actions .secondary-link {
    flex: 1 1 180px;
  }

  .admin-form-grid {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .admin-login-page {
    padding: 18px 16px 52px;
  }

  .admin-login-card {
    padding: 20px;
  }

  .admin-login-head {
    grid-template-columns: 1fr;
  }

  .admin-login-head h1 {
    font-size: 26px;
  }

  .admin-login-submit {
    justify-self: stretch;
    width: 100%;
  }

  .admin-status-card {
    padding: 0 14px 14px;
  }

  .tool-card {
    min-height: 176px;
    padding: 14px;
  }

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

  .detail-page {
    padding: 18px 16px 52px;
  }

  .internal-page {
    padding: 18px 16px 52px;
  }

  .internal-page-hero {
    padding: 20px;
  }

  .internal-page-title {
    align-items: flex-start;
  }

  .internal-page-title h1 {
    font-size: 26px;
  }

  .internal-page-grid {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .internal-page-card {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .internal-page-tag {
    grid-column: 2;
    justify-self: start;
  }

  .admin-field-wide {
    grid-column: auto;
  }

  .detail-summary,
  .detail-content,
  .detail-side {
    padding: 20px;
  }

  .detail-title-row {
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 14px;
  }

  .detail-logo,
  .detail-logo-fallback {
    width: 54px;
    height: 54px;
  }

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

@media (max-width: 520px) {
  .header-search {
    order: 3;
    width: 100%;
  }

  .header-nav {
    order: 2;
    width: auto;
    margin-left: auto;
  }

  .header-nav a:not(.mobile-category-toggle) {
    display: none;
  }

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

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

  .admin-site-item-top {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .admin-site-logo,
  .admin-site-logo-fallback {
    width: 36px;
    height: 36px;
  }

  .hot-tags {
    justify-content: flex-start;
  }

  .footer-inner {
    display: grid;
  }
}

/* ---- 后台管理增强样式 ---- */

.admin-quick-toggles {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
  background: #fafbfe;
}

.quick-toggle {
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid #dee2ed;
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  transition: all 0.15s ease;
}

.quick-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.quick-toggle.active {
  border-color: var(--primary);
  background: #eff6ff;
  color: var(--primary);
  font-weight: 750;
}

.quick-toggle-sep {
  width: 1px;
  height: 20px;
  margin: 0 4px;
  background: var(--line);
}

.admin-changed-badge {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 999px;
  background: #eff6ff;
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
}

.admin-field.has-error input,
.admin-field.has-error textarea {
  border-color: #dc4a19;
}

.admin-field.has-error span {
  color: #dc4a19;
}

.admin-field.is-changed span::after {
  content: " ●";
  color: var(--primary);
  font-size: 9px;
  vertical-align: super;
}

.admin-validation-errors {
  padding: 12px 18px;
  border-left: 3px solid #dc4a19;
  background: #fef2f2;
}

.admin-field-error {
  color: #dc4a19;
  font-size: 13px;
  font-weight: 650;
}

.admin-field-error + .admin-field-error {
  margin-top: 4px;
}

.tag-editor {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tag-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-chip-editor {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #eff6ff;
  color: var(--primary);
  font-size: 13px;
  font-weight: 650;
}

.tag-chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: transparent;
  color: var(--primary);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease;
}

.tag-chip-remove:hover {
  background: rgba(15, 107, 255, 0.15);
}

.tag-input {
  min-height: 38px;
  width: 100%;
  padding: 0 12px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  font-size: 13px;
}

.tag-input:focus {
  border-color: var(--primary);
  outline: none;
}

.tag-placeholder {
  color: var(--weak);
  font-size: 13px;
}

.preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(23, 32, 51, 0.5);
  backdrop-filter: blur(4px);
}

.preview-modal {
  width: min(900px, 100%);
  max-height: 85vh;
  overflow: auto;
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 30px 80px rgba(15, 30, 60, 0.3);
}

.preview-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.preview-head h2 {
  margin: 0;
  font-size: 17px;
}

.preview-close {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  background: #f2f4f7;
  color: var(--muted);
  font-weight: 750;
  cursor: pointer;
}

.preview-close:hover {
  background: #e8edf5;
  color: var(--ink);
}

.preview-body {
  padding: 18px;
  line-height: 1.7;
}

.preview-body img {
  max-width: 100%;
}

.preview-body h2,
.preview-body h3 {
  margin: 16px 0 8px;
}

.admin-form-bottom {
  display: flex;
  justify-content: flex-end;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  background: #f9fafc;
}

.admin-form-bottom .primary-link {
  min-height: 40px;
  padding: 0 22px;
  font-size: 15px;
}

.admin-form-advanced {
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.admin-form-advanced:focus-within,
.admin-form-advanced:hover {
  opacity: 1;
}

.admin-editor-inner {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ---- 新增组件样式（沿用既有配色变量） ---- */

.search-highlight {
  padding: 0 1px;
  border-radius: 3px;
  background: #fff3bf;
  color: inherit;
  font-weight: 700;
}

.panel-subtitle {
  margin: 14px 18px 0;
  color: var(--muted);
  font-size: 13px;
}

.tool-results {
  display: block;
}

.admin-load-more {
  display: flex;
  justify-content: center;
  padding: 14px 18px 4px;
}

.admin-load-more .soft-button {
  min-height: 38px;
  padding: 0 18px;
}

.admin-delete-button {
  background: #fef2f2;
  color: #dc4a19;
}

.admin-delete-button:hover {
  background: #fde4e1;
}

.route-error {
  min-height: 60vh;
  display: grid;
  place-items: center;
  padding: 40px 20px;
}

.route-error-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: 420px;
  padding: 32px 28px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.route-error-card strong {
  font-size: 18px;
  color: var(--ink);
}

.route-error-card span {
  color: var(--muted);
  font-size: 14px;
  word-break: break-word;
}

.route-error-card .primary-link {
  margin-top: 6px;
}

/* 卡片轻微细节优化：聚焦可见性与图标过渡 */

.tool-card:focus-visible,
.category-button:focus-visible,
.section-tab:focus-visible,
.soft-button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.card-logo,
.detail-logo {
  transition: transform 0.18s ease;
}

.tool-card:hover .card-logo {
  transform: scale(1.05);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .card-logo,
  .detail-logo,
  .icon-scroll-row {
    transition: none !important;
    animation: none !important;
  }
}
