:root {
    --bg: #f5f8fc;
    --bg-soft: #eaf1f8;
    --surface: #ffffff;
    --text: #12151a;
    --text-sub: #5c6675;
    --muted: #8b93a1;
    --line: rgba(18, 21, 26, 0.08);
    --accent: #1a8fd8;
    --accent-soft: #e7f4fc;
    --accent-deep: #0d6eab;
    --danger: #c23b3b;
    --warn: #b7791f;
    --ok: #1a8fd8;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgba(18,21,26,.04), 0 8px 24px rgba(18,21,26,.05);
    --shadow-hover: 0 2px 6px rgba(18,21,26,.06), 0 16px 40px rgba(18,21,26,.08);
    --font: "Manrope", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
    --max: 640px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background:
        radial-gradient(1200px 500px at 10% -10%, #e3f1fb 0%, transparent 55%),
        radial-gradient(900px 420px at 100% 0%, #eef3f9 0%, transparent 50%),
        var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; }

/* ── Layout ── */
.site-wrap {
    width: min(100%, var(--max));
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Nav ── */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,.86);
    backdrop-filter: saturate(160%) blur(16px);
    -webkit-backdrop-filter: saturate(160%) blur(16px);
    border-bottom: 1px solid var(--line);
}

.nav-bar {
    display: flex;
    align-items: center;
    height: 56px;
    padding: 0 16px;
    gap: 12px;
}

.nav-back {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: var(--bg-soft);
    display: grid;
    place-items: center;
    transition: background .2s, transform .2s;
}
.nav-back:active { transform: scale(.96); background: #e4e8ee; }

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.brand-mark {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: linear-gradient(145deg, var(--accent), #4db0ea);
    color: #fff;
    font-weight: 800;
    font-size: 13px;
    display: grid;
    place-items: center;
    letter-spacing: .5px;
    box-shadow: 0 6px 16px rgba(26,143,216,.28);
}
.brand-text {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: .2px;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.brand-text span {
    color: var(--accent);
}

.nav-spacer { flex: 1; }

.nav-link-admin {
    font-size: 12px;
    color: var(--muted);
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--line);
}

/* Tabs */
.tab-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 14px 14px;
    justify-content: flex-start;
}

.tab-inner {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 16px;
    border-radius: 999px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-sub);
    background: var(--bg-soft);
    transition: all .25s cubic-bezier(.4,0,.2,1);
    white-space: nowrap;
}
.tab.active .tab-inner,
.tab-inner.is-active {
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(26,143,216,.22);
}
.tab:not(.active):active .tab-inner { background: #e2e7ee; }

/* Hero strip */
.hero-strip {
    padding: 22px 16px 6px;
}
.hero-strip h1 {
    font-size: clamp(22px, 5vw, 28px);
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.25;
}
.hero-strip p {
    margin-top: 6px;
    color: var(--text-sub);
    font-size: 14px;
}

/* Cards list */
.list-wrap {
    padding: 10px 14px 28px;
    flex: 1;
}

.card-link {
    display: block;
    margin-bottom: 14px;
    animation: rise .45s ease both;
}
.card-link:nth-child(1) { animation-delay: .02s; }
.card-link:nth-child(2) { animation-delay: .06s; }
.card-link:nth-child(3) { animation-delay: .1s; }
.card-link:nth-child(4) { animation-delay: .14s; }
.card-link:nth-child(5) { animation-delay: .18s; }

@keyframes rise {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}

.card {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    transition: transform .2s, box-shadow .25s, border-color .25s;
}
.card-link:hover .card {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(26,143,216,.28);
}
.card-link:active .card { transform: scale(.985); }

.card-img-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #edf2f0, #e8eef5);
    overflow: hidden;
}
.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255,255,255,.92);
    color: var(--accent-deep);
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    backdrop-filter: blur(8px);
}
.card-top {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 999px;
}

