/* 全局字体设置 */
body,
.btn,
h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
    font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, 微软雅黑, Arial, sans-serif;
}

/* 输入框 */
.form-control:focus {
    color: #1a8cff;
    font-weight: 600;
}

/* 搜索框外层容器：相对定位，让内部绝对定位元素参考它 */
.search-container {
    position: relative;
    /* 继承父元素宽度，保证搜索框占满容器 */
    width: 100%;
}

/* 搜索框本身：重置样式，确保尺寸不受影响 */
#searchkw {
    /* 强制继承容器宽度（根据你的需求调整，也可写固定值） */
    width: 100% !important;
    /* 保持原有内边距，避免挤压 */
    padding: 原内边距值（比如 0.375rem 0.75rem）;
}

/* 自定义提示文本：绝对定位，贴合输入框内部 */
.custom-placeholder {
    position: absolute;
    /* 距离左侧和输入框内边距对齐，根据实际调整 */
    left: 10px;
    /* 垂直居中 */
    top: 50%;
    transform: translateY(-50%);
    /* 提示文本颜色，可自定义 */
    color: #999;
    /* 让点击穿透到输入框，不影响输入 */
    pointer-events: none;
    /* 字体大小和输入框保持一致，根据实际调整 */
    font-size: 1rem;
}

/* 输入框聚焦时，隐藏自定义提示 */
#searchkw:focus+.custom-placeholder {
    display: none;
}

/* 导航栏图标与文字对齐 */
.nk-quick-nav .nk-menu-link {
    display: flex !important;
    align-items: center !important;
    padding: 0.5rem 0.75rem !important;
}

.nk-quick-nav .nk-menu-link .icon {
    font-size: 1.125rem;
    line-height: 1;
}

/* 导航文字样式 */
.nk-quick-nav .nav-text {
    margin-left: 0.375rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
}

/* 彩色图标样式 */
.nav-icon-login {
    color: #3b82f6 !important;
    /* 蓝色 */
}

.nav-icon-register {
    color: #10b981 !important;
    /* 绿色 */
}

.nav-icon-comment {
    color: #f59e0b !important;
    /* 橙色 */
}

.nav-icon-user {
    color: #8b5cf6 !important;
    /* 紫色 */
}

.nav-icon-dark {
    color: #6366f1 !important;
    /* 靛蓝色 */
}

.nav-icon-light {
    color: #fbbf24 !important;
    /* 黄色 */
}

/* 导航项间距调整 */
.nk-quick-nav>li {
    margin: 0 0.25rem !important;
}

/* 确保暗黑模式按钮的对齐 */
.dark-switch {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0.5rem !important;
}

