.color-config-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px 20px;
}

.config-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--border-color);
}

.config-row:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.config-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-color);
}

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

.config-row-copyable {
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
}

.config-row-copyable:hover {
  background: rgba(15, 23, 42, 0.28);
  border-color: rgba(16, 185, 129, 0.22);
  transform: translateY(-1px);
}

.color-output-header button.secondary,
.config-copy-btn {
  padding: 4px 10px;
  font-size: 11px;
}

.config-input {
  flex: 1;
  min-width: 0;
  width: 100%;
  padding: 10px 12px 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.35);
  color: #e5e7eb;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.config-input:focus {
  border-color: rgba(16, 185, 129, 0.18);
  background: rgba(15, 23, 42, 0.5);
}

.config-hint {
  font-size: 12px;
  color: var(--text-secondary);
}

.color-preview-card {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.25);
  display: flex;
  flex-direction: column;
  min-height: 160px;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
}

.color-preview-card:hover {
  background: rgba(15, 23, 42, 0.4);
  border-color: rgba(16, 185, 129, 0.22);
  transform: translateY(-1px);
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  color: #e5e7eb;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.preview-body {
  flex: 1;
  min-height: 0;
  position: relative;
  background:
    linear-gradient(45deg, rgba(148, 163, 184, 0.15) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(148, 163, 184, 0.15) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(148, 163, 184, 0.15) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(148, 163, 184, 0.15) 75%);
  background-size: 18px 18px;
  background-position: 0 0, 0 9px, 9px -9px, -9px 0px;
  user-select: none;
}

.preview-body::after {
  content: "点击调色";
  position: absolute;
  inset: 10px 10px auto auto;
  z-index: 2;
  cursor: pointer;
}

.preview-color {
  position: absolute;
  inset: 0;
  transform-origin: center;
}

.preview-color-picker {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.preview-body {
  cursor: pointer;
}

.color-output-item {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.25);
  display: flex;
  flex-direction: column;
  min-height: 160px;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
}

.color-output-item:hover {
  background: rgba(15, 23, 42, 0.4);
  border-color: rgba(16, 185, 129, 0.22);
  transform: translateY(-1px);
}

.color-output-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  color: #e5e7eb;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.color-output-label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.color-output-label::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
}

.color-output-body {
  flex: 1;
  min-height: 0;
  position: relative;
  background:
    linear-gradient(45deg, rgba(148, 163, 184, 0.15) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(148, 163, 184, 0.15) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(148, 163, 184, 0.15) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(148, 163, 184, 0.15) 75%);
  background-size: 18px 18px;
  background-position: 0 0, 0 9px, 9px -9px, -9px 0px;
  user-select: none;
}

.color-output-body .color-output-value {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  background: rgba(15, 23, 42, 0.3);
  border: 1px solid rgba(148, 163, 184, 0.08);
  border-radius: 0;
  padding: 10px 12px 12px;
  font-family: "JetBrains Mono", "Fira Code", Consolas, monospace;
  color: #e5e7eb;
  line-height: 1.5;
  cursor: pointer;
  user-select: text;
}

.color-table-section {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed rgba(148, 163, 184, 0.25);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.3) transparent;
}

.color-table-section::-webkit-scrollbar {
  width: 6px;
}

.color-table-section::-webkit-scrollbar-track {
  background: transparent;
}

.color-table-section::-webkit-scrollbar-thumb {
  background-color: rgba(148, 163, 184, 0.3);
  border-radius: 3px;
}

.color-table-section::-webkit-scrollbar-thumb:hover {
  background-color: rgba(148, 163, 184, 0.5);
}

.color-table-title {
  font-size: 13px;
  font-weight: 600;
  color: #e5e7eb;
  margin-bottom: 10px;
}

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

.color-table-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 9px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.22);
  border: 1px solid rgba(148, 163, 184, 0.16);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
  cursor: pointer;
}

.color-table-item:hover {
  background: rgba(15, 23, 42, 0.45);
  border-color: rgba(16, 185, 129, 0.35);
  transform: translateY(-1px);
}

