/* 组件样式 */

/* 链接卡片 */
.link-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.8) 100%);
  border: 1.5px solid rgba(100, 181, 246, 0.2);
  border-radius: 16px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(15px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08), 0 0 40px rgba(255, 255, 255, 0.1) inset;
}

.link-card:hover {
  border-color: rgba(100, 181, 246, 0.5);
  box-shadow: 0 16px 50px rgba(100, 181, 246, 0.2), 0 0 60px rgba(255, 255, 255, 0.2) inset;
  transform: translateY(-4px) scale(1.02);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.9) 100%);
}

.link-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.link-logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.link-actions {
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  transform: translateX(10px);
  display: flex;
  gap: 4px;
  align-items: center;
}

.link-card:hover .link-actions {
  opacity: 1;
  transform: translateX(0);
}

.link-action-btn {
  background: linear-gradient(135deg, rgba(243, 244, 246, 0.9) 0%, rgba(229, 231, 235, 0.8) 100%);
  border: none;
  border-radius: 8px;
  padding: 6px 8px;
  cursor: pointer;
  color: #6b7280;
  font-size: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(107, 114, 128, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
}

.link-action-btn:hover {
  background: linear-gradient(135deg, rgba(229, 231, 235, 0.95) 0%, rgba(209, 213, 219, 0.9) 100%);
  color: #374151;
  transform: translateY(-1px) scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.link-action-btn[data-action="edit"] {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(37, 99, 235, 0.1) 100%);
  color: #3b82f6;
  border-color: rgba(59, 130, 246, 0.2);
}

.link-action-btn[data-action="edit"]:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(37, 99, 235, 0.2) 100%);
  color: #2563eb;
}

.link-action-btn[data-action="delete"] {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.1) 100%);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.2);
}

.link-action-btn[data-action="delete"]:hover {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(220, 38, 38, 0.2) 100%);
  color: #dc2626;
}

.link-action-btn .icon {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.link-card-body {
  margin-bottom: 12px;
}

.link-title {
  font-size: 16px;
  font-weight: 700;
  background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 6px;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* 深色主题下的 link-title 样式 */
[data-theme="dark"] .link-title {
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: unset;
  background-clip: unset;
  color: white;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.link-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 6px;
}

.link-domain {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.visit-count {
  font-size: 11px;
  background: #f3f4f6;
  padding: 2px 6px;
  border-radius: 10px;
}

.link-category {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #6b7280;
}

.link-category .icon {
  width: 12px;
  height: 12px;
}

.link-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.link-time {
  font-size: 11px;
  color: #9ca3af;
}

/* Logo颜色选择器样式 */
.logo-color-selector {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.color-picker {
  display: flex;
  align-items: center;
  gap: 10px;
}

.color-input {
  width: 40px;
  height: 40px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  background: none;
  padding: 0;
}

.color-input::-webkit-color-swatch {
  border: none;
  border-radius: 6px;
}

.color-input::-webkit-color-swatch-wrapper {
  padding: 0;
}

.color-preview {
  width: 40px;
  height: 40px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: white;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  transition: all 0.2s ease;
}

.color-preview:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.quick-colors {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quick-colors-label {
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
}

.quick-color-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-color-btn {
  width: 28px;
  height: 28px;
  border: 2px solid #e5e7eb;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.quick-color-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  border-color: #9ca3af;
}

.quick-color-btn.active {
  border-color: #4285f4;
  box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.3);
  transform: scale(1.15);
}

.quick-color-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  background: white;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.quick-color-btn.active::after {
  opacity: 1;
}

/* 加载状态 */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: #6b7280;
}

.loading-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid #e5e7eb;
  border-top: 2px solid #4285f4;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 错误状态 */
.error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: #dc2626;
  text-align: center;
}

.error-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

/* 通知 */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 12px 16px;
  border-radius: 6px;
  color: white;
  font-size: 14px;
  z-index: 9999;
  animation: slideIn 0.3s ease;
}

.notification-success {
  background: #10b981;
}

.notification-error {
  background: #ef4444;
}

.notification-info {
  background: #3b82f6;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* 右键菜单 */
.context-menu {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  padding: 4px 0;
  min-width: 160px;
}

.context-menu-item {
  padding: 8px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #374151;
}

.context-menu-item:hover {
  background: #f3f4f6;
}

.context-menu-item.context-menu-danger {
  color: #dc2626;
}

.context-menu-item.context-menu-danger:hover {
  background: #fef2f2;
}

.context-menu-divider {
  height: 1px;
  background: #e5e7eb;
  margin: 4px 0;
}

/* 工具提示 */
.link-tooltip {
  background: #1f2937;
  color: white;
  padding: 12px;
  border-radius: 6px;
  font-size: 12px;
  max-width: 250px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tooltip-title {
  font-weight: 500;
  margin-bottom: 4px;
}

.tooltip-url {
  color: #9ca3af;
  margin-bottom: 4px;
  word-break: break-all;
}

.tooltip-note {
  margin-bottom: 4px;
}

.tooltip-meta {
  color: #6b7280;
  font-size: 11px;
}

/* 美化模态框样式 */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* 删除确认模态框需要更高的层级 */
#deleteCategoryModal,
#deleteLinkModal {
  z-index: 1100;
}

/* 确保删除确认模态框在管理模态框之上 */
#manageCategoryModal {
  z-index: 1000;
}

.modal[style*="flex"] {
  opacity: 1;
  visibility: visible;
}

.modal[style*="flex"] .modal-content {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.modal-content {
  background: white;
  border-radius: 20px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 
    0 32px 64px rgba(0, 0, 0, 0.15),
    0 16px 32px rgba(0, 0, 0, 0.1),
    0 8px 16px rgba(0, 0, 0, 0.05);
  transform: scale(0.9) translateY(20px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow-y: auto;
}

/* 设置模态框更宽 */
#settingsModal .modal-content {
  max-width: 600px;
}

/* 添加链接模态框更宽以适应左右布局 */
#addLinkModal .modal-content {
  max-width: 800px;
  width: 90%;
}

@media (max-width: 768px) {
  #settingsModal .modal-content {
    max-width: none;
  }
  
  #addLinkModal .modal-content {
    max-width: 95%;
    width: 95%;
  }
}

