.context-menu {
  position: fixed;
  min-width: 200px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 16px 40px var(--shadow-lg), 0 0 30px var(--glow);
  padding: 8px 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(12px);
  overflow: hidden;
}

/* 深色主题下右键菜单完全不透明 */
[data-theme="dark"] .context-menu,
.context-menu:not([data-theme]) {
  background: rgba(30, 30, 30, 0.95);
  backdrop-filter: blur(8px);
}

/* 浅色主题下右键菜单优化 */
[data-theme="light"] .context-menu {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12), 0 0 30px rgba(59, 130, 246, 0.1);
}

.context-menu::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

.context-menu button {
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  font: inherit;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.context-menu button:hover {
  background: var(--card-bg-hover);
  color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--primary);
}

/* 浅色主题下右键菜单按钮悬停优化 */
[data-theme="light"] .context-menu button:hover {
  background: rgba(59, 130, 246, 0.08);
  color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--primary);
}

.context-menu button .action-icon {
  width: 20px;
  display: inline-flex;
  justify-content: center;
  font-size: 18px;
}

.context-menu button .action-text {
  flex: 1;
  font-size: 14px;
}

.context-menu button.danger {
  color: var(--danger);
}

.context-menu button.danger:hover {
  background: rgba(239, 68, 68, 0.12);
  color: var(--danger);
  box-shadow: inset 0 0 0 1px var(--danger);
}

