/* 暗黑模式下的紫色导航栏背景覆盖 */
[data-bs-theme="dark"] .navbar-purple {
    background: #2d3748 !important;
    border-color: #4a5568 !important;
}


/* 暗黑模式下导航栏图标和文字颜色 */
[data-bs-theme="dark"] .nav-link {
    color: var(--tblr-secondary) !important;
}

[data-bs-theme="dark"] .nav-link-title {
    color: var(--tblr-secondary) !important;
}

/* 暗黑模式下当前激活状态保持白色并加粗 */
[data-bs-theme="dark"] .nav-item.active .nav-link,
.nav-item.active .nav-link-title {
    color: #fff !important;
    font-weight: bold !important;
}

/* 暗黑模式下搜索输入框样式 - 使用默认暗黑主题样式 */
[data-bs-theme="dark"] .form-controls {
    border: var(--tblr-border-width) solid var(--tblr-border-color) !important;
    background-color: var(--tblr-bg-surface) !important;
    color: var(--tblr-body-color) !important;
    position: relative;
    box-sizing: border-box;
    width: 100%;
    padding: 0 40px 0 12px !important;
    height: 40px;
    z-index: 1;
    font-size: 14px;
    border-radius: 5px;
    vertical-align: top;
}


/* 暗黑模式下的左侧导航样式 */
[data-bs-theme="dark"] .aside {
    background-color: var(--tblr-bg-surface) !important;
    border-right: 1px solid var(--tblr-border-color) !important;
    color: var(--tblr-body-color) !important;
}

[data-bs-theme="dark"] .sb-hd {
    color: var(--tblr-body-color) !important;
}


[data-bs-theme="dark"] .aside a {
    color: var(--tblr-body-color) !important;
    transition: color 0.15s ease-in-out;
}

[data-bs-theme="dark"] .aside a:hover {
    color: var(--tblr-primary) !important;
}

[data-bs-theme="dark"] .tree-panel .tph-bd strong {
    color: var(--tblr-body-color) !important;
}

[data-bs-theme="dark"] .tree-panel .tpb-item {
    color: #6b7280;
}

[data-bs-theme="dark"] .tree-panel .tpb-item a {
    color: var(--tblr-secondary) !important;
}

[data-bs-theme="dark"] .tree-panel .tpb-item a:hover {
    color: var(--tblr-body-color) !important;
}


/* 暗黑模式下的SVG图标 */
[data-bs-theme="dark"] .aside svg {
    filter: brightness(0.8) !important;
}

/* 暗黑模式下的展开/收起图标 */
[data-bs-theme="dark"] .tree-toggle {
    filter: brightness(0.9) invert(1) !important;
}

/* 暗黑模式下的分隔线效果 */
[data-bs-theme="dark"] .tree-panel {
    padding-bottom: 10px;
    margin-bottom: 15px;
}

[data-bs-theme="dark"] .tree-panel:last-child {
    border-bottom: none;
}

/* 暗黑模式下确保导航栏激活边框可见 */
[data-bs-theme="dark"] .navbar-expand-md .nav-item.active:after {
    border-color: var(--tblr-primary) !important;
}

[data-bs-theme="dark"] .avatar-list .post-cate {
    background-color: #4a5568 !important;
}

[data-bs-theme="dark"] .row-cards .card {
    transition: all 0.3s cubic-bezier(0.31, 1, 0.34, 1);
    cursor: pointer;
}

[data-bs-theme="dark"] .row-cards .card:hover .card-title {
    color: #fff;
}


[data-bs-theme="dark"] .row-cards .card:hover {
    background-color: #2d3748 !important;
}


[data-bs-theme="dark"] .mobile-search-bar {
    background: #2d3748 !important;

}


[data-bs-theme="dark"] .tooltip .tooltip-inner {
    background-color: #2d3748 !important;
    color: #fff !important;
    padding: 8px 12px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* 暗黑模式下tooltip箭头颜色 */
[data-bs-theme="dark"] .tooltip.bs-tooltip-bottom .tooltip-arrow::before,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="bottom"] .tooltip-arrow::before {
    border-bottom-color: #2d3748 !important;
}

[data-bs-theme="dark"] .tooltip.bs-tooltip-top .tooltip-arrow::before,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="top"] .tooltip-arrow::before {
    border-top-color: #2d3748 !important;
}

[data-bs-theme="dark"] .tooltip.bs-tooltip-start .tooltip-arrow::before,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="left"] .tooltip-arrow::before {
    border-left-color: #2d3748 !important;
}

[data-bs-theme="dark"] .tooltip.bs-tooltip-end .tooltip-arrow::before,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="right"] .tooltip-arrow::before {
    border-right-color: #2d3748 !important;
}

[data-bs-theme="dark"] .mobile-card-content {
    background-color: #2d3748 !important;
}


