/**
 * markdown 输出样式
 */

.markdown {
    overflow-wrap: break-word;
    text-align: justify;
    line-height: 1.8;
    color: #333;
}

.markdown h1 {
    font-size: 1.8rem !important;
    margin-top: 1.5em;
    margin-bottom: 20px;
    font-weight: 700;
    padding-bottom: 12px;
    border-bottom: 3px solid #C9A227;
    letter-spacing: 1px;
    color: #23436E;
}

.markdown h2 {
    font-size: 1.5rem !important;
    margin-top: 1.5em;
    margin-bottom: 16px;
    font-weight: 700;
    padding-bottom: 8px;
    padding-left: 12px;
    border-left: 4px solid #23436E;
    letter-spacing: 1px;
    color: #23436E;
}

.markdown h3 {
    font-size: 1.3rem !important;
    line-height: 1.5;
    font-weight: 600;
    margin-top: 1.2em;
    margin-bottom: 12px;
    color: #333;
}

.markdown h4 {
    font-size: 1.15rem !important;
    margin-top: 1em;
    margin-bottom: 12px;
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: 0.5px;
    color: #444;
}

.markdown h5 {
    font-size: 1rem !important;
    margin-top: 1em;
    margin-bottom: 10px;
    font-weight: 600;
    line-height: 1.5;
    color: #555;
}

.markdown h6 {
    font-size: 0.95rem !important;
    color: #666;
    margin-top: 1em;
    font-weight: 500;
    line-height: 1.5;
    margin-bottom: 10px;
}

.markdown p {
    margin-bottom: 16px;
}

.markdown strong {
    font-weight: 700;
    font-size: 1rem !important;
    color: #23436E;
}

.markdown del {
    text-decoration: line-through;
}

.markdown a {
    color: #23436E;
    text-decoration: none;
    border-bottom: 1px solid #23436E;
    transition: all 0.3s;
}

.markdown a:hover {
    color: #C9A227;
    border-bottom-color: #C9A227;
}

.markdown blockquote {
    color: #666;
    border-left: 4px solid #23436E;
    padding: 16px 20px;
    margin: 20px 0;
    font-size: 15px;
    background: #f5f7fa;
    border-radius: 0 6px 6px 0;
    line-height: 1.8;
}

.markdown ul {
    padding-left: 2em;
    margin-bottom: 20px;
    margin-top: 12px;
}

.markdown ol {
    padding-left: 2em;
    margin-bottom: 20px;
    margin-top: 12px;
}

.markdown li {
    font-size: 15px !important;
    line-height: 1.8;
    margin-bottom: 10px;
    padding-left: 6px;
    color: #333;
}

.markdown li:last-child {
    margin-bottom: 0;
}

.markdown ul li {
    list-style-type: disc;
    color: #23436E;
}

.markdown ul li span,
.markdown ul li p {
    color: #333;
}

.markdown ul ul li {
    list-style-type: circle;
}

.markdown ul ul ul li {
    list-style-type: square;
}

.markdown ol li {
    list-style-type: decimal;
    color: #23436E;
}

.markdown ol li span,
.markdown ol li p {
    color: #333;
}

.markdown ol ol li {
    list-style-type: lower-alpha;
}

.markdown ol ol ol li {
    list-style-type: lower-roman;
}

.markdown hr {
    height: 1px;
    border: none;
    border-top: 1px solid #ddd;
    background: none
}

.markdown pre.prettyprint {
    padding: 10px;
    border: 1px solid #ddd;
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 1.6
}

.markdown table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    word-break: keep-all;
    border-collapse: collapse;
    margin: 24px 0;
    table-layout: auto;
    border-radius: 8px;
}

.markdown thead tr {
    background-color: #23436E;
}

.markdown th {
    padding: 14px 16px;
    border: 1px solid #23436E;
    font-weight: 600;
    color: #fff;
    text-align: left;
    background-color: #23436E;
}

.markdown td {
    padding: 14px 16px;
    border: 1px solid #e0e0e0;
    color: #333;
    line-height: 1.8;
}

.markdown table tr:nth-child(even) {
    background-color: #f5f7fa;
}

.markdown table tr:hover {
    background-color: #f0f4f9;
}

/* 选择不在 <pre> 标签中的 <code> 元素 */
.markdown code:not(pre > code) {
    border-radius: 3px;
    font-size: 14px;
    margin-right: 4px;
    color: var(--aHoverColor);
    background: var(--borderColor);
    padding: 2px 4px;
}

.markdown pre {
    padding: 10px;
    border-radius: 5px;
    border: 1px solid var(--borderColor);
    background: var(--borderColor);
    overflow: auto
}

.markdown img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1.5em auto;
    box-sizing: border-box;
    border: 0;
    border-radius: 4px;
  }

.markdown hr {
    margin: 7px 0 7px 0
}

@media (max-width: 768px) {
    .markdown table {
        font-size: 13px;
        margin: 16px 0;
        border-radius: 6px;
    }
    
    .markdown th,
    .markdown td {
        padding: 10px 12px;
        line-height: 1.6;
    }
}