.color-table-swatch {
  width: 22px;
  height: 22px;
  border-radius: 999px;
}

.color-table-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.color-table-name {
  font-size: 12px;
  color: #e5e7eb;
}

.color-table-code {
  font-size: 11px;
  color: #9ca3af;
  font-family: "JetBrains Mono", "Fira Code", Consolas, monospace;
}

.preview-color.preview-pulse {
  animation: colorPreviewPulse 360ms ease-in-out;
}

@keyframes colorPreviewPulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.02);
    opacity: 0.95;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}


.left-output-items {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 12px;
}

.left-output-items .color-output-item {
  flex: 1;
  min-width: calc(50% - 6px);
}

.output-panel-body {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.output-panel-body .color-table-section {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
  flex: 1;
  min-height: 0;
}

.light-theme .config-input {
  background: #ffffff;
  color: #0f172a;
  border-color: rgba(30, 41, 59, 0.18);
}

.light-theme .config-input:focus {
  background: #ffffff;
  border-color: rgba(16, 185, 129, 0.8);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.14);
}

.light-theme .color-preview-card {
  background: #ffffff;
  border-color: rgba(30, 41, 59, 0.12);
}

.light-theme .color-preview-card:hover {
  border-color: rgba(16, 185, 129, 0.65);
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.06);
}

.light-theme .preview-header {
  color: #0f172a;
}

.light-theme .preview-body::after {
  color: rgba(15, 23, 42, 0.92);
}

.light-theme .color-output-item {
  background: #ffffff;
  border-color: rgba(30, 41, 59, 0.12);
}

.light-theme .color-output-item:hover {
  border-color: rgba(16, 185, 129, 0.65);
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.06);
  background: #ffffff;
}

.light-theme .color-output-header {
  color: #0f172a;
  border-bottom-color: rgba(30, 41, 59, 0.12);
}

.light-theme .color-output-body {
  position: relative;
  background:
    linear-gradient(45deg, rgba(30, 41, 59, 0.08) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(30, 41, 59, 0.08) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(30, 41, 59, 0.08) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(30, 41, 59, 0.08) 75%);
  background-size: 18px 18px;
  background-position: 0 0, 0 9px, 9px -9px, -9px 0px;
}

.light-theme .color-output-body .color-output-value {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0;
  padding: 10px 12px 12px;
  font-family: "JetBrains Mono", "Fira Code", Consolas, monospace;
  color: #059669;
  line-height: 1.5;
  cursor: pointer;
  user-select: text;
}

.light-theme .config-row-copyable:hover {
  background: #ffffff;
  border-color: #10b981;
}

.light-theme .color-table-section {
  border-top-color: rgba(30, 41, 59, 0.2);
  scrollbar-color: rgba(30, 41, 59, 0.3) transparent;
}

.light-theme .color-table-section::-webkit-scrollbar-thumb {
  background-color: rgba(30, 41, 59, 0.3);
}

.light-theme .color-table-section::-webkit-scrollbar-thumb:hover {
  background-color: rgba(30, 41, 59, 0.5);
}

.light-theme .color-table-item {
  background: #ffffff;
  border-color: #e2e8f0;
}

.light-theme .color-table-item:hover {
  border-color: #10b981;
  background: #f8fafc;
}

.light-theme .color-table-title {
  color: #0f172a;
}

.light-theme .color-table-name {
  color: #0f172a;
}

.light-theme .color-table-code {
  color: #64748b;
}

/* 搜索框样式 */
.search-box {
  display: flex;
  align-items: center;
}

.search-input {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.35);
  color: #e5e7eb;
  font-size: 12px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  min-width: 150px;
}

.search-input:focus {
  border-color: rgba(16, 185, 129, 0.18);
  background: rgba(15, 23, 42, 0.5);
}

.light-theme .search-input {
  background: #ffffff;
  color: #0f172a;
  border-color: rgba(30, 41, 59, 0.18);
}

.light-theme .search-input:focus {
  background: #ffffff;
  border-color: rgba(16, 185, 129, 0.8);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.14);
}