@charset "utf-8";

.post-md {
    width: 100%;
    font-size: 16px;
    letter-spacing: 0;
}

.post-md h1,
.post-md h2,
.post-md h3,
.post-md h4,
.post-md h5,
.post-md h6 {
    color: var(--font-color-1);
    margin: 12px 0;
}

.post-md h1 {
    font-size: 2rem;
    line-height: 1.2;
    padding: 24px 0;
}

.post-md h2 {
    font-size: 1.6rem;
    line-height: 1.2;
    padding: 20px 0;
}

.post-md h3 {
    font-size: 1.4rem;
    line-height: 1.2;
    padding: 18px 0;
}

.post-md h4 {
    font-size: 1.2rem;
    line-height: 1.2;
    padding: 16px 0;
}

.post-md h5 {
    font-size: 1.15rem;
    line-height: 1.2;
    padding: 14px 0;
}

.post-md h6 {
    font-size: 1.1rem;
    line-height: 1.2;
    padding: 12px 0;
}

.post-md a {
    color: var(--font-color-0);
    /* box-shadow: 0 1.5px 0 #de1267; */
    /* text-decoration: underline dotted; */
    transition: color ease-in-out .65s, box-shadow ease-in-out .65s;
}

.post-md a:hover {
    color: var(--font-color-0);
    box-shadow: 0 2px 0 var(--font-color-0);
    transition: color ease-in-out .65s, box-shadow ease-in-out .65s;
}

.post-md strong {
    font-weight: 700;
}

.post-md em {
    font-style: italic;
}

.post-md kbd {
    padding: 2px 4px;
    border-radius: 2px;
    background: #eee;
    border: 1px solid #ddd;
}

.post-md ol {
    list-style: decimal;
    padding-left: 24px;
}

.post-md ul {
    list-style: disc;
    padding-left: 24px;
}

.post-md img {
    border-radius: 4px;
    box-sizing: border-box;
    padding: 5px 5px;
    border: 1px solid #ebebeb;
}

.post-md hr {
    border: none;
    height: 1px;
    background: var(--line-1);
    margin: 24px 0;
}

.post-md p,
.post-md blockquote {
    width: 100%;
    margin: 12px 0;
}

.post-md blockquote {
    border-left: 2px solid var(--line-2);
    padding-left: 12px;
    word-wrap: break-word;
}

.post-md .video-container {
    background: #000;
    border-radius: 4px;
    overflow: hidden;
}

.post-md iframe,
.post-md .video-container iframe {
    width: 100%;
    height: 100vh;
    max-height: 360px;
    margin: 12px 0;
}

.post-md>table {
    width: 100%;
    text-align: left;
    border-spacing: 0;
}

.post-md>table th {
    padding: 12px 0;
    border-bottom: 2px solid var(--line-1);
}

.post-md>table tr:nth-child(odd) td {
    padding: 12px 0;
    border-bottom: 1px solid var(--line-1);
    background: #fafafa;
}

.post-md>table tr:nth-child(even) td {
    padding: 12px 0;
    border-bottom: 1px solid var(--line-1);
    background: #fff;
}

.post-md code {
    border-radius: 4px;
    background: #f6f8fa;
    padding: 2px 4px;
    color: #24292f;
    font-size: 1rem;
}

.post-md .hljs-ln-numbers {
    opacity: .5;
    padding-right: 12px;
}

.post-md figure.highlight {
    margin: 1em 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e1e4e8;
}

.post-md figure.highlight table {
    margin: 0;
    width: 100%;
    border-spacing: 0;
    border-collapse: collapse;
}

.post-md figure.highlight td {
    padding: 0;
    border: none;
    vertical-align: top;
}

/* 行号列 */
.post-md figure.highlight .gutter {
    background: #f0f0f0;
    color: #6e7781;
    padding: 1em 0.75em;
    text-align: right;
    user-select: none;
    border-right: 1px solid #e1e4e8;
    width: 3.5em;
}

.post-md figure.highlight .gutter pre {
    margin: 0;
    padding: 0;
    background: transparent;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Monaco, "Courier New", monospace;
    font-size: 0.875rem;
    line-height: 1.6;
}

/* 代码列 */
.post-md figure.highlight .code {
    background: #f6f8fa;
    padding: 1em;
    overflow-x: auto;
}

.post-md figure.highlight .code pre {
    margin: 0;
    padding: 0;
    background: transparent;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Monaco, "Courier New", monospace;
    font-size: 0.875rem;
    line-height: 1.6;
}

.post-md figure.highlight code {
    background: transparent;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 0;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Monaco, "Courier New", monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    display: block;
}

.post-md figure.highlight code.hljs {
    background: transparent;
    padding: 0;
    margin: 0;
    border: none;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Monaco, "Courier New", monospace;
}

/* 关键修复：确保 br 标签正确换行 */
.post-md figure.highlight br {
    display: block;
    content: "";
}

/* 确保代码行之间没有额外空隙 */
.post-md figure.highlight .hljs,
.post-md figure.highlight code.hljs,
.post-md figure.highlight span[class^="hljs-"] {
    background: transparent;
    padding: 0;
    margin: 0;
    border: none;
    line-height: inherit;
}