img.hitandrun {
    width: 35px;
    height: 12px;
    background: url(icons.gif) no-repeat -100px -171px;
    margin-left: 0.5em;
}
/* 全局背景已由 functions.php 的 stdfoot() 统一管理 */
html {
    min-height: 100vh;
}

body {
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* 移除装饰性圆形元素 */
body::before {
    content: none !important;
}

body::after {
    content: none !important;
}
details summary {
    width: fit-content;
    line-height: 28px;
    color: #4d6c99;
    cursor: pointer;
    font-weight: 700;
    background-color: rgba(77, 108, 153, 0.1);
    padding: 0 10px;
}
details[open] summary {
    margin-bottom: 10px;
}
.layui-layer {
    color: #1f1f1f !important;
    background: #ffffff !important;
    border-radius: 10px !important;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.25) !important;
    overflow: hidden !important;
}
.layui-layer .layui-layer-title {
    background: #f8f9fc !important;
    color: #1f1f1f !important;
    font-weight: 600 !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
    padding: 14px 18px !important;
}
.layui-layer .layui-layer-content {
    background: #ffffff !important;
    color: #333 !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    padding: 18px 22px !important;
}
.layui-layer .layui-layer-btn {
    padding: 0 18px 18px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 12px !important;
}
.layui-layer .layui-layer-btn a {
    flex: 0 0 auto !important;
    min-width: 96px !important;
    padding: 9px 18px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    border: 1px solid #d0d5dd !important;
    background: #ffffff !important;
    color: #344054 !important;
    box-shadow: none !important;
    text-align: center !important;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease !important;
}
.layui-layer .layui-layer-btn a:hover {
    background: #f9fafb !important;
    color: #111827 !important;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08) !important;
}
.layui-layer .layui-layer-btn .layui-layer-btn0 {
    background: linear-gradient(135deg, #2f80ed 0%, #56ccf2 100%) !important;
    border-color: #2f80ed !important;
    color: #ffffff !important;
    box-shadow: 0 8px 16px rgba(47, 128, 237, 0.25) !important;
}
.layui-layer .layui-layer-btn .layui-layer-btn0:hover {
    background: linear-gradient(135deg, #1c6dd0 0%, #37b8e5 100%) !important;
}
.layui-layer .layui-layer-setwin {
    top: 14px !important;
    right: 16px !important;
}
.layui-layer .layui-layer-setwin .layui-layer-close1 {
    width: 26px !important;
    height: 26px !important;
    border-radius: 50% !important;
    color: #6b7280 !important;
    font-size: 18px !important;
    background: transparent !important;
    transition: background 0.2s ease, color 0.2s ease !important;
}
.layui-layer .layui-layer-setwin .layui-layer-close1:hover {
    background: #eef2ff !important;
    color: #111827 !important;
}
.layui-layer-shade {
    background: rgba(0, 0, 0, 0.45) !important;
    opacity: 1 !important;
}

#nexus-preview {
    position: fixed !important;
    z-index: 2147483000 !important;
    pointer-events: none !important;
    display: none;
    border-radius: 8px !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.28) !important;
    background: #ffffff !important;
    padding: 4px !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
}
.layer-form {
    padding: 10px 15px;
}
.layer-form .form-control-row input{
    padding: 4px;
}
.layer-form .form-control-row .label{
    margin-bottom: 4px;
}
.rainbow {
    text-align: center;
    text-decoration: underline;
    /*font-size: 32px;*/
    /*font-family: monospace;*/
    /*letter-spacing: 5px;*/
    background: linear-gradient(to right, #6666ff, #0099ff , #00ff00, #ff3399, #6666ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    /* 移除动画，改为静态 */
}
.nexus-media-info-raw {
    padding: 0 0.5rem;
    border: none;
}
.nexus-media-info-raw .spoiler-title-box{
    text-align: center;
}
.nexus-media-info-raw pre {
    white-space: break-spaces;
    overflow-wrap: anywhere;
}
.text-muted {
    color: #7d7b7b
}
.codemain>pre {
    margin: 0;
}
.word-break-all {
    word-break: break-all;
}

.form-box {
    padding: 15px;
}
.form-control-row {
    display: flex;
    align-items: center;
    padding: 10px 0;
}
.form-control-row .label {
    width: 80px
}
.form-control-row .field {

}
.form-control-row input[type=text],textarea {
    width: 300px;
    padding: 4px;
}
.form-control-row input[type=checkbox] {
    vertical-align: sub;
}

.hidden-text {
    filter: blur(.5em);
}
.hidden-text:hover {
    filter: blur(0);
}

/* ============================================
   公共布局样式 - 从各个页面提取的统一样式
   这些样式在所有页面中通用，避免重复定义
   ============================================ */

/* mainouter 容器样式 - 标准宽度并去掉边框和背景 */
table.mainouter {
    width: 95% !important;
    max-width: 1400px !important;
    margin: 0 auto !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

table.mainouter td {
    background: transparent !important;
    border: none !important;
}

/* 主要内容区域 - 使用纯色背景以提升性能（移除 backdrop-filter） */
table.main {
    width: 100% !important;
    max-width: 100% !important;
    background: #ffffff !important;
    border: 1px solid rgba(221, 221, 221, 0.8) !important;
    border-radius: 6px !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08) !important;
    margin-bottom: 15px !important;
    position: relative !important;
    z-index: 1 !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

table.main td.embedded {
    padding: 15px !important;
    background-color: transparent !important;
}

/* 按钮区域 - 确保完全透明 */
table.main tr:last-child td[colspan="2"],
table.main tr:last-child td[colspan="2"] table,
table.main tr:last-child td[colspan="2"] table td,
table.main tr:last-child td[colspan="2"] table td.embedded {
    background: none !important;
    background-color: transparent !important;
}

/* 确保所有 embedded 单元格都没有背景色 */
td.embedded {
    background-color: transparent !important;
}

/* Nav Block 样式 - 与 include/functions.php 保持一致 */
#nav_block {
    overflow: visible !important;
    position: relative;
    z-index: 10000 !important;
    text-align: center !important;
}

#nav_block td {
    overflow: visible !important;
}

