﻿/* TDesign conversion-focused tool UI - generated from Tencent TDesign hue direction */
:root {
  --background: #f3f3f3;
  --bg: var(--background);
  --surface1: #ffffff;
  --surface2: #f8f8f8;
  --surface3: #eeeeee;
  --border: #e8e8e8;
  --border-visible: #dcdcdc;
  --text1: rgba(0, 0, 0, 0.9);
  --text2: rgba(0, 0, 0, 0.6);
  --text3: rgba(0, 0, 0, 0.4);
  --text4: rgba(0, 0, 0, 0.26);
  --accent: #0052d9;
  --accent-hover: #2667d4;
  --accent-active: #054bbe;
  --accent-subtle: #ecf2fe;
  --success: #00a870;
  --success-bg: #e3f9e9;
  --warning: #ed7b2f;
  --warning-bg: #fff1e9;
  --error: #e34d59;
  --error-bg: #fff0ed;
  --font-display: "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;
  --font-body: "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Mono", Consolas, "SFMono-Regular", monospace;
  --radius-element: 2px;
  --radius-control: 3px;
  --radius-component: 6px;
  --radius-container: 9px;
  --radius-pill: 999px;
  --shadow-1: 0 1px 10px rgba(0, 0, 0, 0.05), 0 4px 5px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.12);
  --shadow-2: 0 3px 14px 2px rgba(0, 0, 0, 0.05), 0 8px 10px 1px rgba(0, 0, 0, 0.06), 0 5px 5px -3px rgba(0, 0, 0, 0.1);
  --duration-fast: 120ms;
  --duration-medium: 200ms;
  --duration-slow: 260ms;
  --ease-out: ease-out;
  --ease-emphasis: cubic-bezier(0.38, 0, 0.24, 1);
}

body[data-theme="dark"] {
  --background: #181818;
  --surface1: #242424;
  --surface2: #2c2c2c;
  --surface3: #393939;
  --border: #393939;
  --border-visible: #5e5e5e;
  --text1: rgba(255, 255, 255, 0.9);
  --text2: rgba(255, 255, 255, 0.55);
  --text3: rgba(255, 255, 255, 0.35);
  --text4: rgba(255, 255, 255, 0.22);
  --accent: #4582e6;
  --accent-hover: #699ef5;
  --accent-active: #2667d4;
  --accent-subtle: #1b2f51;
  --success: #43af8a;
  --success-bg: #193a2a;
  --warning: #dc7633;
  --warning-bg: #4f2a1d;
  --error: #c64751;
  --error-bg: #472324;
  --shadow-1: 0 4px 6px rgba(0, 0, 0, 0.06), 0 1px 10px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.12);
  --shadow-2: 0 8px 10px rgba(0, 0, 0, 0.12), 0 3px 14px rgba(0, 0, 0, 0.1), 0 5px 5px rgba(0, 0, 0, 0.16);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  overflow-x: clip;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text1);
  background: var(--background);
  font-family: var(--font-body);
  line-height: 1.57;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

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

main {
  min-height: 100vh;
  padding: 16px;
}

.container {
  width: min(1440px, 100%);
  margin: 0 auto;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.app-bottom {
  width: min(1440px, 100%);
  margin: 18px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--border);
  padding: 12px 2px 0;
  color: var(--text3);
  font-size: 12px;
  line-height: 1.5;
}

.bottom-site,
.bottom-info {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.bottom-name {
  overflow: hidden;
  color: var(--text2);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bottom-info {
  flex-wrap: wrap;
  justify-content: flex-end;
  color: var(--text3);
}

.bottom-info span + span::before {
  margin-right: 8px;
  color: var(--border-visible);
  content: "/";
}

#bottom-load-time {
  color: var(--text2);
  font-family: var(--font-mono);
  font-size: 11px;
}

.status-dot {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px var(--success-bg);
}

.app-header {
  position: relative;
  z-index: 30;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-component);
  background: color-mix(in srgb, var(--surface1) 94%, transparent);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  backdrop-filter: blur(10px);
}

.nav-container {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 16px;
}

