* { margin: 0; padding: 0; box-sizing: border-box; } :root { --bg-color: #202124; --bg-secondary: #282a2d; --text-color: #e8eaed; --text-muted: #9aa0a6; --primary-color: #CB1E59; --primary-hover: #a61848; --border-color: #3c4043; --border-light: #303134; --code-bg: #282a2d; --card-bg: #282a2d; --footer-color: #80868b; --btn-bg: #303134; --btn-hover-bg: #3c4043; --switch-bg: #5f6368; --switch-thumb: #e8eaed; --blockquote-bg: #282a2d; --blockquote-color: #9aa0a6; } [data-theme="light"] { --bg-color: #ffffff; --bg-secondary: #f6f8fa; --text-color: #333333; --text-muted: #666666; --primary-color: #CB1E59; --primary-hover: #a61848; --border-color: #d0d7de; --border-light: #eeeeee; --code-bg: #f6f8fa; --card-bg: #ffffff; --footer-color: #999999; --btn-bg: #f6f8fa; --btn-hover-bg: #ebedf0; --switch-bg: #d0d7de; --switch-thumb: #ffffff; --blockquote-bg: #f9fafb; --blockquote-color: #444d56; } html { background: var(--bg-color); } body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Noto Sans CJK SC", sans-serif; line-height: 1.6; color: var(--text-color); background: var(--bg-color); min-height: 100vh; display: flex; flex-direction: column; } main { flex: 1; width: 100%; } .container { max-width: 960px; width: 100%; margin: 0 auto; padding: 24px 20px 40px; } .container--wide { max-width: 1280px; } @media (max-width: 768px) { .container { padding: 20px 16px 36px; } } footer { width: 100%; border-top: 1px solid var(--border-light); } .footer-inner { max-width: 1200px; margin: 0 auto; padding: 20px; text-align: center; color: var(--footer-color); font-size: 0.9em; } .footer-stats { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--border-light); } .footer-stat-item { display: inline-flex; align-items: center; gap: 5px; color: var(--text-muted); font-size: 0.9em; } .footer-stat-icon { opacity: 0.55; flex-shrink: 0; } .footer-stat-item span[id^="stat-"] { font-weight: 600; color: var(--text-color); font-variant-numeric: tabular-nums; transition: color 0.3s; } .footer-stat-label { color: var(--footer-color); font-weight: 400; } .footer-stat-divider { color: var(--border-color); font-weight: 600; font-size: 1.1em; line-height: 1; user-select: none; } .header { width: 100%; border-bottom: 1px solid var(--border-light); background: var(--bg-color); position: sticky; top: 0; z-index: 100; } .header-inner { max-width: 1200px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; height: 56px; } .header-brand { flex-shrink: 0; } .header-brand a { color: var(--primary-color); text-decoration: none; font-weight: 700; font-size: 1.15em; letter-spacing: -0.01em; } .header-nav { display: flex; align-items: center; gap: 24px; margin-left: auto; } .header-nav a { color: var(--text-muted); text-decoration: none; font-size: 0.95em; padding-bottom: 4px; border-bottom: 2px solid transparent; transition: color 0.15s, border-color 0.15s; } .header-nav a:hover { color: var(--text-color); } .header-nav a.active { color: var(--text-color); border-bottom-color: var(--primary-color); } .header-nav-actions { display: flex; align-items: center; margin-left: 8px; } .header-menu-btn { display: none; flex-direction: column; justify-content: center; align-items: center; gap: 5px; width: 36px; height: 36px; padding: 0; background: none; border: 1px solid var(--border-color); border-radius: 6px; cursor: pointer; margin-left: auto; } .menu-bar { display: block; width: 18px; height: 2px; background: var(--text-color); border-radius: 1px; transition: transform 0.2s, opacity 0.2s; } .header-menu-btn.open .menu-bar:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); } .header-menu-btn.open .menu-bar:nth-child(2) { opacity: 0; } .header-menu-btn.open .menu-bar:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); } .theme-toggle { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; background: var(--btn-bg); border: 1px solid var(--border-color); border-radius: 50%; cursor: pointer; color: var(--text-muted); transition: background 0.15s, color 0.15s, border-color 0.15s; } .theme-toggle:hover { color: var(--text-color); border-color: var(--primary-color); } .theme-toggle-icon { width: 17px; height: 17px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: opacity 0.15s; } [data-theme="dark"] .icon-sun { display: block; } [data-theme="dark"] .icon-moon { display: none; } [data-theme="light"] .icon-sun { display: none; } [data-theme="light"] .icon-moon { display: block; } @media (max-width: 768px) { .header-menu-btn { display: flex; } .header-nav { position: fixed; top: 56px; left: 0; right: 0; bottom: 0; background: var(--bg-color); flex-direction: column; align-items: center; justify-content: flex-start; gap: 0; margin-left: 0; padding-top: 32px; transform: translateX(100%); transition: transform 0.25s ease; will-change: transform; z-index: 99; } .header-nav.open { transform: translateX(0); } .header-nav a { font-size: 1.15em; padding: 14px 0; border-bottom: none; } .header-nav-actions { margin-left: 0; margin-top: 24px; } } .code-block { margin: 16px 0; border: 1px solid var(--border-color); border-radius: 8px; overflow: hidden; background: var(--card-bg); } .code-block-header { display: flex; justify-content: space-between; align-items: center; padding: 0 16px; height: 36px; background: var(--bg-secondary); border-bottom: 1px solid var(--border-color); user-select: none; } .code-block-header-left { display: flex; align-items: center; } .code-block-lang { font-size: 0.75em; font-weight: 500; color: var(--text-muted); font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace; letter-spacing: 0.02em; } .code-block-lang::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--primary-color); margin-right: 8px; vertical-align: middle; position: relative; top: -1px; } .code-block-header-right { display: flex; align-items: center; } .copy-btn { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; font-size: 0.75em; color: var(--text-muted); background: var(--btn-bg); border: 1px solid var(--border-color); border-radius: 5px; cursor: pointer; line-height: 1.5; transition: background 0.15s, border-color 0.15s, color 0.15s; } .copy-btn:hover { background: var(--btn-hover-bg); border-color: var(--primary-color); color: var(--text-color); } .copy-btn:active { background: var(--border-color); } .copy-btn.copied { color: #1a7f37; border-color: #1a7f37; background: rgba(26, 127, 55, 0.12); } .copy-btn.copied .copy-icon { stroke: #1a7f37; } .copy-icon { flex-shrink: 0; stroke: currentColor; transition: stroke 0.15s; } .code-block pre { margin: 0; padding: 16px; background: var(--code-bg); overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--border-color) transparent; } .code-block pre::-webkit-scrollbar { height: 6px; } .code-block pre::-webkit-scrollbar-track { background: transparent; } .code-block pre::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; } .code-block pre::-webkit-scrollbar-thumb:hover { background: var(--text-muted); } .code-block code { background: transparent; padding: 0; font-size: 0.88em; line-height: 1.55; font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace; color: var(--text-color); } pre.mermaid { margin: 16px 0; padding: 20px; border: 1px solid var(--border-color); border-radius: 8px; background: var(--card-bg); overflow-x: auto; text-align: center; } pre.mermaid svg { max-width: 100%; height: auto; } .code-block .c,.code-block .c1,.code-block .cm{color:#75715e} .code-block .k,.code-block .kc,.code-block .kd,.code-block .kn,.code-block .kp,.code-block .kr,.code-block .kt{color:#66d9ef} .code-block .na,.code-block .nc,.code-block .no,.code-block .nd,.code-block .ni,.code-block .ne,.code-block .nf,.code-block .nl{color:#a6e22e} .code-block .s,.code-block .s1,.code-block .s2,.code-block .sb,.code-block .sc,.code-block .sd,.code-block .se,.code-block .sh,.code-block .si,.code-block .sx{color:#e6db74} .code-block .m,.code-block .mb,.code-block .mf,.code-block .mh,.code-block .mi,.code-block .mo{color:#ae81ff} .code-block .o,.code-block .ow{color:#f92672} .code-block .p{color:#f8f8f2} .code-block .n{color:#f8f8f2} .code-block .nb,.code-block .bp{color:#f8f8f2;font-style:italic} .code-block .nv,.code-block .vc,.code-block .vg,.code-block .vi{color:#f8f8f2} .code-block .nt{color:#f92672} .code-block .nn{color:#f8f8f2} .code-block .cp,.code-block .cpf{color:#75715e} .code-block .err{color:#960050;background-color:#1e0010} .home-hero { padding: 40px 0 36px; text-align: center; } .home-hero-avatar { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; margin-bottom: 16px; border: 3px solid var(--border-color); } .home-hero-title { font-size: 1.8em; font-weight: 700; color: var(--text-color); margin-bottom: 4px; } .home-hero-subtitle { font-size: 0.95em; color: var(--text-muted); margin-bottom: 6px; } .home-hero-owner { font-size: 0.85em; color: var(--text-muted); margin-bottom: 24px; } .home-hero-divider { width: 60px; height: 2px; background: var(--primary-color); margin: 0 auto 32px; border-radius: 1px; } .home-logo { text-align: center; margin-bottom: 36px; } .home-logo img { width: 420px; max-width: 100%; height: auto; } .home-posts { margin-top: 8px; } .home-posts--cols { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; } .home-posts-col-title { font-size: 1.05em; font-weight: 700; color: var(--text-color); margin-bottom: 18px; padding-bottom: 10px; border-bottom: 2px solid var(--primary-color); } @media (max-width: 768px) { .home-posts--cols { grid-template-columns: 1fr; gap: 28px; } } .post-item { margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border-light); } .post-item:last-child { border-bottom: none; } .post-item-row { display: flex; justify-content: space-between; align-items: baseline; } .post-item-row h3 { margin: 0; } .post-item-title { color: var(--primary-color); font-size: 1em; } .post-item-row time { color: var(--text-muted); font-size: 0.9em; white-space: nowrap; margin-left: 16px; } .post-item .excerpt { margin-top: 6px; margin-bottom: 10px; color: var(--text-muted); font-size: 0.92em; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; } .post-item-more { display: flex; justify-content: flex-end; } .post-item-more a { color: var(--text-muted); text-decoration: none; font-size: 0.85em; transition: color 0.15s; } .post-item-more a:hover { color: var(--primary-color); } .home-readmore { text-align: center; margin-top: 24px; } .home-readmore a { display: inline-block; padding: 8px 24px; color: var(--primary-color); border: 1px solid var(--primary-color); border-radius: 6px; text-decoration: none; font-size: 0.9em; transition: background 0.15s, color 0.15s; } .home-readmore a:hover { background: var(--primary-color); color: #fff; } .post h2 { margin-bottom: 12px; } .post-meta-top { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; padding-bottom: 18px; border-bottom: 1px solid var(--border-light); flex-wrap: wrap; } .post-author-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 1.5px solid var(--border-color); } .post-meta-row { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; font-size: 0.88em; color: var(--text-muted); } .post-author { font-weight: 600; color: var(--text-color); } .post-meta-sep { color: var(--border-color); user-select: none; } .post-date, .post-updated, .post-location { font-size: 1em; } .post-updated { opacity: 0.7; } .post-location::before { content: '📍'; margin-right: 3px; } .post-cover { width: 100%; max-height: 420px; object-fit: cover; border-radius: 8px; margin-bottom: 28px; border: 1px solid var(--border-light); } .post-body { line-height: 1.8; } .post-body h2, .post-body h3 { margin: 20px 0 10px; } .post-body p { margin-bottom: 15px; } .post-body a { color: var(--primary-color); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.15s; } .post-body a:hover { border-bottom-color: var(--primary-color); } .post-body img { max-width: 100%; height: auto; border-radius: 4px; margin: 8px 0; } .post-body code { background: var(--code-bg); padding: 2px 6px; border-radius: 3px; font-size: 0.9em; font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace; } .post-body pre { background: var(--code-bg); padding: 16px; border-radius: 6px; overflow-x: auto; margin-bottom: 15px; } .post-body blockquote { margin: 16px 0; padding: 12px 20px; border-left: 4px solid var(--primary-color); background: var(--blockquote-bg); color: var(--blockquote-color); border-radius: 0 4px 4px 0; } .post-body blockquote p { margin: 0; } .post-body blockquote p + p { margin-top: 8px; } .post-body blockquote strong { color: var(--text-color); } .post-body hr { margin: 24px 0; border: none; border-top: 1px solid var(--border-light); } .post-body table { width: 100%; border-collapse: collapse; margin-bottom: 18px; font-size: 0.94em; } .post-body thead { background: var(--bg-secondary); } .post-body th { padding: 10px 14px; text-align: left; font-weight: 600; border: 1px solid var(--border-color); color: var(--text-color); } .post-body td { padding: 8px 14px; border: 1px solid var(--border-color); color: var(--text-muted); } .post-body tbody tr:nth-child(even) { background: var(--bg-secondary); } .post-body ul, .post-body ol { padding-left: 1.6em; margin-bottom: 15px; } .post-body ul ul, .post-body ul ol, .post-body ol ul, .post-body ol ol { margin-bottom: 0; } .post-body li { margin-bottom: 4px; } .post-body li:last-child { margin-bottom: 0; } .about-title { font-size: 1.8em; font-weight: 700; margin-bottom: 24px; color: var(--text-color); } .about-page h2 { margin-bottom: 16px; } .articles-header { margin-bottom: 28px; } .articles-header h2 { font-size: 1.4em; margin-bottom: 4px; } .articles-header .articles-count { color: var(--text-muted); font-size: 0.85em; } .post-list-item { display: flex; justify-content: space-between; align-items: baseline; padding: 5px 0; } .post-list-item a { color: var(--primary-color); text-decoration: none; font-size: 1em; } .post-list-item a:hover { text-decoration: underline; } .post-list-item time { color: var(--text-muted); font-size: 0.9em; white-space: nowrap; margin-left: 16px; } .pagination { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--border-light); } .pagination a, .pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; padding: 0 8px; border-radius: 6px; font-size: 0.9em; text-decoration: none; color: var(--text-muted); border: 1px solid var(--border-color); background: var(--btn-bg); transition: background 0.15s, color 0.15s, border-color 0.15s; } .pagination a:hover { color: var(--text-color); border-color: var(--primary-color); background: transparent; } .pagination .page-current { color: #fff; background: var(--primary-color); border-color: var(--primary-color); } .pagination .page-disabled { opacity: 0.4; cursor: default; } .pagination .page-disabled:hover { color: var(--text-muted); border-color: var(--border-color); } .friends-title { font-size: 1.8em; font-weight: 700; margin-bottom: 28px; color: var(--text-color); } .friends-body { line-height: 1.8; } .friends-body h2 { font-size: 1.25em; font-weight: 700; margin: 28px 0 16px; color: var(--text-color); } .friends-body p { margin-bottom: 16px; color: var(--text-muted); font-size: 0.92em; } .friends-body ul { list-style: none; padding: 0; margin: 0; } .friends-body li { padding: 10px 0; border-bottom: 1px solid var(--border-light); } .friends-body li:last-child { border-bottom: none; } .friends-body a { color: var(--primary-color); text-decoration: none; font-size: 0.95em; transition: color 0.15s; } .friends-body a:hover { text-decoration: underline; }