:root {
  color-scheme: dark;
  --bg-body: #050816;
  --bg-elevated: rgba(15, 23, 42, 0.98);
  --bg-elevated-softer: rgba(15, 23, 42, 0.92);
  --bg-soft: rgba(15, 23, 42, 0.8);
  --bg-chip: rgba(148, 163, 184, 0.12);
  --border-subtle: rgba(148, 163, 184, 0.25);
  --accent: #4f46e5;
  --accent-soft: rgba(79, 70, 229, 0.12);
  --accent-strong: rgba(79, 70, 229, 0.35);
  --accent-alt: #22c55e;
  --text-main: #e5e7eb;
  --text-soft: #9ca3af;
  --text-softer: #6b7280;
  --shadow-soft: 0 24px 60px rgba(15, 23, 42, 0.9);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-pill: 999px;
  --transition-fast: 160ms ease-out;
  --transition-med: 220ms ease-out;
  --blur-strong: 18px;
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  background: radial-gradient(circle at top, rgba(79, 70, 229, 0.45), transparent 55%),
    radial-gradient(circle at bottom left, rgba(16, 185, 129, 0.35), transparent 50%),
    radial-gradient(circle at bottom right, rgba(56, 189, 248, 0.25), transparent 45%),
    var(--bg-body);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}

button {
  font: inherit;
}

button,
input {
  border: none;
  outline: none;
}

.page-root {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 20px 40px;
}

.top-nav {
  position: sticky;
  top: 12px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  margin-bottom: 18px;
  border-radius: var(--radius-pill);
  background: radial-gradient(circle at top left, rgba(79, 70, 229, 0.4), transparent 40%),
    radial-gradient(circle at bottom right, rgba(56, 189, 248, 0.35), transparent 50%),
    rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.45);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(18px);
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: conic-gradient(from 180deg at 50% 50%, #4f46e5, #22c55e, #06b6d4, #4f46e5);
  color: #0b1120;
  font-weight: 700;
  font-size: 18px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.9);
}

.logo-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.logo-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.logo-subtitle {
  font-size: 11px;
  color: var(--text-softer);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
}

.nav-link {
  position: relative;
  padding: 6px 14px;
  border-radius: 999px;
  color: var(--text-soft);
  background: transparent;
  cursor: pointer;
  border: none;
  transition: background var(--transition-fast), color var(--transition-fast),
    transform var(--transition-fast);
  font-size: 13px;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 4px;
  height: 1px;
  border-radius: 999px;
  background: linear-gradient(to right, rgba(79, 70, 229, 0.4), rgba(56, 189, 248, 0.4));
  opacity: 0;
  transform: scaleX(0.7);
  transform-origin: center;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.nav-link:hover {
  color: #e5e7eb;
  transform: translateY(-1px);
}

.nav-link-active {
  background: radial-gradient(circle at top left, rgba(79, 70, 229, 0.95), rgba(79, 70, 229, 0.7));
  color: #e5e7eb;
}

.nav-link-active::after {
  opacity: 1;
  transform: scaleX(1);
}

.main-layout {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.hero {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 22px 22px 20px;
  background: radial-gradient(circle at top left, rgba(79, 70, 229, 0.7), transparent 55%),
    radial-gradient(circle at bottom right, rgba(16, 185, 129, 0.4), transparent 50%),
    linear-gradient(to bottom right, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.96));
  border: 1px solid rgba(148, 163, 184, 0.65);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 10% 0%, rgba(248, 250, 252, 0.22) 0, transparent 55%),
    linear-gradient(to bottom right, rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.95));
  mix-blend-mode: overlay;
  opacity: 0.9;
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at top right, rgba(79, 70, 229, 0.45), transparent 45%),
    radial-gradient(circle at bottom left, rgba(56, 189, 248, 0.45), transparent 40%);
  opacity: 0.45;
  mix-blend-mode: soft-light;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-title {
  margin: 0 0 8px;
  font-size: 26px;
  letter-spacing: 0.03em;
}

.hero-subtitle {
  margin: 0 0 18px;
  font-size: 13px;
  max-width: 620px;
  color: var(--text-soft);
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.7);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(18px);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast),
    transform var(--transition-fast), background var(--transition-fast);
}

