
    :root {
      --brand-primary: #6366f1;
      --brand-secondary: #8b5cf6;
      --brand-dark: #0f0f1a;
      --brand-card: #1a1a2e;
      --brand-surface: #16213e;
      --brand-border: rgba(99,102,241,0.2);
      --text-muted-custom: #94a3b8;
    }

    body {
      background: #0d1117;
      color: #e2e8f0;
      font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
      font-size: 14px;
      min-height: 100vh;
    }

    /* ── Navbar ── */
    .bb-navbar {
      background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 100%);
      border-bottom: 1px solid var(--brand-border);
      padding: 0 1.5rem;
      height: 56px;
      position: sticky;
      top: 0;
      z-index: 100;
    }
    .bb-brand {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 38px;
      height: 38px;
      border-radius: 12px;
      background: linear-gradient(180deg, rgba(99,102,241,0.12), rgba(59,130,246,0.08));
      border: 1px solid rgba(99,102,241,0.2);
      text-decoration: none;
      flex-shrink: 0;
      transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
    }
    .bb-brand:hover {
      transform: translateY(-1px);
      border-color: rgba(129,140,248,0.45);
      background: linear-gradient(180deg, rgba(99,102,241,0.18), rgba(59,130,246,0.12));
    }
    .bb-brand-logo {
      width: 25px;
      height: 25px;
      object-fit: contain;
      flex-shrink: 0;
    }
    .bb-nav-link {
      color: #94a3b8 !important;
      font-size: 0.83rem;
      padding: 0.38rem 0.85rem !important;
      border-radius: 6px;
      transition: all 0.2s;
      text-decoration: none;
      white-space: nowrap;
    }
    .bb-nav-link:hover, .bb-nav-link.active {
      color: #e2e8f0 !important;
      background: rgba(99,102,241,0.15);
    }
    .bb-nav-link i { margin-right: 5px; }
    .bb-nav-divider {
      width: 1px;
      height: 20px;
      background: rgba(255,255,255,0.08);
      margin: 0 6px;
    }

    /* ── Layout ── */
    .bb-main { padding: 1.5rem; max-width: 1400px; margin: 0 auto; }

    /* ── Cards ── */
    .bb-card {
      background: #1a1a2e;
      border: 1px solid var(--brand-border);
      border-radius: 12px;
      overflow: hidden;
    }
    .bb-card-header {
      background: rgba(99,102,241,0.08);
      border-bottom: 1px solid var(--brand-border);
      padding: 0.75rem 1.1rem;
      font-weight: 600;
      font-size: 0.85rem;
      color: #c4b5fd;
      letter-spacing: 0.5px;
    }
    .bb-card-body { padding: 1rem 1.1rem; }

    /* ── Stat cards ── */
    .stat-card {
      background: #1a1a2e;
      border: 1px solid var(--brand-border);
      border-radius: 10px;
      padding: 1rem 1.2rem;
      transition: border-color 0.2s, transform 0.2s;
    }
    .stat-card:hover { border-color: var(--brand-primary); transform: translateY(-1px); }
    .stat-card .stat-num { font-size: 1.6rem; font-weight: 700; line-height: 1; }
    .stat-card .stat-label { font-size: 0.75rem; color: var(--text-muted-custom); margin-top: 4px; }

    /* ── Table ── */
    .bb-table { border-collapse: separate; border-spacing: 0; width: 100%; }
    .bb-table th {
      background: rgba(99,102,241,0.1);
      color: #a78bfa;
      font-size: 0.75rem;
      font-weight: 600;
      letter-spacing: 0.8px;
      text-transform: uppercase;
      padding: 0.65rem 0.9rem;
      border-bottom: 1px solid var(--brand-border);
      white-space: nowrap;
    }
    .bb-table td {
      padding: 0.65rem 0.9rem;
      border-bottom: 1px solid rgba(255,255,255,0.04);
      vertical-align: middle;
      color: #cbd5e1;
    }
    .bb-table tbody tr { transition: background 0.15s; }
    .bb-table tbody tr:hover { background: rgba(99,102,241,0.06); }
    .bb-table tbody tr:last-child td { border-bottom: none; }
    .bb-table tbody tr.clickable-row { cursor: pointer; }

    /* ── Badges ── */
    .bb-badge {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 2px 8px;
      border-radius: 20px;
      font-size: 0.72rem;
      font-weight: 600;
    }
    .bb-badge-pending  { background: rgba(100,116,139,0.2); color: #94a3b8; border: 1px solid rgba(100,116,139,0.3); }
    .bb-badge-running  { background: rgba(99,102,241,0.2);  color: #a78bfa; border: 1px solid rgba(99,102,241,0.4); }
    .bb-badge-done     { background: rgba(16,185,129,0.15); color: #34d399; border: 1px solid rgba(16,185,129,0.3); }
    .bb-badge-failed   { background: rgba(239,68,68,0.15);  color: #f87171; border: 1px solid rgba(239,68,68,0.3); }
    .bb-badge-img      { background: rgba(6,182,212,0.15);  color: #22d3ee; border: 1px solid rgba(6,182,212,0.3); }
    .bb-badge-html     { background: rgba(245,158,11,0.15); color: #fbbf24; border: 1px solid rgba(245,158,11,0.3); }
    .bb-badge-video    { background: rgba(239,68,68,0.15);  color: #f87171; border: 1px solid rgba(239,68,68,0.3); }
    .bb-badge-archived { background: rgba(30,41,59,0.8);    color: #64748b; border: 1px solid rgba(100,116,139,0.2); }
    .bb-badge-cache    { background: rgba(100,116,139,0.15); color: #94a3b8; border: 1px solid rgba(100,116,139,0.25); }
    .bb-badge-fresh    { background: rgba(16,185,129,0.12); color: #6ee7b7; border: 1px solid rgba(16,185,129,0.25); }

    /* ── Buttons ── */
    .btn-bb-primary {
      background: linear-gradient(135deg, #6366f1, #8b5cf6);
      border: none;
      color: #fff;
      border-radius: 8px;
      font-size: 0.83rem;
      font-weight: 500;
      padding: 0.4rem 1rem;
      transition: opacity 0.2s, transform 0.1s;
      cursor: pointer;
    }
    .btn-bb-primary:hover { opacity: 0.9; color: #fff; transform: translateY(-1px); }
    .btn-bb-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
    .btn-bb-ghost {
      background: rgba(99,102,241,0.1);
      border: 1px solid var(--brand-border);
      color: #a78bfa;
      border-radius: 8px;
      font-size: 0.83rem;
      font-weight: 500;
      padding: 0.38rem 0.9rem;
      transition: all 0.2s;
      cursor: pointer;
    }
    .btn-bb-ghost:hover { background: rgba(99,102,241,0.2); color: #c4b5fd; }
    .btn-bb-danger {
      background: rgba(239,68,68,0.15);
      border: 1px solid rgba(239,68,68,0.3);
      color: #f87171;
      border-radius: 8px;
      font-size: 0.83rem;
      padding: 0.38rem 0.9rem;
      cursor: pointer;
    }
    .btn-bb-danger:hover { background: rgba(239,68,68,0.25); color: #fca5a5; }
    .btn-bb-success {
      background: rgba(16,185,129,0.15);
      border: 1px solid rgba(16,185,129,0.3);
      color: #34d399;
      border-radius: 8px;
      font-size: 0.83rem;
      padding: 0.38rem 0.9rem;
      cursor: pointer;
    }
    .btn-bb-success:hover { background: rgba(16,185,129,0.25); color: #6ee7b7; }

    /* ── Form controls ── */
    .bb-input {
      background: rgba(255,255,255,0.05);
      border: 1px solid rgba(255,255,255,0.1);
      color: #e2e8f0;
      border-radius: 8px;
      font-size: 0.85rem;
      transition: border-color 0.2s, box-shadow 0.2s;
    }
    .bb-input:focus {
      background: rgba(255,255,255,0.07);
      border-color: var(--brand-primary);
      box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
      color: #e2e8f0;
      outline: none;
    }
    .bb-input::placeholder { color: #475569; }
    .bb-select {
      background: rgba(255,255,255,0.05) url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e") no-repeat right 0.7rem center/16px;
      border: 1px solid rgba(255,255,255,0.1);
      color: #e2e8f0;
      border-radius: 8px;
      font-size: 0.85rem;
      -webkit-appearance: none;
      appearance: none;
      padding-right: 2rem;
    }
    .bb-select:focus {
      border-color: var(--brand-primary);
      box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
      color: #e2e8f0;
      outline: none;
      background-color: rgba(255,255,255,0.07);
    }
    .bb-select option { background: #1a1a2e; color: #e2e8f0; }
    .bb-textarea {
      background: rgba(255,255,255,0.04);
      border: 1px solid rgba(255,255,255,0.1);
      color: #e2e8f0;
      border-radius: 8px;
      font-size: 0.83rem;
      resize: vertical;
      font-family: 'Monaco', 'Menlo', monospace;
    }
    .bb-textarea:focus {
      background: rgba(255,255,255,0.06);
      border-color: var(--brand-primary);
      box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
      color: #e2e8f0;
      outline: none;
    }

    /* ── Pagination ── */
    .bb-pagination { display: flex; gap: 4px; align-items: center; }
    .bb-page-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 34px;
      height: 34px;
      padding: 0 10px;
      background: rgba(255,255,255,0.05);
      border: 1px solid rgba(255,255,255,0.08);
      border-radius: 8px;
      color: #94a3b8;
      font-size: 0.82rem;
      text-decoration: none;
      transition: all 0.15s;
    }
    .bb-page-btn:hover { background: rgba(99,102,241,0.15); border-color: var(--brand-primary); color: #a78bfa; }
    .bb-page-btn.active { background: var(--brand-primary); border-color: var(--brand-primary); color: #fff; }
    .bb-page-btn.disabled { opacity: 0.35; pointer-events: none; }
    .bb-page-info { color: #475569; font-size: 0.8rem; padding: 0 8px; }

    /* ── Misc ── */
    .text-muted-custom { color: var(--text-muted-custom) !important; }
    .truncate { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; }
    .domain-link { color: #818cf8; text-decoration: none; font-weight: 500; }
    .domain-link:hover { color: #a78bfa; text-decoration: underline; }
    .remark-box {
      white-space: pre-wrap;
      font-size: 0.82rem;
      line-height: 1.8;
      background: rgba(0,0,0,0.2);
      border: 1px solid rgba(99,102,241,0.15);
      border-radius: 8px;
      padding: 0.9rem 1rem;
      color: #cbd5e1;
    }
    .ad-thumb {
      width: 64px;
      height: 42px;
      object-fit: cover;
      border-radius: 5px;
      border: 1px solid rgba(255,255,255,0.1);
      cursor: pointer;
      transition: opacity 0.2s, transform 0.15s;
    }
    .ad-thumb:hover { opacity: 0.85; transform: scale(1.05); }

    /* ── Spinner ── */
    .spinner-sm {
      display: inline-block;
      width: 12px; height: 12px;
      border: 2px solid rgba(167,139,250,0.3);
      border-top-color: #a78bfa;
      border-radius: 50%;
      animation: spin 0.7s linear infinite;
      vertical-align: middle;
    }
    @keyframes spin { to { transform: rotate(360deg); } }

    /* ── Alert ── */
    .bb-alert {
      border-radius: 10px;
      padding: 0.75rem 1rem;
      font-size: 0.85rem;
      border: 1px solid;
    }
    .bb-alert-info    { background: rgba(99,102,241,0.1); border-color: rgba(99,102,241,0.3); color: #a78bfa; }
    .bb-alert-success { background: rgba(16,185,129,0.1); border-color: rgba(16,185,129,0.3); color: #34d399; }
    .bb-alert-warning { background: rgba(245,158,11,0.1); border-color: rgba(245,158,11,0.3); color: #fbbf24; }
    .bb-alert-danger  { background: rgba(239,68,68,0.1);  border-color: rgba(239,68,68,0.3);  color: #f87171; }

    /* ── Page title ── */
    .bb-page-title { font-size: 1.1rem; font-weight: 700; color: #e2e8f0; letter-spacing: 0.3px; margin: 0; }
    .bb-page-subtitle { font-size: 0.8rem; color: #475569; }

    /* ── Info row (key-value) ── */
    .info-row {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      padding: 5px 0;
      border-bottom: 1px solid rgba(255,255,255,0.04);
    }
    .info-row:last-child { border-bottom: none; }
    .info-key { font-size: 0.78rem; color: #64748b; flex-shrink: 0; margin-right: 12px; }
    .info-val { font-size: 0.83rem; color: #cbd5e1; text-align: right; word-break: break-all; }

    /* ── Modal ── */
    .bb-modal-backdrop {
      display: none;
      position: fixed; inset: 0;
      background: rgba(0,0,0,0.7);
      backdrop-filter: blur(4px);
      z-index: 999;
      align-items: center;
      justify-content: center;
    }
    .bb-modal-backdrop.show { display: flex; }
    .bb-modal {
      background: #1a1a2e;
      border: 1px solid var(--brand-border);
      border-radius: 14px;
      padding: 1.5rem;
      width: 100%;
      max-width: 520px;
      box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    }
    .bb-modal-title { font-size: 1rem; font-weight: 700; color: #e2e8f0; margin-bottom: 1rem; }

    /* ── Footer ── */
    .bb-footer {
      margin-top: 2.5rem;
      border-top: 1px solid rgba(255,255,255,0.06);
      background: rgba(7,10,16,0.55);
    }
    .bb-footer-inner {
      max-width: 1400px;
      margin: 0 auto;
      padding: 1rem 1.5rem 1.4rem;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 1rem;
      flex-wrap: wrap;
    }
    .bb-footer-brand {
      display: flex;
      align-items: center;
      gap: 10px;
      color: #94a3b8;
      font-size: 0.78rem;
      flex-wrap: wrap;
    }
    .bb-footer-brand-mark {
      width: 22px;
      height: 22px;
      object-fit: contain;
      flex-shrink: 0;
    }
    .bb-footer-links {
      display: flex;
      align-items: center;
      gap: 0.9rem;
      flex-wrap: wrap;
    }
    .bb-footer-link {
      color: #64748b;
      text-decoration: none;
      font-size: 0.78rem;
      transition: color 0.2s;
    }
    .bb-footer-link:hover {
      color: #cbd5e1;
    }
    .bb-footer-copy {
      color: #475569;
      font-size: 0.75rem;
    }
    .bb-footer-badges img {
      display: block;
    }

    /* ── Static pages ── */
    .bb-static-wrap {
      max-width: 920px;
      margin: 0 auto;
    }
    .bb-static-hero {
      margin-bottom: 1.2rem;
    }
    .bb-static-title {
      font-size: 1.8rem;
      font-weight: 800;
      color: #f8fafc;
      margin: 0;
    }
    .bb-static-subtitle {
      margin-top: 0.45rem;
      color: #64748b;
      font-size: 0.9rem;
      line-height: 1.7;
      max-width: 760px;
    }
    .bb-static-card {
      background: linear-gradient(180deg, rgba(22,26,39,0.96), rgba(13,17,23,0.96));
      border: 1px solid rgba(148,163,184,0.12);
      border-radius: 12px;
      padding: 1.2rem 1.3rem;
      margin-bottom: 1rem;
      box-shadow: 0 10px 30px rgba(0,0,0,0.18);
    }
    .bb-static-card h2 {
      font-size: 1rem;
      margin: 0 0 0.7rem;
      color: #e2e8f0;
    }
    .bb-static-card p,
    .bb-static-card li {
      font-size: 0.86rem;
      line-height: 1.8;
      color: #94a3b8;
    }
    .bb-static-card ul {
      margin: 0;
      padding-left: 1.15rem;
    }
    .bb-static-card a {
      color: #93c5fd;
      text-decoration: none;
    }
    .bb-static-card a:hover {
      text-decoration: underline;
    }

    /* ---- blog Markdown body ---- */
    .bb-static-body {
      font-size: 0.92rem;
      line-height: 1.85;
      color: #cbd5e1;
    }
    .bb-static-body h2 {
      font-size: 1.35rem;
      font-weight: 700;
      color: #e2e8f0;
      margin: 2rem 0 0.75rem;
      padding-bottom: 0.5rem;
      border-bottom: 1px solid rgba(99,102,241,0.15);
    }
    .bb-static-body h3 {
      font-size: 1.1rem;
      font-weight: 600;
      color: #e2e8f0;
      margin: 1.5rem 0 0.5rem;
    }
    .bb-static-body h4 {
      font-size: 1rem;
      font-weight: 600;
      color: #e2e8f0;
      margin: 1.25rem 0 0.5rem;
    }
    .bb-static-body p {
      margin: 0 0 1rem;
    }
    .bb-static-body strong { color: #f1f5f9; }
    .bb-static-body a { color: #93c5fd; text-decoration: underline; }
    .bb-static-body a:hover { color: #a78bfa; }
    .bb-static-body ul, .bb-static-body ol {
      margin: 0 0 1rem 0;
      padding-left: 1.5rem;
    }
    .bb-static-body li { margin-bottom: 0.35rem; }
    /* 表格是 Markdown 里最容易被摘引的结构，别让它裸奔成无边框文本。
       窄屏靠外层容器横向滚动，页面本身不许出现横向滚动条。 */
    .bb-static-body .bb-table-wrap {
      overflow-x: auto;
      margin: 0 0 1.25rem;
    }
    .bb-static-body table {
      width: 100%;
      border-collapse: collapse;
      font-size: 0.86rem;
    }
    .bb-static-body th, .bb-static-body td {
      border: 1px solid rgba(99,102,241,0.18);
      padding: 0.5rem 0.75rem;
      text-align: left;
      vertical-align: top;
    }
    .bb-static-body thead th {
      background: rgba(99,102,241,0.1);
      color: #e2e8f0;
      font-weight: 600;
      white-space: nowrap;
    }
    .bb-static-body tbody tr:nth-child(even) { background: rgba(148,163,184,0.04); }
    /* 标题带 id，直接跳锚点时别被顶栏盖住 */
    .bb-static-body h2, .bb-static-body h3, .bb-static-body h4 { scroll-margin-top: 5rem; }
    .bb-static-body blockquote {
      margin: 1rem 0;
      padding: 0.75rem 1.25rem;
      border-left: 3px solid rgba(99,102,241,0.4);
      background: rgba(99,102,241,0.06);
      border-radius: 0 8px 8px 0;
      color: #94a3b8;
    }
    .bb-static-body blockquote p { margin: 0; }
    .bb-static-body code {
      font-family: 'SF Mono', 'Fira Code', monospace;
      font-size: 0.82em;
      background: rgba(99,102,241,0.12);
      padding: 0.15em 0.4em;
      border-radius: 4px;
      color: #a78bfa;
    }
    .bb-static-body pre {
      background: rgba(15,23,42,0.6);
      border: 1px solid rgba(99,102,241,0.15);
      border-radius: 8px;
      padding: 1rem 1.25rem;
      overflow-x: auto;
      margin: 1rem 0;
    }
    .bb-static-body pre code {
      background: transparent;
      padding: 0;
      color: #cbd5e1;
      font-size: 0.82rem;
    }
    .bb-static-body img {
      max-width: 100%;
      border-radius: 8px;
      margin: 1rem 0;
    }
    .bb-static-body hr {
      border: none;
      border-top: 1px solid rgba(99,102,241,0.12);
      margin: 2rem 0;
    }
    .bb-static-body table {
      width: 100%;
      border-collapse: collapse;
      margin: 1rem 0;
    }
    .bb-static-body th, .bb-static-body td {
      padding: 0.5rem 0.75rem;
      border: 1px solid rgba(99,102,241,0.1);
      text-align: left;
    }
    .bb-static-body th {
      background: rgba(99,102,241,0.08);
      font-weight: 600;
      color: #e2e8f0;
    }

    /* scrollbar */
    ::-webkit-scrollbar { width: 6px; height: 6px; }
    ::-webkit-scrollbar-track { background: transparent; }
    ::-webkit-scrollbar-thumb { background: rgba(99,102,241,0.3); border-radius: 3px; }
    ::-webkit-scrollbar-thumb:hover { background: rgba(99,102,241,0.5); }
  
.auth-wrap { min-height: calc(100vh - 56px - 3rem); display:flex; align-items:center; justify-content:center; }
.auth-card { background:#1a1a2e; border:1px solid rgba(99,102,241,.25); border-radius:16px; padding:2rem; width:100%; max-width:420px; box-shadow:0 0 60px rgba(99,102,241,.08); }
.auth-title { font-size:1.15rem; font-weight:700; color:#e2e8f0; margin-bottom:1.5rem; text-align:center; }
.auth-label { font-size:.8rem; color:#64748b; margin-bottom:4px; }
.bb-oauth-sep { display:flex; align-items:center; gap:.75rem; margin:1.2rem 0 1rem; color:#475569; font-size:.78rem; }
.bb-oauth-sep::before, .bb-oauth-sep::after { content:""; flex:1; height:1px; background:rgba(148,163,184,.18); }
.bb-oauth-btn { display:flex; align-items:center; justify-content:center; gap:.6rem; width:100%; padding:.6rem; border-radius:8px; background:#fff; color:#1f2937; font-weight:600; font-size:.9rem; text-decoration:none; border:1px solid rgba(148,163,184,.25); transition:filter .15s; }
.bb-oauth-btn:hover { filter:brightness(.94); color:#1f2937; }
.table { border-collapse:separate; border-spacing:0; width:100%; color:#e2e8f0; }
.table thead th { background:rgba(99,102,241,.1); color:#a78bfa; font-size:.75rem; font-weight:600; letter-spacing:.8px; text-transform:uppercase; padding:.65rem .9rem; border-bottom:1px solid var(--brand-border); white-space:nowrap; }
.table tbody td { padding:.65rem .9rem; border-bottom:1px solid rgba(255,255,255,.04); }
.table-striped > tbody > tr:nth-of-type(odd) > * { background:rgba(255,255,255,.018); }
.btn-primary, .btn-bb-primary { background:linear-gradient(135deg,#6366f1,#8b5cf6); border:1px solid rgba(129,140,248,.55); color:#fff; font-weight:600; border-radius:8px; }
.form-control, .bb-input { background:rgba(15,23,42,.72); border:1px solid rgba(148,163,184,.2); color:#e2e8f0; border-radius:8px; }
.form-control:focus, .bb-input:focus { background:rgba(15,23,42,.9); border-color:#6366f1; color:#fff; box-shadow:0 0 0 .2rem rgba(99,102,241,.14); }