#nav_block td.text {
    text-align: center !important;
}

#nav_block table.main {
    z-index: 10000 !important;
    overflow: visible !important;
}

/* Info Block 容器样式 - 统一文字颜色和行间距，与 include/functions.php 保持一致 */
#info_block {
    line-height: 1.6 !important;
    border-radius: 6px !important;
    overflow: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    color: #333 !important;
}

#info_block td {
    line-height: 1.6 !important;
    color: #333 !important;
}

#info_block span.medium {
    line-height: 1.6 !important;
    color: #333 !important;
}

#info_block a {
    color: #333 !important;
}

/* 表格样式 - 通用表格样式（移除 backdrop-filter 以提升性能） */
table[width="100%"] {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
    background: #ffffff !important;
    border: 1px solid rgba(221, 221, 221, 0.8) !important;
    border-radius: 6px;
    overflow: hidden;
}

/* attachment.php iframe 布局修复 */
body.inframe {
    margin: 0;
    padding: 0 0 10px 0;
    overflow: visible;
    background: transparent !important;
    min-height: auto;
}

body.inframe table[width="100%"] {
    margin: 0 0 0 0 !important;
    border-spacing: 0;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
    position: relative !important;
    z-index: auto !important;
    padding-bottom: 0 !important;
}

table[width="100%"] td {
    padding: 10px;
    border: none;
}

/* 确保所有单元格都没有背景色 */
table[width="100%"] td,
table[width="100%"] tr:hover td,
table[width="100%"] td:hover {
    background-color: transparent !important;
}

/* 确保 iframe 中所有表格相关元素都没有背景色和边框 */
body.inframe table[width="100%"] tr,
body.inframe table[width="100%"] tbody,
body.inframe table[width="100%"] thead,
body.inframe table[width="100%"] tr:hover,
body.inframe table[width="100%"] tr:hover td,
body.inframe table[width="100%"] td {
    background-color: transparent !important;
    background: transparent !important;
    position: static !important;
    z-index: auto !important;
    margin: 0 !important;
}

/* embedded 单元格样式调整，确保内容完整显示 */
body.inframe table[width="100%"] td.embedded {
    padding: 0px 10px 0px 0px;
    line-height: 1.4;
    background-color: transparent !important;
    background: transparent !important;
}

/* 确保表格最后一行有足够的底部空间，避免被下方输入框覆盖 */
body.inframe table[width="100%"] tr:last-child td {
    padding-bottom: 15px !important;
}

