:root {
    --text-active-r: 24;
    --text-active-g: 144;
    --text-active-b: 255;
    --bg-warning-r: 230;
    --bg-warning-g: 126;
    --bg-warning-b: 34;
    --light-bg: #f8f9fc;
    --table-bg: #ffffff;
    --text-bright-color: #ffffff;
    --bg-color: #ffffff;
    --sidebar-width: 250px;
    --text-color: #333;
    --text-active: #1890ff;
    --text-active-1: #18cbff;
    --side-bd-color: #eee;
    --card-bd-color: #e1e1e1;
    --card-text-color: #999;
    --color-error-text: #a94442;
    --color-error-bg: #f2dede;
    --color-error-bd: #ebccd1;
    --table-th-color: #d1e9ff;
    --btn-close-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") !important;
}

body.dark {
    --text-active-r: 24;
    --text-active-g: 144;
    --text-active-b: 255;
    --bg-warning-r: 244;
    --bg-warning-g: 119;
    --bg-warning-b: 8;
    --light-bg: #1e1e1e;
    --table-bg: #1e1e1e;
    --text-bright-color: #ffffff;
    --bg-color: #171717;
    --sidebar-width: 250px;
    --text-color: #b8b8b8;
    --text-active: #2b83d4;
    --text-active-1: #18cbff;
    --side-bd-color: rgba(255, 255, 255, 0.2);
    --card-bd-color: #e1e1e1;
    --card-text-color: #999;
    --color-error-text: #a94442;
    --color-error-bg: #f2dede;
    --color-error-bd: #ebccd1;
    --table-th-color: #1e1e1e;
    --btn-close-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23b8b8b8'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") !important;
}

a:link, a:visited {
    text-decoration: none;
    color: var(--text-color);
}

b, strong {
    font-weight: bolder;
}

.font-size-20px {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.font-size-16px {
    font-size: 1rem;
}

.text-active {
    color: var(--text-active) !important;
}

.font-bold {
    font-weight: 700;
}

.font-semibold {
    font-weight: 600;
}

.items-center {
    align-items: center;
}

.flex {
    display: flex;
}

.mb-24px {
    margin-bottom: 1.5rem;
}

.mb-4px {
    margin-bottom: 0.25rem;
}

.mt-16px {
    margin-top: 1rem;
}

.flex-1 {
    flex: 1 1 0%;
}

.icon-color {
    color: var(--text-bright-color);
}

.form-control, .form-control:focus {
    background-color: var(--light-bg);
    color: var(--text-color);
}

input::placeholder, textarea::placeholder {
    color: var(--text-color) !important;
}

.table {
    background-color: var(--table-bg);
    color: var(--text-color);
}

.table > :not(caption) > * > * {
    background-color: var(--table-bg);
    color: var(--text-color);
}

.bg-light {
    background-color: var(--light-bg) !important;
}

.modal-content {
    background-color: var(--bg-color);
}

.custom-close-btn {
    /* 移除焦点样式 */
    --bs-btn-close-focus-shadow: none;
    box-shadow: none !important;
    outline: none !important;
}

.custom-close-btn:focus {
    /* 移除焦点时的轮廓 */
    box-shadow: none !important;
    outline: none !important;
}

.btn-bg, .btn-bg:hover, .btn-bg:focus {
    background-color: var(--text-active) !important;
    color: var(--text-bright-color) !important;;
}

/* 取消所有状态下的变换效果 */
.btn, .btn-close {
    transform: none !important;
    transition: none !important;
}

button.btn-close {
    background: transparent var(--btn-close-bg) center / 1em auto no-repeat;
}

/* 移除焦点 */
.form-control:focus {
    box-shadow: none !important;
    outline: 0 !important;
}

/* 移除焦点黑框 */
.btn:focus, .btn-close:focus, .nav-link:focus {
    box-shadow: none !important;
    outline: none !important;
}

.line-clamp-4 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
}

.line-clamp-2 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.line-clamp-1 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

.modal-visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.padding-bottom-12px {
    padding-bottom: .8rem;
}

.padding-top-16px {
    padding-top: 1rem;
}