.card-body {
    padding: 14px 16px 16px;
}
.card-title {
    font-size: 15.5px;
    font-weight: 700;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-meta {
    margin-top: 10px;
    display: flex;
    gap: 12px;
    color: var(--muted);
    font-size: 12px;
}

/* Empty */
.empty {
    text-align: center;
    padding: 72px 20px;
    color: var(--muted);
}
.empty-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    border-radius: 16px;
    background: var(--bg-soft);
    display: grid;
    place-items: center;
}

/* Pager */
.pager {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 8px 0 20px;
}
.pager a, .pager span {
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border: 1px solid var(--line);
    font-size: 13px;
    font-weight: 600;
}
.pager .current {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* Copyright */
.copyright {
    padding: 8px 20px 36px;
    text-align: center;
    font-size: 12px;
    color: var(--muted);
    line-height: 1.9;
}

/* Detail — 媒体优先阅读页 */
.article {
    padding: 14px 0 28px;
}
.article-head {
    padding: 6px 16px 14px;
}
.article-cat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-deep);
    font-size: 12px;
    font-weight: 700;
}
.article h1 {
    margin-top: 10px;
    font-size: clamp(20px, 5vw, 26px);
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.35;
}
.article-meta {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--muted);
    font-size: 12.5px;
}
.article-cover {
    margin: 0 0 8px;
    overflow: hidden;
    background: #eef3f8;
}
.article-cover img {
    width: 100%;
    height: auto;
    display: block;
}
.article-content {
    padding: 8px 0 12px;
    font-size: 15.5px;
    color: #2a303a;
    line-height: 1.8;
}
.article-content > *:first-child { margin-top: 0; }
.article-content p {
    margin: 0;
    padding: 0 16px;
}
.article-content p:has(img),
.article-content p:has(video) {
    padding: 0;
}
.article-content p + p { margin-top: .85em; }
.article-content img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0;
    border-radius: 0;
    background: #eef3f8;
}
.article-content video,
.article-content .media-video,
.article-content [data-w-e-type="video"] {
    display: block;
    width: 100%;
    margin: 10px 0;
    background: #0b1220;
}
.article-content video {
    width: 100%;
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}
.article-content h2, .article-content h3 {
    margin: 1.2em 16px .5em;
    font-weight: 800;
}
.article-foot {
    margin: 20px 16px 0;
    padding: 16px;
    border-radius: 14px;
    background: linear-gradient(180deg, #f7fbff, #eef5fb);
    border: 1px solid rgba(26,143,216,.12);
}
.article-foot h3 {
    font-size: 14px;
    font-weight: 800;
    color: var(--accent-deep);
    margin-bottom: 6px;
}
.article-foot p {
    font-size: 12.5px;
    color: var(--text-sub);
    line-height: 1.75;
}

/* Modal disclaimer */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 14, 20, .48);
    backdrop-filter: blur(6px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-card {
    width: min(100%, 420px);
    background: #fff;
    border-radius: 18px;
    padding: 32px 26px 24px;
    box-shadow: 0 24px 60px rgba(0,0,0,.2);
    animation: pop .35s cubic-bezier(.34,1.4,.64,1);
}
@keyframes pop {
    from { opacity: 0; transform: translateY(24px) scale(.94); }
    to { opacity: 1; transform: none; }
}
.modal-title {
    text-align: center;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 16px;
}
.modal-body {
    font-size: 14px;
    color: #555e6b;
    line-height: 1.8;
    max-height: 42vh;
    overflow: auto;
    white-space: pre-wrap;
    margin-bottom: 22px;
}
.modal-body::-webkit-scrollbar { width: 4px; }
.modal-body::-webkit-scrollbar-thumb { background: #d5dbe3; border-radius: 4px; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px 18px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
    transition: transform .15s, box-shadow .2s, background .2s;
}
.btn:active { transform: scale(.97); }
.btn-primary {
    background: linear-gradient(135deg, var(--accent), #4db0ea);
    color: #fff;
    box-shadow: 0 8px 22px rgba(26,143,216,.28);
}
.btn-ghost {
    background: var(--bg-soft);
    color: var(--text);
}
.btn-danger {
    background: #fff1f1;
    color: var(--danger);
}
.btn-block { width: 100%; }
.btn-sm { padding: 7px 12px; font-size: 12.5px; border-radius: 9px; }

/* Alerts */
.alert {
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 14px;
    margin-bottom: 16px;
}
.alert.ok { background: #e9f7f1; color: var(--ok); }
.alert.err { background: #fff0f0; color: var(--danger); }
.alert.warn { background: #fff8e8; color: var(--warn); }

/* Install */
.install-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}
.install-shell { width: min(100%, 440px); }
.install-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 32px 28px;
    box-shadow: var(--shadow-hover);
}
.install-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(145deg, var(--accent), #4db0ea);
    color: #fff;
    font-weight: 800;
    margin-bottom: 16px;
    box-shadow: 0 10px 24px rgba(26,143,216,.25);
}
.install-card h1 {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -.02em;
}
.install-desc {
    margin: 8px 0 20px;
    color: var(--text-sub);
    font-size: 14px;
}
.install-form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-sub);
    margin-bottom: 14px;
}
.install-form input {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #fafbfc;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}
.install-form input:focus {
    border-color: rgba(26,143,216,.45);
    box-shadow: 0 0 0 4px rgba(26,143,216,.12);
    background: #fff;
}
.install-actions {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}
.install-hint {
    margin-top: 18px;
    font-size: 12px;
    color: var(--muted);
    line-height: 1.7;
}
.install-hint code, .alert code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .92em;
    background: var(--bg-soft);
    padding: 1px 5px;
    border-radius: 4px;
}

/* ── Admin（浅蓝白企业风） ── */
.admin-body {
    background:
        radial-gradient(900px 420px at 0% 0%, #dff0fb 0%, transparent 55%),
        #f4f8fc;
    min-height: 100vh;
}
.admin-shell {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 100vh;
}
.admin-side {
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(12px);
    border-right: 1px solid rgba(26,143,216,.12);
    padding: 22px 14px;
    position: sticky;
    top: 0;
    height: 100vh;
}
.admin-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px 22px;
    font-weight: 800;
    color: var(--text);
    font-size: 17px;
}
.admin-logo .logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: linear-gradient(145deg, #1a8fd8, #5bb8ef);
    color: #fff;
    display: grid;
    place-items: center;
    box-shadow: 0 8px 18px rgba(26,143,216,.28);
}
.admin-logo .logo-mark svg { display: block; }
.admin-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border-radius: 12px;
    color: #5c6b7a;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    transition: background .2s, color .2s, box-shadow .2s;
}
.admin-nav a svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: .85;
}
.admin-nav a:hover {
    background: #eef6fc;
    color: var(--accent-deep);
}
.admin-nav a.active {
    background: linear-gradient(135deg, #e8f4fc, #d9eefb);
    color: var(--accent-deep);
    box-shadow: inset 0 0 0 1px rgba(26,143,216,.18);
}
.admin-nav a.nav-danger:hover {
    background: #fff1f1;
    color: var(--danger);
}
.admin-main {
    padding: 28px;
}
.admin-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}
.admin-top h1 {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -.02em;
}
.admin-card {
    background: #fff;
    border: 1px solid rgba(26,143,216,.1);
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 8px 28px rgba(26,100,160,.05);
}
.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 18px;
}
.stat {
    background: #fff;
    border: 1px solid rgba(26,143,216,.1);
    border-radius: 18px;
    padding: 18px;
    position: relative;
    overflow: hidden;
}
.stat::after {
    content: "";
    position: absolute;
    right: -20px;
    top: -20px;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: rgba(26,143,216,.08);
}
.stat .label { color: var(--muted); font-size: 13px; font-weight: 600; }
.stat .num {
    margin-top: 6px;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -.03em;
    color: var(--accent-deep);
}