/* 暗黑模式下的分页按钮样式 */
[data-bs-theme="dark"] .mod-pagination .next,
[data-bs-theme="dark"] .mod-pagination .prev,
[data-bs-theme="dark"] .mod-pagination .submit {
    background-color: #2d3748 !important;
    border-color: #4a5568 !important;
}

[data-bs-theme="dark"] .mod-pagination button.disabled,
[data-bs-theme="dark"] .mod-pagination button[disabled] {
    background-color: #4b5563 !important;
    cursor: not-allowed !important;
}

/* 暗黑模式下的分页按钮悬停效果 */
[data-bs-theme="dark"] .mod-pagination .next:hover,
[data-bs-theme="dark"] .mod-pagination .prev:hover,
[data-bs-theme="dark"] .mod-pagination .submit:hover {
    background-color: #4a5568 !important;
}

/* 暗黑模式下的分页输入框 */
[data-bs-theme="dark"] .mod-pagination .pagination-goto input {
    background-color: #2d3748 !important;
    border-color: #4a5568 !important;
    color: #e2e8f0 !important;
}

[data-bs-theme="dark"] .mod-pagination .pagination-goto input:focus {
    border-color: #667eea !important;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25) !important;
}

/* 暗黑模式下的分页文字 */
[data-bs-theme="dark"] .mod-pagination .pagination-status,
[data-bs-theme="dark"] .mod-pagination .pagination-goto {
    color: #e2e8f0 !important;
}

/* 统计页面暗黑模式样式 */
[data-bs-theme="dark"] .stat-card {
    background: hsla(0, 0%, 100%, .03) !important;
    border: 1px solid hsla(0, 0%, 100%, .12) !important;
}

[data-bs-theme="dark"] .stat-number {
    color: #39d353 !important;
}

[data-bs-theme="dark"] .stat-label {
    color: #8b949e !important;
}

/* 主题切换按钮暗黑模式 */
[data-bs-theme="dark"] .theme-toggle .btn {
    background-color: var(--tblr-primary) !important;
    border-color: var(--tblr-primary) !important;
    color: #fff !important;
}

[data-bs-theme="dark"] .theme-toggle .btn:hover {
    background-color: var(--tblr-primary-darken) !important;
    border-color: var(--tblr-primary-darken) !important;
}

/* 暗黑模式下的nav-segmented导航样式 - 参考vs.html */
[data-bs-theme="dark"] .nav-segmented {
    background: #1a202c !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    padding: 4px !important;
    --tblr-nav-segmented-bg: transparent !important;
}

[data-bs-theme="dark"] .nav-segmented .nav-link {
    background: color-mix(in srgb, var(--tblr-nav-link-color) 14%, transparent) !important;
    color: #a0aec0 !important;
    border: none !important;
    margin: 0 2px !important;
    border-radius: 6px !important;
    padding: 8px 12px !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
}

[data-bs-theme="dark"] .nav-segmented .nav-link:hover {
    color: #e2e8f0 !important;
}

