*, ::before, ::after {
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
  --tw-contain-size:  ;
  --tw-contain-layout:  ;
  --tw-contain-paint:  ;
  --tw-contain-style:  ;
}

::backdrop {
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
  --tw-contain-size:  ;
  --tw-contain-layout:  ;
  --tw-contain-paint:  ;
  --tw-contain-style:  ;
}/*
! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com
*//*
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
*/

*,
::before,
::after {
  box-sizing: border-box; /* 1 */
  border-width: 0; /* 2 */
  border-style: solid; /* 2 */
  border-color: #e5e7eb; /* 2 */
}

::before,
::after {
  --tw-content: '';
}

/*
1. Use a consistent sensible line-height in all browsers.
2. Prevent adjustments of font size after orientation changes in iOS.
3. Use a more readable tab size.
4. Use the user's configured `sans` font-family by default.
5. Use the user's configured `sans` font-feature-settings by default.
6. Use the user's configured `sans` font-variation-settings by default.
7. Disable tap highlights on iOS
*/

html,
:host {
  line-height: 1.5; /* 1 */
  -webkit-text-size-adjust: 100%; /* 2 */
  -moz-tab-size: 4; /* 3 */
  -o-tab-size: 4;
     tab-size: 4; /* 3 */
  font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; /* 4 */
  font-feature-settings: normal; /* 5 */
  font-variation-settings: normal; /* 6 */
  -webkit-tap-highlight-color: transparent; /* 7 */
}

/*
1. Remove the margin in all browsers.
2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.
*/

body {
  margin: 0; /* 1 */
  line-height: inherit; /* 2 */
}

/*
1. Add the correct height in Firefox.
2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
3. Ensure horizontal rules are visible by default.
*/

hr {
  height: 0; /* 1 */
  color: inherit; /* 2 */
  border-top-width: 1px; /* 3 */
}

/*
Add the correct text decoration in Chrome, Edge, and Safari.
*/

abbr:where([title]) {
  -webkit-text-decoration: underline dotted;
          text-decoration: underline dotted;
}

/*
Remove the default font size and weight for headings.
*/

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
}

/*
Reset links to optimize for opt-in styling instead of opt-out.
*/

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

/*
Add the correct font weight in Edge and Safari.
*/

b,
strong {
  font-weight: bolder;
}

/*
1. Use the user's configured `mono` font-family by default.
2. Use the user's configured `mono` font-feature-settings by default.
3. Use the user's configured `mono` font-variation-settings by default.
4. Correct the odd `em` font sizing in all browsers.
*/

code,
kbd,
samp,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; /* 1 */
  font-feature-settings: normal; /* 2 */
  font-variation-settings: normal; /* 3 */
  font-size: 1em; /* 4 */
}

/*
Add the correct font size in all browsers.
*/

small {
  font-size: 80%;
}

/*
Prevent `sub` and `sup` elements from affecting the line height in all browsers.
*/

sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub {
  bottom: -0.25em;
}

sup {
  top: -0.5em;
}

/*
1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
3. Remove gaps between table borders by default.
*/

table {
  text-indent: 0; /* 1 */
  border-color: inherit; /* 2 */
  border-collapse: collapse; /* 3 */
}

/*
1. Change the font styles in all browsers.
2. Remove the margin in Firefox and Safari.
3. Remove default padding in all browsers.
*/

button,
input,
optgroup,
select,
textarea {
  font-family: inherit; /* 1 */
  font-feature-settings: inherit; /* 1 */
  font-variation-settings: inherit; /* 1 */
  font-size: 100%; /* 1 */
  font-weight: inherit; /* 1 */
  line-height: inherit; /* 1 */
  letter-spacing: inherit; /* 1 */
  color: inherit; /* 1 */
  margin: 0; /* 2 */
  padding: 0; /* 3 */
}

/*
Remove the inheritance of text transform in Edge and Firefox.
*/

button,
select {
  text-transform: none;
}

/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Remove default button styles.
*/

