/* 盘神资源站 · 明暗主题扩展（v1） */
html[data-z-theme="dark"] {
    color-scheme: dark;
    --blue: #74a9ff;
    --blue-dark: #9bc2ff;
    --blue-soft: #172b47;
    --ink: #e9f1fb;
    --text: #c7d4e5;
    --muted: #93a6bd;
    --line: #28384c;
    --bg: #0d1520;
    --white: #162233;
    --orange: #ffb84d;
    --green: #48d39a;
    --red: #ff7b7b;
}
html[data-z-theme="dark"],
html[data-z-theme="dark"] body {
    background: var(--bg);
    color: var(--text);
}
html[data-z-theme="dark"] .site-header,
html[data-z-theme="dark"] .site-footer,
html[data-z-theme="dark"] .side-card,
html[data-z-theme="dark"] .content-card,
html[data-z-theme="dark"] .save-notice {
    background: var(--white);
    border-color: var(--line);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .22);
}
html[data-z-theme="dark"] .brand-text strong,
html[data-z-theme="dark"] .side-title,
html[data-z-theme="dark"] .post-row h3,
html[data-z-theme="dark"] .post-row h3 a,
html[data-z-theme="dark"] .moment-title,
html[data-z-theme="dark"] .moment-title a,
html[data-z-theme="dark"] .article-title,
html[data-z-theme="dark"] .article-title a,
html[data-z-theme="dark"] .section-title,
html[data-z-theme="dark"] .section-title span,
html[data-z-theme="dark"] h1,
html[data-z-theme="dark"] h2,
html[data-z-theme="dark"] h3,
html[data-z-theme="dark"] h4,
html[data-z-theme="dark"] .footer-brand {
    color: var(--ink);
}
html[data-z-theme="dark"] .main-nav a,
html[data-z-theme="dark"] .side-nav a,
html[data-z-theme="dark"] .hot-list a,
html[data-z-theme="dark"] .post-row-meta,
html[data-z-theme="dark"] .post-row-side,
html[data-z-theme="dark"] .footer-inner p,
html[data-z-theme="dark"] .footer-links a,
html[data-z-theme="dark"] .footer-bottom,
html[data-z-theme="dark"] .announcement-text {
    color: var(--muted);
}
html[data-z-theme="dark"] .main-nav a:hover,
html[data-z-theme="dark"] .main-nav a.active,
html[data-z-theme="dark"] .side-nav a:hover,
html[data-z-theme="dark"] .side-nav a.active {
    color: var(--blue);
    background: var(--blue-soft);
}
html[data-z-theme="dark"] .header-search,
html[data-z-theme="dark"] .side-search input {
    background: #0f1b2a;
    border-color: var(--line);
    color: var(--ink);
}
html[data-z-theme="dark"] .header-search input,
html[data-z-theme="dark"] .side-search input {
    color: var(--ink);
}
html[data-z-theme="dark"] .post-row,
html[data-z-theme="dark"] .moment-card,
html[data-z-theme="dark"] .moment-head,
html[data-z-theme="dark"] .moment-foot {
    border-color: var(--line);
}
html[data-z-theme="dark"] .article-content,
html[data-z-theme="dark"] .moment-text,
html[data-z-theme="dark"] .article-content p,
html[data-z-theme="dark"] .moment-text p {
    color: var(--text);
}
html[data-z-theme="dark"] .article-content blockquote {
    background: #0f1b2a;
    border-color: var(--blue);
    color: var(--muted);
}
html[data-z-theme="dark"] .article-content pre,
html[data-z-theme="dark"] .article-content code {
    background: #0b1420;
    color: #d9e7ff;
}
html[data-z-theme="dark"] .article-content table th {
    background: #1b2b3e;
}
html[data-z-theme="dark"] .article-content table td,
html[data-z-theme="dark"] .article-content table th {
    border-color: var(--line);
}
html[data-z-theme="dark"] .mini-tag {
    background: var(--blue-soft);
    color: var(--blue);
}
html[data-z-theme="dark"] .flash {
    background: #162233;
    color: var(--ink);
}
html[data-z-theme="dark"] .article-image {
    border-radius: 6px;
    margin: 14px auto;
    max-width: 100%;
    height: auto;
}
html[data-z-theme="dark"] .article-video {
    background: #000;
}

/* 悬浮切换按钮：浅色/深色，单键循环 */
.z-theme-toggle {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 80;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(127, 153, 183, .35);
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    color: #24344a;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(15, 30, 50, .16);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform .18s ease, background .18s ease, color .18s ease;
}
.z-theme-toggle:hover { transform: translateY(-2px); }
html[data-z-theme="dark"] .z-theme-toggle {
    background: rgba(22, 34, 51, .9);
    color: #e9f1fb;
    border-color: rgba(116, 169, 255, .35);
}
@media (max-width: 720px) {
    .z-theme-toggle { right: 12px; bottom: 72px; width: 40px; height: 40px; font-size: 18px; }
}