.logo,
.logo-button {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.logo-button {
  min-height: 44px;
  border-radius: var(--radius-control);
}

.logo-button:hover {
  background: var(--surface2);
}

.logo-img {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-component);
  object-fit: cover;
  background: var(--surface1);
}

.logo-eyebrow,
.hero-kicker,
.filter-title,
.mode-rail-title,
.command-label,
.console-label,
.search-info {
  font-family: var(--font-mono);
  letter-spacing: 0;
}

.logo-eyebrow {
  display: block;
  color: var(--text3);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  text-transform: uppercase;
}

.logo-text {
  display: block;
  overflow: hidden;
  color: var(--text1);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.theme-toggle,
.guide-btn,
.mode-btn,
.category-tab,
.primary-button,
.link-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--border-visible);
  border-radius: var(--radius-control);
  padding: 8px 14px;
  color: var(--text1);
  background: var(--surface1);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  transition: background-color var(--duration-fast) linear, border-color var(--duration-fast) linear, color var(--duration-fast) linear, box-shadow var(--duration-fast) linear, transform var(--duration-fast) var(--ease-out);
  touch-action: manipulation;
}

.theme-toggle:hover,
.category-tab:hover,
.link-button:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-subtle);
}

.theme-toggle:active,
.guide-btn:active,
.mode-btn:active,
.category-tab:active,
.primary-button:active,
.link-button:active,
.list-item:active {
  transform: scale(0.98);
}

.theme-toggle-icon {
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  color: var(--accent);
  background: var(--accent-subtle);
  font-size: 12px;
  font-weight: 600;
}

.theme-toggle.compact {
  min-height: 36px;
  padding: 6px 10px;
}

.version-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 16px;
  margin-bottom: 16px;
}

.version-hero-copy,
.version-console,
.version-filter-bar,
.query-workbench,
.query-command,
.list-box,
.version-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-component);
  background: var(--surface1);
}

.version-hero-copy {
  position: relative;
  display: flex;
  min-height: 320px;
  min-width: 0;
  overflow: hidden;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 4vw, 48px);
}

.version-hero-copy::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, var(--accent-subtle), transparent 46%);
  opacity: 0.72;
  content: "";
}

.version-hero-copy > * {
  position: relative;
}

.hero-kicker {
  width: fit-content;
  margin-bottom: 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: var(--radius-pill);
  padding: 4px 10px;
  color: var(--accent);
  background: var(--accent-subtle);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.version-hero h1 {
  max-width: 680px;
  margin: 0 0 14px;
  color: var(--text1);
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 600;
  line-height: 1.12;
}

.version-hero h1 span {
  display: block;
}

.version-hero p {
  max-width: 620px;
  margin: 0;
  color: var(--text2);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
}

.version-console {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
}

.console-stat {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  border-bottom: 1px solid var(--border);
  padding: 20px;
}

.console-stat:first-child {
  border-right: 1px solid var(--border);
  background: var(--accent);
  color: #fff;
}

.console-value {
  font-family: var(--font-mono);
  font-size: clamp(38px, 5vw, 56px);
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.console-label {
  margin-top: 8px;
  color: currentColor;
  font-size: 12px;
  font-weight: 600;
}

.version-search-panel {
  display: flex;
  grid-column: 1 / -1;
  min-width: 0;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  background: var(--surface1);
}

.version-search-panel label,
.version-selector label {
  display: block;
  margin-bottom: 8px;
  color: var(--text2);
  font-size: 13px;
  font-weight: 600;
}

.version-search-panel input,
.search-box input,
.version-selector select {
  width: 100%;
  height: 40px;
  border: 1px solid var(--border-visible);
  border-radius: var(--radius-control);
  padding: 0 12px;
  color: var(--text1);
  background: var(--surface1);
  outline: none;
  transition: border-color var(--duration-fast) linear, box-shadow var(--duration-fast) linear, background-color var(--duration-fast) linear;
}

.version-search-panel input::placeholder,
.search-box input::placeholder {
  color: var(--text3);
}

.version-search-panel input:hover,
.search-box input:hover,
.version-selector select:hover {
  border-color: var(--accent);
}

.version-search-panel input:focus,
.search-box input:focus,
.version-selector select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 16%, transparent);
}

