/* 排版样式 */

/* 基础排版 */
body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: 1.6;
    color: var(--text-dark);
}

/* 标题样式 */
h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-weight: var(--font-weight-bold);
    line-height: 1.2;
    color: var(--text-dark);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.75rem;
}

h4 {
    font-size: 1.5rem;
}

h5 {
    font-size: 1.25rem;
}

h6 {
    font-size: 1rem;
}

/* 段落样式 */
p {
    margin-top: 0;
    margin-bottom: 1rem;
}

/* 链接样式 */
a {
    color: var(--primary-blue);
    text-decoration: none;
    background-color: transparent;
}

a:hover {
    color: var(--secondary-blue);
    text-decoration: underline;
}

/* 列表样式 */
ul, ol {
    margin-top: 0;
    margin-bottom: 1rem;
}

ul ul, ol ul, ul ol, ol ol {
    margin-bottom: 0;
}

.list-unstyled {
    padding-left: 0;
    list-style: none;
}

.list-inline {
    padding-left: 0;
    list-style: none;
}

.list-inline-item {
    display: inline-block;
}

.list-inline-item:not(:last-child) {
    margin-right: 0.5rem;
}

/* 代码样式 */
code {
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 87.5%;
    color: #e83e8c;
    word-wrap: break-word;
}

kbd {
    padding: 0.2rem 0.4rem;
    font-size: 87.5%;
    color: #fff;
    background-color: #212529;
    border-radius: 0.2rem;
}

pre {
    display: block;
    font-size: 87.5%;
    color: #212529;
}

pre code {
    font-size: inherit;
    color: inherit;
    word-break: normal;
}

/* 引用样式 */
.blockquote {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.blockquote-footer {
    display: block;
    font-size: 80%;
    color: #6c757d;
}

.blockquote-footer::before {
    content: "\2014\00A0";
}

/* 文本工具类 */
.text-monospace {
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
}

.text-justify {
    text-align: justify !important;
}

.text-wrap {
    white-space: normal !important;
}

.text-nowrap {
    white-space: nowrap !important;
}

.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 字体大小工具类 */
.font-size-xs {
    font-size: var(--font-size-small) !important;
}

.font-size-sm {
    font-size: calc(var(--font-size-base) * 0.875) !important;
}

.font-size-base {
    font-size: var(--font-size-base) !important;
}

.font-size-lg {
    font-size: var(--font-size-large) !important;
}

.font-size-xl {
    font-size: calc(var(--font-size-base) * 1.25) !important;
}

.font-size-xxl {
    font-size: calc(var(--font-size-base) * 1.5) !important;
}

/* 字体粗细工具类 */
.font-weight-light {
    font-weight: 300 !important;
}

.font-weight-lighter {
    font-weight: lighter !important;
}

.font-weight-normal {
    font-weight: var(--font-weight-normal) !important;
}

.font-weight-bold {
    font-weight: var(--font-weight-bold) !important;
}

.font-weight-bolder {
    font-weight: bolder !important;
}

/* 行高工具类 */
.line-height-1 {
    line-height: 1 !important;
}

.line-height-sm {
    line-height: 1.25 !important;
}

.line-height-base {
    line-height: 1.6 !important;
}

.line-height-lg {
    line-height: 2 !important;
}

/* 响应式标题 */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    h4 {
        font-size: 1.25rem;
    }
    
    h5 {
        font-size: 1.1rem;
    }
    
    h6 {
        font-size: 1rem;
    }
}

/* 特殊排版组件 */
.display-1 {
    font-size: 6rem;
    font-weight: 300;
    line-height: 1.2;
}

.display-2 {
    font-size: 5.5rem;
    font-weight: 300;
    line-height: 1.2;
}

.display-3 {
    font-size: 4.5rem;
    font-weight: 300;
    line-height: 1.2;
}

.display-4 {
    font-size: 3.5rem;
    font-weight: 300;
    line-height: 1.2;
}

/* 小文字样式 */
.small {
    font-size: 80%;
    font-weight: 400;
}

.mark {
    padding: 0.2em;
    background-color: #fcf8e3;
}

/* 预格式化文本 */
.pre-scrollable {
    max-height: 340px;
    overflow-y: scroll;
}