.dark-switch .nk-menu-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 鼠标悬停效果 */
.nk-quick-nav .nk-menu-link:hover {
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

/* 暗黑模式下的悬停效果 */
.dark-mode .nk-quick-nav .nk-menu-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* 移除导航项的下拉箭头样式 */
.nk-quick-nav .dropdown {
    padding: 0 !important;
}

/* 优化移动端显示 */
@media (max-width: 768px) {
    .nk-quick-nav .nav-text {
        display: none;
    }

    .nk-quick-nav .nk-menu-link {
        padding: 0.5rem !important;
    }

    .nk-quick-nav>li {
        margin: 0 0.125rem !important;
    }
}

/* 首页链接的彩色图标 */
.nk-menu-main .ni-home {
    color: #ef4444 !important;
    /* 红色 */
}

/* 侧边栏 */
.fixed-side-btns {
    position: fixed;
    right: 20px;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 9999;
}

/* 单个按钮通用样式 */
.fixed-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 6px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

/* 按钮悬停效果 */
.fixed-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 按钮图标样式 */
.fixed-btn img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

/* 按钮提示文字 */
.btn-tooltip {
    position: absolute;
    right: 60px;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
    white-space: nowrap;
}

.fixed-btn:hover .btn-tooltip {
    opacity: 1;
}

/* 右下角固定按钮组样式 */
.fixed-side-btns {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fixed-btn {
    position: relative;
    width: 45px;
    height: 45px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
    border: 1px solid #e1e8ed;
}

.fixed-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

.fixed-btn img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

/* Tooltip样式 */
.btn-tooltip {
    position: absolute;
    right: 55px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 10001;
}

.btn-tooltip::after {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-left-color: rgba(0, 0, 0, 0.8);
}

.fixed-btn:hover .btn-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(-5px);
}

/* 分类菜单样式 */
.category-menu {
    position: fixed;
    right: 85px;
    bottom: 180px;
    width: 200px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateX(10px);
    transition: all 0.3s ease;
    z-index: 10000;
    border: 1px solid #e1e8ed;
}

.category-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.category-menu ul {
    list-style: none;
    padding: 8px 0;
    margin: 0;
}

.category-menu li {
    padding: 0;
    border-bottom: 1px solid #f0f0f0;
}

.category-menu li:last-child {
    border-bottom: none;
}

.category-menu a {
    display: block;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
}

.category-menu a:hover {
    background-color: #f8f9fa;
    color: #007bff;
    text-decoration: none;
}

.category-menu a.active {
    background-color: #007bff;
    color: #fff;
    font-weight: bold;
}

/* 响应式适配 - 调整手机上的样式 */
@media (max-width: 768px) {
    .fixed-side-btns {
        right: 15px;
        bottom: 15px;
    }

    .fixed-btn {
        width: 40px;
        height: 40px;
        margin: 5px 0;
    }

    .fixed-btn img {
        width: 18px;
        height: 18px;
    }

    .btn-tooltip {
        display: none;
    }

    .category-menu {
        right: 50px;
        width: 180px;
        font-size: 13px;
    }

    .category-menu a {
        padding: 8px 12px;
        font-size: 13px;
    }
}

/* 浮动按钮显示动画 */
.fixed-side-btns {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 为工具列表项容器添加悬停/激活效果 */
.col-lg-3[role="listitem"] {
    transition: all 0.3s ease;
    /* 所有样式变化添加过渡动画 */
}

/* 鼠标悬停或触摸激活时的样式 */
.col-lg-3[role="listitem"]:hover,
.col-lg-3[role="listitem"].active {
    transform: translateY(-5px);
    /* 向上移动5px */
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    /* 添加阴影 */
    z-index: 10;
    /* 确保悬浮元素显示在顶部 */
}

/* 优化链接按钮的悬停/激活效果 */
.col-lg-3[role="listitem"]:hover .tool-link,
.col-lg-3[role="listitem"].active .tool-link {
    background-color: rgba(255, 255, 255, 0.1);
    /* 按钮背景轻微变色 */
    transform: scale(1.02);
    /* 按钮轻微放大 */
}

/* 为按钮添加过渡 */
.tool-link {
    transition: all 0.3s ease;
}

/* 针对移动设备的优化 */
@media (max-width: 768px) {

    .col-lg-3[role="listitem"]:hover,
    .col-lg-3[role="listitem"].active {
        transform: translateY(-3px);
        /* 移动端减小悬浮高度 */
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        /* 移动端减小阴影强度 */
    }
}

.breadcrumb-item {
    transition: transform 0.2s ease;
}

.breadcrumb-item:hover {
    transform: translateY(-2px);
}

.breadcrumb-item a {
    position: relative;
    transition: all 0.2s ease;
}

.breadcrumb-item a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: #4a6cf7;
    transition: width 0.2s ease;
}

.breadcrumb-item a:hover::after {
    width: 100%;
}

/* 新增：工具标题悬停效果 - 鼠标碰到时字体颜色改成#09b1b9 */
.tool-link {
    position: relative;
}

.tool-link:hover {
    color: #09b1b9 !important;
    /* 确保覆盖其他颜色设置 */
}

/* 底部多语言和加入QQ群 */
.language-switcher {
    display: inline-flex;
    margin-left: 1rem;
    list-style: none;
    padding: 0;
}

.language-switcher li {
    margin-right: 0.375rem;
}

.language-switcher li a {
    color: #0000FF;
    text-decoration: none;
}

.language-switcher li a:hover {
    color: #3b82f6;
    text-decoration: underline;
}

.language-switcher li span {
    color: #d1d5db;
    margin-right: 0.25rem;
}

/* QQ群按钮样式 - 调整与语言切换器的间距 */
.qq-group-link {
    display: inline-flex;
    align-items: center;
    margin-left: 0.75rem;
}

/* 广告弹窗美化样式 */
.ad-choice-popup {
    text-align: center;
    padding: 25px 30px;
    max-width: 400px;
}

.ad-choice-popup .ad-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(52, 152, 219, 0.1);
    color: #3498db;
}

.ad-choice-popup .ad-icon i {
    font-size: 36px;
}

.ad-choice-popup h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.ad-choice-popup p {
    font-size: 15px;
    color: #666;
    margin-bottom: 25px;
}

