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

    body {
      font-family: Arial, Helvetica, sans-serif;
      background: #ffffff;
      color: #222;
      line-height: 1.4;
      transition: background 0.3s, color 0.3s;
    }

    a {
      text-decoration: none;
      color: inherit;
    }

    body.dark {
      background: #0f0f0f;
      color: #e4e4e4;
    }

    /* ===== Top bar (mobile) ===== */
    .top-bar {
      display: none;
      position: sticky;
      top: 0;
      z-index: 90;
      width: 100%;
      height: 56px;
      background: #fff;
      border-bottom: 1px solid #ddd;
      align-items: center;
      justify-content: space-between;
      padding: 0 14px;
      transition: background 0.3s, border-color 0.3s;
    }

    body.dark .top-bar {
      background: #0f0f0f;
      border-bottom-color: #222;
    }

    .top-bar-left {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .top-bar-title {
      font-size: 20px;
      font-weight: 700;
      letter-spacing: -0.3px;
    }

    .current-rank-badge {
      font-size: 12px;
      color: #888;
      padding: 3px 10px;
      border-radius: 12px;
      background: #f2f2f2;
      white-space: nowrap;
      max-width: 160px;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    body.dark .current-rank-badge {
      background: #1a1a1a;
      color: #999;
    }

    .top-bar-right {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .icon-btn {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      border: 1px solid #ddd;
      background: #fff;
      cursor: pointer;
      display: grid;
      place-items: center;
      font-size: 18px;
      transition: background 0.3s, border-color 0.3s;
    }

    body.dark .icon-btn {
      background: #1a1a1a;
      border-color: #333;
    }

    .theme-toggle {
      position: fixed;
      top: 18px;
      right: 24px;
      width: 40px;
      height: 40px;
      border-radius: 50%;
      border: 1px solid #ddd;
      background: #fff;
      cursor: pointer;
      display: grid;
      place-items: center;
      font-size: 18px;
      transition: background 0.3s, border-color 0.3s;
      z-index: 100;
    }

    body.dark .theme-toggle {
      background: #1a1a1a;
      border-color: #333;
    }

    .lang-toggle {
      position: fixed;
      top: 18px;
      right: 72px;
      width: 40px;
      height: 40px;
      border-radius: 50%;
      border: 1px solid #ddd;
      background: #fff;
      cursor: pointer;
      display: grid;
      place-items: center;
      font-size: 13px;
      font-weight: 700;
      color: #555;
      transition: background 0.3s, border-color 0.3s, color 0.3s;
      z-index: 100;
    }

    body.dark .lang-toggle {
      background: #1a1a1a;
      border-color: #333;
      color: #bbb;
    }

    #langToggleMobile {
      margin-right: 4px;
    }

    .drawer-overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.4);
      z-index: 150;
      opacity: 0;
      transition: opacity 0.3s;
    }

    .drawer-overlay.visible {
      display: block;
      opacity: 1;
    }

    .drawer {
      position: fixed;
      top: 0;
      left: 0;
      bottom: 0;
      width: 280px;
      max-width: 80vw;
      background: #fff;
      z-index: 200;
      transform: translateX(-100%);
      transition: transform 0.3s ease;
      overflow-y: auto;
      padding: 20px 16px;
      border-right: 1px solid #ddd;
    }

    body.dark .drawer {
      background: #0f0f0f;
      border-right-color: #222;
    }

    .drawer.open {
      transform: translateX(0);
    }

    .drawer-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 24px;
    }

    .drawer-logo {
      font-size: 22px;
      font-weight: 700;
    }

    .drawer-close {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      border: 1px solid #ddd;
      background: #fff;
      cursor: pointer;
      display: grid;
      place-items: center;
      font-size: 18px;
      color: #555;
    }

    body.dark .drawer-close {
      background: #1a1a1a;
      border-color: #333;
      color: #bbb;
    }

    /* 排行 Tab（原 source-item 样式复用） */
    .rank-item {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 10px 12px;
      border-radius: 3px;
      color: #222;
      cursor: pointer;
      transition: background 0.2s, color 0.3s;
      margin-bottom: 2px;
    }

    body.dark .rank-item {
      color: #e4e4e4;
    }

    .rank-item.active,
    .rank-item:hover {
      background: #f0f0f0;
    }

    body.dark .rank-item.active,
    body.dark .rank-item:hover {
      background: #1a1a1a;
    }

    .rank-left {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .rank-bar {
      width: 3px;
      height: 28px;
      background: #111;
      transition: background 0.3s;
    }

    body.dark .rank-bar {
      background: #e4e4e4;
    }

    .rank-name {
      font-size: 15px;
    }   
    /* ===== Brand header (logo + title) ===== */
.brand-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.brand-logo {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: #111;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.dark .brand-logo {
  background: #e4e4e4;
  color: #0f0f0f;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #111;
}

body.dark .brand-title {
  color: #e4e4e4;
}

.brand-slogan {
  font-size: 13px;
  color: #888;
  margin-top: 2px;
}

body.dark .brand-slogan {
  color: #666;
}

@media (max-width: 600px) {
  .brand-logo {
    width: 44px;
    height: 44px;
    font-size: 22px;
    border-radius: 10px;
  }

  .brand-title {
    font-size: 22px;
  }

  .brand-slogan {
    font-size: 12px;
  }
}
    .search-section {
      max-width: 1200px;
      margin: 0 auto;
      padding: 60px 24px 30px;
    }

    .search-title {
      font-size: 18px;
      font-weight: 700;
      margin-bottom: 14px;
    }
/* ===== 短域名通知 ===== */
.domain-notice {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 11px 14px;
    margin-bottom: 14px;
    border: 1px solid #dbeafe;
    border-radius: 5px;
    background: #eff6ff;
    color: #475569;
    font-size: 13px;
    line-height: 1.6;
    transition: background 0.3s, border-color 0.3s, color 0.3s;
}

.notice-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 17px;
    height: 17px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #3b82f6;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.notice-text {
    color: #475569;
}