.context-menu hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 6px 0;
}
:root {
  color-scheme: dark light;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  
  /* 深色主题变量 */
  --bg-dark: linear-gradient(135deg, #0c0c0c 0%, #1a1a2e 25%, #16213e 50%, #0f3460 75%, #533483 100%);
  --bg-attachment-dark: fixed;
  --card-bg-dark: rgba(0, 0, 0, 0.35);
  --card-bg-hover-dark: rgba(0, 0, 0, 0.45);
  --card-bg-active-dark: rgba(0, 0, 0, 0.4);
  --border-dark: rgba(255, 255, 255, 0.12);
  --border-hover-dark: rgba(255, 255, 255, 0.18);
  --text-dark: #f8fafc;
  --text-secondary-dark: #cbd5e1;
  --text-muted-dark: #94a3b8;
  --primary-dark: #3b82f6;
  --primary-hover-dark: #2563eb;
  --secondary-dark: rgba(255, 255, 255, 0.1);
  --danger-dark: #ef4444;
  --success-dark: #10b981;
  --warning-dark: #f59e0b;
  --shadow-dark: rgba(0, 0, 0, 0.3);
  --shadow-lg-dark: rgba(0, 0, 0, 0.4);
  --glow-dark: rgba(59, 130, 246, 0.3);
  --header-bg-dark: rgba(0, 0, 0, 0.2);
  
  /* 深色主题变量 - 调整文字颜色，提高可读性 */
  --text-dark: #e2e8f0;
  --text-secondary-dark: #94a3b8;
  --text-muted-dark: #64748b;
  
  /* 浅色主题变量 - 调整背景色，让灰色更浅 */
  --bg-light: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 25%, #e2e8f0 50%, #cbd5e1 75%, #94a3b8 100%);
  --bg-attachment-light: fixed;
  --card-bg-light: rgba(255, 255, 255, 0.9);
  --card-bg-hover-light: rgba(255, 255, 255, 0.95);
  --card-bg-active-light: rgba(255, 255, 255, 1);
  --border-light: rgba(0, 0, 0, 0.08);
  --border-hover-light: rgba(0, 0, 0, 0.12);
  --text-light: #1e293b;
  --text-secondary-light: #475569;
  --text-muted-light: #64748b;
  --primary-light: #3b82f6;
  --primary-hover-light: #2563eb;
  --secondary-light: rgba(0, 0, 0, 0.05);
  --danger-light: #dc2626;
  --success-light: #059669;
  --warning-light: #d97706;
  --shadow-light: rgba(0, 0, 0, 0.1);
  --shadow-lg-light: rgba(0, 0, 0, 0.15);
  --glow-light: rgba(59, 130, 246, 0.2);
  --header-bg-light: rgba(255, 255, 255, 0.8);
  
  /* 默认使用深色主题 */
  --bg: var(--bg-dark);
  --bg-attachment: var(--bg-attachment-dark);
  --card-bg: var(--card-bg-dark);
  --card-bg-hover: var(--card-bg-hover-dark);
  --card-bg-active: var(--card-bg-active-dark);
  --border: var(--border-dark);
  --border-hover: var(--border-hover-dark);
  --text: var(--text-dark);
  --text-secondary: var(--text-secondary-dark);
  --text-muted: var(--text-muted-dark);
  --primary: var(--primary-dark);
  --primary-hover: var(--primary-hover-dark);
  --primary-text: #ffffff;
  --secondary: var(--secondary-dark);
  --danger: var(--danger-dark);
  --danger-color: var(--danger-dark);
  --success: var(--success-dark);
  --warning: var(--warning-dark);
  --shadow: var(--shadow-dark);
  --shadow-lg: var(--shadow-lg-dark);
  --glow: var(--glow-dark);
}

/* 深色主题下网址列表优化 */
[data-theme="dark"] .bookmark-title {
  color: #e2e8f0;
}

[data-theme="dark"] .bookmark-url {
  color: #94a3b8;
  opacity: 0.9;
}

[data-theme="dark"] .bookmark-path {
  color: #64748b;
  opacity: 0.8;
}

/* 浅色主题 */
[data-theme="light"] {
  --bg: var(--bg-light);
  --bg-attachment: var(--bg-attachment-light);
  --card-bg: var(--card-bg-light);
  --card-bg-hover: var(--card-bg-hover-light);
  --card-bg-active: var(--card-bg-active-light);
  --border: var(--border-light);
  --border-hover: var(--border-hover-light);
  --text: var(--text-light);
  --text-secondary: var(--text-secondary-light);
  --text-muted: var(--text-muted-light);
  --primary: var(--primary-light);
  --primary-hover: var(--primary-hover-light);
  --primary-text: #ffffff;
  --secondary: var(--secondary-light);
  --danger: var(--danger-light);
  --success: var(--success-light);
  --warning: var(--warning-light);
  --shadow: var(--shadow-light);
  --shadow-lg: var(--shadow-lg-light);
  --glow: var(--glow-light);
  --header-bg: var(--header-bg-light);
  /* 浅色主题下网址列表优化 */
  --bookmark-title-light: #2d3748;
}

/* 浅色主题下网址列表优化 */
[data-theme="light"] .bookmark-title {
  color: #2d3748;
}

[data-theme="light"] .bookmark-url {
  color: #718096;
  opacity: 0.9;
}

[data-theme="light"] .bookmark-path {
  color: #a0aec0;
  opacity: 0.8;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  background-attachment: var(--bg-attachment);
  color: var(--text);
  backdrop-filter: blur(1px);
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button {
  font: inherit;
  cursor: pointer;
}

.app-header {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: var(--header-bg);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.app-title {
  font-size: 1.8rem;
  font-weight: 700;
  background: linear-gradient(45deg, #3b82f6, #8b5cf6, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 30px rgba(59, 130, 246, 0.5);
  animation: glow 3s ease-in-out infinite alternate;
}

@keyframes glow {
  from { filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.3)); }
  to { filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.5)); }
}

.panel-title.horizontal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.panel-actions .tertiary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
}

.panel-actions .tertiary.small {
  padding: 0.375rem 0.75rem;
  font-size: 0.8rem;
}

.theme-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.theme-toggle-btn {
  position: relative;
  width: 56px;
  height: 28px;
  border: 2px solid var(--border);
  border-radius: 25px;
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 16px var(--shadow);
  overflow: hidden;
}

.theme-toggle-btn::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

.theme-toggle-btn:hover {
  border-color: var(--primary);
  box-shadow: 0 6px 20px var(--glow);
  transform: translateY(-1px);
}

[data-theme="light"] .theme-toggle-btn::before {
  transform: translateX(26px);
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 2px 8px rgba(251, 191, 36, 0.4);
}

.theme-toggle-icon {
  font-size: 1rem;
  transition: all 0.3s ease;
}

[data-theme="light"] .sun-icon {
  opacity: 0;
  transform: scale(0.5) rotate(-45deg);
}

[data-theme="dark"] .moon-icon {
  opacity: 0;
  transform: scale(0.5) rotate(45deg);
}

