:root {
    --primary-color: #0d6efd;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --primary-light: #eff6ff;    /* 主色浅版 */
    --text-primary: #1e293b;     /* 主文本色 */
    --text-secondary: #64748b;   /* 次文本色 */
    --border-color: #e2e8f0;     /* 边框色 */
    --bg-light: #f8fafc;         /* 浅背景色 */
    --radius-md: 0.75rem;        /* 中等圆角 */
    --radius-sm: 0.5rem;         /* 小圆角 */
    --transition: all 0.2s ease; /* 统一过渡 */
  }
  
  /* -------------------- 基础重置与通用样式 -------------------- */
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: url('/bj.png') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: 56px; /* 为固定导航栏留出空间 */
    padding-bottom: 0;
  }
  
  .container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1.5rem;
    flex: 1;
    position: relative;
    z-index: 1;
  }
  
  /* 左侧面板 */
  .left-panel {
    background: white;
    padding: 1.25rem;
    border-radius: var(--radius-md);
    box-shadow: 0 2px 8px rgba(14, 30, 37, 0.08);
  }
  
  /* 右侧面板 */
  .right-panel {
    background: white;
    padding: 1.25rem;
    border-radius: var(--radius-md);
    box-shadow: 0 2px 8px rgba(14, 30, 37, 0.08);
    max-height: calc(100vh - 140px);
    overflow-y: auto;
  }
  
  /* 标题样式优化 */
  h1 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    grid-column: 1 / -1;
  }
  
  /* 历史记录标题 */
  h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
  }
  
  /* 历史记录项样式优化 */
  .history-item {
    background: #fff;
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px solid rgba(0,0,0,.08);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: auto;
    margin: 0;
  }
  
  .history-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  }
  
  .history-item:last-child {
    border-bottom: none;
  }
  
  .history-item p {
    margin: 0.25rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
  }
  
  /* 历史记录操作按钮容器 */
  .history-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: auto;
  }
  
  .history-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .history-info p {
    margin: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #4b5563;
    font-size: 0.95rem;
  }
  
  .history-info p i {
    color: #6b7280;
    font-size: 1.1rem;
  }
  
  .history-info .filename {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.75rem;
  }
  
  .history-info .status {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    margin-top: 0.5rem;
  }
  
  .history-info .status.completed {
    background-color: #dcfce7;
    color: #166534;
  }
  
  .history-info .status.failed {
    background-color: #fee2e2;
    color: #991b1b;
  }
  
  .history-info .status.downloading {
    background-color: #dbeafe;
    color: #1e40af;
  }
  
  /* 现代化响应式按钮设计 */
  .history-actions a,
  .history-actions button {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
  }
  
  .history-actions a {
    background-color: #22c55e;
    color: white;
    text-decoration: none;
  }
  
  .history-actions a:hover {
    background-color: #16a34a;
    transform: translateY(-1px);
  }
  
  .history-actions button {
    background-color: #ef4444;
    color: white;
    border: none;
    cursor: pointer;
  }
  
  .history-actions button:hover {
    background-color: #dc2626;
    transform: translateY(-1px);
  }
  
  /* 空历史记录提示样式优化 */
  .empty-history {
    text-align: center;
    padding: 3rem 2rem;
    color: #6b7280;
    background: #f9fafb;
    border-radius: 12px;
    margin: 1rem 0;
  }
  
  .empty-history i {
    font-size: 2.5rem;
    color: #9ca3af;
    margin-bottom: 1rem;
  }
  
  .empty-history p {
    font-size: 1.1rem;
    margin: 0;
  }
  
  /* 响应式布局 */
  @media (max-width: 1024px) {
    .container {
      grid-template-columns: 1fr;
      gap: 0.75rem;
    }
  
    .right-panel {
      max-height: none;
    }
  }
  
  /* 平板适配 */
  @media (min-width: 768px) and (max-width: 1024px) {
    .container {
      width: 90%;
    }
  }
  
  /* 手机适配 */
  @media (max-width: 767px) {
    .container {
      margin: 50px auto 40px;
      padding: 0.5rem;
    }
  
    .left-panel, .right-panel {
      padding: 1rem;
    }
  
    h1 {
      font-size: 1.25rem;
      margin-bottom: 0.75rem;
    }
  
    .intro {
      padding: 0.5rem 0.75rem;
      margin-bottom: 0.75rem;
    }
  
    .input-group {
      margin-bottom: 0.75rem;
    }
  
    #urlInput {
      padding: 0.5rem 0.75rem;
      min-height: 60px;
    }
  
    #downloadBtn {
      padding: 0.5rem 1rem;
    }
  
    .history-item {
      padding: 1rem;
    }
  
    .history-actions {
      flex-direction: column;
      gap: 0.5rem;
    }
  
    .history-item a, .history-item .delete-btn {
      width: 100%;
      max-width: none;
    }
  }
  
  /* -------------------- PC端核心样式 -------------------- */
  .intro {
    background: var(--primary-light);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary-color);
    font-size: 0.9rem;
  }
  
  .intro p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
  }
  
  .input-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
  }
  
  #urlInput {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    color: var(--text-primary);
    transition: var(--transition);
    resize: vertical; /* 允许垂直调整大小 */
    min-height: 100px; /* 最小高度 */
  }
  
  #urlInput:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  }
  
  #downloadBtn {
    padding: 1rem 2rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  
  #downloadBtn:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
  }
  
  .progress-bar {
    height: 0.75rem;
    background: #e5e7eb;
    border-radius: 999px;
    margin: 1rem 0;
    overflow: hidden;
    position: relative;
  }
  
  .progress {
    height: 100%;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
    position: relative;
    min-width: 0;
    max-width: 100%;
    width: 0%;
    background-image: linear-gradient(
      45deg,
      rgba(255, 255, 255, 0.15) 25%,
      transparent 25%,
      transparent 50%,
      rgba(255, 255, 255, 0.15) 50%,
      rgba(255, 255, 255, 0.15) 75%,
      transparent 75%,
      transparent
    );
    background-size: 1rem 1rem;
    animation: progress-bar-stripes 1s linear infinite;
  }
  
  @keyframes progress-bar-stripes {
    0% { background-position: 1rem 0; }
    100% { background-position: 0 0; }
  }
  
  .progress-info {
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .progress-info span {
    white-space: nowrap;
  }
  
  /* 状态文本颜色区分 */
  .history-item p:nth-child(3) {  /* 第三条是状态文本 */
    font-weight: 500;
  }
  
  /* 完成状态：绿色 */
  .history-item p:nth-child(3):contains("下载完成") {
    color: #22c55e;
  }
  
  /* 失败状态：红色 */
  .history-item p:nth-child(3):contains("下载失败") {
    color: #ef4444;
  }
  
  /* 异常状态：橙色 */
  .history-item p:nth-child(3):contains("下载异常") {
    color: #f59e0b;
  }
  
  .copyright {
    background: #1e293b;
    padding: 1.25rem 0;
    margin-top: auto;
  }
  
  .copyright p {
    color: #94a3b8;
    text-align: center;
    font-size: 0.85rem;
  }
  
  /* -------------------- 移动端适配（≤768px） -------------------- */
  @media (max-width: 768px) {
    .container {
      width: 95%;
      padding: 1.5rem;
      margin: 1rem auto;
    }
  
    h1 {
      font-size: 1.375rem;
      margin-bottom: 1.5rem;
    }
  
    .intro {
      padding: 1rem 1.25rem;
      margin-bottom: 1.5rem;
    }
  
    .input-group {
      flex-direction: column;
      gap: 0.75rem;
    }
  
    #urlInput {
      padding: 0.875rem 1.125rem;
      font-size: 0.9rem;
    }
  
    #downloadBtn {
      padding: 0.875rem 1.5rem;
      font-size: 0.9rem;
      justify-content: center;
    }
  
    .progress-info {
      flex-direction: column;
      gap: 0.25rem;
      font-size: 0.85rem;
    }
  
    #historyList {
      max-height: 400px;
    }
  
    .history-item {
      padding: 0.75rem;
    }
  
    .history-actions {
      flex-direction: column;
      gap: 0.5rem;
    }
  
    .history-actions .btn {
      width: 100%;
    }
  
    .copyright {
      padding: 1rem 0;
    }
  
    .copyright p {
      font-size: 0.8rem;
    }
  }
  
  /* -------------------- 公共组件样式（保持功能） -------------------- */
  .delete-modal, .input-alert-modal {
    /* 确保新增的取消模态框与删除模态框样式一致 */
    .delete-modal {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      z-index: 1000;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.5);
      justify-content: center;
      align-items: center;
    }
    
    .delete-modal-content {
      background: white;
      padding: 2rem;
      border-radius: var(--radius-md);
      min-width: 300px;
      box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
    }
    
    .delete-modal-actions {
      display: flex;
      gap: 1rem;
      justify-content: flex-end;
      margin-top: 1.5rem;
    }
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background: rgba(30, 41, 59, 0.6);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 1rem;
  }
  
  .delete-modal-content, .input-alert-modal-content {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    min-width: 300px;
    max-width: 400px;
    box-shadow: 0 4px 32px rgba(14, 30, 37, 0.15);
  }
  
  .delete-modal h3, .input-alert-modal h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
  }
  
  .delete-modal p, .input-alert-modal p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
  }
  
  .delete-modal-actions, .input-alert-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
  }
  
  .delete-cancel-btn, .input-alert-confirm-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
  }
  
  .delete-cancel-btn {
    background: #e5e7eb;
    color: var(--text-primary);
  }
  
  .delete-cancel-btn:hover {
    background: #d1d5db;
  }
  
  .delete-confirm-btn {
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
  }
  
  .delete-confirm-btn:hover {
    background: #1d4ed8;
  }
  
  .toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1050;
  }
  
  .toast {
    background-color: #22c55e;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
  }
  
  .toast.show {
    opacity: 1;
  }
  
  .toast-body {
    font-size: 0.95rem;
    font-weight: 500;
  }
  
  /* 顶部固定导航栏 */
  .navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(5px);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    height: 48px; /* 设置固定高度 */
  }
  
  .navbar-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.8rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .navbar-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
  }
  
  .navbar-logo {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a73e8;
    text-decoration: none;
    transition: color 0.3s ease;
  }
  
  .navbar-logo:hover {
    color: #1557b0;
  }
  
  .navbar-tip {
    color: #666;
    font-size: 0.95rem;
    padding: 0.4rem 0.8rem;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #1a73e8;
  }
  
  .navbar-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
  }
  
  .navbar-link {
    color: #666;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
  }
  
  .navbar-link:hover {
    color: #1a73e8;
  }
  
  /* 页脚样式 */
  footer {
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(5px);
    border-top: 1px solid rgba(0,0,0,.1);
    box-shadow: 0 -1px 3px rgba(0,0,0,0.05);
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: auto;
  }
  
  footer p {
    font-size: 0.9rem;
    color: #6c757d;
    margin: 0;
    text-align: center;
  }
  
  /* 主容器样式调整 */
  .container-fluid {
    flex: 1 0 auto;
    padding-top: 0.75rem;
    padding-bottom: 0.5rem;
  }
  
  #activeTasksList {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow-y: scroll !important;
    padding: 0.75rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f1f1f1;
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
  }
  
  .active-task {
    background: #fff;
    border-radius: 0.5rem;
    padding: 0.75rem;
    border: 1px solid rgba(0,0,0,.125);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 0;
  }
  
  .task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
  }
  
  .task-filename {
    font-weight: 500;
    margin: 0;
    color: #212529;
    word-break: break-all;
  }
  
  .cancel-btn {
    padding: 0.5rem 1rem;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
  }
  
  .cancel-btn:hover {
    background: #c0392b;
    transform: translateY(-1px);
  }
  
  /* 历史记录项样式优化 */
  .history-info {
    margin-bottom: 1rem;
  }
  
  .history-filename {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #212529;
  }
  
  .history-meta {
    color: #6c757d;
    font-size: 0.875rem;
  }
  
  /* 状态标签样式 */
  .status-label {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
  }
  
  .status-completed {
    background-color: #d1e7dd;
    color: #0f5132;
  }
  
  .status-failed {
    background-color: #f8d7da;
    color: #842029;
  }
  
  .status-downloading {
    background-color: #cff4fc;
    color: #055160;
  }
  
  /* 空历史记录提示 */
  .empty-history {
    text-align: center;
    padding: 2rem 1.5rem;
    color: #6b7280;
    background: #f9fafb;
    border-radius: 12px;
    margin: 0.5rem;
  }
  
  .empty-tasks i {
    font-size: 2.5rem;
    color: #9ca3af;
    margin-bottom: 1rem;
  }
  
  .empty-tasks p {
    font-size: 1.1rem;
    margin: 0;
  }
  
  /* 响应式调整 */
  @media (max-width: 768px) {
    .task-header {
      flex-direction: column;
      align-items: flex-start;
      gap: 0.5rem;
    }
    
    .history-item {
      padding: 0.75rem;
    }
    
    .history-actions {
      flex-direction: column;
      gap: 0.5rem;
    }
    
    .history-actions .btn {
      width: 100%;
    }
  }
  
  /* 自定义样式补充 */
  :root {
    --primary-color: #0d6efd;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
  }
  
  /* 使用说明步骤样式 */
  .usage-steps {
    padding: 0.25rem;
  }
  
  .step {
    display: flex;
    align-items: flex-start;
    font-size: 18;
    color: #495057;
    margin-bottom: 0.5rem;
    line-height: 1.3;
  }
  
  .step:last-child {
    margin-bottom: 0;
  }
  
  .step i {
    font-size: 0.9rem;
    margin-top: 0.1rem;
    margin-right: 0.4rem;
  }
  
  /* 卡片头部样式优化 */
  .card-header {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid rgba(0,0,0,.125);
  }
  
  .card-header .card-title {
    font-size: 0.95rem;
    margin: 0;
  }
  
  .card-body {
    padding: 0.75rem;
    flex: 1;
  }
  
  /* 任务卡片样式 */
  .active-task {
    background: #fff;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(0,0,0,.125);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  }
  
  .task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
  }
  
  .task-filename {
    font-weight: 500;
    margin: 0;
    color: #212529;
    word-break: break-all;
  }
  
  .progress-info {
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .progress-info span {
    white-space: nowrap;
  }
  
  /* 状态标签样式 */
  .status-label {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
  }
  
  .status-completed {
    background-color: #d1e7dd;
    color: #0f5132;
  }
  
  .status-failed {
    background-color: #f8d7da;
    color: #842029;
  }
  
  .status-downloading {
    background-color: #cff4fc;
    color: #055160;
  }
  
  /* 空历史记录提示 */
  .empty-history {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
  }
  
  /* 按钮样式优化 */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 500;
  }
  
  .btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
  }
  
  .btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
  }
  
  /* 响应式调整 */
  @media (max-width: 992px) {
    .container-fluid {
      padding-left: 1rem;
      padding-right: 1rem;
    }
    
    .card {
      margin-bottom: 1rem;
    }
  }
  
  @media (max-width: 768px) {
    .task-header {
      flex-direction: column;
      align-items: flex-start;
      gap: 0.5rem;
    }
    
    .history-item {
      padding: 0.75rem;
    }
    
    .history-actions {
      flex-direction: column;
      gap: 0.5rem;
    }
    
    .history-actions .btn {
      width: 100%;
    }
    
    .usage-steps {
      padding: 0.25rem;
    }
    
    .step {
      font-size: 0.9rem;
    }
  }
  
  /* 卡片容器样式 */
  .card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    margin-bottom: 1rem;
  }
  
  .card-header {
    padding: 1rem;
    border-bottom: 1px solid rgba(0,0,0,.08);
    background: transparent;
  }
  
  .card-body {
    padding: 1rem;
  }
  
  /* 当前任务和下载记录卡片特殊样式 */
  #activeTasksList, #historyList {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  
  /* 历史记录项样式优化 */
  .history-item {
    background: #fff;
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px solid rgba(0,0,0,.08);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    flex-shrink: 0; /* 防止记录项被压缩 */
  }
  
  /* 移除所有可能限制高度的样式 */
  #activeTasksList, #historyList {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
  
  .card-body {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
  
  .history-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
  }
  
  .history-info p {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #4b5563;
    font-size: 0.95rem;
  }
  
  .history-info p i {
    color: #6b7280;
    font-size: 1.1rem;
  }
  
  .history-info .filename {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
  }
  
  .history-info .status {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
  }
  
  .history-info .status.completed {
    background-color: #dcfce7;
    color: #166534;
  }
  
  .history-info .status.failed {
    background-color: #fee2e2;
    color: #991b1b;
  }
  
  .history-info .status.downloading {
    background-color: #dbeafe;
    color: #1e40af;
  }
  
  .history-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
  }
  
  /* 响应式调整 */
  @media (max-width: 992px) {
    .card-header {
      padding: 0.75rem;
    }
    
    .card-body {
      padding: 0.75rem;
    }
    
    .history-item {
      padding: 1rem;
    }
    
    .history-actions {
      flex-direction: column;
    }
  }
  
  /* 输入区域卡片样式 */
  .card:has(#urlInput) {
    /* height: auto; */
  }
  
  /* 使用说明卡片样式 */
  .card:has(.usage-steps) {
    height: 660px !important;
    display: flex;
    flex-direction: column;
  }
  
  .card:has(.usage-steps) .card-header {
    flex-shrink: 0;
  }
  
  .card:has(.usage-steps) .card-body {
    flex: 1;
    overflow-y: auto;
  }
  
  /* 当前任务卡片样式 */
  .card:has(#activeTasksList) {
    height: 533px !important;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  
  .card:has(#activeTasksList) .card-header {
    flex-shrink: 0;
    padding: 1rem;
    background: white;
    border-bottom: 1px solid rgba(0,0,0,.08);
  }
  
  .card:has(#activeTasksList) .card-body {
    flex: 1;
    overflow: hidden;
    padding: 0;
    position: relative;
    height: calc(450px - 57px); /* 卡片总高度减去头部高度 */
  }
  
  /* 当前任务列表样式 */
  #activeTasksList {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow-y: scroll !important;
    padding: 0.75rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f1f1f1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
  }
  
  /* 美化滚动条 - Chrome/Safari/Edge */
  #activeTasksList::-webkit-scrollbar {
    width: 8px !important; /* 增加宽度确保可见 */
    display: block !important; /* 强制显示 */
  }
  
  #activeTasksList::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
  }
  
  #activeTasksList::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
    border: 2px solid #f1f1f1; /* 添加边框使滚动条更明显 */
  }
  
  #activeTasksList::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
  }
  
  /* 空任务状态样式 */
  .empty-tasks {
    text-align: center;
    padding: 2rem 1.5rem;
    color: #6b7280;
    background: #f9fafb;
    border-radius: 12px;
    margin: 0.5rem;
  }
  
  .empty-tasks i {
    font-size: 2.5rem;
    color: #9ca3af;
    margin-bottom: 1rem;
  }
  
  .empty-tasks p {
    font-size: 1.1rem;
    margin: 0;
  }
  
  /* 响应式调整 */
  @media (max-width: 768px) {
    .card:has(#activeTasksList) {
      height: 400px !important;
    }
    
    .card:has(#activeTasksList) .card-body {
      height: calc(400px - 57px);
    }
  }
  
  /* 下载记录卡片样式 */
  .card:has(#historyList) {
    height: 760px !important;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  
  .card:has(#historyList) .card-header {
    flex-shrink: 0;
    padding: 1rem;
    background: white;
    border-bottom: 1px solid rgba(0,0,0,.08);
  }
  
  .card:has(#historyList) .card-body {
    flex: 1;
    overflow: hidden;
    padding: 0;
    position: relative;
    height: calc(450px - 57px);
  }
  
  /* 历史记录列表样式 */
  #historyList {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow-y: scroll !important; /* 强制显示滚动条 */
    padding: 1rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: #c1c1c1 #f1f1f1; /* Firefox */
  }
  
  /* 历史记录项样式 */
  .history-item {
    background: #fff;
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid rgba(0,0,0,.08);
    box-shadow: 0 2px 4px rgba(0,0,0,.05);
    margin-bottom: 1rem;
    position: relative;
  }
  
  .history-item:last-child {
    margin-bottom: 0;
  }
  
  /* 美化滚动条 - Chrome/Safari/Edge */
  #historyList::-webkit-scrollbar {
    width: 8px !important; /* 增加宽度确保可见 */
    display: block !important; /* 强制显示 */
  }
  
  #historyList::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
  }
  
  #historyList::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
    border: 2px solid #f1f1f1; /* 添加边框使滚动条更明显 */
  }
  
  #historyList::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
  }
  
  /* 响应式调整 */
  @media (max-width: 768px) {
    .card:has(#historyList) {
      height: 400px;
    }
    
    .card:has(#historyList) .card-body {
      height: calc(400px - 57px);
    }
  }
  