.notice-domain {
    color: #2563eb;
    font-weight: 700;
    white-space: nowrap;
}

/* ===== 深色模式 ===== */
body.dark .domain-notice {
    background: #172033;
    border-color: #263b5c;
    color: #aab8cc;
}

body.dark .notice-text {
    color: #aab8cc;
}

body.dark .notice-domain {
    color: #60a5fa;
}

body.dark .notice-icon {
    background: #2563eb;
    color: #fff;
}

/* ===== 手机端适配 ===== */
@media (max-width: 600px) {
    .domain-notice {
        padding: 10px 12px;
        gap: 6px;
        font-size: 12px;
    }


}
    .search-box {
      position: relative;
      width: 100%;
      max-width: 1180px;
    }

    .search-box input {
      width: 100%;
      height: 56px;
      border: 1px solid #ddd;
      border-radius: 4px;
      padding: 0 16px 0 44px;
      font-size: 15px;
      outline: none;
      background: #fafafa;
      color: #222;
      transition: border-color 0.2s, background 0.3s, color 0.3s;
    }

    .search-box input:focus {
      border-color: #999;
      background: #fff;
    }

    body.dark .search-box input {
      background: #1a1a1a;
      border-color: #333;
      color: #e4e4e4;
    }

    body.dark .search-box input:focus {
      background: #222;
      border-color: #555;
    }

    .search-icon {
      position: absolute;
      left: 14px;
      top: 50%;
      transform: translateY(-50%);
      color: #999;
      pointer-events: none;
    }

    .search-icon svg {
      width: 20px;
      height: 20px;
    }

    .clear-btn {
      position: absolute;
      right: 12px;
      top: 50%;
      transform: translateY(-50%);
      width: 28px;
      height: 28px;
      border-radius: 50%;
      border: none;
      background: #ddd;
      color: #555;
      cursor: pointer;
      display: none;
      place-items: center;
      font-size: 16px;
      line-height: 1;
    }

    .clear-btn.visible {
      display: grid;
    }

    body.dark .clear-btn {
      background: #333;
      color: #bbb;
    }

    .main {
      max-width: 1200px;
      margin: 0 auto;
      padding: 0 24px 60px;
      display: grid;
      grid-template-columns: 240px 1fr;
      gap: 28px;
    }

    .sidebar-title {
      font-size: 18px;
      font-weight: 700;
      margin-bottom: 10px;
    }

    .sidebar-desc {
      color: #555;
      font-size: 14px;
      margin-bottom: 22px;
      max-width: 210px;
      transition: color 0.3s;
    }

    body.dark .sidebar-desc {
      color: #999;
    }

    .content-title {
      font-size: 18px;
      font-weight: 700;
      margin-bottom: 16px;
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .result-count {
      font-size: 13px;
      font-weight: 400;
      color: #888;
    }

    body.dark .result-count {
      color: #666;
    }

    .table {
      border: 1px solid #ddd;
      border-radius: 5px;
      overflow: hidden;
      transition: border-color 0.3s;
    }

    body.dark .table {
      border-color: #333;
    }

    .table-header,
    .torrent-row {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 110px 100px 100px 90px;
      align-items: center;
      padding: 14px 18px;
      border-bottom: 1px solid #eee;
      transition: border-color 0.3s, background 0.2s;
    }

    body.dark .table-header,
    body.dark .torrent-row {
      border-bottom-color: #222;
    }

    .table-header {
      background: #fff;
      color: #666;
      font-size: 12px;
      font-weight: 700;
      letter-spacing: 0.3px;
      transition: background 0.3s, color 0.3s;
    }

    body.dark .table-header {
      background: #0f0f0f;
      color: #888;
    }

    .torrent-row:last-child {
      border-bottom: none;
    }

    .torrent-row:hover {
      background: #fafafa;
    }

    body.dark .torrent-row:hover {
      background: #1a1a1a;
    }

    .name-col {
      min-width: 0;
      padding-right: 18px;
    }

    .torrent-name {
      font-size: 15px;
      color: #111;
      margin-bottom: 4px;
      word-break: break-word;
      transition: color 0.3s;
    }

    body.dark .torrent-name {
      color: #e4e4e4;
    }

    .rank-tag {
      display: inline-block;
      min-width: 28px;
      text-align: center;
      font-size: 12px;
      font-weight: 700;
      padding: 1px 6px;
      border-radius: 3px;
      margin-right: 6px;
      background: #f0f0f0;
      color: #666;
    }

    .rank-tag.top1 { background: #ffd700; color: #000; }
    .rank-tag.top2 { background: #c0c0c0; color: #000; }
    .rank-tag.top3 { background: #cd7f32; color: #fff; }

    body.dark .rank-tag { background: #2a2a2a; color: #999; }
    body.dark .rank-tag.top1 { background: #b8960f; color: #fff; }
    body.dark .rank-tag.top2 { background: #6e6e6e; color: #fff; }
    body.dark .rank-tag.top3 { background: #8b5a2b; color: #fff; }

    mark {
      background: #ffe066;
      color: inherit;
      padding: 0 2px;
      border-radius: 2px;
    }

    body.dark mark {
      background: #c99800;
    }

    .torrent-meta {
      font-size: 13px;
      color: #666;
      word-break: break-word;
      transition: color 0.3s;
    }

    body.dark .torrent-meta {
      color: #888;
    }

    .num {
      text-align: right;
      font-size: 14px;
      color: #333;
      transition: color 0.3s;
    }

    body.dark .num {
      color: #bbb;
    }

    .magnet-col {
      display: flex;
      justify-content: flex-end;
      gap: 8px;
      align-items: center;
    }

    /* ===== 详情按钮（与 magnet-btn 保持一致风格） ===== */
    .detail-btn {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      border: 1px solid #ddd;
      display: grid;
      place-items: center;
      color: #555;
      cursor: pointer;
      background: #fff;
      transition: background 0.2s, border-color 0.2s, color 0.3s;
      text-decoration: none;
    }

    body.dark .detail-btn {
      background: #1a1a1a;
      border-color: #333;
      color: #bbb;
    }

    .detail-btn:hover {
      background: #f2f2f2;
      border-color: #aaa;
    }

    body.dark .detail-btn:hover {
      background: #2a2a2a;
      border-color: #555;
    }

    .detail-btn svg {
      width: 18px;
      height: 18px;
    }

    /* 复制成功状态 */
    .magnet-btn.copied {
      color: #4caf50;
      border-color: #4caf50;
    }

    body.dark .magnet-btn.copied {
      color: #66bb6a;
      border-color: #66bb6a;
    }

    /* Toast 提示 */
    .toast {
      position: fixed;
      bottom: 90px;
      left: 50%;
      transform: translateX(-50%) translateY(20px);
      background: #333;
      color: #fff;
      padding: 10px 20px;
      border-radius: 6px;
      font-size: 14px;
      z-index: 400;
      opacity: 0;
      visibility: hidden;
      transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
      pointer-events: none;
      box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    }

    body.dark .toast {
      background: #2a2a2a;
      box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    }

    .toast.visible {
      opacity: 1;
      visibility: visible;
      transform: translateX(-50%) translateY(0);
    }

    .magnet-btn {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      border: 1px solid #ddd;
      display: grid;
      place-items: center;
      color: #555;
      cursor: pointer;
      background: #fff;
      transition: background 0.2s, border-color 0.2s, color 0.3s;
    }

    body.dark .magnet-btn {
      background: #1a1a1a;
      border-color: #333;
      color: #bbb;
    }

    .magnet-btn:hover {
      background: #f2f2f2;
      border-color: #aaa;
    }

    body.dark .magnet-btn:hover {
      background: #2a2a2a;
      border-color: #555;
    }

    .magnet-btn svg {
      width: 18px;
      height: 18px;
    }

    .empty-state {
      padding: 60px 18px;
      text-align: center;
      color: #888;
      display: none;
    }

    .empty-state.visible {
      display: block;
    }

    .empty-state svg {
      width: 48px;
      height: 48px;
      margin-bottom: 12px;
      opacity: 0.5;
    }

    .back-to-top {
      position: fixed;
      bottom: 28px;
      right: 28px;
      width: 44px;
      height: 44px;
      border-radius: 50%;
      border: 1px solid #ddd;
      background: #fff;
      color: #555;
      cursor: pointer;
      display: grid;
      place-items: center;
      font-size: 20px;
      z-index: 95;
      opacity: 0;
      visibility: hidden;
      transform: translateY(10px);
      transition: opacity 0.3s, visibility 0.3s, transform 0.3s, background 0.3s, border-color 0.3s, color 0.3s;
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    }

    .back-to-top.visible {
      opacity: 1;
      visibility: visible;
      transform: translateY(0);
    }

    .back-to-top:hover {
      background: #f2f2f2;
      border-color: #aaa;
    }

    body.dark .back-to-top {
      background: #1a1a1a;
      border-color: #333;
      color: #bbb;
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    }

    body.dark .back-to-top:hover {
      background: #2a2a2a;
      border-color: #555;
    }

    .footer {
      margin-top: 60px;
      padding: 28px 24px 32px;
      border-top: 1px solid #eee;
      transition: border-color 0.3s;
    }

    body.dark .footer {
      border-top-color: #222;
    }

    .footer-inner {
      max-width: 1200px;
      margin: 0 auto;
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 16px;
    }

    .footer-left {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .footer-logo {
      font-size: 16px;
      font-weight: 700;
      color: #111;
      transition: color 0.3s;
    }

    body.dark .footer-logo {
      color: #e4e4e4;
    }

    .footer-sep {
      color: #ccc;
    }

    body.dark .footer-sep {
      color: #444;
    }

    .footer-text {
      font-size: 13px;
      color: #888;
      transition: color 0.3s;
    }

    body.dark .footer-text {
      color: #666;
    }

    .footer-right {
      display: flex;
      gap: 20px;
    }

    .footer-link {
      font-size: 13px;
      color: #555;
      transition: color 0.2s;
    }

    .footer-link:hover {
      color: #111;
    }

    body.dark .footer-link {
      color: #888;
    }

    body.dark .footer-link:hover {
      color: #e4e4e4;
    }

    .footer-center {
      width: 100%;
      text-align: center;
      margin-top: 8px;
    }

    .modal-overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.45);
      z-index: 300;
      opacity: 0;
      transition: opacity 0.25s;
    }

    .modal-overlay.visible {
      display: block;
      opacity: 1;
    }

    .modal {
      position: fixed;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%) scale(0.96);
      width: 100%;
      max-width: 520px;
      max-height: 80vh;
      background: #fff;
      border-radius: 10px;
      z-index: 310;
      box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
      display: flex;
      flex-direction: column;
      opacity: 0;
      visibility: hidden;
      transition: opacity 0.25s, visibility 0.25s, transform 0.25s;
    }

    .modal.visible {
      opacity: 1;
      visibility: visible;
      transform: translate(-50%, -50%) scale(1);
    }

    body.dark .modal {
      background: #1a1a1a;
    }

    .modal-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 18px 22px;
      border-bottom: 1px solid #eee;
    }

    body.dark .modal-header {
      border-bottom-color: #2a2a2a;
    }

    .modal-title {
      font-size: 17px;
      font-weight: 700;
    }

    .modal-close {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      border: 1px solid #ddd;
      background: #fff;
      cursor: pointer;
      display: grid;
      place-items: center;
      font-size: 18px;
      color: #555;
      transition: background 0.2s, border-color 0.2s;
    }

    body.dark .modal-close {
      background: #222;
      border-color: #333;
      color: #bbb;
    }

    .modal-close:hover {
      background: #f2f2f2;
      border-color: #aaa;
    }

    body.dark .modal-close:hover {
      background: #2a2a2a;
      border-color: #555;
    }

    .modal-body {
      padding: 20px 22px;
      overflow-y: auto;
      font-size: 14px;
      line-height: 1.7;
      color: #444;
    }

    body.dark .modal-body {
      color: #bbb;
    }

    .modal-body h4 {
      font-size: 14px;
      font-weight: 700;
      color: #222;
      margin: 14px 0 6px;
    }

    body.dark .modal-body h4 {
      color: #e4e4e4;
    }

    .modal-body p {
      margin-bottom: 10px;
    }

    .modal-body ul {
      padding-left: 18px;
      margin-bottom: 10px;
    }

    .modal-body li {
      margin-bottom: 6px;
    }

    .modal-body a {
      color: #2563eb;
      word-break: break-all;
    }

    .modal-body a:hover {
      text-decoration: underline;
    }

    body.dark .modal-body a {
      color: #60a5fa;
    }

    .modal-footer {
      padding: 14px 22px;
      border-top: 1px solid #eee;
      text-align: right;
    }

    body.dark .modal-footer {
      border-top-color: #2a2a2a;
    }

    .modal-btn {
      padding: 8px 20px;
      border-radius: 6px;
      border: 1px solid #ddd;
      background: #fff;
      cursor: pointer;
      font-size: 14px;
      color: #333;
      transition: background 0.2s, border-color 0.2s;
    }

    body.dark .modal-btn {
      background: #222;
      border-color: #333;
      color: #e4e4e4;
    }

    .modal-btn:hover {
      background: #f2f2f2;
      border-color: #aaa;
    }

    body.dark .modal-btn:hover {
      background: #2a2a2a;
      border-color: #555;
    }

    .dmca-email {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 6px 12px;
      background: #f5f5f5;
      border-radius: 6px;
      font-family: monospace;
      font-size: 13px;
      margin: 6px 0;
    }

    body.dark .dmca-email {
      background: #222;
    }

    .copy-btn {
      border: none;
      background: none;
      cursor: pointer;
      font-size: 14px;
      color: #555;
    }

    body.dark .copy-btn {
      color: #bbb;
    }

    .copy-btn.copied {
      color: #4caf50;
    }

    @media (max-width: 900px) {
      .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 42px;
        height: 42px;
      }

      .footer {
        margin-top: 40px;
        padding: 24px 16px 28px;
      }

      .footer-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 14px;
      }

      .footer-right {
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px;
      }

      .footer-center {
        margin-top: 4px;
      }

      .modal {
        max-width: 92vw;
        max-height: 85vh;
      }

      .modal-header,
      .modal-body,
      .modal-footer {
        padding-left: 18px;
        padding-right: 18px;
      }

      .top-bar {
        display: flex;
      }

      .theme-toggle { display: none; }
      .lang-toggle { display: none; }

      .sidebar {
        display: none;
      }

      .search-section {
        padding-top: 24px;
      }

      .main {
        grid-template-columns: 1fr;
        padding-top: 16px;
      }

      .table-header {
        display: none;
      }

      .torrent-row {
        grid-template-columns: 1fr auto;
        gap: 8px 14px;
      }

      .name-col {
        grid-column: 1 / -1;
      }

      .num::before {
        content: attr(data-label);
        margin-right: 6px;
        color: #777;
        font-size: 12px;
      }

      body.dark .num::before {
        color: #666;
      }

      .magnet-col {
        grid-column: 2;
      }
    }