.app-header h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  background: linear-gradient(45deg, #3b82f6, #8b5cf6, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle-artistic {
  margin-left: 12px;
  font-size: 14px;
  font-weight: 500;
  background: linear-gradient(45deg, #3b82f6, #8b5cf6, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 8px rgba(59, 130, 246, 0.3);
  animation: sparkle 3s ease-in-out infinite alternate;
  letter-spacing: 1px;
  position: relative;
}

.subtitle-artistic::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  background: linear-gradient(45deg, #3b82f6, #8b5cf6, #ec4899, #3b82f6);
  border-radius: 6px;
  opacity: 0.2;
  z-index: -1;
  filter: blur(4px);
  animation: pulse 4s ease-in-out infinite;
}

@keyframes sparkle {
  from {
    filter: drop-shadow(0 0 3px rgba(59, 130, 246, 0.2));
    transform: scale(1);
  }
  to {
    filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.4));
    transform: scale(1.01);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.15;
    transform: scale(1);
  }
  50% {
    opacity: 0.3;
    transform: scale(1.02);
  }
}

/* 脉冲动画 */
@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.9;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.header-actions button + button {
  margin-left: 12px;
}

.app-main {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 24px;
  padding: 24px;
  height: calc(100vh - 80px);
  overflow: hidden;
}

.tree-panel,
.list-panel {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 8px 32px var(--shadow-lg);
  display: flex;
  flex-direction: column;
  height: calc(100vh - 160px);
  max-height: calc(100vh - 160px);
  min-height: 500px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.tree-panel:hover,
.list-panel:hover {
  border-color: var(--border-hover);
  box-shadow: 0 12px 40px var(--shadow-lg);
  transform: translateY(-2px);
}

.panel-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.panel-title {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.panel-title.horizontal {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.panel-header h2 {
  margin: 0;
  font-size: 16px;
}

.panel-tip {
  font-size: 13px;
  color: var(--text-muted);
}

.tree-root {
  list-style: none;
  margin: 0;
  padding: 16px 16px 24px;
  flex: 1;
  overflow-y: auto;
}

.tree-item {
  margin-bottom: 6px;
}

.tree-row {
  display: flex;
  align-items: center;
  background: transparent;
  border-radius: 12px;
  padding: 10px 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  border: 1px solid transparent;
}

.tree-row:hover {
  background: var(--card-bg-hover);
  border-color: var(--border-hover);
  box-shadow: 0 4px 12px var(--shadow), 0 0 20px var(--glow);
  transform: translateY(-1px);
}

.tree-row.selected {
  background: var(--card-bg-active);
  border-color: var(--primary);
  box-shadow: 0 0 20px var(--glow);
  padding-left: 10px !important; /* 调整选中状态左边距（基础10px + 选中额外16px） */
}

.tree-row.selected::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: linear-gradient(180deg, var(--primary), #8b5cf6);
  border-radius: 0 3px 3px 0;
}

.tree-row .node-main {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  border: none;
  background: transparent;
  padding: 0;
  text-align: left;
}

.node-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  overflow: hidden;
}

.node-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.node-title {
  max-width: 160px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tree-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.tree-actions.inline button {
  border: none;
  background: transparent;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  transition: all 0.2s ease;
  position: relative;
}

.tree-actions.inline button:hover {
  color: var(--primary);
  background: var(--card-bg-hover);
  box-shadow: 0 2px 8px var(--glow);
  transform: translateY(-1px);
}

.tree-actions.inline button:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px var(--glow);
}

.tree-actions .action-icon {
  font-size: 16px;
  width: 10px;
  display: inline-flex;
  justify-content: center;
}

.children {
  list-style: none;
  margin: 8px 0 8px 24px;
  padding-left: 16px;
  border-left: 2px solid;
  border-image: linear-gradient(180deg, var(--border), transparent) 1;
}

.placeholder {
  margin: auto;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

/* bookmark-list样式定义移至下方 */

.bookmark-item {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--card-bg);
  backdrop-filter: blur(8px);
}

.bookmark-item:hover {
  border-color: var(--border-hover);
  box-shadow: 0 8px 24px var(--shadow-lg), 0 0 20px var(--glow);
  transform: translateY(-2px);
  background: var(--card-bg-hover);
}

.bookmark-main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1;
}

.bookmark-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bookmark-title {
  font-weight: 600;
  font-size: 15px;
  display: inline-block;
}

.bookmark-url {
  font-size: 13px;
  color: var(--text-muted);
  word-break: break-all;
}

.bookmark-path {
  font-size: 12px;
  color: var(--text-secondary);
}

.bookmark-actions {
  display: flex;
  gap: 8px;
}

.bookmark-actions .secondary,
.bookmark-actions .tertiary {
  padding: 6px 10px;
}

.tertiary.small {
  padding: 6px 12px;
  font-size: 13px;
}

.primary,
.secondary,
.tertiary {
  border-radius: 10px;
  padding: 10px 16px;
  border: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 500;
  position: relative;
  overflow: hidden;
}

.primary {
  background: linear-gradient(45deg, var(--primary), #8b5cf6);
  color: var(--primary-text);
  box-shadow: 0 4px 12px var(--glow);
}

.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--glow);
  filter: brightness(1.1);
}