.padding-top-24px {
    padding-top: 1.5rem;
}

.padding-top-bottom-10px {
    padding-top: .65rem;
    padding-bottom: .65rem;
}

ul li {
    list-style: none;
}


body {
    background-color: var(--light-bg);
    font-family: "Microsoft YaHei", sans-serif;
    color: var(--text-color);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* 侧边栏 */
.sidebar {
    /*background: var(--light-bg);*/
    background: var(--bg-color);
    color: var(--text-color);
    width: var(--sidebar-width);
    min-height: 100vh;
    /*padding-bottom: 20px;*/
    border-right: 1px solid var(--side-bd-color);
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
    overflow-y: auto;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.nav-bottom {
    /*padding: 10px 0 10px 30px;*/
}

.nav-bottom .nav-bottom-item {
    padding: 10px 0 10px 30px;
    border-top: 1px solid var(--side-bd-color);
}

.nav-bottom .nav-bottom-item:hover, .nav-bottom a:hover {
    cursor: pointer;
    color: var(--text-active) !important;
}

.sidebar-close {
    display: none;
    margin-right: 20px;
    line-height: 60px;
}

.sidebar-header {
    /*padding: 0 20px 20px;*/
    height: 60px;
    border-bottom: 1px solid var(--side-bd-color);
    margin-bottom: 15px;
}

.sidebar-title {
    padding-left: 20px;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0;
    display: flex;
    align-items: center;
    line-height: 60px;
}

.sidebar-toggle {
    display: none;
    position: absolute;
    top: 15px;
    right: 15px;
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 4px;
    width: 30px;
    height: 30px;
    z-index: 101;
}

.nav-link {
    color: var(--text-color) !important;
    padding: 12px 20px;
    margin: 4px 10px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    transition: all 0.3s;
}

.nav-link:hover, .nav-link.active {
    /*background-color: rgba(255, 255, 255, 0.15);*/
    color: var(--text-active) !important;
}

.nav-link::before {
    width: 25px;
    text-align: center;
    margin-right: 10px;
    font-size: 1.1rem;
}

/* 二级菜单 */
.submenu {
    padding-left: 30px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.submenu.show {
    max-height: 500px;
}

.submenu .nav-link {
    padding: 10px 15px;
    font-size: 0.9rem;
}

.has-submenu {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.arrow {
    transition: transform 0.3s;
    font-size: 0.8rem;
}

.arrow.rotated {
    transform: rotate(90deg);
}

/* 头部区域 */
/* PC顶部登陆 */
.header-top-pc-div {
    height: 70px;
    display: flex;
    justify-content: end;
    align-items: center;
}

.header-pc-nav {
    color: var(--text-color);
    height: 40px;
    padding: 0 15px;
    display: flex;
    justify-content: flex-end;
}

/* 移动端顶部导航 - 默认隐藏 */
.header-nav {
    display: none;
    /*background: linear-gradient(90deg, var(--light-bg) 0%, var(--light-bg) 100%);*/
    background-color: var(--bg-color);
    color: var(--text-color);
    /*position: fixed;*/
    /*top: 0;*/
    /*left: 0;*/
    /*right: 0;*/
    height: 60px;
    z-index: 1000;
    /*box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);*/
    border-bottom: 1px solid var(--side-bd-color);
    align-items: center;
    padding: 0 15px;
}

.header-nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-nav-right > div > i {
    font-size: 18px;
    margin-right: -3px;
}

.header-nav-right > i:hover, .header-nav-right > div:hover {
    cursor: pointer;
    color: var(--text-active);
}

.header-nav-title {
    padding-left: 10px;
    font-size: 1.3rem;
    font-weight: bold;
    margin-right: auto;
    display: flex;
    align-items: center;
}

.header-nav-toggle {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    margin-right: 15px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.header-nav-toggle:hover {
    background-color: rgba(255, 255, 255, 0.2);
}


.header-search-container {
    position: relative;
}

.header-search-input {
    width: 200px !important;
    height: 35px;
    /*border-radius: 20px;*/
    border: 1px solid var(--text-active);
    padding-left: 15px;
    font-size: 14px;
}

.header-search-btn {
    height: 35px;
    border-radius: 0 20px 20px 0;
    border-left: none;
    border-color: var(--text-active);
}

.header-search-btn:hover, .header-search-btn:focus {
    background-color: var(--text-active) !important;
    color: var(--text-bright-color);
}

.input-group .header-search-input {
    border-radius: 20px 0 0 20px;
}

#my-search-modal .header-search-input, #my-search-modal .header-search-btn {
    height: auto;
}

.header-search-num-label {
    font-size: .8rem;
}

.top-search-content {
    max-height: 300px;
    position: relative;
    overflow-y: auto;
    margin-top: 20px;
    border-top: 1px solid var(--side-bd-color);
}

.top-search-content .top-search-item {
    padding: 10px;
    border: 1px solid var(--side-bd-color);
    margin-top: 10px;
    border-radius: 10px;
}

.top-search-content .top-search-item:hover {
    cursor: pointer;

    .top-search-tool-title {
        color: var(--text-active);
    }
}

.top-search-content .top-search-item:hover .top-search-tool-title {
    color: var(--text-active);
}

.top-search-no {
    padding: 50px 0;
    text-align: center;
}

/*  面板自定义 */
/* 添加自定义图标 */
.accordion-button::after {
    display: inline-block;
    margin-left: 8px; /* 图标与文字之间的间距 */
    font-size: 16px;
    font-weight: bold;
    transition: transform 0.3s ease; /* 添加过渡动画 */
    transform: rotate(0deg);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%231890ff'%3E%3Cpath fill-rule='evenodd' d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat;
}

/* 按钮样式调整 */
.accordion-button {
    /* 使用flex布局控制内容排列 */
    display: flex;
    align-items: center;
    padding-right: 15px; /* 恢复正常内边距 */
    position: relative;
}

.accordion-item {
    color: var(--text-color);
    background-color: transparent;
    border: none;
    padding-bottom: 20px;
    border-radius: 10px;
}

.accordion-collapse, .accordion-body {
    background: var(--bg-color);
}

/* 展开状态的图标样式 */
.accordion-button:not(.collapsed)::after {
    transform: rotate(90deg); /* 旋转90度，从 > 变成 v */
}

.accordion-button:not(.collapsed) {
    color: var(--text-active);
    background-color: var(--table-th-color);
    border-bottom-color: var(--side-bd-color);
    box-shadow: none;
}

.accordion-item:first-of-type .accordion-button, .accordion-item:first-of-type {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.accordion-button:focus {
    border: none;
    box-shadow: none;
}

.accordion-button {
    color: var(--text-active);
    background-color: var(--table-th-color);
    border-bottom-color: var(--side-bd-color);
}

.box-content-item {
    display: block;
    word-break: break-all;
    word-wrap: break-word;
}

/* 响应式设计 */
@media (max-width: 992px) {
    /* 显示移动端顶部导航 */
    .header-nav {
        display: flex;
    }

    .header-top-pc-div {
        display: none;
    }
}

/* 主内容区域 */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 0 10px 0 10px;
    transition: all 0.3s;
}

.type-content {
    width: 92%;
    margin: 0 auto;
}

.footer {
    text-align: center;
    padding: 1.8rem 0 0.5rem 0;
}

.footer a:hover {
    color: var(--text-active);
}

.footer-nav {
    line-height: 2;
    padding-top: 1rem;
    font-size: .9rem;
    border-top-style: solid;
    border-top-width: 1px;
    border-top-color: var(--side-bd-color);
}

.footer-nav span {
    color: var(--card-text-color);
    margin-right: 0.25rem;
    margin-left: 0.25rem;
}

.footer p {
    font-size: .75rem;
    padding-top: .3rem;
    color: var(--card-text-color);
}

.tool-detail-content {
    background-color: var(--bg-color);
    border-radius: 1rem;
    padding: 2rem;
    font-size: 1rem;
    margin-top: 2rem;
}

/* 标题样式 */
.section-title {
    font-size: 1.3rem;
    /*border-left: 4px solid var(--primary-color);*/
    /*padding-left: 15px;*/
    /*margin: 30px 0 20px;*/
    margin: 10px 0;
}

/* 工具卡片 */
.tool-card {
    cursor: pointer;
    height: 100%;
    border: 1px solid var(--card-bd-color);
}

.card {
    background-color: var(--bg-color);
}

.tip-body {
    color: var(--text-color);
}

.tool-card:hover {
    border: 1px solid var(--text-active);
}

.tool-card .tool-card-title {
    color: var(--text-active);
    display: flex;
    justify-content: flex-start;
    align-items: center;
    min-height: 48px;
}

.di-tool-icon {
    width: 30px;
    height: 30px;
    margin-right: 0.5rem;
}

.di-icon-svg {
    width: 30px;
    height: 30px;
}

.tool-icon {
    margin-right: 0.25rem;
    width: 40px;
    height: 40px;
}

.icon-svg {
    width: 37px;
    height: 37px;
}

.card-title {
    margin: 0;
    text-align: left;
}

.tool-card-desc {
    color: var(--card-text-color);
    padding-top: 10px;
    text-align: left;
}

.stats-container {
    color: var(--card-text-color);
    padding-top: 10px;
    display: flex;
    justify-content: space-between;
}

.stat {
    display: flex;
    align-items: center;
    /*gap: 2px;*/
    font-size: 0.9rem;
}


/* 内容加载动画 */
.content-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 300px;
}

/* 移动设备样式 */
@media (max-width: 1200px) {
    .type-content {
        width: 95%;
    }
}

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
        width: 75%;
        z-index: 9999;
        box-shadow: 3px 0 10px rgba(0, 0, 0, 0.1);
        border-right: none;
    }

    .sidebar-close {
        display: flex;
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        /* 为顶部导航留出空间 */
        /*padding: 70px 10px 0;*/
        padding: 10px 10px 0;
    }

    .type-content {
        width: 98%;
    }

    .footer {
        padding: 1rem 0;
    }

    .sidebar-toggle {
        display: block;
        position: fixed;
        top: 15px;
        left: 15px;
        z-index: 99;
    }

    .overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1001;
    }

    .overlay.show {
        display: block;
    }
}