.ad-choice-popup .btn-group {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.ad-choice-popup .btn {
    padding: 10px 25px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.ad-choice-popup .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.ad-choice-popup .btn-close-ad {
    background-color: #e74c3c;
    border-color: #e74c3c;
    color: white;
}

.ad-choice-popup .btn-close-ad:hover {
    background-color: #c0392b;
    border-color: #c0392b;
}

.ad-choice-popup .btn-support-ad {
    background-color: #2ecc71;
    border-color: #2ecc71;
    color: white;
}

.ad-choice-popup .btn-support-ad:hover {
    background-color: #27ae60;
    border-color: #27ae60;
}

:root {
    --tool-icon-size: 24px;
    /* 统一图标尺寸 */
    --tool-btn-height: 56px;
    /* 工具按钮高度 */
    --icon-margin-right: 5px;
    /* 图标与文本间距 */
}

/* 分类标题图标样式 */
.tool-category-icon {
    font-size: var(--tool-icon-size);
    margin-right: var(--icon-margin-right);
    vertical-align: middle;
}

/* 工具图标样式 - 调整尺寸和间距 */
.tool-icon {
    width: var(--tool-icon-size);
    height: var(--tool-icon-size);
    margin-right: var(--icon-margin-right);
    vertical-align: middle;
    object-fit: contain;
    transition: all 0.3s;
    display: inline-block;
}

/* 字体图标统一样式 */
.tool-font-icon {
    font-size: var(--tool-icon-size);
    margin-right: var(--icon-margin-right);
    vertical-align: middle;
}

/* 防止图标加载时闪烁 */
.tool-icon:not([src]) {
    visibility: hidden;
}

/* 工具链接按钮 */
.tool-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: var(--tool-btn-height);
}

/* 搜索框统计信息样式 */
#refreshStats {
    background: none;
    border: none;
    padding: 4px;
    z-index: 10;
}

/* 旋转动画 */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.spin {
    animation: spin 0.5s linear;
}

/* 渐变背景 */
body:before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -520;
    pointer-events: none
}