.modal-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.modal-header {
  padding: 24px 28px 20px;
  border-bottom: 1px solid rgba(229, 231, 235, 0.6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(145deg, #fafafa 0%, #ffffff 100%);
  position: relative;
}

.modal-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.05), transparent);
}

.modal-header h3 {
  font-size: 20px;
  font-weight: 700;
  background: linear-gradient(135deg, #1f2937 0%, #4285f4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
  letter-spacing: -0.02em;
}

.modal-close {
  background: rgba(0, 0, 0, 0.05);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.modal-close::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.1));
  opacity: 0;
  transition: opacity 0.2s;
}

.modal-close:hover {
  background: rgba(239, 68, 68, 0.1);
  transform: scale(1.05);
}

.modal-close:hover::before {
  opacity: 1;
}

.modal-close:active {
  transform: scale(0.95);
}

.modal-close .icon {
  width: 20px;
  height: 20px;
  color: #6b7280;
  transition: color 0.2s;
  z-index: 1;
}

.modal-close:hover .icon {
  color: #ef4444;
}

.modal-body {
  padding: 28px;
  background: white;
  position: relative;
}

.modal-footer {
  padding: 20px 28px 24px;
  border-top: 1px solid rgba(229, 231, 235, 0.6);
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  background: linear-gradient(145deg, #ffffff 0%, #fafafa 100%);
}

/* 表单组件美化 */
.form-group {
  margin-bottom: 20px;
  position: relative;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #374151;
  font-size: 14px;
  letter-spacing: -0.01em;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 14px;
  outline: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  background: #fafafa;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #4285f4;
  background: white;
  box-shadow: 
    0 0 0 4px rgba(66, 133, 244, 0.1),
    0 4px 12px rgba(0, 0, 0, 0.05);
  transform: translateY(-1px);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #9ca3af;
  transition: color 0.2s;
}

.form-group input:focus::placeholder,
.form-group textarea:focus::placeholder {
  color: #d1d5db;
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.5;
}

.form-group small {
  display: block;
  margin-top: 6px;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.4;
}

.form-group input[type="checkbox"] {
  width: auto;
  margin-right: 8px;
  transform: scale(1.2);
  accent-color: #4285f4;
}

/* 按钮美化 */
.btn {
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  position: relative;
  overflow: hidden;
  letter-spacing: -0.01em;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, #4285f4 0%, #1a73e8 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1a73e8 0%, #1557b0 100%);
  box-shadow: 0 6px 20px rgba(66, 133, 244, 0.4);
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(66, 133, 244, 0.3);
}

.btn-secondary {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  color: #475569;
  border: 2px solid #e2e8f0;
}

.btn-secondary:hover {
  background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
  border-color: #cbd5e1;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-secondary:active {
  transform: translateY(0);
}

.btn-get-current {
  margin-top: 8px;
  padding: 8px 14px;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  color: #475569;
  font-weight: 500;
}

.btn-get-current:hover {
  background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 设置面板样式美化 */
.settings-tabs {
  display: flex;
  border-bottom: 2px solid #f1f5f9;
  margin-bottom: 24px;
  background: #fafafa;
  border-radius: 12px 12px 0 0;
  padding: 4px;
}

.settings-tab {
  padding: 12px 20px;
  border: none;
  background: none;
  cursor: pointer;
  color: #6b7280;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  flex: 1;
  text-align: center;
}

.settings-tab.active {
  color: #4285f4;
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.settings-tab:hover:not(.active) {
  color: #374151;
  background: rgba(255, 255, 255, 0.5);
}

.settings-content {
  min-height: 300px;
}

.settings-panel {
  display: none;
  animation: fadeIn 0.3s ease;
}

.settings-panel.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.setting-item {
  margin-bottom: 24px;
  padding: 20px;
  background: #fafafa;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  transition: all 0.2s;
}

.setting-item:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.setting-item label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: #374151;
  font-size: 14px;
}

.setting-item select,
.setting-item input:not([type="checkbox"]) {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: 14px;
  background: white;
  transition: all 0.2s;
}

.setting-item select:focus,
.setting-item input:focus {
  border-color: #4285f4;
  box-shadow: 0 0 0 4px rgba(66, 133, 244, 0.1);
}

.setting-item small {
  display: block;
  margin-top: 8px;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.4;
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
  transform: translateY(-2px);
}

.btn-danger:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

/* 深色主题 */
[data-theme="dark"] {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 25%, #5dade2 50%, #85c1e9 75%, #a9cce3 100%);
  color: #f9fafb;
}

[data-theme="dark"] .header,
[data-theme="dark"] .categories-nav,
[data-theme="dark"] .link-card {
  background: #1f2937;
  border-color: #374151;
}

[data-theme="dark"] .modal-content {
  background: #1f2937;
  border-color: #374151;
  box-shadow: 
    0 32px 64px rgba(0, 0, 0, 0.4),
    0 16px 32px rgba(0, 0, 0, 0.3),
    0 8px 16px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .modal-header {
  background: linear-gradient(145deg, #1f2937 0%, #374151 100%);
  border-bottom-color: rgba(75, 85, 99, 0.6);
}

[data-theme="dark"] .modal-header h3 {
  background: linear-gradient(135deg, #f9fafb 0%, #60a5fa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-theme="dark"] .modal-body {
  background: #1f2937;
}

[data-theme="dark"] .modal-footer {
  background: linear-gradient(145deg, #1f2937 0%, #374151 100%);
  border-top-color: rgba(75, 85, 99, 0.6);
}

[data-theme="dark"] .search-input,
[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group select,
[data-theme="dark"] .form-group textarea {
  background: #374151;
  border-color: #4b5563;
  color: #f9fafb;
}

[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group select:focus,
[data-theme="dark"] .form-group textarea:focus {
  background: #4b5563;
  border-color: #60a5fa;
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.1);
}

[data-theme="dark"] .form-group label {
  color: #e5e7eb;
}

[data-theme="dark"] .btn-secondary {
  background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
  color: #f9fafb;
  border-color: #4b5563;
}

[data-theme="dark"] .btn-secondary:hover {
  background: linear-gradient(135deg, #4b5563 0%, #6b7280 100%);
  border-color: #6b7280;
}

[data-theme="dark"] .settings-tabs {
  background: #374151;
  border-bottom-color: #4b5563;
}

[data-theme="dark"] .settings-tab {
  color: #9ca3af;
}

[data-theme="dark"] .settings-tab.active {
  color: #60a5fa;
  background: #1f2937;
}

[data-theme="dark"] .setting-item {
  background: #374151;
  border-color: #4b5563;
}

[data-theme="dark"] .setting-item:hover {
  border-color: #6b7280;
}

[data-theme="dark"] .setting-item label {
  color: #e5e7eb;
}

[data-theme="dark"] .setting-item select,
[data-theme="dark"] .setting-item input:not([type="checkbox"]) {
  background: #1f2937;
  border-color: #4b5563;
  color: #f9fafb;
}

/* 颜色选择器样式 */
.color-picker {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.color-picker input[type="radio"] {
  display: none;
}

.color-option {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid transparent;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.color-option::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: white;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.color-option:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.color-picker input[type="radio"]:checked + .color-option {
  border-color: rgba(0, 0, 0, 0.2);
  transform: scale(1.1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.color-picker input[type="radio"]:checked + .color-option::before {
  transform: translate(-50%, -50%) scale(1);
}

[data-theme="dark"] .color-option {
  border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .color-picker input[type="radio"]:checked + .color-option {
  border-color: rgba(255, 255, 255, 0.4);
}

[data-theme="dark"] .color-option::before {
  background: #1f2937;
}

/* 删除确认模态框样式 */
.delete-warning {
  text-align: center;
  padding: 20px 0;
}

.warning-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(239, 68, 68, 0.1);
  border-radius: 50%;
}

.warning-icon svg {
  width: 32px;
  height: 32px;
  color: #ef4444;
}

.delete-warning h4 {
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 16px;
}

.warning-message {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 16px;
  line-height: 1.5;
}

.warning-message strong {
  color: #ef4444;
}

.warning-note {
  background: rgba(239, 68, 68, 0.05);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 8px;
  padding: 12px;
  font-size: 13px;
  color: #b91c1c;
}

[data-theme="dark"] .delete-warning h4 {
  color: #f9fafb;
}

[data-theme="dark"] .warning-message {
  color: #d1d5db;
}

[data-theme="dark"] .warning-message strong {
  color: #f87171;
}

[data-theme="dark"] .warning-note {
  background: rgba(248, 113, 113, 0.1);
  border-color: rgba(248, 113, 113, 0.3);
  color: #fca5a5;
}

[data-theme="dark"] .warning-icon {
  background: rgba(248, 113, 113, 0.2);
}

[data-theme="dark"] .warning-icon svg {
  color: #f87171;
}

/* 表单验证样式 */
.form-group.focused label {
  color: #4285f4;
  transform: translateY(-2px);
}

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
  border-color: #ef4444;
  background: #fef2f2;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

[data-theme="dark"] .form-group input.error,
[data-theme="dark"] .form-group select.error,
[data-theme="dark"] .form-group textarea.error {
  border-color: #f87171;
  background: rgba(239, 68, 68, 0.1);
}

.error-message {
  color: #ef4444;
  font-size: 12px;
  margin-top: 4px;
  font-weight: 500;
  animation: slideInDown 0.2s ease;
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 响应式模态框 */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    max-width: none;
    margin: 20px;
    max-height: calc(100vh - 40px);
  }
  
  .modal-header {
    padding: 20px 20px 16px;
  }
  
  .modal-body {
    padding: 20px;
  }
  
  .modal-footer {
    padding: 16px 20px 20px;
    flex-direction: column-reverse;
  }
  
  .modal-footer .btn {
    width: 100%;
    margin: 0;
  }
  
  .modal-footer .btn + .btn {
    margin-bottom: 8px;
  }
}

@media (max-width: 480px) {
  .modal-header h3 {
    font-size: 18px;
  }
  
  .settings-tabs {
    flex-direction: column;
    border-radius: 8px;
  }
  
  .settings-tab {
    text-align: left;
    border-radius: 6px;
  }
}

/* 管理分类模态框样式 */
#manageCategoryModal .modal-content {
  width: 90%;
  max-width: 800px;
}

/* 响应式设计：在较小屏幕上调整管理分类模态框 */
@media (max-width: 768px) {
  #manageCategoryModal .modal-content {
    width: 95%;
    max-width: none;
  }
  
  .category-management {
    flex-direction: column;
  }
  
  .category-management-sidebar {
    flex: none;
    width: 100%;
  }
}

.category-management {
  min-height: 400px;
  display: flex;
  gap: 20px;
}

.category-management-sidebar {
  flex: 0 0 280px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.category-management-header {
  padding: 16px;
  background: #f8fafc;
  border-radius: 8px;
  border-left: 4px solid #3b82f6;
  flex: 1;
}

.category-management-header p {
  margin: 0 0 12px 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.5;
}

.management-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.category-list {
  flex: 1;
  max-height: 500px;
  overflow-y: auto;
  min-height: 300px;
}

.manage-category-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 10px;
  background: white;
  transition: all 0.2s;
  cursor: pointer;
}

.manage-category-item:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-edit-category {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #2563eb;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 3px;
  margin-bottom: 3px;
}

.btn-edit-category:hover {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.btn-edit-category:active {
  background: #bfdbfe;
  transform: scale(0.98);
}

.btn-edit-category .icon {
  width: 10px;
  height: 10px;
}

.btn-delete-category {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 3px;
}

.btn-delete-category:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
}

.btn-delete-category:active {
  background: #fecaca;
  transform: scale(0.98);
}

.btn-delete-category .icon {
  width: 10px;
  height: 10px;
}

.manage-category-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.manage-category-icon {
  font-size: 20px;
  width: 24px;
  text-align: center;
}

.manage-category-details h4 {
  margin: 0 0 4px 0;
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
}

.manage-category-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #64748b;
}

.manage-category-color {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.manage-category-count {
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 500;
}

.manage-category-actions {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.category-management-footer {
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
  text-align: center;
}

.category-count-info {
  margin: 0;
  color: #64748b;
  font-size: 14px;
}

.category-management-footer {
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
  text-align: center;
}

.category-count-info {
  margin: 0;
  color: #64748b;
  font-size: 14px;
}

.empty-categories {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: #64748b;
  text-align: center;
}

.empty-categories .empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-categories h4 {
  margin: 0 0 8px 0;
  font-size: 18px;
  color: #475569;
}

.empty-categories p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

/* 迁移提示组件样式 */
.migration-prompt {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.3s ease;
}

.migration-content {
  background: white;
  border-radius: 12px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  animation: slideUp 0.3s ease;
}

.migration-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #e5e7eb;
}

.migration-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #111827;
}

.close-btn {
  background: none;
  border: none;
  font-size: 24px;
  color: #6b7280;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
}

.close-btn:hover {
  background: #f3f4f6;
  color: #374151;
}

.migration-body {
  padding: 20px 24px;
}

.migration-body p {
  margin: 0 0 16px;
  line-height: 1.6;
  color: #374151;
}

.migration-benefits {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  padding: 16px;
  margin: 16px 0;
}

.migration-benefits h4 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: #0369a1;
}

.migration-benefits ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.migration-benefits li {
  margin-bottom: 8px;
  font-size: 14px;
  color: #0c4a6e;
}

.migration-data-info {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  margin: 16px 0;
}

.migration-data-info p {
  margin: 0 0 12px;
  font-weight: 500;
}

.migration-data-info ul {
  margin: 0;
  padding-left: 20px;
  color: #6b7280;
}

.migration-data-info li {
  margin-bottom: 4px;
  font-size: 14px;
}

.migration-note {
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  padding: 12px;
  margin: 16px 0;
  font-size: 14px;
  color: #92400e;
}

.migration-actions {
  display: flex;
  gap: 12px;
  padding: 16px 24px 24px;
  border-top: 1px solid #e5e7eb;
}

.migration-actions .btn {
  flex: 1;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
  position: relative;
}

.migration-actions .btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.migration-actions .btn-primary {
  background: #4285f4;
  color: white;
}

.migration-actions .btn-primary:hover:not(:disabled) {
  background: #3367d6;
}

.migration-actions .btn-secondary {
  background: #f3f4f6;
  color: #374151;
  border-color: #d1d5db;
}

.migration-actions .btn-secondary:hover:not(:disabled) {
  background: #e5e7eb;
}

.migration-actions .btn-warning {
  background: #f59e0b;
  color: white;
}

.migration-actions .btn-warning:hover:not(:disabled) {
  background: #d97706;
}

.btn-loading {
  color: rgba(255, 255, 255, 0.8);
}

/* 迁移成功/错误状态 */
.migration-success,
.migration-error {
  text-align: center;
  padding: 20px;
}

.success-icon,
.error-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.migration-success h4 {
  color: #059669;
  margin: 0 0 12px;
}

.migration-error h4 {
  color: #dc2626;
  margin: 0 0 12px;
}

/* 冲突解决界面 */
.conflict-data-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 16px 0;
}

.data-source {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
}

.data-source h4 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
}

.data-source ul {
  margin: 0;
  padding-left: 20px;
  color: #6b7280;
}

.data-source li {
  margin-bottom: 4px;
  font-size: 14px;
}

/* 动画 */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* 响应式设计 */
@media (max-width: 640px) {
  .migration-content {
    width: 95%;
    margin: 20px;
  }
  
  .migration-header,
  .migration-body,
  .migration-actions {
    padding-left: 16px;
    padding-right: 16px;
  }
  
  .conflict-data-info {
    grid-template-columns: 1fr;
  }
  
  .migration-actions {
    flex-direction: column;
  }
}

/* 备份提示样式 */
.backup-notice {
  margin-bottom: 24px;
}

.notice-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid #fbbf24;
  border-radius: 12px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.2); }
  70% { box-shadow: 0 0 0 8px rgba(251, 191, 36, 0); }
  100% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0); }
}

