/* =========================================================
   txruiWeb - Article theme
   派生自 templates/article/default,主色取自 home/txruiWeb
   ========================================================= */
@charset "utf-8";

html,body{height:100%;}
body{
    margin:0;
    background-color:#f5f6fa;
    background-repeat:no-repeat;
    background-attachment:fixed;
    background-size:cover;
    -webkit-font-smoothing:antialiased;
    color:#2f3640;
    font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",Arial,sans-serif;
}

/* ===== 顶部栏 ===== */
.tx-header{
    position:fixed;
    top:0;left:0;right:0;
    height:60px;
    background:rgba(255,255,255,.92);
    backdrop-filter:blur(10px);
    -webkit-backdrop-filter:blur(10px);
    box-shadow:0 1px 6px rgba(0,0,0,.06);
    z-index:100;
}
.tx-toolbar{
    max-width:1280px;
    height:60px;
    margin:0 auto;
    padding:0 20px;
    display:flex;
    align-items:center;
    gap:14px;
}
.tx-logo{
    color:#5fb878;
    font-size:18px;
    font-weight:600;
    text-decoration:none;
    display:flex;
    align-items:center;
    gap:6px;
}
.tx-logo:hover{color:#4a9b65;}
.tx-title{
    color:#333;
    font-size:15px;
    font-weight:500;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    max-width:50%;
}
.tx-spacer{flex:1;}
.tx-back{
    color:#666;
    text-decoration:none;
    font-size:14px;
    display:flex;
    align-items:center;
    gap:6px;
    padding:6px 14px;
    border-radius:20px;
    transition:all .2s;
}
.tx-back:hover{
    background:#5fb878;
    color:#fff;
}

/* ===== 主体 ===== */
.tx-main{
    padding:90px 16px 40px;
    min-height:100vh;
    box-sizing:border-box;
}
.container-body{
    max-width:920px;
    margin:0 auto;
}

/* ===== 文章卡片 ===== */
.tx-card{
    background:#fff;
    border-radius:12px;
    padding:36px 44px;
    box-shadow:0 2px 18px rgba(0,0,0,.05);
    margin-bottom:24px;
}
.tx-card-head{margin-bottom:24px;}
.tx-article-title{
    margin:0 0 12px;
    font-size:26px;
    font-weight:600;
    color:#222;
    line-height:1.4;
}
.tx-meta{
    display:flex;
    flex-wrap:wrap;
    gap:18px;
    color:#888;
    font-size:13px;
}
.tx-meta i{margin-right:5px;color:#5fb878;}
.tx-content{
    color:#333;
    word-break:break-word;
}

/* ===== 段落 ===== */
.tx-content p{
    margin:14px 0;
}
.tx-content h1,
.tx-content h2,
.tx-content h3,
.tx-content h4{
    margin:28px 0 14px;
    color:#222;
    font-weight:600;
    line-height:1.4;
}
.tx-content h1{font-size:22px;}
.tx-content h2{font-size:20px;}
.tx-content h3{font-size:18px;}
.tx-content h4{font-size:16px;}

/* ===== 图片 ===== */
.tx-content img{
    max-width:100%;
    height:auto;
    display:block;
    margin:14px auto;
    border-radius:6px;
}

/* ===== 链接 ===== */
.tx-content a{
    color:#5fb878;
    text-decoration:none;
    border-bottom:1px solid transparent;
    transition:border-color .2s;
}
.tx-content a:hover{
    border-bottom-color:#5fb878;
}

/* ===== 列表 ===== */
.tx-content ul,
.tx-content ol{
    padding-left:22px;
    margin:12px 0;
}
.tx-content li{
    margin:6px 0;
}

/* ===== 表格 ===== */
.tx-content table{
    width:100%;
    border-collapse:collapse;
    margin:16px 0;
    font-size:14px;
}
.tx-content table th,
	.tx-content table td{
    border:1px solid #e5e7eb;
    padding:8px 12px;
    text-align:left;
}
.tx-content table th{
    background:#f7f8fa;
    font-weight:600;
}

/* ===== 行内代码 / 代码块 ===== */
.tx-content code{
    background:#f2f3f5;
    padding:2px 6px;
    border-radius:4px;
    font-family:"Courier New",Consolas,Monaco,monospace;
    font-size:0.92em;
    color:#d63384;
    word-break:break-word;
}
.tx-content pre{
    background:#1e1e1e;
    color:#e6e6e6;
    padding:16px 20px;
    border-radius:8px;
    overflow-x:auto;
    margin:16px 0;
    font-size:13px;
    line-height:1.55;
}
.tx-content pre code{
    background:transparent;
    color:inherit;
    padding:0;
    border-radius:0;
    font-size:inherit;
}

/* ===== 引用 ===== */
.tx-content blockquote{
    margin:16px 0;
    padding:10px 18px;
    background:#f7f8fa;
    border-left:4px solid #5fb878;
    color:#555;
    border-radius:0 6px 6px 0;
}

/* ===== 关键修复:video 自适应 ===== */
.tx-content video{
    display:block;
    max-width:100%;
    height:auto;
}
.mdui-video-container,
.tx-content .video-container{
    position:relative;
    height:0;
    padding-bottom:56.25%;
    overflow:hidden;
    max-width:100%;
    margin:16px auto;
    background:#000;
}
.mdui-video-container embed,
.mdui-video-container iframe,
.mdui-video-container object,
.mdui-video-container video,
.tx-content .video-container embed,
.tx-content .video-container iframe,
.tx-content .video-container video{
    position:absolute;
    top:0;left:0;
    width:100%;
    height:100%;
    border:0;
}

/* ===== 抽屉菜单(从默认模板移植) ===== */
.tx-draw-item,
.tx-draw-heading{
    padding:14px 20px;
    display:flex;
    align-items:center;
    gap:10px;
    color:#333;
    cursor:pointer;
    border-bottom:1px solid #f0f0f0;
    transition:background .2s;
}
.tx-draw-item:hover,
.tx-draw-heading:hover{
    background:#f7f8fa;
}
.tx-draw-item i,
.tx-draw-heading i{color:#5fb878;width:18px;}
.tx-draw-headings{padding:8px 0;}

/* ===== 底部 ===== */
.tx-foot{
    text-align:center;
    color:#888;
    font-size:13px;
    line-height:2;
    padding:20px 0;
}
.tx-foot a{color:#888;text-decoration:none;margin:0 6px;}
.tx-foot a:hover{color:#5fb878;}

/* ===== 响应式 ===== */
@media(max-width:768px){
    .tx-toolbar{padding:0 12px;gap:8px;}
    .tx-title{display:none;}
    .tx-card{padding:22px 18px;border-radius:8px;}
    .tx-article-title{font-size:20px;}
    .tx-content{font-size:14px;}
    .tx-main{padding-top:74px;}
}

/* ===== prism 代码高亮(默认+深色两套) ===== */
code[class*=language-],pre[class*=language-]{
    color:#f8f8f2;
    background:0 0;
    text-shadow:0 1px rgba(0,0,0,.3);
    font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;
    font-size:1em;
    text-align:left;
    white-space:pre;
    word-spacing:normal;
    word-break:normal;
    word-wrap:normal;
    line-height:1.5;
    -moz-tab-size:4;-o-tab-size:4;tab-size:4;
    -webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none;
}
pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto;border-radius:8px;}
:not(pre)>code[class*=language-],pre[class*=language-]{background:#1e1e1e;color:#f8f8f2;}
:not(pre)>code[class*=language-]{padding:.1em .3em;border-radius:.3em;white-space:normal;}
.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#708090;}
.token.punctuation{color:#999;}
.token.namespace{opacity:.7;}
.token.boolean,.token.constant,.token.deleted,.token.number,.token.property,.token.symbol,.token.tag{color:#f08d49;}
.token.attr-name,.token.builtin,.token.char,.token.inserted,.token.selector,.token.string{color:#a6e22e;}
.token.attr-value,.token.keyword,.token.operator,.token.url{color:#66d9ef;}
.token.atrule,.token.important,.token.regex{font-weight:700;}
.token.bold,.token.important{font-weight:700;}
.token.italic{font-style:italic;}
.token.entity{cursor:help;}