/* 基础变量与重置 */
:root {
    --bg-primary-color: #ffffff;
    --bg-secondary-color: #f8f9fa;
    --bg-tertiary-color: #e9ecef;
    --text-primary-color: #212529;
    --text-secondary-color: #6c757d;
    --accent-color: #4361ee;
    --border-color: #dee2e6;
  }
  
  .dark-mode {
    --bg-primary-color: #1a1a1a;
    --bg-secondary-color: #2d2d2d;
    --bg-tertiary-color: #3d3d3d;
    --text-primary-color: #f8f9fa;
    --text-secondary-color: #adb5bd;
    --accent-color: #4895ef;
    --border-color: #495057;
  }
  
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--text-primary-color);
    background-color: var(--bg-primary-color);
    transition: background-color 0.3s, color 0.3s;
  }
  
  /* 布局容器 */
  .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  @media (min-width: 768px) {
    .container {
      grid-template-columns: 1fr 1fr;
    }
    
    .card:first-child,
    .card:nth-child(4) {
      grid-column: span 2;
    }
  }
  
  /* 卡片样式 */
  .card {
    background: var(--bg-secondary-color);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
  }
  
  .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  }
  
  .card h2 {
    margin-bottom: 1rem;
    color: var(--accent-color);
    font-size: 1.4rem;
  }
  
  /* 头部样式 */
  header {
    grid-column: span 2;
    text-align: center;
    margin-bottom: 1rem;
  }
  
  header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--accent-color), #4a6cf7);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
  
  .header-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
  }
  
  .header-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.2s;
  }
  
  .header-link:hover {
    background-color: rgba(67, 97, 238, 0.1);
    text-decoration: none;
  }
  
  /* 文件上传区域 */
  .file-input {
    padding: 2.5rem 1rem;
    text-align: center;
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    background-color: var(--bg-secondary-color);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    width: 100%;
  }
  
  .file-input::before {
    content: "点击或拖放文件到这里";
    display: block;
    font-size: 1.1rem;
    color: var(--text-secondary-color);
    margin-bottom: 0.5rem;
  }
  
  .file-input:hover {
    border-color: var(--accent-color);
    background-color: var(--bg-tertiary-color);
  }
  
  /* 表格样式 */
  .table-container {
    max-height: 400px;
    overflow-y: auto;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
  }
  
  table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
  }
  
  th, td {
    padding: 0.75rem 1rem;
    text-align: left;
  }
  
  th {
    background: linear-gradient(to bottom, var(--bg-secondary-color), var(--bg-tertiary-color));
    color: var(--text-primary-color);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 10;
  }
  
  td {
    background: var(--bg-primary-color);
    border-top: 1px solid var(--border-color);
  }
  
  tr:last-child td {
    border-bottom: none;
  }
  
  tr:hover td {
    background-color: var(--bg-tertiary-color);
  }
  
  /* 状态标签 */
  .status-cell span {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    color: white;
  }
  
  .status-processing {
    background: linear-gradient(135deg, #64b5f6, #2196f3);
    animation: pulse 1.5s infinite;
  }
  
  .status-done {
    background: linear-gradient(135deg, #81c784, #4caf50);
  }
  
  .status-error {
    background: linear-gradient(135deg, #e57373, #f44336);
  }
  
  @keyframes pulse {
    0% { opacity: 0.9; }
    50% { opacity: 0.6; }
    100% { opacity: 0.9; }
  }
  
  /* 表单元素 */
  .form-grid {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 1rem;
    align-items: center;
  }
  
  label {
    font-weight: 500;
    color: var(--text-primary-color);
  }
  
  select, input[type="number"], input[type="range"] {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: var(--bg-primary-color);
    color: var(--text-primary-color);
    transition: border-color 0.2s;
  }
  
  select:focus, input[type="number"]:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(67, 97, 238, 0.2);
  }
  
  .short-input {
    width: 80px;
  }
  
  input[type="range"] {
    -webkit-appearance: none;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    flex-grow: 1;
    margin-right: 0.75rem;
  }
  
  input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: var(--accent-color);
    border-radius: 50%;
    cursor: pointer;
  }
  
  /* 按钮区域 */
  .action-bar {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
  }
  
  button, .accent-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
  }
  
  .accent-btn {
    background: linear-gradient(135deg, var(--accent-color), #4a6cf7);
    color: white;
    box-shadow: 0 4px 6px rgba(74, 108, 247, 0.2);
  }
  
  .accent-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(74, 108, 247, 0.3);
  }
  
  button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
  }
  
  /* 进度条 */
  .progress-container {
    margin-top: 1.5rem;
  }
  
  .progress-container label {
    display: block;
    margin-bottom: 0.5rem;
  }
  
  progress {
    width: 100%;
    height: 10px;
    border-radius: 10px;
    overflow: hidden;
    border: none;
    background-color: var(--bg-tertiary-color);
  }
  
  progress::-webkit-progress-bar {
    background-color: transparent;
    border-radius: 10px;
  }
  
  progress::-webkit-progress-value {
    background: linear-gradient(90deg, var(--accent-color), #6c5ce7);
    border-radius: 10px;
    transition: width 0.3s ease;
  }
  
  #batch-status-label {
    display: block;
    margin-top: 0.5rem;
    font-style: italic;
    color: var(--text-secondary-color);
  }
  
  /* 页脚 */
  footer {
    grid-column: span 2;
    text-align: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary-color);
    font-size: 0.9rem;
  }
  
  /* 暗色模式调整 */
  .dark-mode .file-input {
    border-color: #444;
  }
  
  .dark-mode input[type="range"] {
    background: #444;
  }
  
  .dark-mode th {
    background: linear-gradient(to bottom, #2d2d2d, #3d3d3d);
  }