:root {
    --primary: #00e5a0;
    --primary-dark: #00b880;
    --accent: #4d7cff;
    --accent-2: #a855f7;
    --bg: #0a0e1a;
    --bg-soft: #0f1526;
    --card-bg: rgba(20, 27, 45, 0.72);
    --card-border: rgba(90, 120, 200, 0.18);
    --text: #e6ecf5;
    --text-light: #8b96ad;
    --border: rgba(120, 140, 190, 0.14);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { min-height: 100%; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                 "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    position: relative;
    overflow-x: hidden;
}

/* ===== 科技感背景 ===== */
.bg-grid {
    position: fixed;
    inset: 0;
    z-index: -3;
    background-image:
        linear-gradient(rgba(90, 120, 200, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(90, 120, 200, 0.06) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
}
.bg-glow {
    position: fixed;
    z-index: -2;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.5;
    pointer-events: none;
}
.bg-glow-1 {
    width: 520px; height: 520px;
    background: radial-gradient(circle, rgba(77,124,255,.55), transparent 70%);
    top: -180px; left: -120px;
}
.bg-glow-2 {
    width: 480px; height: 480px;
    background: radial-gradient(circle, rgba(0,229,160,.4), transparent 70%);
    top: -120px; right: -140px;
}

.container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Header ===== */
.site-header {
    background: rgba(10, 14, 26, 0.55);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 20;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 66px;
}
.logo { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 800; }
.logo-icon { font-size: 22px; filter: drop-shadow(0 0 8px rgba(0,229,160,.6)); }
.logo-text { letter-spacing: .5px; }
.logo-text em {
    font-style: normal;
    margin-left: 6px;
    font-size: 13px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    vertical-align: middle;
}
.top-nav .nav-badge {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    padding: 5px 12px;
    border: 1px solid rgba(0,229,160,.35);
    border-radius: 20px;
    background: rgba(0,229,160,.08);
    box-shadow: 0 0 16px rgba(0,229,160,.15) inset;
}
.admin-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    padding: 6px 14px;
    border: 1px solid rgba(0,229,160,.4);
    border-radius: 8px;
    transition: all .2s;
}
.admin-link:hover { background: var(--primary); color: #041014; }

/* ===== Hero ===== */
.hero { padding: 56px 0 30px; }
.hero-tag {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    color: #b9c4dd;
    padding: 6px 14px;
    border-radius: 20px;
    background: rgba(77,124,255,.12);
    border: 1px solid rgba(77,124,255,.28);
    margin-bottom: 20px;
}
.hero-title {
    font-size: 42px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -.5px;
    margin-bottom: 16px;
}
.grad-text {
    background: linear-gradient(120deg, var(--primary), var(--accent) 55%, var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    padding: 0 4px;
}
.hero-desc {
    max-width: 720px;
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 30px;
}
.hero-desc b { color: #d3ddf0; font-weight: 600; }

.hero-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 8px;
}
.feat-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    backdrop-filter: blur(8px);
    transition: transform .25s, border-color .25s, box-shadow .25s;
}
.feat-item:hover {
    transform: translateY(-3px);
    border-color: rgba(0,229,160,.4);
    box-shadow: 0 10px 30px rgba(0,0,0,.35), 0 0 24px rgba(0,229,160,.12);
}
.feat-ico {
    font-size: 24px;
    width: 46px; height: 46px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(77,124,255,.22), rgba(0,229,160,.18));
    flex-shrink: 0;
}
.feat-h { font-size: 15px; font-weight: 700; }
.feat-p { font-size: 13px; color: var(--text-light); }

/* ===== 状态栏 ===== */
.status-bar {
    margin: 28px 0 18px;
    font-size: 13.5px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 8px;
}
.status-bar::before {
    content: "";
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary);
    animation: pulse 1.6s infinite;
}
.status-bar.error { color: #ff6b6b; }
.status-bar.error::before { background: #ff6b6b; box-shadow: 0 0 10px #ff6b6b; }
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .4; transform: scale(.7); }
}

/* ===== 文章网格 / 卡片 ===== */
.accounts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 22px;
    padding-bottom: 60px;
}
.account-card {
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 18px;
    padding: 22px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow: hidden;
    transition: transform .25s, border-color .25s, box-shadow .25s;
}
.account-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--accent-2));
    opacity: .8;
}
.account-card:hover {
    transform: translateY(-4px);
    border-color: rgba(77,124,255,.42);
    box-shadow: 0 16px 40px rgba(0,0,0,.4), 0 0 30px rgba(77,124,255,.1);
}
.account-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.account-name {
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 9px;
    color: #fff;
}
.account-name::before {
    content: "";
    width: 5px;
    height: 18px;
    background: linear-gradient(var(--primary), var(--accent));
    border-radius: 3px;
    box-shadow: 0 0 10px rgba(0,229,160,.5);
}