/* 表头样式 */
td.colhead {
    white-space: nowrap;
    font-weight: bold;
    color: #333 !important;
    background-color: rgba(248, 249, 250, 0.85) !important;
    padding: 10px !important;
    text-align: center;
    border: 1px solid rgba(224, 224, 224, 0.5);
}

/* 表格内容样式 - rowhead 右对齐，rowfollow 左对齐 */
td.rowhead {
    font-weight: bold;
    vertical-align: top;
    text-align: right;
    color: #333;
    background-color: rgba(248, 249, 250, 0.85);
    padding: 10px;
    border: 1px solid rgba(224, 224, 224, 0.5);
}

td.rowfollow {
    color: #666;
    background-color: transparent !important;
    padding: 10px;
    border: none !important;
}

td.text {
    padding: 10px;
    color: #666;
    background-color: transparent !important;
}

/* 仅清除“快速评论”区域（form#compose）背景，不影响其它嵌套表格的边线 */
form#compose,
form#compose table,
form#compose tr,
form#compose td {
    background: transparent !important;
    background-color: transparent !important;
}

/* 快速评论区域去除背景色（不影响其它表格） */
table.quick-comment,
table.quick-comment tr,
table.quick-comment td {
    background: transparent !important;
    background-color: transparent !important;
}

/* 保证任何使用 .nowrap 的元素不换行，图片内联对齐 */
.nowrap {
    white-space: nowrap !important;
}
.nowrap img {
    display: inline-block !important;
    vertical-align: middle !important;
    line-height: 1;
}

/* 用户名后佩戴的勋章（小/大）强制与文字同一行展示 */
.nexus-username-medal,
.nexus-username-medal-big {
    display: inline-block !important;
    vertical-align: middle !important;
    line-height: 1;
}

/* 统一去除详情内容区嵌套表格的背景与单元格边线（含内联属性） */
td.rowfollow table,
td.rowfollow table tr,
td.rowfollow table td,
td.rowfollow td.text,
td.rowfollow td.embedded,
td.rowfollow [bgcolor],
td.rowfollow td[bgcolor],
td.rowfollow table[bgcolor] {
    background: transparent !important;
    background-color: transparent !important;
}
td.rowfollow table,
td.rowfollow table tr,
td.rowfollow table td,
td.rowfollow table[border],
td.rowfollow td[border],
td.rowfollow [style*="border"],
td.rowfollow table [style*="border"],
td.rowfollow td [style*="border"] {
    border: none !important;
    border-color: transparent !important;
    outline: none !important;
    box-shadow: none !important;
}

/* 仅在“其它版本”区块（#kothercopy）保留单元格线条（背景仍透明） */
#kothercopy table,
#kothercopy table tr,
#kothercopy table td {
    border: 1px solid #000 !important;
    border-collapse: collapse !important;
}

/* 详情页：下载行单行显示，长文件名省略号，元素居中不换行 */
td.rowfollow .download-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}
td.rowfollow .download-filename {
    display: inline-block;
    max-width: 60%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}
td.rowfollow .download-bookmark,
td.rowfollow .download-upped,
td.rowfollow .download-time {
    display: inline-block;
    white-space: nowrap;
    vertical-align: middle;
}

/* 富文本编辑器按钮样式 - 紧密布局，无背景色 */
/* 针对BBCode编辑器工具栏中的按钮 - 使用更具体的选择器确保覆盖全局样式 */
#editorouter input[type="button"],
#editorouter input.codebuttons[type="button"],
#editorouter input.codebuttons,
table td.embedded input[type="button"],
table td.embedded input.codebuttons[type="button"],
table td.embedded input.codebuttons,
table input.codebuttons[type="button"],
table input.codebuttons {
    padding: 2px 6px !important;
    border: 1px solid #ccc !important;
    border-radius: 3px !important;
    font-size: 11px !important;
    cursor: pointer !important;
    font-weight: normal !important;
    background: transparent !important;
    color: #333 !important;
    margin-right: 1px !important;
}

#editorouter input[type="button"]:hover,
#editorouter input.codebuttons[type="button"]:hover,
#editorouter input.codebuttons:hover,
table td.embedded input[type="button"]:hover,
table td.embedded input.codebuttons[type="button"]:hover,
table td.embedded input.codebuttons:hover,
table input.codebuttons[type="button"]:hover,
table input.codebuttons:hover {
    background: #f0f0f0 !important;
    border-color: #999 !important;
}