body:before {
    background: linear-gradient(90deg, #f795331a, #f370551a 15%, #ef4e7b1a 30%, #a166ab1a, #5073b81a, #1098ad1a, #07b39b1a 86%, #6dba821a)
}

/* 保留第一版原始暗黑模式样式 */
.dark-mode .form-text-hint-lx {
    background: #141c26;
}

.dark-mode .bannerbg {
    opacity: 0.4;
}

.dark-mode .nya-title {
    background-color: #313c93;
}

.dark-mode .query-title {
    background-color: #273b5f;
}

.dark-mode .table-title {
    background-color: #273b5f;
}

/* 全局基础样式（第一版保留） */
.nk-header {
    border-bottom: 0px solid #e5e9f2;
    box-shadow: 0 0 #0000, 0 0 #0000, 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.nk-ibx-action {
    position: relative;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e9f2;
}

.nk-ibx-action-list {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nk-ibx-action-item a {
    display: flex;
    align-items: center;
}

.nk-ibx-action-item .icon {
    font-size: 1.5rem;
}

.nk-ibx-action-item .icon+span {
    margin-left: 0.5rem;
}

.dark-switch.active .ni-moon {
    display: none;
}

.dark-switch.active .ni-sun {
    display: inline !important;
}

.dark-switch:after {
    height: 0rem;
    width: 0rem;
    right: 0;
    background-color: #dbdfea00;
}

.dark-switch:before {
    right: 0;
    width: 0rem;
    height: 0rem;
    background-color: rgba(255, 255, 255, 0);
    border: #dbdfea solid 0px;
}

.card-preview {
    box-shadow: 6px 5px 40px rgba(30, 48, 75, .08);
}

.form-control-lx {
    height: calc(3.625rem + 2px);
    padding: 0.6875rem 2rem;
    font-size: 0.9375rem;
    line-height: 1.25rem;
    border-radius: 5px;
}

.form-clip-lx,
.form-text-hint-lx {
    position: absolute;
    right: 22px;
    top: 6px;
    height: calc(3.125rem - 2px);
    display: flex;
    align-items: center;
    color: #6576ff;
    padding-left: 1rem;
    padding-right: .75rem;
    background: #fff;
    border-radius: 4px;
}

.form-text-hint-lx .overline-title {
    font-size: 24px;
}

.form-control-lx.btn-round {
    border-radius: 2.125rem;
}

.breadcrumb-item.active:not(:only-child) {
    font-weight: 700;
}

.breadcrumb-item.active a {
    color: #086cf0 !important;
}

.nya-title {
    position: absolute;
    top: -15px;
    background-color: #6576ff;
    color: #fff;
    padding: 5px 18px;
    border-radius: 8px;
    font-size: 1.0rem;
    box-shadow: 0 0.5rem 0.625rem #6576ff57;
}

.search-placeholder {
    position: relative;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 700;
    width: 100%;
    color: #aaa;
}

.card+.card {
    margin-top: 40px;
}

.btn-block {
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    box-shadow: 0 3px 12px 1px rgba(43, 55, 72, 0.15) !important;
}

.logo-link {
    font-weight: 700;
    font-size: 21px;
    position: inherit;
}

.logo-link img {
    height: 35px;
    margin: -3px 8px 0 5px;
}

.center-block {
    margin: 0 auto;
    float: none;
    padding: 0;
}

.nk-footer-wrap {
    display: block;
}

.nk-footer-copyright {
    text-align: center;
}

#link_content {
    margin-top: 40px;
}

.nk-ibx-action-item .fa {
    font-size: 1.2rem;
}

.nk-ibx-action-item .fa+span {
    margin-left: 0.5rem;
}

* ::-webkit-scrollbar {
    width: .375rem;
    height: .5rem
}

* ::-webkit-scrollbar-thumb {
    background-color: #6576ff;
    border-radius: 6249.9375rem
}

img.loginbtn {
    width: 66px;
    margin: 16px;
}

.nk-reply-item {
    padding: 0
}

.nk-reply-item+.nk-reply-item {
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px solid #e5e9f2;
}

.custom-control-input {
    width: 2.4rem;
}

.custom-control-sm>.custom-control-input {
    width: 1.6rem;
}

.query-title {
    background-color: #f5fafe;
    word-break: keep-all;
}

.query-result {
    word-break: break-all;
}

.table-title {
    background-color: #f5fafe;
}

/* 全局字体定义（修正路径+规范格式） */
@font-face {
    font-family: 'MyFont';
    src: url('../fonts/OPPOSans-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

/* 全局字体应用 */
body,
h1,
h2,
h3,
p,
a,
span,
div,
li,
ul,
button,
input {
    font-family: 'MyFont', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

/* 强制覆盖分类按钮样式 */
.breadcrumb .breadcrumb-item a {
    font-family: 'MyFont' !important;
}

/* ======================== 浮动按钮组样式 ======================== */
/* 浮动按钮组样式 */
.floating-buttons {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.floating-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #e1e8ed;
    position: relative;
    opacity: 1;
    visibility: visible;
}

/* 始终显示的按钮 - 优先级更高 */
.floating-btn.always-show {
    opacity: 1 !important;
    visibility: visible !important;
    animation: fadeInUpFloating 0.5s ease forwards;
}

/* 返回顶部按钮特殊样式 */
.floating-btn.back-to-top-btn {
    opacity: 0 !important;
    visibility: hidden !important;
    transition: all 0.3s ease;
}

.floating-btn.back-to-top-btn.show {
    opacity: 1 !important;
    visibility: visible !important;
    animation: fadeInUpFloating 0.3s ease forwards;
}

/* 按钮动画延迟 */
.floating-btn.always-show:nth-child(2) {
    animation-delay: 0.1s;
}

.floating-btn.always-show:nth-child(3) {
    animation-delay: 0.2s;
}

.floating-btn.always-show:nth-child(4) {
    animation-delay: 0.3s;
}

.floating-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    background: #f8f9fa;
}

.floating-btn img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

/* 浮动按钮工具提示样式（避免与现有tooltip冲突） */
.floating-btn .btn-tooltip {
    position: absolute;
    right: 55px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 10001;
}

.floating-btn .btn-tooltip::after {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-left-color: rgba(0, 0, 0, 0.8);
}

.floating-btn:hover .btn-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(-5px);
}

/* 浮动按钮淡入上升动画（避免与现有动画冲突） */
@keyframes fadeInUpFloating {
    from {
        opacity: 0;
        visibility: hidden;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}

/* 浮动按钮响应式优化 */
@media (max-width: 768px) {
    .floating-buttons {
        bottom: 20px;
        right: 20px;
        gap: 10px;
    }

    .floating-btn {
        width: 45px;
        height: 45px;
    }

    .floating-btn img {
        width: 20px;
        height: 20px;
    }

    .floating-btn .btn-tooltip {
        right: 50px;
        font-size: 11px;
        padding: 5px 8px;
    }

    .floating-btn .btn-tooltip::after {
        border-width: 4px;
    }

    .category-menu {
        right: 50px;
        bottom: 120px;
        width: 180px;
        font-size: 13px;
    }

    .category-menu a {
        padding: 8px 12px;
        font-size: 13px;
    }
}