.secondary {
  background: var(--card-bg);
  color: var(--text);
  border: 1px solid var(--border);
}

.secondary:hover {
  background: var(--card-bg-hover);
  border-color: var(--border-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--shadow);
}

.tertiary {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}

.tertiary:hover {
  background: var(--card-bg-hover);
  box-shadow: 0 4px 12px var(--glow);
  transform: translateY(-1px);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(8px);
}

.modal {
  width: 420px;
  background: var(--card-bg);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 24px 48px var(--shadow-lg), 0 0 40px var(--glow);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
}

/* 编辑模式工具栏样式 */
.bookmark-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(8px);
}

.bookmark-content-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.bookmark-scroll-container {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  max-height: calc(100vh - 240px);
}

.bookmark-list {
  list-style: none;
  margin: 0;
  padding: 12px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toolbar-info {
  display: flex;
  align-items: center;
}

.toolbar-text {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
}

.toolbar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* 编辑模式书签项样式 */
.bookmark-item.editing {
  padding: 12px 16px 12px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.bookmark-item.editing:hover {
  background: var(--card-bg-hover);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.bookmark-item.selected {
  background: var(--card-bg-hover);
  box-shadow: inset 0 0 0 2px var(--accent-color);
}

/* 编辑模式复选框样式 */
.bookmark-edit-checkbox {
  display: flex;
  align-items: center;
  margin-right: 12px;
}

.bookmark-edit-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  cursor: pointer;
  accent-color: var(--accent-color);
  transition: all 0.2s ease;
}

.bookmark-edit-checkbox input[type="checkbox"]:checked {
  background: var(--accent-color);
  border-color: var(--accent-color);
}

.bookmark-edit-checkbox input[type="checkbox"]:hover {
  border-color: var(--accent-color);
}

/* 编辑模式操作按钮样式 */
.bookmark-actions {
  display: flex;
  gap: 6px;
  margin-left: 12px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.bookmark-item.editing .bookmark-actions {
  opacity: 1;
}

.bookmark-actions .tertiary.small {
  padding: 6px;
  min-width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

.bookmark-actions .tertiary.small.danger {
  color: var(--danger-color);
}

.bookmark-actions .tertiary.small.danger:hover {
  background: rgba(220, 53, 69, 0.1);
}

/* 面板头部水平布局样式 */
.panel-title.horizontal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.panel-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* 深色主题下的编辑模式样式 */
[data-theme="dark"] .bookmark-toolbar {
  background: rgba(0, 0, 0, 0.35);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .bookmark-edit-checkbox input[type="checkbox"] {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] .bookmark-edit-checkbox input[type="checkbox"]:hover {
  border-color: var(--accent-color);
}

[data-theme="dark"] .bookmark-actions .tertiary.small.danger {
  color: #ff6b7a;
}

[data-theme="dark"] .bookmark-actions .tertiary.small.danger:hover {
  background: rgba(255, 107, 122, 0.15);
}

.modal-title {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 600;
  background: linear-gradient(45deg, var(--primary), #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.modal-subtitle {
  margin: 0 0 20px;
  font-size: 14px;
  color: var(--text-secondary);
  background: var(--surface);
  padding: 8px 12px;
  border-radius: 8px;
  border-left: 3px solid var(--primary);
}

.form-group {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-weight: 600;
  color: var(--text-secondary);
}

.form-group input {
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font: inherit;
  background: var(--card-bg);
  color: var(--text);
  transition: all 0.3s ease;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--glow);
  background: var(--card-bg-hover);
}

.url-input {
  display: flex;
  gap: 12px;
}

.url-input input {
  flex: 1;
}

.form-error {
  color: var(--danger);
  margin: 0;
  font-size: 13px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* 确认对话框样式 */
.confirm-dialog {
  max-width: 480px;
  text-align: center;
  padding: 30px;
}

.confirm-icon {
  font-size: 48px;
  margin-bottom: 20px;
  animation: pulse 1.5s infinite;
}

.confirm-icon.warning {
  animation-delay: 0.2s;
}

.confirm-content {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 20px 0;
  padding: 0 10px;
}

.confirm-dialog .modal-title {
  margin-bottom: 10px;
}

.confirm-dialog .modal-actions {
  justify-content: center;
  margin-top: 30px;
}

/* 危险按钮样式 */
button.primary.danger {
  background: linear-gradient(135deg, #ff4757, #ff6b6b);
  border-color: #ff4757;
}

button.primary.danger:hover {
  background: linear-gradient(135deg, #ff3838, #ff6348);
  transform: translateY(-1px);
}

button.primary.danger:active {
  transform: translateY(0);
}

.folder-select-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--surface-variant);
  border: 1px solid var(--outline);
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  color: var(--on-surface);
  transition: all 0.2s;
}

.folder-select-btn:hover {
  background: var(--primary-container);
  border-color: var(--primary);
  color: var(--on-primary-container);
}

.folder-selector {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid var(--outline);
  border-radius: 8px;
  background: var(--surface);
  margin-top: 8px;
}

.folder-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  cursor: pointer;
  transition: background-color 0.2s;
  position: relative;
  border-bottom: 1px solid var(--outline-variant);
}

.folder-option:last-child {
  border-bottom: none;
}

.folder-option:hover {
  background: var(--surface-variant);
}

.folder-option .selected-indicator {
  margin-left: auto;
  color: var(--primary);
  font-weight: bold;
}

.toast {
  position: fixed;
  bottom: 40px;
  right: 40px;
  padding: 20px 24px;
  border-radius: 16px;
  box-shadow: 0 16px 40px var(--shadow-lg), 0 0 30px var(--glow);
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  z-index: 2000;
  backdrop-filter: blur(12px);
  border: 2px solid rgba(255, 255, 255, 0.2);
  min-width: 300px;
  max-width: 400px;
  word-wrap: break-word;
}

.toast.success {
  background: linear-gradient(45deg, var(--success), #34d399);
  box-shadow: 0 16px 40px rgba(16, 185, 129, 0.4);
  animation: pulse 2s infinite;
}

.toast.error {
  background: linear-gradient(45deg, var(--danger), #f87171);
  box-shadow: 0 16px 40px rgba(239, 68, 68, 0.4);
  animation: errorPulse 1s infinite;
  border-color: rgba(255, 255, 255, 0.3);
}

.toast.warning {
  background: linear-gradient(45deg, var(--warning), #fbbf24);
  box-shadow: 0 16px 40px rgba(245, 158, 11, 0.4);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 16px 40px rgba(16, 185, 129, 0.4);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 16px 40px rgba(16, 185, 129, 0.6);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 16px 40px rgba(16, 185, 129, 0.4);
  }
}

@keyframes errorPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 16px 40px rgba(239, 68, 68, 0.4);
  }
  30% {
    transform: scale(1.08);
    box-shadow: 0 16px 40px rgba(239, 68, 68, 0.7);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 16px 40px rgba(239, 68, 68, 0.4);
  }
}

.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.2s ease;
}

.fade-enter-from,
.fade-leave-to {
  opacity: 0;
}

.toast-enter-active,
.toast-leave-active {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.toast-enter-from {
  transform: translateX(100%);
  opacity: 0;
}

.toast-leave-to {
  transform: translateX(100%);
  opacity: 0;
}

@media (max-width: 960px) {
  .app-main {
    grid-template-columns: 1fr;
  }

  .tree-panel,
  .list-panel {
    min-height: auto;
    max-height: none;
  }
}