.search-box-focus {
  border-color: rgba(94, 234, 212, 0.95);
  box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.7), 0 18px 40px rgba(15, 23, 42, 0.95);
  transform: translateY(-1px);
  background: rgba(15, 23, 42, 0.96);
}

.search-icon {
  font-size: 16px;
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 13px;
}

.search-input::placeholder {
  color: var(--text-softer);
}

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

.chip {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg-chip);
  color: var(--text-soft);
  font-size: 12px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast),
    transform var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
}

.chip:hover {
  background: rgba(148, 163, 184, 0.22);
  transform: translateY(-1px);
  color: #e5e7eb;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.9);
}

.chip-filled {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.9), rgba(56, 189, 248, 0.9));
  color: #e5e7eb;
  border-color: transparent;
}

.chip-filled:hover {
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.95);
}

.content-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 16px;
  align-items: flex-start;
}

.sidebar {
  position: sticky;
  top: 76px;
  padding: 14px 12px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(var(--blur-strong));
}

.sidebar-header {
  margin-bottom: 10px;
}

.sidebar-title {
  margin: 0 0 4px;
  font-size: 16px;
}

.sidebar-subtitle {
  margin: 0;
  font-size: 12px;
  color: var(--text-softer);
}

.category-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}

.category-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-radius: 999px;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  border: none;
  transition: background var(--transition-fast), color var(--transition-fast),
    transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.category-item:hover {
  background: rgba(15, 23, 42, 0.85);
  color: #e5e7eb;
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.95);
}

.category-item-active {
  background: radial-gradient(circle at top left, rgba(79, 70, 229, 0.95), rgba(79, 70, 229, 0.7));
  color: #e5e7eb;
  box-shadow: 0 15px 38px rgba(15, 23, 42, 0.98);
}

.category-name {
  font-size: 13px;
}

.category-count {
  min-width: 24px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.86);
  color: var(--text-softer);
  font-size: 11px;
  text-align: center;
}

.tools-section {
  padding: 14px 16px 18px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated-softer);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(var(--blur-strong));
}

.tools-section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.tools-section-title {
  margin: 0;
  font-size: 18px;
}

.tools-section-subtitle {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--text-softer);
}

.tools-view-toggle {
  display: inline-flex;
  padding: 2px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border-subtle);
}

.view-btn {
  padding: 6px 10px;
  border-radius: 999px;
  background: transparent;
  color: var(--text-softer);
  font-size: 12px;
  cursor: pointer;
  border: none;
  transition: background var(--transition-fast), color var(--transition-fast),
    transform var(--transition-fast), box-shadow var(--transition-fast);
}

.view-btn:hover {
  color: var(--text-main);
}

.view-btn-active {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.95), rgba(56, 189, 248, 0.95));
  color: #e5e7eb;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.96);
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.tool-card {
  position: relative;
  padding: 14px 12px 12px;
  border-radius: 18px;
  background: radial-gradient(circle at top left, rgba(148, 163, 184, 0.22), transparent 55%),
    rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.55);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.95);
  cursor: pointer;
  transition: transform var(--transition-med), box-shadow var(--transition-med),
    border-color var(--transition-med), background var(--transition-med), translate var(--transition-med);
  overflow: hidden;
}

.tool-card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: conic-gradient(from 180deg, rgba(79, 70, 229, 0.6), transparent, rgba(56, 189, 248, 0.5), transparent);
  opacity: 0;
  transition: opacity 200ms ease-out;
  z-index: 0;
}

.tool-card-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tool-card:hover {
  transform: translateY(-6px);
  border-color: rgba(94, 234, 212, 0.85);
  background: radial-gradient(circle at top left, rgba(79, 70, 229, 0.4), transparent 55%),
    rgba(15, 23, 42, 0.98);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.98);
}

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

.tool-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tool-icon {
  width: 32px;
  height: 32px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 10% 0, rgba(148, 163, 184, 0.45), rgba(15, 23, 42, 0.96));
  font-size: 18px;
}

.tool-title {
  font-size: 14px;
  margin-bottom: 2px;
}

.tool-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-softer);
}