.notice-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: #d97706;
  margin-top: 2px;
}

.notice-content h4 {
  margin: 0 0 6px 0;
  font-size: 16px;
  font-weight: 600;
  color: #92400e;
}

.notice-content p {
  margin: 0;
  font-size: 14px;
  color: #92400e;
  line-height: 1.5;
}

/* 深色主题下的备份提示样式 */
[data-theme="dark"] .notice-banner {
  background: linear-gradient(135deg, #78350f 0%, #92400e 100%);
  border-color: #f59e0b;
}

[data-theme="dark"] .notice-icon {
  color: #f59e0b;
}

[data-theme="dark"] .notice-content h4,
[data-theme="dark"] .notice-content p {
  color: #fcd34d;
}



/* 用户须知面板样式 */
.notice-content {
  padding: 0;
  max-height: 400px;
  overflow-y: auto;
}

.notice-section {
  margin-bottom: 24px;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #4285f4;
}

.notice-section:last-child {
  margin-bottom: 0;
}

.notice-section h4 {
  margin: 0 0 12px 0;
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
  display: flex;
  align-items: center;
  gap: 8px;
}

.notice-section ul {
  margin: 0;
  padding-left: 20px;
  list-style-type: disc;
}

.notice-section li {
  margin-bottom: 8px;
  line-height: 1.5;
  color: #374151;
}

.notice-section li:last-child {
  margin-bottom: 0;
}

.notice-section p {
  margin: 0 0 8px 0;
  line-height: 1.5;
  color: #374151;
}

.notice-section p:last-child {
  margin-bottom: 0;
}

.notice-section strong {
  color: #1f2937;
  font-weight: 600;
}

.feedback-section {
  border-left-color: #10b981;
  background: #f0fdf4;
}

.feedback-section h4 {
  color: #065f46;
}

.feedback-section p {
  color: #047857;
}

/* 深色主题下的用户须知样式 */
[data-theme="dark"] .notice-content {
  background: transparent;
}

[data-theme="dark"] .notice-section {
  background: #1f2937;
  border-left-color: #60a5fa;
}

[data-theme="dark"] .notice-section h4 {
  color: #f9fafb;
}

[data-theme="dark"] .notice-section li,
[data-theme="dark"] .notice-section p {
  color: #d1d5db;
}

[data-theme="dark"] .notice-section strong {
  color: #f9fafb;
}

[data-theme="dark"] .feedback-section {
  background: #065f46;
  border-left-color: #34d399;
}

[data-theme="dark"] .feedback-section h4 {
  color: #ecfdf5;
}

[data-theme="dark"] .feedback-section p {
  color: #a7f3d0;
}

/* 响应式处理 */
@media (max-width: 768px) {
  .notice-content {
    max-height: 300px;
  }
  
  .notice-section {
    padding: 12px;
    margin-bottom: 16px;
  }
  
  .notice-section h4 {
    font-size: 14px;
  }
}

/* 书签导入模态框样式 */
.modal-large {
  max-width: 800px;
  max-height: 85vh;
}

.bookmark-import {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.import-controls {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.import-options {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: #374151;
  user-select: none;
}

.checkbox-group input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.management-actions {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.import-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.import-progress {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #4285f4, #34a853);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 14px;
  color: #6b7280;
  text-align: center;
}

.bookmark-tree {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  max-height: 400px;
  overflow-y: auto;
  background: #fafafa;
}

.tree-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  color: #6b7280;
}

.placeholder-icon {
  margin-bottom: 16px;
}

.placeholder-icon .icon {
  width: 48px;
  height: 48px;
  color: #9ca3af;
}

.tree-placeholder h4 {
  margin: 0 0 8px 0;
  font-size: 16px;
  color: #374151;
}

.tree-placeholder p {
  margin: 0;
  font-size: 14px;
  color: #6b7280;
  line-height: 1.5;
}

.bookmark-node {
  padding: 8px 12px;
  border-bottom: 1px solid #e5e7eb;
  background: white;
  cursor: pointer;
  transition: all 0.2s;
}

.bookmark-node:last-child {
  border-bottom: none;
}

.bookmark-node:hover {
  background: #f3f4f6;
}

.bookmark-node.selected {
  background: #dbeafe;
  border-color: #3b82f6;
}

.bookmark-folder {
  font-weight: 500;
  color: #1f2937;
}

.bookmark-folder.expandable {
  cursor: pointer;
}

.bookmark-folder.expandable:hover {
  color: #4285f4;
}

.bookmark-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}

.bookmark-link .icon {
  width: 16px;
  height: 16px;
  color: #6b7280;
}

.bookmark-title {
  flex: 1;
  font-size: 14px;
  color: #374151;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bookmark-url {
  font-size: 12px;
  color: #9ca3af;
  margin-left: 24px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bookmark-tree-node {
  padding-left: 0;
}

.bookmark-tree-node.level-1 {
  padding-left: 20px;
}

.bookmark-tree-node.level-2 {
  padding-left: 40px;
}

.bookmark-tree-node.level-3 {
  padding-left: 60px;
}

.import-summary {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  padding: 16px;
}

.import-summary h4 {
  margin: 0 0 12px 0;
  font-size: 16px;
  color: #0369a1;
}

.summary-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.stat-label {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 36px; 
  font-weight: 400;
  color: #0369a1;
}

/* 深色主题适配 */
[data-theme="dark"] .bookmark-import {
  color: #e5e7eb;
}

[data-theme="dark"] .import-progress {
  background: #1f2937;
  border-color: #374151;
}

[data-theme="dark"] .bookmark-tree {
  background: #1f2937;
  border-color: #374151;
}

[data-theme="dark"] .bookmark-node {
  background: #111827;
  border-color: #374151;
  color: #e5e7eb;
}

[data-theme="dark"] .bookmark-node:hover {
  background: #1f2937;
}

[data-theme="dark"] .bookmark-node.selected {
  background: #1e3a8a;
  border-color: #3b82f6;
}

[data-theme="dark"] .import-summary {
  background: #1e3a8a;
  border-color: #3b82f6;
}

[data-theme="dark"] .import-summary h4 {
  color: #93c5fd;
}

[data-theme="dark"] .stat-value {
  color: #bfdbfe;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.btn-warning {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: white;
  border: none;
}

.btn-warning:hover {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  transform: translateY(-1px);
}

.btn-warning:active {
  transform: translateY(0);
}

/* 响应式处理 */
@media (max-width: 768px) {
  .modal-large {
    max-width: 95%;
    margin: 10px;
  }
  
  .import-options {
    flex-direction: column;
    gap: 12px;
  }
  
  .import-actions {
    flex-direction: column;
  }
  
  .summary-stats {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

/* 用户须知模态框样式 */
.welcome-notice-content {
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
}

.welcome-header {
  text-align: center;
  background: linear-gradient(135deg, #4285f4 0%, #34a853 100%);
  color: white;
  padding: 30px 30px 20px;
  border-radius: 16px 16px 0 0;
  margin: -1px -1px 0 -1px;
  position: relative;
  overflow: hidden;
}

.welcome-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(255,255,255,0.1) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.1) 75%, transparent 75%);
  background-size: 20px 20px;
  animation: stripes 20s linear infinite;
  opacity: 0.3;
}

@keyframes stripes {
  0% { transform: translateX(0); }
  100% { transform: translateX(20px); }
}

.welcome-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}

.welcome-icon {
  font-size: 32px;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

.welcome-header h2 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 1;
}

.welcome-subtitle {
  margin: 10px 0 0;
  font-size: 14px;
  opacity: 0.9;
  position: relative;
  z-index: 1;
}

.welcome-body {
  padding: 30px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
}

[data-theme="dark"] .welcome-body {
  background: rgba(31, 41, 55, 0.98);
  color: #e5e7eb;
}

.welcome-body .notice-content {
  max-height: 400px;
  overflow-y: auto;
  padding-right: 10px;
}

.welcome-body .notice-section {
  margin-bottom: 25px;
  padding: 20px;
  background: rgba(248, 250, 252, 0.8);
  border-radius: 12px;
  border-left: 4px solid #4285f4;
  position: relative;
  transition: all 0.3s ease;
}

[data-theme="dark"] .welcome-body .notice-section {
  background: rgba(55, 65, 81, 0.6);
  border-left-color: #60a5fa;
}

.welcome-body .notice-section:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 12px rgba(66, 133, 244, 0.1);
}

.welcome-body .notice-section:nth-child(2) {
  border-left-color: #fbbc04;
}

.welcome-body .notice-section:nth-child(3) {
  border-left-color: #ea4335;
}

.welcome-body .notice-section:nth-child(4) {
  border-left-color: #34a853;
}

.welcome-body .notice-section:nth-child(5) {
  border-left-color: #9c27b0;
}

.welcome-body .notice-section h4 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
  display: flex;
  align-items: center;
  gap: 8px;
}