.version-filter-bar {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  padding: 12px;
}

.filter-title {
  color: var(--text2);
  font-size: 12px;
  font-weight: 600;
}

.category-tabs {
  display: flex;
  min-width: 0;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.category-tab {
  min-width: max-content;
  min-height: 36px;
  color: var(--text2);
  background: var(--surface1);
}

.category-tab.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-subtle);
}

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

.version-card {
  --mx: 50%;
  --my: 50%;
  position: relative;
  display: grid;
  min-height: 0;
  overflow: hidden;
  grid-template-rows: 180px 1fr;
  transition: border-color var(--duration-medium) linear, box-shadow var(--duration-medium) var(--ease-out), transform var(--duration-medium) var(--ease-out);
}

.version-card::before {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(260px circle at var(--mx) var(--my), color-mix(in srgb, var(--accent) 12%, transparent), transparent 58%);
  opacity: 0;
  transition: opacity var(--duration-medium) linear;
  content: "";
}

.version-card:hover {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--border));
  box-shadow: var(--shadow-1);
  transform: translateY(-2px);
}

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

.version-image {
  position: relative;
  min-height: 100%;
  border-bottom: 1px solid var(--border);
  background: var(--surface3) center / cover no-repeat;
}

.version-image::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.46));
  content: "";
}

.version-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1;
  border-radius: var(--radius-control);
  padding: 4px 8px;
  color: #fff;
  background: rgba(0, 0, 0, 0.62);
  font-size: 12px;
  font-weight: 600;
}

.version-body {
  position: relative;
  z-index: 3;
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  background: var(--surface1);
}


.version-name {
  color: var(--text1);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.small-muted {
  color: var(--text2);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.7;
}

.version-meta-line {
  color: var(--text3);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}

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

.version-tags span {
  min-height: 24px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--accent);
  background: var(--accent-subtle);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
}

.card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
  flex-wrap: wrap;
}

.primary-button {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

.primary-button:hover,
.guide-btn:hover {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
}

.primary-button:active,
.guide-btn:active {
  border-color: var(--accent-active);
  background: var(--accent-active);
}

.link-button {
  color: var(--text2);
  background: var(--surface1);
}

.version-selector {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.version-selector label {
  margin: 0;
}

.version-selector select {
  width: auto;
  min-width: 190px;
  height: 36px;
}

.guide-btn {
  min-height: 36px;
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

.query-workbench {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
}

.mode-rail {
  display: flex;
  min-width: 0;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text1);
}

.mode-rail-title {
  border-bottom: 1px solid var(--border);
  padding: 14px 16px;
  color: var(--text2);
  font-size: 12px;
  font-weight: 600;
}

.search-mode {
  display: grid;
  gap: 4px;
  padding: 8px;
}

.mode-btn {
  justify-content: flex-start;
  min-height: 38px;
  border-color: transparent;
  padding: 8px 10px;
  color: var(--text2);
  background: transparent;
  text-align: left;
}

.mode-btn:hover {
  color: var(--accent);
  background: var(--accent-subtle);
}

.mode-btn.active {
  border-color: color-mix(in srgb, var(--accent) 22%, transparent);
  color: var(--accent);
  background: var(--accent-subtle);
}

.query-main {
  min-width: 0;
  padding: 12px;
}

.query-command {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 12px;
  padding: 12px;
  background: var(--surface1);
}

.command-label {
  margin-bottom: 6px;
  color: var(--text3);
  font-size: 12px;
  font-weight: 600;
}

.community-info,
.search-info {
  color: var(--text2);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.65;
}

.search-container {
  min-width: 0;
}

.search-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-box {
  flex: 1 1 auto;
  min-width: 220px;
}

.search-box input {
  height: 42px;
  border-color: color-mix(in srgb, var(--border-visible) 72%, transparent);
  background: color-mix(in srgb, var(--surface1) 82%, var(--surface2));
}

.search-box input:hover {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border-visible));
  background: var(--surface1);
}