.tool-badge {
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(22, 163, 74, 0.16);
  color: #bbf7d0;
}

.tool-desc {
  margin: 0;
  font-size: 12px;
  color: var(--text-soft);
}

.tool-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tool-tag {
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  font-size: 10px;
  color: var(--text-soft);
  background: rgba(15, 23, 42, 0.92);
}

.tool-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
}

.tool-cta {
  padding: 6px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.95), rgba(56, 189, 248, 0.95));
  border: none;
  color: #e5e7eb;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.98);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), opacity var(--transition-fast);
}

.tool-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 1);
}

.tool-cta span:last-child {
  font-size: 13px;
}

.tool-shortcut {
  font-size: 11px;
  color: var(--text-softer);
}

.tool-shortcut-key {
  padding: 2px 5px;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(15, 23, 42, 0.9);
}

.tools-grid-compact {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tool-row {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 2fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(30, 64, 175, 0.9);
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast),
    box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.tool-row:hover {
  background: rgba(15, 23, 42, 0.98);
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.98);
  border-color: rgba(59, 130, 246, 0.9);
}

.tool-row-main {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tool-row-name {
  font-size: 13px;
}

.tool-row-desc {
  font-size: 11px;
  color: var(--text-soft);
}

.tool-row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tool-row-cta {
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(79, 70, 229, 0.95);
  color: #e5e7eb;
  font-size: 11px;
  border: none;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

.tool-row-cta:hover {
  background: rgba(79, 70, 229, 1);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.98);
}

.empty-state {
  margin-top: 30px;
  padding: 28px 20px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px dashed rgba(148, 163, 184, 0.6);
  text-align: center;
}

.empty-illustration {
  font-size: 32px;
  margin-bottom: 6px;
}

.empty-title {
  font-size: 14px;
  margin-bottom: 4px;
}

.empty-subtitle {
  font-size: 12px;
  color: var(--text-soft);
}

.about-section {
  margin-top: 16px;
}

.about-card {
  padding: 18px 18px 20px;
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.6);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.95);
}

.about-title {
  margin: 0 0 8px;
  font-size: 16px;
}

.about-text {
  margin: 0 0 6px;
  font-size: 12px;
  color: var(--text-soft);
}

.tool-detail-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 30;
}

.tool-detail-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.3), rgba(15, 23, 42, 0.96));
  backdrop-filter: blur(18px);
}

.tool-detail-panel {
  position: relative;
  width: 100%;
  max-width: 920px;
  margin: 0 16px;
  border-radius: 24px;
  background: radial-gradient(circle at top left, rgba(79, 70, 229, 0.7), transparent 45%),
    radial-gradient(circle at bottom right, rgba(56, 189, 248, 0.5), transparent 40%),
    rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.7);
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.98);
  padding: 18px 18px 16px;
  max-height: min(82vh, 860px);
  display: flex;
  flex-direction: column;
}

.detail-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(15, 23, 42, 0.94);
  color: var(--text-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast),
    color var(--transition-fast), box-shadow var(--transition-fast);
}

.detail-close-btn:hover {
  background: rgba(248, 250, 252, 0.06);
  color: #e5e7eb;
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.98);
}

.detail-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.detail-icon {
  width: 40px;
  height: 40px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: radial-gradient(circle at top left, rgba(148, 163, 184, 0.5), rgba(15, 23, 42, 0.96));
}

.detail-title {
  margin: 0 0 2px;
  font-size: 16px;
}

.detail-subtitle {
  margin: 0;
  font-size: 12px;
  color: var(--text-soft);
}

.detail-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
  overflow: auto;
  padding-right: 6px;
  flex: 1;
}

.detail-section {
  padding: 10px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.6);
}

.detail-label {
  font-size: 11px;
  color: var(--text-softer);
  margin-bottom: 4px;
}

.detail-text {
  margin: 0;
  font-size: 12px;
  color: var(--text-soft);
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.detail-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.primary-btn {
  padding: 8px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.98), rgba(56, 189, 248, 0.98));
  border: none;
  color: #e5e7eb;
  font-size: 12px;
  cursor: pointer;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.98);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast),
    opacity var(--transition-fast);
}