@media (max-width: 768px) {
    .type-content {
        width: 100%;
    }

    .modal .modal-dialog-width-max {
        max-width: 90% !important;
    }
}


/* 自定义Toast样式 - 替换Bootstrap默认样式 */
.toast-container {
    z-index: 1090;
}

.toast {
    min-width: 300px;
    max-width: 400px;
    /*background: white;*/
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    margin-bottom: 15px;
    border: none;
    color: var(--text-bright-color) !important;
}

.toast-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 12px 15px;
    background: transparent;
}

.toast-body {
    padding: 15px;
    /*color: #333;*/
}

/* 自定义Toast类型样式 */

.md5-bg-info {
    background-color: var(--table-th-color);
    border-bottom-color: var(--side-bd-color);
    color: var(--text-color);
}

.md5-bg-warning {
    background-color: rgb(var(--bg-warning-r), var(--bg-warning-g), var(--bg-warning-b), 0.4);
}


.bg-warning {
    background: linear-gradient(to right, var(--color-error-bg), var(--color-error-bd)) !important;
    color: var(--text-color) !important;
}

.bg-info {
    background: linear-gradient(to right, var(--text-active-1), var(--text-active)) !important;
    color: var(--text-color) !important;
}

.bg-success .btn-close,
.bg-danger .btn-close,
.bg-warning .btn-close,
.bg-info .btn-close {
    filter: invert(1);
}


/* 验证码弹窗相关 */

.modal-title-center {
    flex: 1;
    text-align: center;
}

.modal-dialog-tool {
    margin: 10% auto 0;
    max-width: 400px;
}

.modal-dialog-width-max {
    max-width: 600px !important;
}

.modal-footer-tool {
    text-align: right;
    padding: 10px;
}

#md5-submit-dialog-tool {
    width: 40%;
    background-color: var(--text-active);
    color: var(--text-bright-color);
}

#md5-dialog-tip-tool {
    text-align: left;
    color: red;
}

.md5-code {
    height: 55px;
    font-size: 16px;
}