/* 近 12 小时有更新的公众号：高亮突出 */
.account-card.fresh {
    border-color: rgba(255, 149, 61, 0.5);
    box-shadow: 0 0 0 1px rgba(255,149,61,.25), 0 12px 34px rgba(255,120,40,.12);
}
.account-card.fresh::before {
    background: linear-gradient(90deg, #ffb347, #ff6b3d, #ff3d81);
    opacity: 1;
    box-shadow: 0 0 14px rgba(255,120,40,.6);
}
.account-card.fresh:hover {
    border-color: rgba(255, 149, 61, 0.75);
    box-shadow: 0 16px 44px rgba(0,0,0,.45), 0 0 34px rgba(255,120,40,.25);
}
.fresh-badge {
    font-size: 11px;
    font-weight: 600;
    color: #ffb98a;
    padding: 2px 9px 2px 8px;
    border-radius: 20px;
    background: rgba(255,120,40,.14);
    border: 1px solid rgba(255,120,40,.35);
    white-space: nowrap;
    line-height: 1.5;
    animation: freshGlow 2.4s ease-in-out infinite;
}
@keyframes freshGlow {
    0%, 100% { box-shadow: 0 0 0 rgba(255,120,40,0); }
    50% { box-shadow: 0 0 12px rgba(255,120,40,.35); }
}
.stale-badge {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-light);
    padding: 2px 9px;
    border-radius: 20px;
    background: rgba(255,255,255,.04);
    border: 1px solid var(--border);
    white-space: nowrap;
    line-height: 1.5;
}

/* ===== AI 观点总结 ===== */
.summary-box {
    background: linear-gradient(160deg, rgba(0,229,160,.06), rgba(77,124,255,.05));
    border: 1px solid rgba(0,229,160,.18);
    border-radius: 14px;
    padding: 16px 18px;
    margin-bottom: 14px;
    font-size: 14.5px;
    line-height: 1.8;
    color: var(--text);
}
.summary-box .md-h {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
    margin: 16px 0 8px;
    padding-left: 10px;
    border-left: 3px solid var(--primary);
    text-shadow: 0 0 12px rgba(0,229,160,.3);
}
.summary-box .md-h:first-child { margin-top: 0; }
.summary-box .md-p { margin: 8px 0; color: #cdd6e8; }
.summary-box .md-ul { margin: 8px 0; padding-left: 0; list-style: none; }
.summary-box .md-ul li {
    position: relative;
    margin: 9px 0;
    padding-left: 20px;
    color: #cdd6e8;
}
.summary-box .md-ul li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 10px;
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 8px rgba(0,229,160,.7);
}
.summary-box strong {
    color: #fff;
    font-weight: 700;
    background: linear-gradient(transparent 62%, rgba(0,229,160,.28) 0);
    padding: 0 2px;
}
.summary-box code {
    background: rgba(0,229,160,.14);
    color: var(--primary);
    padding: 1px 6px;
    border-radius: 5px;
    font-size: 13px;
}
.summary-empty {
    font-size: 14px;
    color: var(--text-light);
    padding: 10px 0 14px;
}