.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 48px rgba(15, 23, 42, 1);
}

.ghost-btn {
  padding: 8px 14px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.6);
  color: var(--text-soft);
  font-size: 12px;
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast),
    color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.ghost-btn:hover {
  border-color: rgba(148, 163, 184, 0.9);
  color: #e5e7eb;
  background: rgba(15, 23, 42, 0.96);
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.98);
}

.workbench {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wb-banner {
  padding: 10px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.6);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.wb-banner-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wb-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.wb-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.wb-btn {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.45);
  color: var(--text-main);
  font-size: 12px;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast),
    background var(--transition-fast), border-color var(--transition-fast), opacity var(--transition-fast);
}

.wb-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.98);
  border-color: rgba(148, 163, 184, 0.7);
  background: rgba(148, 163, 184, 0.18);
}

.wb-btn-primary {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.98), rgba(56, 189, 248, 0.98));
  border-color: transparent;
}

.wb-btn-primary:hover {
  box-shadow: 0 18px 40px rgba(15, 23, 42, 1);
}

.wb-btn-ghost {
  background: transparent;
}

.wb-btn-danger {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(239, 68, 68, 0.35);
}

.wb-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.wb-panel {
  padding: 10px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.6);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.wb-panel-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.wb-title {
  font-size: 12px;
  color: var(--text-softer);
}

.wb-hint {
  font-size: 11px;
  color: var(--text-softer);
}

.wb-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wb-label {
  font-size: 11px;
  color: var(--text-softer);
}

.wb-input,
.wb-textarea,
.wb-select {
  width: 100%;
  padding: 9px 10px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.55);
  background: rgba(2, 6, 23, 0.55);
  color: var(--text-main);
  font-size: 12px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast),
    background var(--transition-fast);
}

.wb-textarea {
  min-height: 160px;
  resize: vertical;
  line-height: 1.55;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
}

.wb-input:focus,
.wb-textarea:focus,
.wb-select:focus {
  border-color: rgba(94, 234, 212, 0.95);
  box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.6);
  background: rgba(2, 6, 23, 0.75);
}

.wb-inline {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.wb-pill {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(148, 163, 184, 0.12);
  font-size: 11px;
  color: var(--text-soft);
}

.wb-status {
  font-size: 12px;
  color: var(--text-soft);
  line-height: 1.45;
  margin-top: 4px;
}

.wb-status-error {
  color: #fecaca;
}

.wb-status-success {
  color: #bbf7d0;
}

.regex-highlight {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  font-size: 12px;
  line-height: 1.55;
}

.regex-mark {
  background: rgba(34, 197, 94, 0.22);
  border: 1px solid rgba(34, 197, 94, 0.35);
  border-radius: 8px;
  padding: 0 2px;
}

.toast-stack {
  position: fixed;
  right: 18px;
  bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 40;
}

.toast {
  min-width: 220px;
  max-width: 320px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.6);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(18px);
  font-size: 12px;
  color: var(--text-main);
  transform: translateY(8px);
  opacity: 0;
  animation: toast-in 220ms ease-out forwards;
}

.toast-error {
  border-color: rgba(239, 68, 68, 0.45);
}

.toast-success {
  border-color: rgba(34, 197, 94, 0.45);
}

@keyframes toast-in {
  from {
    transform: translateY(8px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.hidden {
  display: none;
}

@media (max-width: 960px) {
  .page-root {
    padding: 16px 14px 32px;
  }

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

  .sidebar {
    position: static;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .category-list {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .category-item {
    flex: 1 1 calc(50% - 4px);
  }

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

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

@media (max-width: 640px) {
  .top-nav {
    padding: 8px 12px;
  }

  .logo-subtitle {
    display: none;
  }

  .hero {
    padding: 18px 16px 16px;
  }

  .hero-title {
    font-size: 22px;
  }

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

  .tools-section {
    padding: 12px 12px 14px;
  }

  .tool-row {
    grid-template-columns: minmax(0, 2fr) minmax(0, 2.3fr);
  }

  .tool-row-actions {
    justify-content: flex-end;
  }

  .detail-footer {
    flex-direction: column-reverse;
    align-items: stretch;
  }
}