[data-bs-theme="dark"] .nav-segmented .nav-link.active {
    background: linear-gradient(135deg, #2d3748, #4b5563) !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    border: 1px solid transparent !important;
    border-color: var(--tblr-border-color) !important;
}

/* 暗黑模式下nav-segmented中的图标样式 */
[data-bs-theme="dark"] .nav-segmented .nav-link img {
    filter: brightness(0.7) !important;
    transition: filter 0.2s ease !important;
}

[data-bs-theme="dark"] .nav-segmented .nav-link.active img {
    filter: brightness(0) saturate(100%) invert(44%) sepia(8%) saturate(665%) hue-rotate(185deg) brightness(93%) contrast(88%) !important;
}

[data-bs-theme="dark"] .nav-segmented .nav-link:hover img {
    filter: brightness(0.9) !important;
}

/* 暗黑模式下nav-segmented按钮样式优化 */
[data-bs-theme="dark"] .nav-segmented button.nav-link {
    border: none !important;
    outline: none !important;
}

[data-bs-theme="dark"] .nav-segmented button.nav-link:focus {
    box-shadow: 0 0 0 2px rgba(var(--tblr-primary-rgb), 0.25) !important;
}

[data-bs-theme="dark"] .footer {
    background-color:#1f2937!important;
    border-top: none !important;
    box-shadow: none !important;
}


[data-bs-theme="dark"]  .main-detail .content {
    background-color:#1f2937;
}

[data-bs-theme="dark"]  .data h1, [data-bs-theme="dark"]  .article-detail h3,  [data-bs-theme="dark"] .data p,  [data-bs-theme="dark"]  .widget-hot h3, [data-bs-theme="dark"] .widget-hot .title, [data-bs-theme="dark"] .widget-hot .post-meta{
    color: #e2e8f0 !important;
}



[data-bs-theme="dark"] .modal-badge-rim {
    background-color: #1f2937;
    color: #e2e8f0;
    border-color: #6b7280;

}


[data-bs-theme="dark"] .hot-tags a {
    border: 0;
    background-color: #4a5568 !important;
    color: #e2e8f0 !important;
}

[data-bs-theme="dark"]  .detaltext p,  [data-bs-theme="dark"] .bread-crumbs li a {
   color: var(--tblr-secondary) !important;
}


[data-bs-theme="dark"] .sidebar-right .link {
    color: #e2e8f0 !important;
  }

[data-bs-theme="dark"]  .custom-checkbox {
    background-color: #4a5568;
    border: 1px solid  #6b7280;
    color: #e2e8f0;
}


[data-bs-theme="dark"] .custom-checkbox:hover {
    background-color: #374151;
    border-color: #aaa;
}

[data-bs-theme="dark"] .custom-checkbox.checked,
[data-bs-theme="dark"] .custom-checkbox.checked:hover {
    background-color: #16b777;
    border-color: #16b777;
    color: #fff;
}


[data-bs-theme="dark"] .score-box .btn {
    background:#374151;
    border: 1px solid  #4a5568;
    color: #fff;
}

[data-bs-theme="dark"] .score-box .btn:hover {
    background: #0db252;
    border: none;
    color: #FFFFFF;
    text-decoration: none;
}

/* 暗黑模式下选中卡片样式 */
[data-bs-theme="dark"] .card-selected {
    background-color: #374151 !important;
    border-color: #9ca3af!important;
}

[data-bs-theme="dark"] .card-selected .card-title {
    color: #e2e8f0 !important;
}

[data-bs-theme="dark"] .card-selected .card-body {
    background-color: #374151 !important;
}

/* 贡献日历暗黑主题适配 */
[data-bs-theme="dark"] .contributions-section {
    background: hsla(0, 0%, 100%, .03) !important;
    border: 1px solid hsla(0, 0%, 100%, .12) !important;
    border-radius: 4px !important;
}

[data-bs-theme="dark"] .contributions-title-text {
    color: hsla(0, 0%, 100%, .92) !important;
}

[data-bs-theme="dark"] .contributions-info-icon {
    opacity: 0.4 !important;
}

[data-bs-theme="dark"] .contributions-calendar-container {
    color: #8b949e !important;
}

[data-bs-theme="dark"] .contributions-legend {
    color: #8b949e !important;
}

[data-bs-theme="dark"] .contributions-legend-text {
    color: #737a87 !important;
}

/* 暗黑主题下的图例颜色 */
[data-bs-theme="dark"] .contributions-legend-0 {
    background-color: rgba(237, 239, 242, 0.08) !important;
}

[data-bs-theme="dark"] .contributions-legend-1 {
    background-color: #0e4429 !important;
}

[data-bs-theme="dark"] .contributions-legend-2 {
    background-color: #006d32 !important;
}

[data-bs-theme="dark"] .contributions-legend-3 {
    background-color: #26a641 !important;
}

[data-bs-theme="dark"] .contributions-legend-4 {
    background-color: #39d353 !important;
}

/* 暗黑主题下的统计区块样式 */
[data-bs-theme="dark"] .contributions-stats-subtitle {
    color: hsla(0, 0%, 100%, .6) !important;
}

[data-bs-theme="dark"] .contributions-stats-value {
    color: hsla(0, 0%, 100%, .92) !important;
}

[data-bs-theme="dark"] .contributions-progress-icon {
    color: #fff !important;
}

[data-bs-theme="dark"] .contributions-icon-text {
    color: #9599a6 !important;
}

[data-bs-theme="dark"] .contributions-icon-number {
    color: hsla(0, 0%, 100%, .92) !important;
}

[data-bs-theme="dark"] .contributions-progress-segment {
    color: #fff !important;
}

/* 暗黑主题下的百分比状态条颜色 - 使用不同颜色 */
[data-bs-theme="dark"] .progress-segment-1 {
    background-color: #374151 !important;
}

[data-bs-theme="dark"] .progress-segment-2 {
    background-color: #374151!important;
}

[data-bs-theme="dark"] .progress-segment-3 {
    background-color: #374151 !important;
}

/* 暗黑主题下的滚动条样式 */
[data-bs-theme="dark"] .contributions-calendar-scroll {
    scrollbar-color: hsla(0, 0%, 100%, .2) transparent !important;
}

[data-bs-theme="dark"] .contributions-calendar-scroll::-webkit-scrollbar-thumb {
    background-color: hsla(0, 0%, 100%, .2) !important;
}

/* 暗黑主题下的cal-heatmap样式覆盖 */
[data-bs-theme="dark"] .cal-heatmap-container .graph-label {
    fill: #8b949e !important;
}

[data-bs-theme="dark"] .cal-heatmap-container .graph-subdomain-group rect:hover {
    stroke: #ffffff !important;
    stroke-width: 1px !important;
    stroke-opacity: 0.8 !important;
}

[data-bs-theme="dark"] .ch-tooltip {
    background: #1f2937 !important;
    color: #e5e7eb !important;
    border: 1px solid #374151 !important;
}

[data-bs-theme="dark"] .ch-tooltip::after {
    border-top-color: #1f2937 !important;
}

/* 暗黑主题下的加载和错误状态 */
[data-bs-theme="dark"] .contributions-loading {
    color: #8b949e !important;
}

[data-bs-theme="dark"] .contributions-loading::before {
    border-color: #8b949e !important;
    border-top-color: transparent !important;
}

[data-bs-theme="dark"] .contributions-error {
    color: #f85149 !important;
}

/* 暗黑主题下的焦点样式 */
[data-bs-theme="dark"] .contributions-calendar:focus-visible {
    outline-color: #58a6ff !important;
}

/* 确保暗黑主题下的过渡效果 */
[data-bs-theme="dark"] .contributions-section,
[data-bs-theme="dark"] .contributions-legend-item,
[data-bs-theme="dark"] .contributions-stats-value,
[data-bs-theme="dark"] .contributions-progress-segment {
    transition: all 0.3s ease !important;
}/* 
Cal-Heatmap v3.3.10 暗黑主题颜色覆盖 */
[data-bs-theme="dark"] .cal-heatmap-container .q1 {
    background-color: #0e4429 !important;
    fill: #0e4429 !important;
}

[data-bs-theme="dark"] .cal-heatmap-container .q2 {
    background-color: #006d32 !important;
    fill: #006d32 !important;
}

[data-bs-theme="dark"] .cal-heatmap-container .q3 {
    background-color: #26a641 !important;
    fill: #26a641 !important;
}

[data-bs-theme="dark"] .cal-heatmap-container .q4 {
    background-color: #39d353 !important;
    fill: #39d353 !important;
}

[data-bs-theme="dark"] .cal-heatmap-container .graph-rect {
    fill: rgba(237, 239, 242, 0.08) !important;
}/* C
al-Heatmap v3.3.10 全局颜色覆盖 */
[data-bs-theme="dark"] .q1,
[data-bs-theme="dark"] svg .q1 {
    background-color: #0e4429 !important;
    fill: #0e4429 !important;
}

[data-bs-theme="dark"] .q2,
[data-bs-theme="dark"] svg .q2 {
    background-color: #006d32 !important;
    fill: #006d32 !important;
}

[data-bs-theme="dark"] .q3,
[data-bs-theme="dark"] svg .q3 {
    background-color: #26a641 !important;
    fill: #26a641 !important;
}

[data-bs-theme="dark"] .q4,
[data-bs-theme="dark"] svg .q4 {
    background-color: #39d353 !important;
    fill: #39d353 !important;
}

[data-bs-theme="dark"] .graph-rect,
[data-bs-theme="dark"] svg .graph-rect {
    fill: rgba(237, 239, 242, 0.08) !important;
}

/* 暗黑模式下的分隔线样式 */
[data-bs-theme="dark"] .border-divider {
    border-top: 1px solid #374151 !important;
}


[data-bs-theme="dark"] .nav-tabs {
    border-bottom: 1px solid #9ca3af!important;
}

[data-bs-theme="dark"] .nav-tabs .nav-link {
    color: #9ca3af!important;
}

/* 邀请页面暗黑模式样式 */
[data-bs-theme="dark"] .invite-link-container {
    background-color: #374151 !important;
    border: 1px solid #4b5563 !important;
}

[data-bs-theme="dark"] .invite-link-input {
    background-color: #1f2937 !important;
    border: 1px solid #4b5563 !important;
    color: #e5e7eb !important;
}

[data-bs-theme="dark"] .invite-link-input:focus {
    border-color: #6b7280 !important;
}

/* 暗黑模式下表格样式 */
[data-bs-theme="dark"] .card-table .table {
    color: #e5e7eb !important;
}

[data-bs-theme="dark"] .card-table .table thead th {
    color: #d1d5db !important;
    border-bottom: 1px solid #4b5563 !important;
}

[data-bs-theme="dark"] .card-table .table tbody tr {
    border-bottom: 1px solid #374151 !important;
}

[data-bs-theme="dark"] .card-table .table tbody td {
    color: #e5e7eb !important;
}


[data-bs-theme="dark"] .main-content .row-cards .card{
 background-color: var(--tblr-bg-surface-tertiary);
}

[data-bs-theme="dark"]  .border-end {
    border-color: #374151; !important;
}

[data-bs-theme="dark"]  .main-content .flex-column {
         background: var(--tblr-active-bg);
}


[data-bs-theme="dark"]  .align-middle{
     background: var(--tblr-active-bg);
}