/* 全局变量定义 */
:root {
  --bg-color: #f8fafc;
  --surface-color: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --text-tertiary: #94a3b8;
  --border-color: #e2e8f0;
  --primary-color: #3b82f6;
  --primary-hover: #2563eb;
  --nav-bg: rgba(255, 255, 255, 0.85);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --sidebar-width: 240px;
  --navbar-height: 64px;
}

[data-theme="dark"] {
  --bg-color: #0f172a;
  --surface-color: #1e293b;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-tertiary: #64748b;
  --border-color: #334155;
  --primary-color: #60a5fa;
  --primary-hover: #3b82f6;
  --nav-bg: rgba(30, 41, 59, 0.85);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

/* 重置与基础样式 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.5;
  transition: background-color 0.3s ease, color 0.3s ease;
}

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

/* 顶部导航栏 */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--navbar-height);
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 100;
}

.navbar-container {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 24px;
  max-width: 1440px;
  margin: 0 auto;
}

.navbar-left {
  display: flex;
  align-items: center;
  width: 240px;
  flex-shrink: 0;
}

.navbar-center {
  flex: 1;
  display: flex;
  justify-content: center;
}

.navbar-right {
  display: flex;
  align-items: center;
  width: 240px;
  justify-content: flex-end;
  flex-shrink: 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
}

.logo img {
  height: 32px;
  width: auto;
  object-fit: contain;
}

.logo i {
  font-size: 28px;
}

.search-box {
  position: relative;
  width: 400px;
  max-width: 100%;
}

.search-box i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  font-size: 18px;
}

.search-box input {
  width: 100%;
  padding: 10px 16px 10px 40px;
  border-radius: 9999px;
  border: 1px solid var(--border-color);
  background-color: var(--surface-color);
  color: var(--text-primary);
  font-size: 14px;
  transition: all 0.2s;
  outline: none;
}

.search-box input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.icon-btn {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-btn:hover {
  background-color: var(--border-color);
}

/* 主体布局 */
.main-layout {
  display: flex;
  max-width: 1440px;
  margin: 0 auto;
  padding-top: var(--navbar-height);
  min-height: 100vh;
}

/* 侧边栏 */
.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  padding: 24px 16px;
  border-right: 1px solid var(--border-color);
  position: sticky;
  top: var(--navbar-height);
  height: calc(100vh - var(--navbar-height));
  overflow-y: auto;
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-weight: 500;
  transition: all 0.2s;
  cursor: pointer;
}

.menu-item:hover {
  background-color: var(--border-color);
  color: var(--text-primary);
}

.menu-item.active {
  background-color: rgba(59, 130, 246, 0.1);
  color: var(--primary-color);
}

.menu-item i {
  font-size: 20px;
}

/* 主内容区 */
.content {
  flex: 1;
  padding: 32px;
  min-width: 0;
}

.content-header {
  margin-bottom: 24px;
}

.breadcrumbs {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.subcategories {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.sub-tag {
  padding: 6px 16px;
  border-radius: 9999px;
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.sub-tag:hover {
  border-color: var(--text-secondary);
}

.sub-tag.active {
  background-color: var(--text-primary);
  color: var(--bg-color);
  border-color: var(--text-primary);
}

/* 软件列表网格 */
.software-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.software-card {
  background-color: var(--surface-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  overflow: hidden;
}

.software-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(59, 130, 246, 0.3);
}

.card-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.software-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  object-fit: cover;
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--primary-color);
}

.software-info {
  flex: 1;
  min-width: 0;
}

.software-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.software-meta {
  font-size: 12px;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.software-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.card-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: auto;
}

.download-btn {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background-color 0.2s;
}

.download-btn:hover {
  background-color: var(--primary-hover);
}

/* 状态展示 */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 0;
  color: var(--text-tertiary);
}

.empty-state i {
  font-size: 48px;
  margin-bottom: 16px;
}

