/* custom.css */

/* 公共样式导入 路径相对于 custom.css 的位置 */
@import url("_tab.css");
@import url("_table.css");
@import url("_list.css");
@import url("_body.css");
@import url("_field_list.css");
@import url("_code_block.css");
@import url("_cpp_ref.css");
@import url("admonition.css");
@import url("feature_intro.css");

/* 多语言字体配置 */
body:lang(en) p {
    font-family: inherit; /* 继承默认字体 */
}

body:lang(zh-CN) p {
    font-family: "Microsoft YaHei", sans-serif;
}

/* 可选：其他语言扩展 */
body:lang(ja) p {
    font-family: "MS Gothic", sans-serif;
}

/* 支持更多语言扩展 */
body:lang(de) p { font-family: Arial; }
body:lang(ar) p { font-family: Tahoma; }

/* 渐变背景和全局样式 */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(to right, #ff758c 0%, #ff7eb3 100%);
    --forum-blue: #4a90e2;
    --forum-orange: #ff7f50;
    --text-dark: #2d3748;
    --text-light: #f7fafc;
    --root-margin-top: 4px;
    --root-margin-bottom: 0px;
}

/* 页面底部 Previous 和 next 按钮 margin-top */
.footer {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
    color: #6c757d;
}

.footer a {
    color: #6c757d;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

.ic-pram-format *:not(a) {
    color: rgb(4, 0, 255);
    font-weight: bold;
    font-style: italic;
}

.keywordformat {
    color: red;
}

[id], h1, h2, h3, h4, h5, h6, dt, div[id], span[id], .section[id] {
    scroll-margin-top: var(--top-nav-height) !important; /* 提高优先级 */
}