:root {
  --page: #f3f5f7;
  --panel: #ffffff;
  --panel-2: #f7f9fb;
  --ink: #21272f;
  --muted: #5b6570;
  --faint: #98a1ab;
  --line: #e4e8ec;
  --line-2: #d4dae0;
  --brand: #e4560e;
  --brand-deep: #c4480a;
  --brand-soft: #fdefe5;
  --blue: #2266d3;
  --blue-soft: #eaf1fd;
  --green: #178a52;
  --green-soft: #e7f5ed;
  --amber: #a86a12;
  --amber-soft: #fbf3e2;
  --red: #cf4545;
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(20, 28, 38, .05);
  --shadow-md: 0 14px 30px -18px rgba(20, 28, 38, .28);
}
* { box-sizing: border-box; }
html { background: var(--page); }
body {
  margin: 0; min-width: 320px;
  color: var(--ink);
  font-family: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  line-height: 1.65;
  background: var(--page);
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
.container { width: min(1080px, calc(100% - 32px)); margin: 0 auto; }

/* ===== header ===== */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.92); border-bottom: 1px solid var(--line); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 62px; }
.brand { color: var(--ink); text-decoration: none; min-width: 0; }
.brand-text { display: block; min-width: 0; }
.brand-text strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; font-weight: 800; letter-spacing: -.01em; }
.brand-text small { display: block; margin-top: 1px; color: var(--faint); font-size: 11px; }
.header-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.status-pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 12px; white-space: nowrap; background: #fff; }
.status-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.status-pill.is-ok i { background: var(--green); }
.status-pill.is-warn i { background: var(--amber); }
.status-pill.is-loading i { background: var(--brand); animation: blink 1s ease-in-out infinite; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .2; } }
.refresh-btn { min-height: 30px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 8px; color: var(--ink); background: #fff; font-size: 13px; }
.refresh-btn:hover { border-color: var(--ink); }
.refresh-btn:disabled { opacity: .5; cursor: wait; }

/* ===== main / hero ===== */
main { padding: 34px 0 60px; }
.hero { padding: 34px 0 26px; }
.hero h1 { margin: 0; font-size: clamp(26px, 4vw, 40px); line-height: 1.2; font-weight: 800; letter-spacing: -.02em; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero-copy { margin: 14px 0 0; max-width: 780px; color: var(--muted); font-size: 15px; }
.hero-copy strong { color: var(--ink); font-weight: 700; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 30px; margin-top: 26px; }
.hero-stat span { display: block; color: var(--faint); font-size: 12px; margin-bottom: 4px; }
.hero-stat strong { display: block; font-size: 24px; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }

/* ===== ads ===== */
.ad-sec { margin: 26px 0 42px; }
.ad-row { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.ad-card {
  color: var(--ink);
  position: relative; display: flex; flex-direction: column; gap: 12px;
  padding: 16px 18px 18px; border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; box-shadow: var(--shadow-sm);
  text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s;
}
.ad-rocket { border-top: 3px solid var(--brand); }
.ad-airport { border-top: 3px solid var(--blue); }
.ad-card:hover { border-color: var(--line-2); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.ad-tag {
  position: absolute; top: 10px; right: 12px; z-index: 1;
  padding: 1px 6px; border: 1px solid var(--line); border-radius: 5px;
  color: var(--faint); font-size: 10px; background: #fff;
}
.ad-body { display: block; padding-right: 44px; }
.ad-title { display: block; color: var(--ink); font-size: 15.5px; font-weight: 800; line-height: 1.4; letter-spacing: -.01em; }
.ad-sub { display: block; margin-top: 3px; color: var(--muted); font-size: 12.5px; font-style: normal; line-height: 1.55; }
.ad-cta {
  display: block; text-align: center; padding: 10px 0; border-radius: 8px;
  font-size: 13.5px; font-weight: 700; color: #fff;
}
.ad-rocket .ad-cta { background: var(--brand); }
.ad-rocket .ad-cta:hover { background: var(--brand-deep); }
.ad-airport .ad-cta { background: var(--blue); }
.ad-airport .ad-cta:hover { background: #1b52ad; }

/* wide ad */
.ad-wide {
  color: var(--ink);
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; box-shadow: var(--shadow-sm); border-left: 4px solid var(--brand);
}
.ad-wide-main { min-width: 240px; flex: 1 1 300px; }
.ad-wide .ad-title { font-size: 16px; }
.ad-wide .ad-sub { margin-top: 4px; }
.ad-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.ad-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 40px; padding: 0 16px; border-radius: 8px;
  font-size: 13.5px; font-weight: 700; text-decoration: none;
  transition: transform .15s, filter .15s;
}
.ad-btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.ad-btn-rocket { color: #fff; background: var(--brand); }
.ad-btn-airport { color: #fff; background: var(--blue); }

/* ===== notice / tips ===== */
.notice-section { margin: 0 0 42px; }
.notice-section h2 { margin: 0 0 12px; font-size: 22px; font-weight: 800; letter-spacing: -.01em; line-height: 1.4; }
.notice-intro { margin: 0 0 8px; max-width: 820px; color: var(--muted); font-size: 14px; }
.tip-grid { margin: 14px 0 0; }
.tip-card { padding: 14px 2px; border-bottom: 1px solid var(--line); }
.tip-card:last-child { border-bottom: 0; }
.tip-card h3 { display: flex; align-items: baseline; gap: 10px; margin: 0 0 5px; font-size: 15.5px; font-weight: 800; line-height: 1.45; }
.tip-num { flex: 0 0 auto; color: var(--brand); font-size: 13px; font-weight: 800; }
.tip-card p { margin: 0; color: var(--muted); font-size: 13.5px; max-width: 860px; }

/* ===== accounts ===== */
.accounts-section { margin-bottom: 40px; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); }
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.section-head h2 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.section-sub { margin: 6px 0 0; color: var(--muted); font-size: 13px; max-width: 640px; }
.count-badge { flex: 0 0 auto; margin-top: 2px; color: var(--faint); font-size: 12.5px; white-space: nowrap; }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.search-box { display: flex; align-items: center; gap: 8px; flex: 1 1 260px; max-width: 420px; min-height: 40px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--panel-2); color: var(--faint); }
.search-box:focus-within { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(228,86,14,.1); }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; font-size: 13.5px; }
.search-box input::placeholder { color: var(--faint); }
.select-box { display: flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 4px 0 12px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--panel-2); color: var(--muted); font-size: 12.5px; }
.select-box select { min-width: 118px; height: 38px; border: 0; outline: 0; padding: 0 8px 0 2px; background: transparent; font-size: 13px; cursor: pointer; }
.select-box option { background: #fff; color: var(--ink); }
.clear-btn { min-height: 40px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 8px; color: var(--muted); background: #fff; font-size: 12.5px; }
.clear-btn:hover { color: var(--ink); border-color: var(--ink); }

.source-strip { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px dashed var(--line); }
.strip-placeholder { color: var(--faint); font-size: 12.5px; }
.strip-summary { margin-left: auto; color: var(--faint); font-size: 12px; white-space: nowrap; }
.source-chip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: #fff; font-size: 12px; text-align: left; }
.source-chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.source-chip span { font-weight: 700; color: var(--ink); }
.source-chip b { font-weight: 500; }
.source-chip small { display: block; width: 100%; color: var(--faint); font-size: 10.5px; }
.source-chip.status-online i { background: var(--green); }
.source-chip.status-online { border-color: #cfe5d8; }
.source-chip.status-cached i { background: var(--amber); }
.source-chip.status-cached { border-color: #ecd9ae; }
.source-chip.status-offline i { background: var(--red); }
.source-chip.status-offline { border-color: #eccccc; }
.source-chip.is-active { border-color: var(--blue); color: var(--ink); background: var(--blue-soft); }

.account-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px,1fr)); gap: 12px; }
.account-card { display: flex; flex-direction: column; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); transition: border-color .15s, box-shadow .15s; }
.account-card:hover { border-color: var(--line-2); box-shadow: var(--shadow-sm); }
.acct-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.acct-email { margin: 0; font-family: ui-monospace, "SF Mono", Consolas, Menlo, monospace; font-size: 14px; font-weight: 700; color: var(--ink); word-break: break-all; cursor: pointer; }
.acct-email:hover { color: var(--blue); }
.acct-password { margin: 6px 0 12px; font-family: ui-monospace, "SF Mono", Consolas, Menlo, monospace; font-size: 13.5px; color: var(--brand-deep); word-break: break-all; cursor: pointer; }
.acct-source { flex: 0 0 auto; color: var(--faint); font-size: 11px; padding-top: 3px; }
.acct-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 14px; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11px; }
.badge-status { color: var(--green); background: var(--green-soft); }
.badge-status.dim { color: var(--muted); background: #eceff2; }
.badge-region { color: var(--blue); background: var(--blue-soft); }
.acct-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: auto; }
.copy-btn { min-height: 36px; border-radius: 8px; border: 0; font-size: 13px; font-weight: 600; color: #fff; }
.copy-account { background: var(--blue); }
.copy-account:hover { background: #1b52ad; }
.copy-password { background: var(--ink); }
.copy-password:hover { background: #3a424c; }
.empty-state { grid-column: 1 / -1; padding: 56px 20px; color: var(--muted); text-align: center; font-size: 13.5px; }

/* ===== footer ===== */
.site-footer { border-top: 1px solid var(--line); background: #eceff2; }
.footer-inner { padding: 26px 0 30px; text-align: center; }
.footer-inner p { margin: 5px 0; color: var(--muted); font-size: 12.5px; }
.footer-inner .footer-disclaimer { color: var(--faint); }
.footer-wechat strong { color: var(--green); }
.footer-brand { color: var(--faint); font-size: 11.5px !important; }

/* ===== copy toast ===== */
.copy-toast { position: fixed; left: 50%; bottom: 38px; z-index: 100; transform: translate(-50%, 14px); padding: 9px 18px; border-radius: 999px; color: #fff; background: #262c33; font-size: 13px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; box-shadow: var(--shadow-md); }
.copy-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ===== modal ===== */
.modal-backdrop { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; background: rgba(18, 24, 31, .5); opacity: 0; pointer-events: none; transition: opacity .18s; }
.modal-backdrop.visible { opacity: 1; pointer-events: auto; }
.access-modal { width: min(100%, 470px); max-height: calc(100vh - 40px); overflow-y: auto; padding: 26px 26px 24px; border-radius: 14px; background: #fff; box-shadow: 0 30px 80px -20px rgba(18,24,31,.4); transform: translateY(8px); transition: transform .18s; }
.modal-backdrop.visible .access-modal { transform: translateY(0); }
.modal-head { margin-bottom: 14px; }
.modal-head h2 { margin: 0 0 6px; font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.modal-sub { margin: 0; color: var(--muted); font-size: 13px; }
.disclaimer-list { margin: 0 0 16px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); list-style: none; }
.disclaimer-list li { color: var(--muted); font-size: 13px; padding: 2px 0; }
.disclaimer-list li::before { content: "·"; color: var(--brand); font-weight: 800; margin-right: 8px; }
.code-guide { padding: 12px 16px; border: 1px solid #cfe3d8; border-radius: 10px; background: var(--green-soft); margin-bottom: 16px; }
.code-guide-title { margin: 0 0 5px; color: var(--ink); font-size: 13.5px; font-weight: 800; }
.code-guide-text { margin: 0 0 6px; color: var(--muted); font-size: 13px; }
.code-guide-text strong { color: var(--ink); }
.wechat-name { display: inline-block; margin: 0; padding: 5px 12px; border-radius: 7px; color: #fff; background: var(--green); font-size: 13.5px; font-weight: 700; }
.modal-divider { display: flex; align-items: center; gap: 12px; margin: 2px 0 14px; color: var(--faint); font-size: 11.5px; }
.modal-divider::before, .modal-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.field-label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 12.5px; }
#accessCode { width: 100%; height: 44px; padding: 0 13px; border: 1px solid var(--line-2); border-radius: 8px; outline: 0; background: #fff; font-size: 14px; }
#accessCode:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(228,86,14,.12); }
.error-message { min-height: 18px; margin: 8px 0 0; color: var(--red); font-size: 12.5px; }
.enter-btn { display: block; width: 100%; height: 46px; margin-top: 6px; border: 0; border-radius: 8px; color: #fff; background: var(--brand); font-size: 14.5px; font-weight: 700; }
.enter-btn:hover { background: var(--brand-deep); }
.enter-btn:disabled { opacity: .6; cursor: wait; }
.modal-footnote { display: block; margin-top: 14px; color: var(--faint); font-size: 11.5px; line-height: 1.6; }

@media (max-width: 900px) {
  .section-head { flex-wrap: wrap; }
  .count-badge { margin-left: auto; }
}
@media (max-width: 860px) {
  .ad-row { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .container { width: calc(100% - 24px); }
  .brand-text small { display: none; }
  .header-inner { min-height: 56px; }
  .status-pill span { display: none; }
  .status-pill { padding: 7px; border: 0; background: none; }
  .status-pill i { width: 9px; height: 9px; }
  .refresh-btn { min-height: 28px; padding: 0 10px; }
  main { padding: 20px 0 44px; }
  .hero { padding: 22px 0 18px; }
  .hero-copy { font-size: 14px; }
  .hero-stats { gap: 22px; margin-top: 22px; }
  .accounts-section { padding: 18px 14px; }
  .account-grid { grid-template-columns: 1fr; }
  .ad-wide { padding: 16px; }
  .ad-actions { width: 100%; }
  .ad-btn { flex: 1 1 auto; }
  .access-modal { padding: 22px 18px 20px; }
  .footer-inner { padding: 22px 0 24px; }
}