button,
input:where([type='button']),
input:where([type='reset']),
input:where([type='submit']) {
  -webkit-appearance: button; /* 1 */
  background-color: transparent; /* 2 */
  background-image: none; /* 2 */
}

/*
Use the modern Firefox focus style for all focusable elements.
*/

:-moz-focusring {
  outline: auto;
}

/*
Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
*/

:-moz-ui-invalid {
  box-shadow: none;
}

/*
Add the correct vertical alignment in Chrome and Firefox.
*/

progress {
  vertical-align: baseline;
}

/*
Correct the cursor style of increment and decrement buttons in Safari.
*/

::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
  height: auto;
}

/*
1. Correct the odd appearance in Chrome and Safari.
2. Correct the outline style in Safari.
*/

[type='search'] {
  -webkit-appearance: textfield; /* 1 */
  outline-offset: -2px; /* 2 */
}

/*
Remove the inner padding in Chrome and Safari on macOS.
*/

::-webkit-search-decoration {
  -webkit-appearance: none;
}

/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Change font properties to `inherit` in Safari.
*/

::-webkit-file-upload-button {
  -webkit-appearance: button; /* 1 */
  font: inherit; /* 2 */
}

/*
Add the correct display in Chrome and Safari.
*/

summary {
  display: list-item;
}

/*
Removes the default spacing and border for appropriate elements.
*/

blockquote,
dl,
dd,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
figure,
p,
pre {
  margin: 0;
}

fieldset {
  margin: 0;
  padding: 0;
}

legend {
  padding: 0;
}

ol,
ul,
menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

/*
Reset default styling for dialogs.
*/
dialog {
  padding: 0;
}

/*
Prevent resizing textareas horizontally by default.
*/

textarea {
  resize: vertical;
}

/*
1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
2. Set the default placeholder color to the user's configured gray 400 color.
*/

input::-moz-placeholder, textarea::-moz-placeholder {
  opacity: 1; /* 1 */
  color: #9ca3af; /* 2 */
}

input::placeholder,
textarea::placeholder {
  opacity: 1; /* 1 */
  color: #9ca3af; /* 2 */
}

/*
Set the default cursor for buttons.
*/

button,
[role="button"] {
  cursor: pointer;
}

/*
Make sure disabled buttons don't get the pointer cursor.
*/
:disabled {
  cursor: default;
}

/*
1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)
2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
   This can trigger a poorly considered lint error in some tools but is included by design.
*/

img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block; /* 1 */
  vertical-align: middle; /* 2 */
}

/*
Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
*/

img,
video {
  max-width: 100%;
  height: auto;
}

/* Make elements with the HTML hidden attribute stay hidden by default */
[hidden]:where(:not([hidden="until-found"])) {
  display: none;
}
.\!container {
  width: 100% !important;
}
.container {
  width: 100%;
}
@media (min-width: 640px) {

  .\!container {
    max-width: 640px !important;
  }

  .container {
    max-width: 640px;
  }
}
@media (min-width: 768px) {

  .\!container {
    max-width: 768px !important;
  }

  .container {
    max-width: 768px;
  }
}
@media (min-width: 1024px) {

  .\!container {
    max-width: 1024px !important;
  }

  .container {
    max-width: 1024px;
  }
}
@media (min-width: 1280px) {

  .\!container {
    max-width: 1280px !important;
  }

  .container {
    max-width: 1280px;
  }
}
@media (min-width: 1536px) {

  .\!container {
    max-width: 1536px !important;
  }

  .container {
    max-width: 1536px;
  }
}
.visible {
  visibility: visible;
}
.fixed {
  position: fixed;
}
.relative {
  position: relative;
}
.mx-auto {
  margin-left: auto;
  margin-right: auto;
}
.block {
  display: block;
}
.inline-block {
  display: inline-block;
}
.flex {
  display: flex;
}
.min-h-screen {
  min-height: 100vh;
}
.max-w-2xl {
  max-width: 42rem;
}
.flex-col {
  flex-direction: column;
}
.gap-5 {
  gap: 1.25rem;
}
.bg-\[var\(--bg-primary\)\] {
  background-color: var(--bg-primary);
}
.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}
.py-6 {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}
.filter {
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}

