/* QiMeng Theme Custom Styles */

/* CSS变量已移至 core/variables.css */

html {
    overflow-x: hidden;
    min-height: 100vh;
    font-family: var(--qm-font-family, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
}

body {
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    background: var(--qm-page-bg);
    color: var(--qm-text-primary);
    font-family: inherit;
    font-size: var(--qm-font-size-body);
    font-weight: var(--qm-font-weight-regular);
    line-height: var(--qm-line-height-body);
}

button,
input,
optgroup,
select,
textarea {
    font-family: inherit;
}

body.qimeng-body {
    display: flex;
    flex-direction: column;
}

body.qimeng-body > main,
body.qimeng-body > .page-main,
body.qimeng-body > .home-main-wrapper,
body.qimeng-body > .qm-main-content,
body.qimeng-body > .qm-page-shell,
body.qimeng-body > .qm-user-center-root {
    flex: 1 0 auto;
    width: 100%;
}

body.qimeng-body > footer.site-footer {
    flex-shrink: 0;
}

/* 非首页主区域的顶部偏移改由 header.css 统一管理，这里只保留底部留白 */
body:not(.home):not(.front-page) main,
body:not(.home):not(.front-page) .page-main,
body:not(.home):not(.front-page) .qm-main-content {
    padding-top: 0 !important;
    padding-bottom: 2rem;
}

@media (min-width: 992px) {
    body:not(.home):not(.front-page) main,
    body:not(.home):not(.front-page) .page-main,
    body:not(.home):not(.front-page) .qm-main-content {
        padding-bottom: 3rem;
    }
}

/* Text color utilities统一到变量，便于暗色/浅色自适应 */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    color: var(--qm-text-primary);
}

.text-body,
.text-body-emphasis {
    color: var(--qm-text-primary) !important;
}

.text-secondary {
    color: var(--qm-text-secondary) !important;
}

.text-muted {
    color: var(--qm-text-muted) !important;
}

.text-light {
    color: var(--qm-text-light) !important;
}

.text-lighter {
    color: var(--qm-text-lighter) !important;
}

/* 全站链接默认去掉下划线 */
a {
    text-decoration: none;
}


.hidden {
    display: none !important;
}



/* 全站内容通用最大宽度容器 */
.qm-page-shell {
    width: 100%;
    max-width: var(--qm-site-max-width);
    margin-left: auto;
    margin-right: auto;
}



/* 桌面端最小宽度：防止大屏下主体过窄 */
@media (min-width: 1200px) {
    body {
        min-width: 1200px;
    }
}