/* ===== 参考文章折叠 ===== */
.ref-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(255,255,255,.02);
    cursor: pointer;
    user-select: none;
    transition: all .2s;
}
.ref-toggle:hover, .ref-toggle.open {
    color: var(--primary);
    border-color: rgba(0,229,160,.35);
    background: rgba(0,229,160,.06);
}
.ref-arrow { font-size: 12px; transition: transform .2s; }
.article-list { list-style: none; margin-top: 6px; }
.article-item {
    padding: 11px 12px;
    border-radius: 10px;
    transition: background .2s;
}
.article-item:hover { background: rgba(77,124,255,.08); }
.article-title {
    color: #d3ddf0;
    text-decoration: none;
    font-size: 14.5px;
    font-weight: 500;
    display: block;
}
.article-title:hover { color: var(--primary); }
.article-meta { font-size: 12px; color: var(--text-light); margin-top: 4px; }
.article-empty, .article-error {
    font-size: 14px;
    color: var(--text-light);
    padding: 8px 0;
}
.article-error { color: #ff6b6b; }

/* ================= 管理员页复用组件（深色适配） ================= */
.subtitle { color: var(--text-light); margin: 24px 0 12px; font-size: 15px; }

.site-footer {
    border-top: 1px solid var(--border);
    padding: 20px 0;
    text-align: center;
    color: var(--text-light);
    font-size: 13px;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 24px;
    margin: 20px 0;
    backdrop-filter: blur(10px);
}
.card h2 { font-size: 18px; margin-bottom: 16px; color: #fff; }

.login-card { max-width: 400px; margin: 60px auto; }
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-size: 14px; margin-bottom: 6px; color: var(--text-light); }
.form-row input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    background: rgba(255,255,255,.04);
    color: var(--text);
}
.form-row input:focus { outline: none; border-color: var(--primary); }

.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    transition: all .2s;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #041014;
    font-weight: 700;
}
.btn-primary:hover { box-shadow: 0 0 20px rgba(0,229,160,.4); }
.btn-primary:disabled { background: #2a3550; color: #7b869c; cursor: not-allowed; }
.btn-ghost {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

.error-text { color: #ff6b6b; font-size: 14px; margin-top: 10px; }
.hint { color: var(--text-light); font-size: 14px; margin-bottom: 16px; }
.hint code {
    background: rgba(255,255,255,.06);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
}

.panel-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    font-size: 14px;
}

.cred-box {
    background: rgba(255,255,255,.04);
    border-radius: 8px;
    padding: 14px;
    font-size: 14px;
    margin-bottom: 14px;
    word-break: break-all;
    font-family: monospace;
}
.cred-box .ok { color: var(--primary); }
.cred-box .no { color: #ff6b6b; }

.scan-status { margin: 14px 0; font-size: 14px; font-weight: 500; }
.scan-status.running { color: #e6a23c; }
.scan-status.success { color: var(--primary); }
.scan-status.error { color: #ff6b6b; }
.scan-log {
    background: #05070d;
    color: #9fe8c8;
    border-radius: 8px;
    padding: 14px;
    font-size: 13px;
    max-height: 240px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
}
.scan-log:empty { display: none; }

.hidden { display: none !important; }

.add-account-form {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.add-account-form input {
    flex: 1;
    min-width: 160px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    background: rgba(255,255,255,.04);
    color: var(--text);
}
.add-account-form input:focus { outline: none; border-color: var(--primary); }

.account-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 14px;
}
.account-table th,
.account-table td {
    text-align: left;
    padding: 10px 8px;
    border-bottom: 1px solid var(--border);
}
.account-table th { color: var(--text-light); font-weight: 500; }
.account-table td.mono { font-family: monospace; word-break: break-all; }

.btn-danger { background: #e54545; color: #fff; }
.btn-danger:hover { background: #c93a3a; }
.btn-sm { padding: 5px 12px; font-size: 13px; }

/* ===== 响应式 ===== */
@media (max-width: 640px) {
    .hero { padding: 36px 0 20px; }
    .hero-title { font-size: 30px; }
    .hero-desc { font-size: 15px; }
    .accounts-grid { grid-template-columns: 1fr; }
}