:root {
  --bg-primary: #1e1e2e;
  --bg-secondary: #2a2a3d;
  --bg-tertiary: #353550;
  --text-primary: #d4d4d8;
  --text-secondary: #a1a1aa;
  --border-color: #3f3f5a;
  --highlight-bg: #ef4444;
  --highlight-text: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Menlo', 'Consolas', 'Monaco', 'Liberation Mono', 'Courier New', monospace;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--bg-tertiary);
}

/* Textarea 样式 */
.data-textarea {
  width: 100%;
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 12px;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.6;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s;
  white-space: nowrap;
  overflow-x: auto;
}

.data-textarea-wrap {
  white-space: pre-wrap;
  overflow-x: hidden;
}

.data-textarea:focus {
  border-color: #6366f1;
}

.data-textarea::-moz-placeholder {
  color: var(--text-secondary);
  opacity: 0.6;
}

.data-textarea::placeholder {
  color: var(--text-secondary);
  opacity: 0.6;
}

/* 区域标签 */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg-tertiary);
  border-radius: 8px 8px 0 0;
  font-size: 13px;
  color: var(--text-secondary);
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

.section-header .section-title {
  font-weight: 600;
  color: var(--text-primary);
}

.section-header .section-hint {
  font-size: 11px;
  color: var(--text-secondary);
  opacity: 0.7;
}

/* 显示框条目 */
.display-item {
  display: flex;
  align-items: center;
  padding: 8px 14px;
  font-size: 13px;
  border-bottom: 1px solid var(--border-color);
  gap: 8px;
  transition: background 0.15s;
}

.display-item:hover {
  background: var(--bg-tertiary);
}

.display-item.exact-match {
  background: var(--highlight-bg);
  color: var(--highlight-text);
  font-weight: 600;
}

.display-item.exact-match:hover {
  background: #dc2626;
}

.display-item.partial-match {
  background: transparent;
}

.display-item.partial-match:hover {
  background: var(--bg-tertiary);
}

.match-highlight {
  background-color: #eab308;
  color: #000;
  border-radius: 2px;
  padding: 0 2px;
}

.display-item .item-key {
  flex-shrink: 0;
}

.display-item .item-comment {
  color: var(--text-secondary);
  font-size: 11px;
  opacity: 0.7;
}

.display-item.exact-match .item-comment {
  color: rgba(255, 255, 255, 0.8);
  opacity: 1;
}

.display-item .item-tag {
  margin-left: auto;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.15);
  white-space: nowrap;
}

.display-item.exact-match .item-tag {
  background: rgba(255, 255, 255, 0.25);
}

/* 登录状态指示器 */
.login-status-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 6px;
  color: #16a34a;
  font-size: 12px;
  font-weight: 600;
}

.login-status-dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  animation: login-dot-pulse 2s infinite;
}

@keyframes login-dot-pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* 未登录时登录按钮脉冲动画 */
.btn-login-pulse {
  animation: btn-pulse-glow 2s infinite;
}

@keyframes btn-pulse-glow {
  0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4); }
  70% { box-shadow: 0 0 0 8px rgba(59, 130, 246, 0); }
  100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  white-space: nowrap;
}

.btn:hover {
  background: var(--bg-tertiary);
  border-color: #6366f1;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  border-color: var(--border-color);
}

.btn-import {
  background: transparent;
  border-color: var(--border-color);
}

.btn-import:hover {
  background: var(--bg-tertiary);
}

/* 保存按钮 */
.btn-save {
  background: transparent;
  border-color: var(--border-color);
  color: #22c55e;
}

.btn-save:hover {
  background: rgba(34, 197, 94, 0.1);
  border-color: #22c55e;
}

/* 加载按钮 */
.btn-load {
  background: transparent;
  border-color: var(--border-color);
  color: #3b82f6;
}