.search-box input:focus {
  border-color: var(--accent);
  background: var(--surface1);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent);
}

.search-box input:focus-visible {
  outline: none;
}

.filter-checkbox {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  padding: 0 2px;
  color: var(--text2);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.filter-checkbox input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.query-version-summary,
.search-info {
  display: none;
}

.lists-container {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  min-height: 560px;
  height: calc(100vh - 236px);
}

.list-box {
  display: flex;
  min-height: 0;
  overflow: hidden;
  flex-direction: column;
}

.list-title {
  min-height: 44px;
  border-bottom: 1px solid var(--border);
  padding: 11px 12px;
  color: var(--text1);
  background: var(--surface2);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.list-content {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 6px;
  background: var(--surface1);
}

.list-content::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.list-content::-webkit-scrollbar-track {
  background: var(--surface2);
}

.list-content::-webkit-scrollbar-thumb {
  border: 2px solid var(--surface2);
  border-radius: var(--radius-pill);
  background: var(--border-visible);
}

.list-content::-webkit-scrollbar-thumb:hover {
  background: var(--text3);
}

.list-item {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 52px;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 4px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  padding: 8px;
  color: var(--text1);
  background: transparent;
  text-align: left;
  transition: background-color var(--duration-fast) linear, border-color var(--duration-fast) linear, color var(--duration-fast) linear, transform var(--duration-fast) var(--ease-out);
}

.list-item:hover {
  border-color: var(--border);
  background: var(--surface2);
}

.list-item.active {
  border-color: color-mix(in srgb, var(--accent) 42%, transparent);
  background: var(--accent-subtle);
  color: var(--accent);
}

.list-item.active::after {
  position: absolute;
  top: 12px;
  right: 10px;
  width: 6px;
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  content: "";
}

.item-number {
  display: inline-flex;
  min-width: 28px;
  height: 24px;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: var(--radius-control);
  color: var(--text3);
  background: var(--surface3);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.list-item.active .item-number {
  color: #fff;
  background: var(--accent);
}

.item-body {
  min-width: 0;
  flex: 1;
  padding-right: 16px;
}

.item-name {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  overflow-wrap: anywhere;
  color: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
}

.item-badge {
  display: inline-flex;
  min-height: 20px;
  align-items: center;
  border-radius: var(--radius-control);
  padding: 2px 6px;
  color: var(--accent);
  background: var(--accent-subtle);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.item-meta {
  display: block;
  margin-top: 4px;
  color: var(--text3);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.list-item.active .item-meta {
  color: color-mix(in srgb, var(--accent) 70%, var(--text2));
}

.tone-drop .item-badge {
  color: var(--error);
  background: var(--error-bg);
}

.list-item.tone-refresh .item-meta,
.list-item.tone-coord .item-meta {
  color: var(--success);
  font-weight: 600;
}

.list-item.kind-path-line,
.list-item.kind-path-option {
  border-color: color-mix(in srgb, var(--warning) 34%, transparent);
  background: color-mix(in srgb, var(--warning-bg) 72%, var(--surface1));
}

.list-item.tone-path.active,
.list-item.kind-path-option.active {
  border-color: color-mix(in srgb, var(--warning) 45%, transparent);
  color: var(--warning);
  background: var(--warning-bg);
}

.path-line {
  display: grid;
  gap: 8px;
  color: inherit;
  font-size: 13px;
  line-height: 1.65;
}

.path-step {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  border: 1px solid color-mix(in srgb, var(--warning) 18%, var(--border));
  border-radius: var(--radius-control);
  padding: 7px 8px;
  background: color-mix(in srgb, var(--surface1) 76%, transparent);
}

.path-step-index {
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-control);
  color: #fff;
  background: var(--warning);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.path-step-text {
  min-width: 0;
  color: var(--text2);
  overflow-wrap: anywhere;
}

.path-coordinate {
  display: inline-flex;
  align-items: center;
  margin: 0 2px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: var(--radius-control);
  padding: 1px 5px;
  color: var(--accent);
  background: var(--accent-subtle);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
}

.path-coordinate.zero {
  border-color: color-mix(in srgb, var(--error) 38%, transparent);
  color: var(--error);
  background: var(--error-bg);
}

.empty-state {
  margin: 8px;
  border: 1px dashed var(--border-visible);
  border-radius: var(--radius-component);
  padding: 28px 12px;
  color: var(--text3);
  background: var(--surface2);
  text-align: center;
  line-height: 1.7;
}

.reveal {
  animation: reveal-up var(--duration-slow) var(--ease-emphasis) both;
}

.version-hero h1 span {
  animation: soft-blur-in 360ms var(--ease-out) both;
}

.version-hero h1 span:nth-child(2) {
  animation-delay: 70ms;
}

.page-switching .page.active {
  animation: fade-through 180ms var(--ease-out) both;
}

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

@keyframes soft-blur-in {
  from {
    opacity: 0;
    filter: blur(6px);
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

@keyframes fade-through {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1180px) {
  .version-hero,
  .query-workbench,
  .query-command {
    grid-template-columns: 1fr;
  }

  .mode-rail {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .search-mode {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .mode-btn {
    justify-content: center;
    text-align: center;
  }

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

  .lists-container {
    height: auto;
  }

  .list-box {
    min-height: 390px;
  }
}

@media (max-width: 760px) {
  main {
    padding: 10px;
  }

  .nav-container,
  .search-row,
  .version-selector {
    align-items: stretch;
    flex-direction: column;
  }

  .logo-text {
    font-size: 17px;
    white-space: normal;
  }

  .version-hero-copy {
    min-height: 300px;
    padding: 24px;
  }

  .version-hero h1 {
    font-size: clamp(32px, 11vw, 46px);
  }

  .version-console,
  .version-filter-bar,
  .version-grid,
  .lists-container {
    grid-template-columns: 1fr;
  }

  .console-stat:first-child {
    border-right: 0;
  }

  .version-selector select,
  .version-selector button,
  .theme-toggle,
  .guide-btn {
    width: 100%;
  }

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

  .search-box {
    min-width: 0;
  }

  .filter-checkbox {
    white-space: normal;
  }

  .list-box {
    min-height: 360px;
  }

  .theme-toggle-text {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
/* Interaction refinements */
.search-input-wrap {
  position: relative;
  min-width: 0;
}

.version-search-panel .search-input-wrap input,
.search-box.search-input-wrap input {
  padding-right: 42px;
}

.clear-search {
  position: absolute;
  top: 50%;
  right: 7px;
  display: inline-flex;
  width: 26px;
  height: 26px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius-control);
  color: var(--text3);
  background: transparent;
  font-size: 18px;
  line-height: 1;
  transform: translateY(-50%);
  transition: color var(--duration-fast) linear, background-color var(--duration-fast) linear;
}

.clear-search:hover {
  color: var(--accent);
  background: var(--accent-subtle);
}

.clear-search:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.clear-search[hidden] {
  display: none;
}

button:disabled,
select:disabled,
input:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

body.is-loading .query-main {
  position: relative;
}

body.is-loading .query-main::after {
  position: absolute;
  right: 22px;
  bottom: 18px;
  z-index: 5;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  padding: 6px 10px;
  color: var(--text2);
  background: var(--surface1);
  box-shadow: var(--shadow-1);
  font-size: 12px;
  font-weight: 600;
  content: "正在同步数据";
}

body.is-loading .guide-btn {
  border-color: var(--border-visible);
  color: var(--text2);
  background: var(--surface3);
}

.list-item,
.version-card,
.category-tab,
.mode-btn,
.primary-button,
.link-button,
.guide-btn,
.theme-toggle,
.clear-search {
  -webkit-tap-highlight-color: transparent;
}

@media (max-width: 760px) {
  .clear-search {
    width: 30px;
    height: 30px;
    right: 6px;
  }

  .version-search-panel .search-input-wrap input,
  .search-box.search-input-wrap input {
    padding-right: 46px;
  }

  body.is-loading .query-main::after {
    right: 16px;
    bottom: 14px;
  }
}
