* { box-sizing: border-box; margin: 0; padding: 0; }

/* 分页控件样式 */
.pagination-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: #ffffff;
  border: 1px solid #e0e4e7;
  border-top: none;
  border-radius: 0 0 8px 8px;
  margin-top: 0;
  flex-wrap: wrap;
  gap: 12px;
}

.pagination-info {
  font-size: 0.9em;
  color: #666;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pagination-btn {
  padding: 6px 12px;
  border: 1px solid #ddd;
  background: #fff;
  color: #333;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85em;
  transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
  background: #f0f0f0;
  border-color: #ccc;
}

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

.pagination-btn.active {
  background: #2196F3;
  color: white;
  border-color: #2196F3;
}

.pagination-numbers {
  display: flex;
  gap: 4px;
  align-items: center;
}

.pagination-size {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9em;
  color: #666;
}

.page-size-select {
  padding: 4px 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.85em;
  background: white;
}
body { 
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; 
  margin: 0; 
  padding: 0; 
  background: #f8f9fa; 
  line-height: 1.4; 
}

/* 顶部导航栏 */
.navbar {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 12px 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.navbar-brand {
  font-size: 1.3em;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.navbar-wallet {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* 钱包连接按钮 - 顶部导航版本 */
.navbar-wallet-btn {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  color: white;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 0.85em;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}
.navbar-wallet-btn:hover {
  background: rgba(255,255,255,0.25);
  border-color: rgba(255,255,255,0.35);
}
.navbar-wallet-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.wallet-info {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8em;
}
.wallet-address {
  font-family: monospace;
  background: rgba(255,255,255,0.15);
  padding: 2px 6px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.9em;
}
.network-badge {
  background: rgba(76,175,80,0.8);
  padding: 1px 6px;
  border-radius: 8px;
  font-size: 0.75em;
}
.disconnect-btn {
  background: rgba(244,67,54,0.8);
  border: none;
  color: white;
  padding: 2px 6px;
  border-radius: 8px;
  font-size: 0.75em;
  cursor: pointer;
  transition: background 0.2s ease;
}
.disconnect-btn:hover {
  background: rgba(244,67,54,1);
}

.container { 
  max-width: 1200px; 
  margin: 0 auto; 
  background: white; 
  border-radius: 0; 
  box-shadow: none; 
  overflow: hidden; 
  padding: 16px;
}
.header { 
  margin: 0 0 20px 0; 
  padding: 20px; 
  background: white; 
  color: #2c3e50; 
  font-size: 1.1em; 
  text-align: center; 
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.loading { text-align: center; padding: 20px; color: #666; font-size: 0.9em; }
.error { background: #ffe6e6; border: 1px solid #ffb3b3; color: #d63384; padding: 12px; margin: 10px; border-radius: 4px; font-size: 0.9em; }

/* 表格样式 */
.table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; min-width: 800px; font-size: 0.9em; }

/* 趋势图标样式 */
.trend {
  font-size: 0.8em;
  margin-left: 4px;
  opacity: 0.8;
  cursor: help;
}
td, th { border: 1px solid #e9ecef; padding: 8px; text-align: left; vertical-align: middle; }
th { background: #f8f9fa; font-weight: 600; color: #495057; white-space: nowrap; }
tr:nth-child(even) { background: #f8f9fa; }
tr:hover { background: #e3f2fd; }
.collateral { 
  background: #e3f2fd; 
  padding: 4px 8px; 
  border-radius: 6px; 
  font-size: 0.8em; 
  font-weight: 600; 
  color: #1976d2; 
  white-space: nowrap; 
}
.time { font-family: monospace; font-size: 0.8em; }
.section-title { 
  margin: 20px 0 10px 0; 
  padding: 10px; 
  background: #f8f9fa; 
  border-left: 4px solid #2196f3; 
  font-weight: 600; 
}

/* 计算器样式 */
.calculator-container { background: #f8f9fa; padding: 20px; border-radius: 8px; margin: 20px 0; }
.calculator-inputs { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin-bottom: 20px; }
.input-group { display: flex; flex-direction: column; }
.input-group label { font-weight: 500; margin-bottom: 4px; color: #444; font-size: 0.85em; }
.input-group input, .input-group select { padding: 8px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; }
.input-group input:focus, .input-group select:focus { outline: none; border-color: #2196f3; box-shadow: 0 0 0 2px rgba(33,150,243,0.2); }
.calculate-button { background: #4caf50; color: white; padding: 12px 24px; border: none; border-radius: 4px; font-size: 16px; font-weight: 600; cursor: pointer; transition: all 0.2s ease; grid-column: 1/-1; justify-self: center; }
.calculate-button:hover { background: #45a049; }
.calculate-button:disabled { background: #bdc3c7; cursor: not-allowed; }

/* 结果展示样式 */
.results { background: white; padding: 15px; border-radius: 4px; margin-top: 15px; display: none; border: 1px solid #ddd; }
.results-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 15px; }
.result-item { text-align: center; padding: 10px; background: #f8f9fa; border-radius: 4px; }
.result-value { font-size: 1.2em; font-weight: bold; color: #2c3e50; }
.result-label { font-size: 0.8em; color: #666; margin-top: 3px; }

/* 价格显示样式（精简为细行） */
.prices-grid { display: flex; gap: 14px; margin: 6px 0; align-items: baseline; padding-left: 8px; }
.price-item { background: transparent; border: none; padding: 0; display: inline-flex; gap: 6px; align-items: baseline; }
.price-token { font-weight: 600; color: #2c3e50; font-size: 0.85em; letter-spacing: 0.2px; }
.price-value { font-size: 0.85em; font-weight: 600; color: #27ae60; }
.price-time { display:none; }

/* 轮次详情表格 */
.rounds-table { margin-top: 15px; display: none; }
.rounds-table table { font-size: 0.85em; }
.show-rounds-btn { background: #607d8b; color: white; padding: 8px 16px; border: none; border-radius: 4px; font-size: 0.9em; cursor: pointer; margin: 10px 0; transition: all 0.2s ease; }
.show-rounds-btn:hover { background: #455a64; }

/* 钱包连接样式 */
.wallet-section { 
  background: white; 
  border-radius: 8px; 
  padding: 16px; 
  margin-bottom: 20px; 
  border: 1px solid #e0e0e0; 
}
.wallet-connect-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.wallet-connect-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}
.wallet-connect-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
}
.wallet-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8f9fa;
  padding: 12px 16px;
  border-radius: 6px;
  margin-top: 10px;
}
.wallet-address {
  font-family: monospace;
  font-size: 0.9em;
  color: #495057;
}
.wallet-disconnect-btn {
  background: #dc3545;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.85em;
  cursor: pointer;
  transition: background 0.2s ease;
}
.wallet-disconnect-btn:hover {
  background: #c82333;
}
.network-info {
  font-size: 0.8em;
  color: #6c757d;
  margin-top: 8px;
}
.network-switch-btn {
  background: #ffc107;
  color: #000;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75em;
  cursor: pointer;
  margin-left: 8px;
}

/* 闪电贷功能样式 */
.flash-loan-container {
  background: white;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 24px;
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.flash-loan-info {
  margin-bottom: 20px;
}

.testnet-warning {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  color: #856404;
  padding: 12px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
}

.switch-testnet-btn {
  background: #ffc107;
  color: #000;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.85em;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.2s ease;
}

.switch-testnet-btn:hover {
  background: #e0a800;
}

.flash-loan-dashboard {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.dashboard-section {
  background: #f8f9fa;
  padding: 16px;
  border-radius: 6px;
  border: 1px solid #e9ecef;
}

.balance-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.balance-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.balance-label {
  font-size: 0.85em;
  color: #666;
  font-weight: 500;
}

.balance-value {
  font-family: monospace;
  font-weight: 600;
  color: #333;
  font-size: 0.95em;
}

.action-group {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e9ecef;
}

.action-group:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.button-group {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.action-btn {
  padding: 8px 16px;
  border-radius: 6px;
  border: none;
  font-size: 0.85em;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 100px;
}

.refresh-btn {
  background: #6c757d;
  color: white;
  width: 100%;
}

.refresh-btn:hover {
  background: #5a6268;
}

.approve-btn {
  background: #fd7e14;
  color: white;
}

.approve-btn:hover {
  background: #e8680a;
}

.deposit-btn {
  background: #198754;
  color: white;
}

.deposit-btn:hover {
  background: #157347;
}

.execute-btn {
  background: #0d6efd;
  color: white;
  width: 100%;
}

.execute-btn:hover {
  background: #0b5ed7;
}

.withdraw-btn {
  background: #dc3545;
  color: white;
  width: 100%;
}

.withdraw-btn:hover {
  background: #bb2d3b;
}

.action-btn:disabled {
  background: #6c757d;
  cursor: not-allowed;
  opacity: 0.6;
}

/* 数据过滤器样式 */
.filters-container {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  border: 1px solid #e9ecef;
}

/* 第一行：基础筛选器 */
.filters-row-basic {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 16px;
  align-items: end;
  margin-bottom: 16px;
}

/* 第二行：多选筛选器 */
.filters-row-multiselect {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-group label {
  font-size: 0.85em;
  font-weight: 600;
  color: #495057;
  margin: 0;
}

.search-input, .filter-select {
  padding: 10px 12px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 0.9em;
  transition: all 0.2s ease;
  background: white;
}

.search-input:focus, .filter-select:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.search-input::placeholder {
  color: #6c757d;
  font-style: italic;
}

/* 可搜索下拉框组件 */
.searchable-select {
  position: relative;
  display: flex;
  align-items: center;
}

.searchable-input {
  flex: 1;
  padding: 10px 32px 10px 12px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 0.9em;
  transition: all 0.2s ease;
  background: white;
  cursor: pointer;
}

.searchable-input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
  cursor: text;
}

.searchable-input::placeholder {
  color: #6c757d;
  font-style: italic;
}

.dropdown-arrow {
  position: absolute;
  right: 12px;
  color: #6c757d;
  pointer-events: none;
  font-size: 0.8em;
  transition: transform 0.2s ease;
}

.searchable-select.open .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 2px solid #007bff;
  border-radius: 8px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.searchable-select.open .dropdown-options {
  display: block;
}

.dropdown-option {
  padding: 10px 12px;
  cursor: pointer;
  transition: background-color 0.15s ease;
  border-bottom: 1px solid #f1f3f4;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dropdown-option:last-child {
  border-bottom: none;
}

.dropdown-option:hover {
  background-color: #f8f9fa;
}

.dropdown-option.selected {
  background-color: #e3f2fd;
  color: #1976d2;
  font-weight: 500;
}

.dropdown-option.highlighted {
  background-color: #e7f3ff;
}

.token-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7em;
  font-weight: bold;
  color: #666;
}

.option-clear {
  font-style: italic;
  color: #6c757d;
}

/* 滚动条样式 */
.dropdown-options::-webkit-scrollbar {
  width: 6px;
}

.dropdown-options::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.dropdown-options::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.dropdown-options::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

.quick-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.quick-filter-btn {
  background: white;
  border: 1.5px solid #dee2e6;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.8em;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
}

.quick-filter-btn:hover {
  border-color: #007bff;
  color: #007bff;
  background: #f8f9ff;
}

.quick-filter-btn.active {
  background: #007bff;
  color: white;
  border-color: #007bff;
}

.results-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: #e3f2fd;
  border-radius: 8px;
  border-left: 4px solid #2196f3;
}

.results-count {
  font-weight: 600;
  color: #1976d2;
}

.clear-filters-btn {
  background: transparent;
  border: 1px solid #6c757d;
  color: #6c757d;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8em;
  cursor: pointer;
  transition: all 0.2s ease;
}

.clear-filters-btn:hover {
  background: #6c757d;
  color: white;
}

/* 表格增强样式 */
.enhanced-table-container {
  position: relative;
}

.table-row-hidden {
  display: none !important;
}

.no-results {
  text-align: center;
  padding: 40px 20px;
  color: #6c757d;
  font-style: italic;
}

.no-results-icon {
  font-size: 2em;
  margin-bottom: 12px;
  opacity: 0.5;
}

/* 表格内容优化样式 */
.chain-badge {
  background: #e9ecef;
  color: #495057;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.8em;
  font-weight: 500;
}

.chain-ethereum {
  background: #627eea;
  color: white;
}

.chain-arbitrum {
  background: #28a0f0;
  color: white;
}

.chain-bsc {
  background: #f0b90b;
  color: #000;
}

.collateral-badge {
  background: #f8f9fa;
  color: #6c757d;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.85em;
  font-weight: 500;
  border: 1px solid #e9ecef;
}

.asset-cell {
  font-weight: 600;
  color: #212529;
}

.rate-cell {
  display: flex;
  align-items: center;
  gap: 4px;
}

.rate-value {
  font-weight: 600;
}

.trend-icon {
  font-size: 0.9em;
}

.borrow-btn {
  background: #007bff;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8em;
  cursor: pointer;
  transition: background 0.2s ease;
}

.borrow-btn:hover {
  background: #0056b3;
}

.no-link {
  color: #6c757d;
  font-style: italic;
}

/* 移动端优化 */
@media (max-width: 768px) {
  body { padding: 8px; }
  .header { font-size: 1.2em; padding: 16px; }
  .table-container::after { content: '👈 Scroll horizontally to see more'; position: sticky; right: 0; bottom: 0; background: rgba(255,193,7,0.9); color: #000; padding: 4px 8px; font-size: 0.7em; border-radius: 4px 0 0 0; pointer-events: none; }
  table { font-size: 0.8em; min-width: 900px; }
  td, th { padding: 6px 4px; }
  .wallet-info { flex-direction: column; gap: 8px; align-items: flex-start; }
  .wallet-address { word-break: break-all; }
  
  .flash-loan-dashboard {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .balance-grid {
    grid-template-columns: 1fr;
  }
  
  .button-group {
    flex-direction: column;
  }
  
  .testnet-warning {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }

  .filters-container {
    padding: 16px;
    margin-bottom: 16px;
  }

  .filters-row-basic,
  .filters-row-multiselect {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .filters-row-basic {
    margin-bottom: 12px;
  }

  .quick-filters {
    justify-content: flex-start;
  }

  .results-summary {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
    padding: 12px;
  }
}

/* 表格行交互样式 */
.table-row-clickable {
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.table-row-clickable:hover {
  background-color: #f8f9fa;
}

.table-row-clickable.selected-row {
  background-color: #e3f2fd;
  border-left: 4px solid #2196f3;
}

/* 动作按钮样式 */
.actions-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.calc-btn {
  background: linear-gradient(135deg, #4CAF50, #45a049);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 6px 8px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
  min-width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.calc-btn:hover {
  background: linear-gradient(135deg, #45a049, #4CAF50);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(76, 175, 80, 0.3);
}

.calc-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(76, 175, 80, 0.3);
}

/* 禁用状态的计算按钮 */
.calc-btn-disabled {
  background: #6c757d;
  color: #adb5bd;
  border: none;
  border-radius: 6px;
  padding: 6px 8px;
  cursor: not-allowed;
  font-size: 14px;
  min-width: 32px;
  height: 32px;
  transition: none;
  opacity: 0.6;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 选择反馈提示 */
.selection-feedback {
  position: fixed;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, #4CAF50, #45a049);
  color: white;
  padding: 12px 18px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 10000;
  animation: slideInRight 0.3s ease, fadeOut 0.3s ease 2.7s forwards;
  max-width: 300px;
  font-size: 14px;
  font-weight: 500;
}

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

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

/* 可排序表头样式 */
.sortable {
  cursor: pointer;
  user-select: none;
  position: relative;
  transition: background-color 0.2s ease;
}

.sortable:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.sort-indicator {
  font-size: 0.8em;
  color: #2196f3;
  margin-left: 4px;
}

/* 确保排序指示器在表头中正确显示 */
th.sortable {
  padding-right: 20px;
}

/* DBI信息图标样式 */
.dbi-info-icon {
  display: inline-block;
  margin-left: 8px;
  width: 20px;
  height: 20px;
  background: #2196F3;
  color: white;
  border-radius: 50%;
  text-align: center;
  line-height: 20px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  vertical-align: middle;
  font-style: normal;
}

.dbi-info-icon:hover {
  background: #1976D2;
  transform: scale(1.1);
  box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
}

/* 模态框样式 */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(3px);
}

.modal-content {
  background-color: white;
  margin: 5% auto;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  width: 90%;
  max-width: 500px;
  position: relative;
  animation: modalSlideIn 0.3s ease;
}

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

.modal .close {
  position: absolute;
  right: 15px;
  top: 15px;
  color: #aaa;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.2s ease;
}

.modal .close:hover,
.modal .close:focus {
  color: #333;
  text-decoration: none;
}

/* 多选组件样式 */
.multi-select {
  position: relative;
  width: 100%;
}

.multi-select-display {
  position: relative;
  min-height: 42px;
  padding: 8px 32px 8px 12px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  background: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  transition: border-color 0.15s ease;
}

.multi-select-display:hover {
  border-color: #007bff;
}

.multi-select.open .multi-select-display {
  border-color: #007bff;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.multi-select-display .placeholder {
  color: #999;
  font-size: 14px;
  flex: 1;
}

.multi-select-display.has-selection .placeholder {
  display: none;
}

.selected-tag {
  display: inline-flex;
  align-items: center;
  background: #e3f2fd;
  color: #1976d2;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  gap: 4px;
}

.selected-tag .remove {
  cursor: pointer;
  font-weight: bold;
  margin-left: 2px;
}

.selected-tag .remove:hover {
  color: #d32f2f;
}

.multi-select-display .dropdown-arrow {
  position: absolute;
  right: 12px;
  font-size: 12px;
  color: #666;
  transition: transform 0.15s ease;
  pointer-events: none;
}

.multi-select.open .dropdown-arrow {
  transform: rotate(180deg);
}

.multi-select-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 2px solid #007bff;
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 300px;
  z-index: 1000;
  display: none;
  overflow: hidden;
}

.multi-select.open .multi-select-dropdown {
  display: block;
}

.multi-select-search {
  padding: 8px;
  border-bottom: 1px solid #e9ecef;
}

.multi-select-search-input {
  width: 100%;
  padding: 8px;
  border: 1px solid #e9ecef;
  border-radius: 4px;
  font-size: 14px;
}

.multi-select-search-input:focus {
  outline: none;
  border-color: #007bff;
}

.multi-select-categories {
  display: flex;
  gap: 4px;
  padding: 8px;
  border-bottom: 1px solid #e9ecef;
  background: #f8f9fa;
}

.category-btn {
  padding: 4px 8px;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  background: white;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.15s ease;
}

.category-btn:hover {
  background: #e9ecef;
}

.category-btn.active {
  background: #007bff;
  color: white;
  border-color: #007bff;
}

.clear-btn {
  padding: 4px 8px;
  border: 1px solid #dc3545;
  border-radius: 4px;
  background: white;
  color: #dc3545;
  cursor: pointer;
  font-size: 12px;
  margin-left: auto;
}

.clear-btn:hover {
  background: #dc3545;
  color: white;
}

.multi-select-options {
  max-height: 200px;
  overflow-y: auto;
}

.multi-select-option {
  padding: 8px 12px;
  cursor: pointer;
  transition: background-color 0.15s ease;
  border-bottom: 1px solid #f1f3f4;
  display: flex;
  align-items: center;
  font-size: 14px;
  gap: 8px;
}

.multi-select-option:hover {
  background-color: #f8f9fa;
}

.multi-select-option.selected {
  background-color: #e3f2fd;
  color: #1976d2;
}

.multi-select-option:last-child {
  border-bottom: none;
}

.multi-select-option .checkbox {
  width: 16px;
  height: 16px;
  border: 2px solid #dee2e6;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.multi-select-option.selected .checkbox {
  background: #007bff;
  border-color: #007bff;
  color: white;
}

.multi-select-option .checkbox::after {
  content: '✓';
  font-size: 10px;
  opacity: 0;
}

.multi-select-option.selected .checkbox::after {
  opacity: 1;
}

.multi-select-option.no-results {
  color: #999;
  font-style: italic;
  cursor: default;
}

.multi-select-option.no-results:hover {
  background-color: transparent;
}

/* 多选组件滚动条样式 */
.multi-select-options::-webkit-scrollbar {
  width: 6px;
}

.multi-select-options::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.multi-select-options::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.multi-select-options::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}