.btn-load:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: #3b82f6;
}

/* 登录按钮 */
.btn-login {
  background: transparent;
  border-color: var(--border-color);
  color: var(--text-secondary);
}

.btn-login:hover {
  background: var(--bg-tertiary);
  border-color: #6366f1;
  color: var(--text-primary);
}

/* 登出按钮 */
.btn-logout {
  background: transparent;
  border-color: var(--border-color);
  color: #f59e0b;
}

.btn-logout:hover {
  background: rgba(245, 158, 11, 0.1);
  border-color: #f59e0b;
}

.btn-user {
  background: transparent;
  border-color: var(--border-color);
  color: #22c55e;
}

.btn-user:hover {
  background: rgba(34, 197, 94, 0.1);
  border-color: #22c55e;
}

.btn-gear {
  background: transparent;
  border-color: var(--border-color);
  color: var(--text-secondary);
  padding: 6px 5px;
}

.btn-gear:hover {
  background: var(--bg-tertiary);
  border-color: #6366f1;
  color: var(--text-primary);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background-color: #252536;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 4px;
  min-width: 160px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 100;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-primary);
  white-space: nowrap;
  transition: background 0.1s;
}

.dropdown-item:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.dropdown-item input[type="checkbox"] {
  accent-color: #3b82f6;
}

.dropdown-item-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 7px 12px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--text-primary);
  background: none;
  border: none;
  cursor: pointer;
  transition: background 0.1s;
}

.dropdown-item-btn:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.section-header-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-sm {
  font-size: 12px;
  padding: 4px 8px;
}

.btn-sm.btn-load {
  background: transparent;
  border-color: var(--border-color);
  color: var(--text-primary);
}

.btn-sm.btn-load:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: #3b82f6;
}

.btn-sm.btn-save {
  background: transparent;
  border-color: var(--border-color);
  color: var(--text-primary);
}

.btn-sm.btn-save:hover {
  background: rgba(34, 197, 94, 0.1);
  border-color: #22c55e;
}

/* 删除按钮 */
.btn-delete {
  background: transparent;
  border-color: var(--border-color);
  color: #ef4444;
}

.btn-delete:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: #ef4444;
}

.btn-sm.btn-delete {
  background: transparent;
  border-color: var(--border-color);
  color: var(--text-primary);
}

.btn-sm.btn-delete:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: #ef4444;
  color: #ef4444;
}

.backup-list {
  max-height: 300px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.backup-list-empty {
  text-align: center;
  color: var(--text-secondary);
  font-size: 13px;
  padding: 20px 0;
}

.backup-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 5px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  transition: background 0.1s;
}

.backup-list-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.backup-list-time {
  font-size: 13px;
  color: var(--text-primary);
  font-family: ui-monospace, 'SF Mono', monospace;
  overflow-wrap: break-word;
  min-width: 0;
  flex: 1;
}

.backup-list-actions {
  display: flex;
  gap: 6px;
}

/* CF 云备份三列布局 */
.cf-backup-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-height: 400px;
  overflow-y: auto;
}