[data-theme="dark"] .welcome-body .notice-section h4 {
  color: #f9fafb;
}

.welcome-body .notice-section ul {
  margin: 0;
  padding-left: 18px;
  list-style: none;
}

.welcome-body .notice-section li {
  margin-bottom: 8px;
  position: relative;
  padding-left: 20px;
  line-height: 1.5;
  color: #4b5563;
}

[data-theme="dark"] .welcome-body .notice-section li {
  color: #d1d5db;
}

.welcome-body .notice-section li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: #4285f4;
  font-weight: bold;
  font-size: 16px;
}

.welcome-body .notice-section li strong {
  color: #1f2937;
  font-weight: 600;
}

[data-theme="dark"] .welcome-body .notice-section li strong {
  color: #f3f4f6;
}

.welcome-body .feedback-section {
  border-left-color: #6366f1 !important;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
}

[data-theme="dark"] .welcome-body .feedback-section {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
}

.welcome-body .feedback-section p {
  margin: 8px 0;
  color: #6b7280;
  line-height: 1.6;
}

[data-theme="dark"] .welcome-body .feedback-section p {
  color: #9ca3af;
}

.welcome-footer {
  padding: 20px 30px 30px;
  background: rgba(248, 250, 252, 0.8);
  border-radius: 0 0 16px 16px;
  text-align: center;
  border-top: 1px solid rgba(229, 231, 235, 0.5);
}