/* 分页 */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
}

.page-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  background-color: var(--surface-color);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.page-btn:hover:not(:disabled) {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.page-btn.active {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .navbar-container {
    padding: 0 16px;
  }
  .search-box {
    display: none; /* 移动端隐藏搜索框或改为点击图标展开 */
  }
  .main-layout {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    height: auto;
    position: static;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    padding: 16px;
  }
  .sidebar-menu {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 8px;
  }
  .menu-item {
    flex-shrink: 0;
  }
}

/* ================= 后台管理仪表盘样式 ================= */

.admin-body {
  background-color: #f4f7fe;
  display: flex;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
}

[data-theme="dark"] .admin-body {
  background-color: #0b0f19;
}

/* 侧边栏 */
.admin-sidebar {
  width: 260px;
  background-color: var(--surface-color);
  display: flex;
  flex-direction: column;
  padding: 32px 24px;
  border-right: 1px solid var(--border-color);
  position: fixed;
  height: 100vh;
  top: 0;
  left: 0;
  z-index: 100;
}

.admin-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 24px;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 48px;
  padding-left: 8px;
}

.admin-logo img {
  height: 36px;
  width: auto;
  object-fit: contain;
}

.admin-logo i {
  font-size: 32px;
}

.admin-menu-group {
  margin-bottom: 32px;
}

.menu-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
  padding-left: 8px;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 15px;
  transition: all 0.3s ease;
}

.admin-nav-item:hover {
  background-color: rgba(59, 130, 246, 0.05);
  color: var(--primary-color);
}

.admin-nav-item.active {
  background-color: var(--primary-color);
  color: white;
  box-shadow: 0 10px 20px -10px rgba(59, 130, 246, 0.5);
}

.admin-nav-item i {
  font-size: 22px;
}

.admin-sidebar-footer {
  margin-top: auto;
}

.text-danger {
  color: #ef4444;
}
.text-danger:hover {
  background-color: rgba(239, 68, 68, 0.05);
  color: #dc2626;
}