@media (max-width: 768px) {
  .cf-backup-columns {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .cf-backup-columns {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: hidden;
  }
  .cf-backup-column {
    flex: 1 1 0;
    min-width: 0;
    overflow: hidden;
  }
  .cf-backup-column-title {
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .backup-list-item {
    font-size: 11px;
  }
  .backup-list-time {
    font-size: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .backup-list-actions {
    display: none;
  }
  .backup-list-item-checkable {
    justify-content: flex-start;
  }
}

.cf-backup-column {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cf-backup-column-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  padding: 4px 0;
  border-bottom: 1px solid var(--border-color);
}

.backup-list-item-checkable {
  cursor: pointer;
  gap: 6px;
}

.backup-checkbox {
  width: 14px;
  height: 14px;
  accent-color: var(--primary-color);
  cursor: pointer;
  flex-shrink: 0;
}

/* 执行按钮旋转图标 */
.btn-spinner {
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* 区域容器 */
.section-container {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}

.section-body {
  padding: 0;
}

/* 显示列表 */
.display-list {
  max-height: 400px;
  overflow-y: auto;
}

.display-list-empty {
  padding: 24px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 12px;
  opacity: 0.6;
}

/* 统计条 */
.stats-bar {
  display: flex;
  gap: 12px;
  padding: 8px 14px;
  font-size: 11px;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

.stats-bar .stat-item {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background 0.15s;
}

.stats-bar .stat-item:hover {
  background: var(--bg-tertiary);
}

.stats-bar .stat-item.stat-copied {
  background: rgba(99, 102, 241, 0.2);
}

.stats-bar .stat-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.stats-bar .stat-dot-new {
  background: #22c55e;
}

.stats-bar .stat-dot-fuzzy {
  background: #eab308;
}

.stats-bar .stat-dot-duplicate {
  background: var(--highlight-bg);
}

/* section-header 按钮组布局 */
.section-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.section-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* 保存状态标识 */
.save-status {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 3px;
  white-space: nowrap;
  line-height: 1.4;
}

.save-status-dirty {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
}

.save-status-saved {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.08);
}

/* 行数统计 */
.row-count {
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
  opacity: 0.7;
}

/* 帮助按钮 */
.btn-help {
  background: transparent;
  border-color: var(--border-color);
  color: var(--text-secondary);
}

.btn-help:hover {
  background: var(--bg-tertiary);
  border-color: #6366f1;
  color: var(--text-primary);
}

/* 帮助浮层 */
.help-wrapper {
  position: relative;
}

.help-tooltip {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 260px;
  padding: 10px 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.help-tooltip::before {
  content: '';
  position: absolute;
  top: -5px;
  right: 14px;
  width: 8px;
  height: 8px;
  background: var(--bg-tertiary);
  border-left: 1px solid var(--border-color);
  border-top: 1px solid var(--border-color);
  transform: rotate(45deg);
}

/* Pill 按钮组 */
.pill-group {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  overflow: hidden;
  font-size: 11px;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  font-size: 11px;
  border: none;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  white-space: nowrap;
  line-height: 1.4;
}

.pill-btn:not(:last-child) {
  border-right: 1px solid var(--border-color);
}

.pill-btn:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.pill-btn.active {
  background: #6366f1;
  color: #ffffff;
}

.pill-btn.active:hover {
  background: #4f46e5;
}

/* 包含匹配三段式布局 */
.partial-match-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
}

.partial-match-input,
.partial-match-complete {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
}

.partial-match-separator {
  color: var(--text-secondary);
  font-size: 12px;
  opacity: 0.6;
  flex-shrink: 0;
}

/* 匹配模式静态标签 */
.match-mode-label {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 11px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  white-space: nowrap;
  line-height: 1.4;
}

/* 确定按钮 */
.btn-primary {
  background: #6366f1;
  border-color: #6366f1;
  color: #ffffff;
  font-weight: 500;
}

.btn-primary:hover {
  background: #4f46e5;
  border-color: #4f46e5;
}

/* 字段选择器区域 */
.field-selector-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.field-selector-item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg-secondary);
}

.field-checkbox {
  width: 14px;
  height: 14px;
  margin: 0 0 0 6px;
  cursor: pointer;
  accent-color: #6366f1;
  flex-shrink: 0;
}

.field-selector-item .pill-btn {
  border-radius: 0;
  border: none;
  border-left: 1px solid var(--border-color);
}

/* ========== Toast 提示系统 ========== */
.toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  left: auto;
  transform: none;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateY(-12px);
  transition: all 0.3s ease;
  pointer-events: auto;
  white-space: nowrap;
}

.toast-show {
  opacity: 1;
  transform: translateY(0);
}

.toast-hide {
  opacity: 0;
  transform: translateY(-12px);
}

.toast-success {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #22c55e;
}

.toast-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.toast-warning {
  background: rgba(234, 179, 8, 0.15);
  border: 1px solid rgba(234, 179, 8, 0.3);
  color: #eab308;
}

.toast-icon {
  font-size: 14px;
  font-weight: bold;
  flex-shrink: 0;
}

.toast-message {
  flex: 1;
}

/* ========== 模态弹窗 ========== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.modal-overlay.modal-show {
  opacity: 1;
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  min-width: 340px;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  transform: scale(0.95);
  transition: transform 0.2s ease;
}

.modal-wide {
  max-width: 900px;
  width: 90vw;
}

.modal-overlay.modal-show .modal-content {
  transform: scale(1);
}

.modal-header {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.modal-body {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 20px;
}

.modal-warning-body {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-warning-icon {
  flex-shrink: 0;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.modal-btn-cancel {
  background: transparent;
  border-color: var(--border-color);
  color: var(--text-secondary);
}

.modal-btn-confirm {
  min-width: 80px;
}

/* ========== 登录弹窗 ========== */
.login-field {
  margin-bottom: 12px;
}

.login-label {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.login-password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.login-input {
  width: 100%;
  padding: 10px 40px 10px 12px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.login-input:focus {
  border-color: #6366f1;
}

.login-input::-moz-placeholder {
  color: var(--text-secondary);
  opacity: 0.5;
}

.login-input::placeholder {
  color: var(--text-secondary);
  opacity: 0.5;
}

.login-visibility-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
}

.login-visibility-btn:hover {
  color: var(--text-primary);
}

.login-remember {
  margin-bottom: 12px;
}

.login-remember-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
}

.login-checkbox {
  width: 14px;
  height: 14px;
  accent-color: #6366f1;
  cursor: pointer;
}

.login-error {
  color: #ef4444;
  font-size: 12px;
  min-height: 18px;
  margin-top: 4px;
}

.login-locked {
  color: #ef4444;
  font-size: 12px;
  padding: 6px 10px;
  background: rgba(239, 68, 68, 0.1);
  border-radius: 4px;
  margin-top: 8px;
}

.login-attempts {
  color: #f59e0b;
  font-size: 11px;
  margin-top: 4px;
}

/* ========== 响应式 ========== */
@media (max-width: 640px) {
  .data-textarea {
    font-size: 12px;
  }

  .section-header {
    flex-wrap: wrap;
    gap: 8px;
  }

  .section-header-left {
    gap: 6px;
    flex-wrap: wrap;
  }

  .section-header-actions {
    flex-wrap: wrap;
    gap: 4px;
    width: 100%;
    justify-content: flex-end;
  }

  .section-header-actions .btn {
    padding: 3px 8px;
    font-size: 11px;
  }

  .row-count,
  .section-hint {
    white-space: normal;
    word-break: break-all;
    font-size: 10px;
    max-width: 100%;
    text-align: right;
  }

  .pill-group {
    font-size: 10px;
  }

  .pill-btn {
    padding: 2px 6px;
    font-size: 10px;
  }

  .help-tooltip {
    width: 200px;
    right: -10px;
  }

  .modal-content {
    min-width: 280px;
    margin: 16px;
  }
}

/* ========== 网站底部（友情链接 + 页脚信息）========== */
.site-footer {
  width: 100%;
  max-width: 42rem;
  margin: 0 auto;
  padding: 16px;
  font-size: 12px;
  color: var(--text-secondary);
  text-align: center;
  border-top: 1px solid var(--border-color);
}

.site-footer-block {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px 14px;
}

.site-footer-block + .site-footer-block {
  margin-top: 8px;
}

.site-footer-label {
  font-weight: 600;
  color: var(--text-secondary);
  margin-right: 4px;
}

.site-footer-item {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s;
  white-space: nowrap;
}

.site-footer-item:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

.site-footer-item-disabled {
  cursor: default;
  opacity: 0.85;
}

.site-footer-item-disabled:hover {
  color: var(--text-secondary);
  text-decoration: none;
}

.site-footer-separator {
  color: var(--border-color);
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

@media (min-width: 640px) {

  .sm\:px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}