[data-theme="dark"] .welcome-footer {
  background: rgba(31, 41, 55, 0.8);
  border-top-color: rgba(75, 85, 99, 0.5);
}

.welcome-footer .btn-large {
  padding: 15px 40px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 12px;
  background: linear-gradient(135deg, #4285f4 0%, #34a853 100%);
  border: none;
  color: white;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
  position: relative;
  overflow: hidden;
}

.welcome-footer .btn-large::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s;
}

.welcome-footer .btn-large:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 20px rgba(66, 133, 244, 0.4);
}

.welcome-footer .btn-large:hover::before {
  width: 120%;
  height: 120%;
}

.welcome-footer .btn-large:active {
  transform: translateY(0) scale(0.98);
}

/* 特殊处理：不能关闭的模态框 */
.modal-no-close {
  pointer-events: auto;
}

.modal-no-close .modal-content {
  position: relative;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .welcome-notice-content {
    max-width: 95%;
    margin: 20px;
    max-height: 85vh;
  }
  
  .welcome-header {
    padding: 25px 20px 15px;
  }
  
  .welcome-header h2 {
    font-size: 24px;
  }
  
  .welcome-body {
    padding: 20px;
  }
  
  .welcome-body .notice-section {
    padding: 15px;
    margin-bottom: 20px;
  }
  
  .welcome-footer {
    padding: 15px 20px 25px;
  }
  
  .welcome-footer .btn-large {
    padding: 12px 30px;
    font-size: 15px;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .welcome-header h2 {
    font-size: 22px;
  }
  
  .welcome-icon {
    font-size: 28px;
  }
  
  .welcome-body .notice-section h4 {
    font-size: 15px;
  }
  
  .welcome-body .notice-section {
    padding: 12px;
  }
}