  :root {
    --bg: #0f1115;
    --panel: #1a1d24;
    --panel-2: #232732;
    --border: #2c3140;
    --text: #e6e8ee;
    --text-dim: #8a92a3;
    --primary: #5b8cff;
    --primary-hover: #4a7af0;
    --success: #4ade80;
    --danger: #f87171;
    --warning: #fbbf24;
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    padding: 40px 20px;
    line-height: 1.5;
  }
  .container { max-width: 880px; margin: 0 auto; }
  header { text-align: center; margin-bottom: 32px; }
  h1 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
    background: linear-gradient(90deg, #5b8cff, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }
  .subtitle { color: var(--text-dim); font-size: 14px; }
  .badge {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 12px;
    color: var(--warning);
    -webkit-text-fill-color: var(--warning);
    vertical-align: middle;
  }

  .card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
  }

  /* Drop zone */
  .dropzone {
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--panel-2);
    user-select: none;
  }
  .dropzone:hover, .dropzone.dragover, .dropzone:focus-visible {
    border-color: var(--primary);
    background: rgba(91, 140, 255, 0.05);
    outline: none;
  }
  .dropzone .icon {
    font-size: 48px;
    margin-bottom: 12px;
    color: var(--text-dim);
  }
  .dropzone .hint { color: var(--text-dim); font-size: 13px; margin-top: 6px; }

  /* Buttons */
  .btn {
    display: inline-block;
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
  }
  .btn:hover { background: var(--primary-hover); }
  .btn:disabled { background: var(--text-dim); cursor: not-allowed; }
  .btn.ghost { background: var(--panel-2); }
  .btn.danger { background: var(--danger); }
  .btn.ghost.danger { background: var(--panel-2); color: var(--danger); border: 1px solid var(--danger); }
  .btn.ghost.danger:hover { background: var(--danger); color: #0f1115; }
  .btn-row { display: flex; gap: 12px; margin-top: 16px; flex-wrap: wrap; align-items: center; }

  /* Progress */
  .progress-list { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
  .progress-item {
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    transition: opacity 0.3s;
  }
  .progress-item.done { border-color: var(--success); }
  .progress-item.error { border-color: var(--danger); }
  .progress-item-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 6px;
    gap: 8px;
  }
  .progress-item-head .name {
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
  }
  .progress-item-head .size-info { font-variant-numeric: tabular-nums; white-space: nowrap; }
  .progress-item-head .status {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
  }
  .progress-item.done .status { background: var(--success); color: #0f1115; }
  .progress-item.error .status { background: var(--danger); color: #0f1115; }
  .progress-bar {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
  }
  .progress-bar > div {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.2s;
  }
  .progress-item.done .progress-bar > div { background: var(--success); width: 100% !important; }
  .progress-item.error .progress-bar > div { background: var(--danger); }
  .progress-item-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    justify-content: flex-end;
  }
  .progress-item-actions button {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-dim);
    border-radius: 4px;
    padding: 3px 10px;
    font-size: 12px;
    cursor: pointer;
  }
  .progress-item-actions button:hover { color: var(--text); border-color: var(--text-dim); }

  /* File list */
  .files-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    gap: 12px;
  }
  .files-header h2 { font-size: 16px; font-weight: 600; }
  .files-header .meta { font-size: 12px; color: var(--text-dim); }
  .files-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .check-all-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-dim);
    cursor: pointer;
    user-select: none;
  }
  .check-all-wrap input {
    width: 14px;
    height: 14px;
    accent-color: var(--primary);
    cursor: pointer;
  }
  .batch-btn { padding: 6px 14px; font-size: 13px; }

  /* Quota */
  .quota-wrap { margin-bottom: 16px; }
  .quota-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 4px;
  }
  .quota-row .quota-text strong { color: var(--text); font-variant-numeric: tabular-nums; }
  .quota-row .quota-text.warn strong { color: var(--warning); }
  .quota-row .quota-text.danger strong { color: var(--danger); }
  .quota-bar {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
  }
  .quota-bar > div {
    height: 100%;
    background: var(--success);
    width: 0%;
    transition: width 0.3s, background 0.3s;
  }
  .quota-bar.warn > div { background: var(--warning); }
  .quota-bar.danger > div { background: var(--danger); }
  .file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 8px;
  }
  .file-check {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
    flex-shrink: 0;
  }
  .file-icon {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: var(--panel);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
  }
  .file-info { flex: 1; min-width: 0; }
  .file-name {
    font-size: 14px;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .file-meta {
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 2px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
  }
  .file-meta .ttl { color: var(--warning); font-variant-numeric: tabular-nums; }
  .file-meta .ttl.danger { color: var(--danger); }
  .file-actions { display: flex; gap: 6px; }
  .icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--panel);
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    text-decoration: none;
  }
  .icon-btn:hover { background: var(--primary); border-color: var(--primary); }
  .icon-btn.danger:hover { background: var(--danger); border-color: var(--danger); }

  .empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-dim);
    font-size: 14px;
  }
  .skeleton {
    background: linear-gradient(90deg, var(--panel-2) 0%, var(--border) 50%, var(--panel-2) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
    border-radius: 6px;
    height: 56px;
    margin-bottom: 8px;
  }
  @keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
  }

  .toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    opacity: 0;
    transform: translateY(8px);
    transition: all 0.2s;
    pointer-events: none;
    z-index: 9999;
    max-width: 360px;
  }
  .toast.show { opacity: 1; transform: translateY(0); }
  .toast.success { border-left: 3px solid var(--success); }
  .toast.error { border-left: 3px solid var(--danger); }
  .toast.info { border-left: 3px solid var(--primary); }

  footer {
    text-align: center;
    color: var(--text-dim);
    font-size: 12px;
    margin-top: 24px;
  }

  .total-progress {
    flex: 1;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
    min-width: 120px;
  }
  .total-progress > div {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.2s;
  }
  .total-label { font-size: 12px; color: var(--text-dim); white-space: nowrap; }

  /* Preview modal */
  .preview-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .preview-modal[hidden] { display: none; }
  .preview-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(2px);
  }
  .preview-panel {
    position: relative;
    width: min(1100px, 92vw);
    height: min(820px, 88vh);
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--panel-2);
  }
  .preview-title {
    flex: 1;
    min-width: 0;
    color: var(--text);
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .preview-actions { display: flex; gap: 6px; flex-shrink: 0; }
  .preview-body {
    flex: 1;
    min-height: 0;
    background: var(--bg);
    overflow: auto;
  }
  .preview-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-dim);
    font-size: 14px;
  }