/* 全局样式 */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 导航栏样式 */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
}

.navbar-brand {
    font-weight: 600;
}

/* 卡片样式 */
.card {
    border: none;
    border-radius: 10px;
}

.card-body {
    padding: 1.5rem;
}

/* 表单样式 */
.form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13,110,253,.25);
}

.form-label {
    font-weight: 500;
    color: #495057;
}

/* 按钮样式 */
.btn {
    padding: 0.5rem 1rem;
    font-weight: 500;
}

.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

/* 提示框样式 */
.toast {
    background-color: white;
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,.15);
}

.toast-header {
    background-color: white;
    border-bottom: 1px solid rgba(0,0,0,.05);
}

/* 下载列表样式 */
.table th {
    font-weight: 600;
    color: #495057;
}

.table td {
    vertical-align: middle;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
}

/* 动画效果 */
.btn, .card, .toast {
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,.15);
}

/* 加载动画 */
.spinner-border {
    width: 1rem;
    height: 1rem;
    margin-right: 0.5rem;
}

/* 状态标签 */
.badge {
    padding: 0.5em 0.75em;
    font-weight: 500;
}

/* 链接样式 */
a {
    text-decoration: none;
    color: #0d6efd;
}

a:hover {
    color: #0a58ca;
}

/* 模态框样式 */
.modal-content {
    border: none;
    border-radius: 10px;
}

.modal-header {
    border-bottom: 1px solid rgba(0,0,0,.05);
}

.modal-footer {
    border-top: 1px solid rgba(0,0,0,.05);
}

/* 密码强度指示器 */
.password-strength {
    height: 4px;
    margin-top: 0.5rem;
    border-radius: 2px;
    background-color: #e9ecef;
}

.password-strength-bar {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.strength-weak {
    background-color: #dc3545;
    width: 33.33%;
}

.strength-medium {
    background-color: #ffc107;
    width: 66.66%;
}

.strength-strong {
    background-color: #198754;
    width: 100%;
} 