.table-wrap { overflow: auto; }
table.data {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
table.data th, table.data td {
    text-align: left;
    padding: 12px 10px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}
table.data th {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}
table.data tr:hover td { background: #fafbfc; }
.thumb {
    width: 56px;
    height: 40px;
    object-fit: cover;
    border-radius: 8px;
    background: var(--bg-soft);
}
.badge {
    display: inline-flex;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}
.badge.on { background: var(--accent-soft); color: var(--accent-deep); }
.badge.off { background: #f1f3f6; color: var(--muted); }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }

.form-grid {
    display: grid;
    gap: 14px;
}
.form-grid label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-sub);
}
.form-grid input,
.form-grid select,
.form-grid textarea {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 11px 12px;
    border-radius: 11px;
    border: 1px solid var(--line);
    background: #fafbfc;
    outline: none;
}
.form-grid textarea { min-height: 220px; resize: vertical; line-height: 1.7; }
.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus {
    border-color: rgba(26,143,216,.45);
    box-shadow: 0 0 0 4px rgba(26,143,216,.1);
    background: #fff;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 8px;
    flex-wrap: wrap;
}

/* Editor */
.editor-box {
    border: 1px solid rgba(26,143,216,.14);
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
}
.editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    background: linear-gradient(180deg, #f7fbff, #eef6fc);
    border-bottom: 1px solid rgba(26,143,216,.1);
}
.editor-toolbar .tool-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid rgba(26,143,216,.14);
    background: #fff;
    color: var(--accent-deep);
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s, transform .15s;
}
.editor-toolbar .tool-btn:hover { background: #e8f4fc; }
.editor-toolbar .tool-btn:active { transform: scale(.97); }
.editor-toolbar .tool-btn svg { width: 15px; height: 15px; }
.editor-toolbar .tool-btn.is-busy { opacity: .55; pointer-events: none; }
.editor-area {
    width: 100%;
    min-height: 360px;
    border: 0;
    padding: 14px 16px;
    resize: vertical;
    line-height: 1.7;
    outline: none;
    background: #fff;
    font-size: 14px;
}
.editor-hint {
    margin-top: 8px;
    font-size: 12px;
    color: var(--muted);
    line-height: 1.6;
}
.editor-preview {
    margin-top: 14px;
    border: 1px dashed rgba(26,143,216,.25);
    border-radius: 14px;
    padding: 12px;
    background: #fafcfe;
}
.editor-preview .label {
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    margin-bottom: 8px;
}
.cover-preview {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}
.cover-preview img {
    width: 160px;
    height: 90px;
    object-fit: cover;
    border-radius: 10px;
    background: var(--bg-soft);
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(800px 400px at 20% 0%, #dff0fb, transparent 60%),
        #f4f8fc;
}
.login-card {
    width: min(100%, 400px);
    background: #fff;
    border: 1px solid rgba(26,143,216,.12);
    border-radius: 20px;
    padding: 32px 28px;
    box-shadow: 0 16px 40px rgba(26,100,160,.08);
}
.login-card h1 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 6px;
}
.login-card .sub {
    color: var(--text-sub);
    font-size: 14px;
    margin-bottom: 22px;
}
.login-brand {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(145deg, #1a8fd8, #5bb8ef);
    display: grid;
    place-items: center;
    margin-bottom: 16px;
    color: #fff;
    box-shadow: 0 10px 24px rgba(26,143,216,.25);
}

@media (max-width: 860px) {
    .admin-shell { grid-template-columns: 1fr; }
    .admin-side {
        position: relative;
        height: auto;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 4px;
        padding: 12px;
    }
    .admin-logo { padding: 4px 8px; width: 100%; }
    .admin-nav { display: flex; flex-wrap: wrap; gap: 4px; width: 100%; }
    .admin-nav a { margin: 0; padding: 8px 12px; font-size: 13px; }
    .admin-main { padding: 16px; }
    .stats { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 400px) {
    .card-title { font-size: 14.5px; }
    .brand-text { font-size: 16px; }
}