/* 主内容区 */
.admin-main {
  flex: 1;
  margin-left: 260px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* 顶部栏 */
.admin-topbar {
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  background-color: transparent;
  position: sticky;
  top: 0;
  z-index: 90;
  backdrop-filter: blur(10px);
}

.admin-search {
  position: relative;
  width: 360px;
}

.admin-search i {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  font-size: 20px;
}

.admin-search input {
  width: 100%;
  padding: 14px 20px 14px 50px;
  border-radius: 9999px;
  border: none;
  background-color: var(--surface-color);
  color: var(--text-primary);
  font-size: 14px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
  outline: none;
  transition: all 0.3s;
}

.admin-search input:focus {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.admin-topbar-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.notification-btn {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--surface-color);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.notification-btn .badge {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 8px;
  height: 8px;
  background-color: #ef4444;
  border-radius: 50%;
  border: 2px solid var(--surface-color);
}

.admin-user {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.admin-user .avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background-color: #e2e8f0;
}

.admin-user .username {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
}

/* 内容区 */
.admin-content {
  padding: 0 40px 40px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* 数据卡片 */
.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.dash-card {
  padding: 32px;
  border-radius: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  transition: transform 0.3s;
}

.dash-card:hover {
  transform: translateY(-4px);
}

.blue-card {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
}

.blue-card .card-info h4 {
  color: rgba(255, 255, 255, 0.8);
}

.blue-card .card-icon {
  background-color: rgba(255, 255, 255, 0.2);
  color: white;
}

.white-card {
  background-color: var(--surface-color);
}

.white-card .card-info h4 {
  color: var(--text-secondary);
}

.white-card .card-icon {
  background-color: rgba(59, 130, 246, 0.1);
  color: var(--primary-color);
}

.card-info h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

.card-value {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -1px;
}

.card-icon {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
}

/* 表格卡片 */
.table-card {
  background-color: var(--surface-color);
  border-radius: 24px;
  padding: 32px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

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

.table-card-header h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.primary-btn {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.primary-btn:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.3);
}

/* 无边框表格 */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 800px;
}

.admin-table th {
  text-align: left;
  padding: 16px 24px;
  color: var(--text-tertiary);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-color);
}

.admin-table td {
  padding: 20px 24px;
  vertical-align: middle;
  border-bottom: 1px solid rgba(0,0,0,0.02);
}

[data-theme="dark"] .admin-table td {
  border-bottom: 1px solid rgba(255,255,255,0.02);
}

.admin-table tbody tr {
  transition: all 0.2s;
}

.admin-table tbody tr:hover {
  background-color: rgba(59, 130, 246, 0.02);
}

/* 软件信息列 */
.software-cell {
  display: flex;
  align-items: center;
  gap: 16px;
}

.table-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background-color: rgba(59, 130, 246, 0.1);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

[data-theme="dark"] .table-icon {
  background-color: rgba(96, 165, 250, 0.15);
}

.software-name-cell {
  font-weight: 700;
  font-size: 15px;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.software-version-cell {
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 500;
}

/* 分类列 */
.category-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.category-cell .sub-tag {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-weight: 500;
}

.cat-tag {
  font-size: 11px;
  color: var(--text-tertiary);
  font-weight: 600;
  text-transform: uppercase;
}

/* 状态列 */
.status-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-dot.completed {
  background-color: #10b981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

/* 操作列 */
.action-cell {
  display: flex;
  gap: 8px;
}

.action-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s;
  background: transparent;
}

.edit-btn {
  color: var(--primary-color);
}
.edit-btn:hover {
  background-color: rgba(59, 130, 246, 0.1);
}

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

/* 弹窗及其他通用样式 */
.cancel-btn {
  background-color: var(--bg-color);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.cancel-btn:hover {
  background-color: var(--border-color);
  color: var(--text-primary);
}

/* 弹窗样式优化 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  animation: fadeIn 0.3s forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background-color: var(--surface-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  transform: translateY(20px);
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--surface-color);
  position: sticky;
  top: 0;
  z-index: 10;
}

.modal-header h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.close-btn {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  font-size: 18px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-btn:hover {
  background-color: var(--border-color);
  color: var(--text-primary);
  transform: rotate(90deg);
}

.modal-body {
  padding: 32px;
}

.form-group {
  margin-bottom: 24px;
}

.form-row {
  display: flex;
  gap: 24px;
}

.form-row .form-group {
  flex: 1;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.form-group .required {
  color: #ef4444;
  margin-left: 4px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-size: 14px;
  transition: all 0.2s;
  font-family: inherit;
  outline: none;
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
  border-color: var(--text-tertiary);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary-color);
  background-color: var(--surface-color);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}

/* ================= 确认弹窗与 Toast ================= */
.confirm-content {
  background-color: var(--surface-color);
  border-radius: var(--radius-md);
  width: 100%;
  max-width: 400px;
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow-hover);
  border: 1px solid var(--border-color);
  transform: scale(0.95);
  animation: popIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes popIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.confirm-icon {
  font-size: 48px;
  color: #ef4444;
  margin-bottom: 16px;
}

.confirm-content h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.confirm-content p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.confirm-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.danger-btn {
  background-color: #ef4444;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
}

.danger-btn:hover {
  background-color: #dc2626;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(239, 68, 68, 0.3);
}

/* Toast 提示 */
.toast-container {
  position: fixed;
  top: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast {
  background-color: var(--surface-color);
  color: var(--text-primary);
  padding: 12px 24px;
  border-radius: 9999px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  transform: translateY(-20px);
  opacity: 0;
  animation: toastDropIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast.success i { color: #10b981; font-size: 20px; }
.toast.error i { color: #ef4444; font-size: 20px; }

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

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