#editorouter input[type="button"]:active,
#editorouter input.codebuttons[type="button"]:active,
#editorouter input.codebuttons:active,
table td.embedded input[type="button"]:active,
table td.embedded input.codebuttons[type="button"]:active,
table td.embedded input.codebuttons:active,
table input.codebuttons[type="button"]:active,
table input.codebuttons:active {
    background: #e8e8e8 !important;
    border-color: #888 !important;
}

/* 富文本编辑器中的select下拉框样式 */
#editorouter select.codebuttons,
#editorouter select.med.codebuttons,
table td.embedded select.codebuttons,
table td.embedded select.med.codebuttons,
table select.codebuttons,
table select.med.codebuttons {
    padding: 2px 4px !important;
    border: 1px solid #ccc !important;
    border-radius: 3px !important;
    font-size: 11px !important;
    background: transparent !important;
    color: #333 !important;
    margin-right: 1px !important;
}

#editorouter select.codebuttons:hover,
#editorouter select.med.codebuttons:hover,
table td.embedded select.codebuttons:hover,
table td.embedded select.med.codebuttons:hover,
table select.codebuttons:hover,
table select.med.codebuttons:hover {
    background: #f0f0f0 !important;
    border-color: #999 !important;
}

/* 富文本编辑器工具栏表格 - 紧密布局 */
#editorouter table {
    border-spacing: 0 !important;
    border-collapse: collapse !important;
    background-color: transparent !important;
}

#editorouter table td {
    background-color: transparent !important;
}

#editorouter table td.embedded {
    padding: 1px 2px !important;
    background-color: transparent !important;
}

/* 富文本编辑器行间距 - 减少间距 */
#editorouter table tr {
    margin: 0 !important;
    padding: 0 !important;
}

#editorouter table tr td {
    padding-top: 2px !important;
    padding-bottom: 2px !important;
}

/* 上传部分间距 - 包含iframe的行 */
#editorouter table tr td iframe {
    margin-top: 2px !important;
    margin-bottom: 2px !important;
}

/* 正文输入框行间距 */
#editorouter textarea.bbcode {
    margin-top: 2px !important;
    margin-bottom: 0 !important;
}

/* 表情面板 - 紧密布局 */
#editorouter table td[align="center"] table {
    border-spacing: 0 !important;
    border-collapse: collapse !important;
    background-color: transparent !important;
}

#editorouter table td[align="center"] table td {
    background-color: transparent !important;
}

#editorouter table td[align="center"] table td.embedded {
    padding: 1px !important;
    background-color: transparent !important;
}

/* 表情面板所在列 */
#editorouter table td[align="center"] {
    padding-left: 8px !important;
    padding-right: 0 !important;
    vertical-align: top !important;
    padding-top: 2px !important;
    background-color: transparent !important;
}

/* 统一提交和预览按钮样式 - btn2 与 btn 保持一致 */
table.main .btn2,
table.main input.btn2[type="button"],
table.main input.btn2[type="submit"] {
    padding: 9px 20px !important;
    border: none !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    background: #007bff !important;
    color: #fff !important;
    outline: none !important;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.1) !important;
}

table.main .btn2:hover,
table.main input.btn2[type="button"]:hover,
table.main input.btn2[type="submit"]:hover {
    background: #0056b3 !important;
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3), 0 2px 4px rgba(0, 0, 0, 0.15) !important;
    /* transform: translateY(-1px) !important; */
}

table.main .btn2:active,
table.main input.btn2[type="button"]:active,
table.main input.btn2[type="submit"]:active {
    background: #004085 !important;
    box-shadow: 0 1px 2px rgba(0, 123, 255, 0.2), 0 1px 1px rgba(0, 0, 0, 0.1) !important;
    /* transform: translateY(0) !important; */
}

table.main .btn2:focus,
table.main input.btn2[type="button"]:focus,
table.main input.btn2[type="submit"]:focus {
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2), 0 2px 4px rgba(0, 123, 255, 0.2) !important;
}

/* 响应式样式 */
@media (max-width: 600px) {
    table.mainouter {
        width: 100% !important;
    }
    
    table.main {
        width: 100% !important;
    }
}
