/* Gmeek 复刻版样式：结构来自 Gmeek 的 base/plist/post/tag 模板，界面依赖 Primer CSS */

/* ---------- base ---------- */
body {
    box-sizing: border-box;
    min-width: 200px;
    max-width: 900px;
    margin: 20px auto;
    padding: 45px;
    font-size: 16px;
    font-family: sans-serif;
    line-height: 1.25;
}
#header {
    display: flex;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--borderColor-muted, var(--color-border-muted));
    margin-bottom: 16px;
}
#footer {
    margin-top: 64px;
    text-align: center;
    font-size: small;
}
#footer a {
    color: var(--color-fg-default);
}

/* ---------- 首页 / 列表 ---------- */
.avatar {
    transition: 0.8s;
    width: 64px;
    height: 64px;
    object-fit: cover;
}
.avatar:hover {
    transform: scale(1.15) rotate(360deg);
}
.title-left a {
    color: inherit;
    text-decoration: none;
    vertical-align: bottom;
    font-size: 40px;
    font-weight: bold;
    font-family: Monaco;
    margin-left: 8px;
}
.title-left {
    display: flex;
    align-items: center;
}
.title-right {
    display: flex;
    margin: auto 0 0 auto;
}
.title-right button {
    margin-right: 8px;
    padding: 16px;
}
.title-right .circle {
    padding: 14px 16px;
}
.SideNav {
    min-width: 360px;
}
.SideNav-icon {
    margin-right: 16px;
}
.SideNav-item .Label {
    color: #fff;
    margin-left: 4px;
}
.d-flex {
    min-width: 0;
}
.listTitle {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 100%;
}
.listLabels {
    white-space: nowrap;
    display: flex;
}
.listLabels object {
    max-height: 16px;
    max-width: 24px;
}
.listLabels .LabelName {
    padding: 2px 5px;
}

/* ---------- 文章页 ---------- */
.postTitle {
    margin: auto 0;
    font-size: 40px;
    font-weight: bold;
}
#postBody {
    border-bottom: 1px solid var(--color-border-default);
    padding-bottom: 36px;
}
#postBody hr {
    height: 2px;
}
.g-emoji {
    font-size: 24px;
}
.copy-feedback {
    display: none;
    position: absolute;
    top: 10px;
    right: 50px;
    color: var(--color-fg-on-emphasis);
    background-color: var(--color-fg-muted);
    border-radius: 3px;
    padding: 5px 8px;
    font-size: 12px;
}

/* 代码块右上角复制按钮（Primer 里没有这套组件，样式自补） */
.snippet-clipboard-content {
    position: relative;
    overflow: auto;
    border-radius: 6px;
    margin-bottom: 16px;
}
.snippet-clipboard-content > pre {
    margin: 0;
}
.clipboard-container {
    z-index: 2;
}
.ClipboardButton {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--color-border-default);
    background: var(--color-canvas-subtle);
}
.ClipboardButton svg {
    display: block;
}

/* ---------- 标签 / 搜索页 ---------- */
.tagTitle {
    margin: auto 0;
    font-size: 40px;
    font-weight: bold;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.subnav-search {
    width: 222px;
    margin-top: 8px;
    margin-right: 8px;
}
.subnav-search-input {
    width: 160px;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}
.subnav-search button {
    padding: 5px 8px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}
#taglabel .Label {
    margin-bottom: 8px;
}
#taglabel .Counter {
    margin-left: 4px;
}
.Counter {
    color: #fff;
    background-color: rgba(234, 238, 242, 0.5);
}
.genTime {
    float: right;
}
.listLabels {
    text-align: right;
}

/* ---------- GitHub 风格提示块 > [!NOTE] ---------- */
.markdown-alert {
    padding: 0.5rem 1rem;
    margin-bottom: 1rem;
    border-left: 0.25em solid var(--borderColor-default, var(--color-border-default));
}
.markdown-alert .markdown-alert-title {
    display: flex;
    font-weight: var(--base-text-weight-medium, 500);
    align-items: center;
    line-height: 1;
}
.markdown-alert > :first-child {
    margin-top: 0;
}
.markdown-alert > :last-child {
    margin-bottom: 0;
}
.markdown-alert.markdown-alert-note {
    border-left-color: var(--borderColor-accent-emphasis, var(--color-accent-emphasis));
    background-color: var(--color-accent-subtle);
}
.markdown-alert.markdown-alert-note .markdown-alert-title {
    color: var(--fgColor-accent, var(--color-accent-fg));
}
.markdown-alert.markdown-alert-tip {
    border-left-color: var(--borderColor-success-emphasis, var(--color-success-emphasis));
    background-color: var(--color-success-subtle);
}
.markdown-alert.markdown-alert-tip .markdown-alert-title {
    color: var(--fgColor-success, var(--color-success-fg));
}
.markdown-alert.markdown-alert-important {
    border-left-color: var(--borderColor-done-emphasis, var(--color-done-emphasis));
    background-color: var(--color-done-subtle);
}
.markdown-alert.markdown-alert-important .markdown-alert-title {
    color: var(--fgColor-done, var(--color-done-fg));
}
.markdown-alert.markdown-alert-warning {
    border-left-color: var(--borderColor-attention-emphasis, var(--color-attention-emphasis));
    background-color: var(--color-attention-subtle);
}
.markdown-alert.markdown-alert-warning .markdown-alert-title {
    color: var(--fgColor-attention, var(--color-attention-fg));
}
.markdown-alert.markdown-alert-caution {
    border-left-color: var(--borderColor-danger-emphasis, var(--color-danger-emphasis));
    background-color: var(--color-danger-subtle);
}
.markdown-alert.markdown-alert-caution .markdown-alert-title {
    color: var(--fgColor-danger, var(--color-danger-fg));
}

/* ---------- 公式块：横向滚动，不撑破正文宽度 ---------- */
.gmeek-math {
    overflow-x: auto;
    overflow-y: hidden;
    margin-bottom: 16px;
}

/* ---------- 移动端（和 Gmeek 一致） ---------- */
@media (max-width: 600px) {
    body {
        padding: 8px;
    }
    .avatar {
        width: 40px;
        height: 40px;
    }
    .blogTitle {
        display: none;
    }
    #buttonRSS {
        display: none;
    }
    .LabelTime {
        display: none;
    }
    .postTitle {
        font-size: 24px;
    }
    .tagTitle {
        display: none;
    }
}
