/* 侧边栏基础样式 */
#sidebar {
    height: 100dvh;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
    transition: transform 0.3s ease-in-out;
    position: fixed;
    left: 0;
    top: 0;
    width: 306px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    z-index: 40;
    flex-shrink: 0;
    /* background-color: var(--bg-secondary) !important; */
}

/* 暗色模式侧边栏背景 */
.dark #sidebar {
    background-color: rgb(31, 41, 55);
    border-right: 1px solid rgb(75, 85, 99);
}

/* 桌面端默认显示 */
@media (min-width: 1024px) {
    #sidebar {
        transform: translateX(0) !important;
    }
    
    main {
        margin-left: 306px;
    }
}

/* 移动端默认隐藏 */
@media (max-width: 1023px) {
    #sidebar {
        /* 基础位置由-translate-x-full类控制 */
        z-index: 9999;
    }
    
    #sidebar:not(.-translate-x-full) {
        transform: translateX(0) !important;
    }
    
    main {
        margin-left: 0 !important;
    }
}
 
/* 移动端隐藏滚动条，保持可滚动 */
@media (max-width: 1023px) {
    #sidebar::-webkit-scrollbar {
        display: none;
    }
    
    #sidebar {
        -ms-overflow-style: none;  /* Internet Explorer 10+ */
        scrollbar-width: none;  /* Firefox */
    }
}

/* 桌面端保持原有滚动条样式 */
@media (min-width: 1024px) {
    #sidebar::-webkit-scrollbar {
        width: 4px;
    }

    #sidebar::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.05);
    }

    #sidebar::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.15);
        border-radius: 4px;
    }

    #sidebar::-webkit-scrollbar-thumb:hover {
        background: rgba(0, 0, 0, 0.25);
    }

    /* 暗色模式下的滚动条 */
    .dark #sidebar::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.05);
    }

    .dark #sidebar::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.15);
    }

    .dark #sidebar::-webkit-scrollbar-thumb:hover {
        background: rgba(255, 255, 255, 0.25);
    }
}

/* 确保侧边栏内容不影响布局 */
#sidebar nav {
    height: auto;
}

/* 侧边栏导航按钮样式改进 */
#sidebar nav button {
    text-align: left;
    justify-content: flex-start;
    transition: all 0.2s ease-in-out;
}

#sidebar nav button:hover {
    transform: translateX(2px);
}

/* 标签区域样式改进 */
#categoryTree {
    /* max-height: calc(100dvh - 400px); */
    /* overflow-y: auto; */
    margin-bottom: 2rem;
}

#categoryTree::-webkit-scrollbar {
    width: 3px;
}

#categoryTree::-webkit-scrollbar-track {
    background: transparent;
}

#categoryTree::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.dark #categoryTree::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
}

/* 标签项样式 - 移除动画效果 */
.category-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    /* 移除动画：transition: all 0.2s ease-in-out; */
    transition: none;
    margin-bottom: 2px;
    color: rgb(55, 65, 81);
}

.dark .category-item {
    color: rgb(209, 213, 219);
}

.category-item:hover {
    background-color: rgb(243, 244, 246);
    /* 移除位移动画：transform: translateX(2px); */
}

.dark .category-item:hover {
    background-color: rgb(55, 65, 81);
}

.category-item.active {
    background-color: rgb(239, 246, 255);
    color: rgb(29, 78, 216);
}

.dark .category-item.active {
    background-color: rgba(30, 58, 138, 0.3) !important;
    color: rgb(147, 197, 253) !important;
}

/* 确保选中状态的悬浮效果保持蓝色背景 */
.category-item.active:hover,
.category-item.bg-blue-100:hover {
    background-color: rgb(239, 246, 255) !important;
    color: rgb(29, 78, 216) !important;
}

.dark .category-item.active:hover,
.dark .category-item.bg-blue-900\/30:hover {
    background-color: rgba(30, 58, 138, 0.3) !important;
    color: rgb(147, 197, 253) !important;
}

/* 移动端侧边栏遮罩层控制 */
@media (max-width: 1023px) {
    #sidebarOverlay.show {
        display: block;
        opacity: 1;
        z-index: 999;
    }
}

/* 主题切换图标控制 */
.theme-icon-light,
.theme-icon-dark {
    transition: opacity 0.2s;
}

html.dark .theme-icon-light {
    display: none;
}

html.dark .theme-icon-dark {
    display: inline !important;
}

html:not(.dark) .theme-icon-dark {
    display: none;
}

html:not(.dark) .theme-icon-light {
    display: inline;
}

/* 修复列表样式 */
ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* 通用响应式布局修复 */
.flex {
    display: flex;
}

.flex-1 {
    flex: 1;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.justify-start {
    justify-content: flex-start;
}

.hidden {
    display: none;
}

.fixed {
    position: fixed;
}

.sticky {
    position: sticky;
}

.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.top-0 {
    top: 0;
}

.left-0 {
    left: 0;
}

.z-10 {
    z-index: 10;
}

.z-40 {
    z-index: 40;
}

.z-999 { z-index: 999; } 
.z-9999 { z-index: 9999; } 

.overflow-hidden {
    overflow: hidden;
}

.overflow-auto {
    overflow: auto;
}

.overflow-y-auto {
    overflow-y: auto;
}

/* 边框和阴影 */
.border-b {
    border-bottom-width: 1px;
}

.border-gray-100 {
    border-color: rgb(243, 244, 246);
}

.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* 过渡和变换 */
.transition-transform {
    transition-property: transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.transition-opacity {
    transition-property: opacity;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* 禁用标签相关元素的Tailwind动画类 */
#categoryTree .transition-transform,
#categoryTree .transition-opacity,
.category-tree-item .transition-transform,
.category-tree-item .transition-opacity,
.category-item .transition-transform,
.category-item .transition-opacity {
    transition: none !important;
    transform: none !important;
    animation: none !important;
}

.transition-colors {
    transition-property: color, background-color, border-color;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.duration-300 {
    transition-duration: 300ms;
}

.-translate-x-full {
    transform: translateX(-100%);
}

/* 文本样式 */
.text-xs {
    font-size: 0.75rem;
    line-height: 1rem;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

.text-center {
    text-align: center;
}

/* 内边距和外边距 */
.p-1 {
    padding: 0.25rem;
}

.p-2 {
    padding: 0.5rem;
}

.p-4 {
    padding: 1rem;
}

.px-2 {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.px-3 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.pb-4 {
    padding-bottom: 1rem;
}

.ml-2 {
    margin-left: 0.5rem;
}

.mr-1 {
    margin-right: 0.25rem;
}

.mr-3 {
    margin-right: 0.75rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mt-3 {
    margin-top: 0.75rem;
}

/* 圆角 */
.rounded-lg {
    border-radius: 0.5rem;
}

.rounded-full {
    border-radius: 9999px;
}

/* 宽度和高度 */
.w-full {
    width: 100%;
}

.w-auto {
    width: auto;
}

.w-10 {
    width: 2.5rem;
}

.h-10 {
    height: 2.5rem;
}

.h-16 {
    height: 4rem;
}

/* Focus样式 */
.focus\:outline-none:focus {
    outline: none;
}

.focus\:bg-gray-100:focus {
    background-color: rgb(243, 244, 246);
}

.dark .focus\:bg-gray-600:focus {
    background-color: rgb(75, 85, 99);
}

/* Hover样式 */
.hover\:bg-gray-50:hover {
    background-color: rgb(249, 250, 251);
}

.hover\:bg-gray-100:hover {
    background-color: rgb(243, 244, 246);
}

.hover\:text-gray-600:hover {
    color: rgb(75, 85, 99);
}

.hover\:text-primary:hover {
    color: var(--primary-color);
}

.hover\:text-primary-dark:hover {
    color: var(--primary-dark);
}

.dark .hover\:bg-gray-600:hover {
    background-color: rgb(75, 85, 99);
}

.dark .hover\:bg-gray-700:hover {
    background-color: rgb(55, 65, 81);
}

.dark .hover\:text-gray-300:hover {
    color: rgb(209, 213, 219);
}

/* 主色调变量 */
:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
}

.text-primary {
    color: var(--primary);
}

.text-primary-dark {
    color: var(--primary-dark);
}

/* 图标大小 */
.icon {
    width: 1.25rem;
    height: 1.25rem;
}

/* 弹性布局缩减 */
.flex-shrink-0 {
    flex-shrink: 0;
}

/* 对象适应 */
.object-cover {
    object-fit: cover;
}

/* 标签树增强样式 - 与todo项目保持一致 */
.category-tree-item.group:hover .category-actions {
    opacity: 1;
}

.category-tree-item .category-actions {
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

/* 标签项的基础样式 */
.category-item {
    position: relative;
    border-radius: 8px;
    transition: all 0.2s ease-in-out;
}

.category-item:hover {
    transform: none; /* 移除之前的transform效果 */
}

/* 标签弹出菜单的深度样式 */
.category-actions-popover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 
                0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-radius: 6px;
    overflow: hidden;
}

.dark .category-actions-popover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 
                0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

/* 确保标签项不被遮挡 */
#categoryTree {
    position: relative;
    z-index: 1;
}

/* 标签操作按钮的改进 */
.category-add-child-btn,
.category-more-actions-btn {
    opacity: 0.7;
    transition: opacity 0.2s ease-in-out;
}

.category-add-child-btn:hover,
.category-more-actions-btn:hover {
    opacity: 1;
}

/* 标签树连接线的改进 - 样式已移至 css/tags.css */

/* 对话框中的表单元素样式 */
.color-option.border-gray-900 {
    border-color: #111827 !important;
}

.dark .color-option.dark\:border-white {
    border-color: #f9fafb !important;
}

/* 确保标签名称在不同主题下都清晰可见 */
.category-item a span {
    color: inherit;
    font-weight: 500;
}

/* 悬浮状态的改进 */
.category-item:hover {
    background-color: rgba(59, 130, 246, 0.05);
}

.dark .category-item:hover {
    background-color: rgba(59, 130, 246, 0.1);
}

/* 选中状态的改进 */
.category-item.bg-blue-100 {
    /* background-color: rgba(59, 130, 246, 0.1) !important; */
}

.dark .category-item.dark\:bg-blue-900\/30 {
    background-color: rgba(59, 130, 246, 0.2) !important;
}

/* 旧样式已移至下面的统一样式区域 */

/* 已移到下面的统一样式区域 */

/* ===== 标签样式统一管理（从其他文件迁移而来） ===== */

/* 标签选中状态基础样式 - 最高优先级 */
.category-item.active,
.category-item.bg-blue-100,
.category-item.text-blue-800 {
    background: rgb(239, 246, 255) !important;
    color: rgb(29, 78, 216) !important;
}

.category-item.active:hover,
.category-item.bg-blue-100:hover,
.category-item.text-blue-800:hover {
    background: rgb(239, 246, 255) !important;
    color: rgb(29, 78, 216) !important;
}

/* 标签计数器样式 */
.category-item.active .category-count,
.category-item.bg-blue-100 .category-count,
.category-item.text-blue-800 .category-count {
    background: rgba(29, 78, 216, 0.1);
    color: rgb(29, 78, 216);
}

[data-theme="dark"] .category-item.active .category-count,
[data-theme="dark"] .category-item.bg-blue-900\/30 .category-count,
[data-theme="dark"] .category-item.text-blue-300 .category-count,
.dark .category-item.active .category-count,
.dark .category-item.bg-blue-900\/30 .category-count,
.dark .category-item.text-blue-300 .category-count {
    background: rgba(147, 197, 253, 0.1);
    color: rgb(147, 197, 253);
}

/* 夜间模式下的标签选中样式 - 最高优先级覆盖 Tailwind 默认样式 */
html[data-theme="dark"] .category-item.active,
html[data-theme="dark"] .category-item.bg-blue-100,
html[data-theme="dark"] .category-item.bg-blue-900\/30,
html[data-theme="dark"] .category-item.text-blue-800,
html[data-theme="dark"] .category-item.text-blue-300,
html.dark .category-item.active,
html.dark .category-item.bg-blue-100,
html.dark .category-item.bg-blue-900\/30,
html.dark .category-item.text-blue-800,
html.dark .category-item.text-blue-300,
body[data-theme="dark"] .category-item.active,
body[data-theme="dark"] .category-item.bg-blue-100,
body[data-theme="dark"] .category-item.bg-blue-900\/30,
body[data-theme="dark"] .category-item.text-blue-800,
body[data-theme="dark"] .category-item.text-blue-300,
body.dark .category-item.active,
body.dark .category-item.bg-blue-100,
body.dark .category-item.bg-blue-900\/30,
body.dark .category-item.text-blue-800,
body.dark .category-item.text-blue-300 {
    background-color: rgba(30, 58, 138, 0.3) !important;
    color: rgb(147, 197, 253) !important;
}

html[data-theme="dark"] .category-item.active:hover,
html[data-theme="dark"] .category-item.bg-blue-100:hover,
html[data-theme="dark"] .category-item.bg-blue-900\/30:hover,
html[data-theme="dark"] .category-item.text-blue-800:hover,
html[data-theme="dark"] .category-item.text-blue-300:hover,
html.dark .category-item.active:hover,
html.dark .category-item.bg-blue-100:hover,
html.dark .category-item.bg-blue-900\/30:hover,
html.dark .category-item.text-blue-800:hover,
html.dark .category-item.text-blue-300:hover,
body[data-theme="dark"] .category-item.active:hover,
body[data-theme="dark"] .category-item.bg-blue-100:hover,
body[data-theme="dark"] .category-item.bg-blue-900\/30:hover,
body[data-theme="dark"] .category-item.text-blue-800:hover,
body[data-theme="dark"] .category-item.text-blue-300:hover,
body.dark .category-item.active:hover,
body.dark .category-item.bg-blue-100:hover,
body.dark .category-item.bg-blue-900\/30:hover,
body.dark .category-item.text-blue-800:hover,
body.dark .category-item.text-blue-300:hover {
    background-color: rgba(30, 58, 138, 0.3) !important;
    color: rgb(147, 197, 253) !important;
}

/* 确保选中状态下的所有子元素颜色一致 */
.category-item.active,
.category-item.bg-blue-100,
.category-item.text-blue-800 {
    color: rgb(29, 78, 216) !important;
}

.category-item.active *,
.category-item.bg-blue-100 *,
.category-item.text-blue-800 * {
    color: inherit !important;
}

/* 夜间模式下的子元素样式 - 高优先级 */
html[data-theme="dark"] .category-item.active *,
html[data-theme="dark"] .category-item.bg-blue-100 *,
html[data-theme="dark"] .category-item.bg-blue-900\/30 *,
html[data-theme="dark"] .category-item.text-blue-800 *,
html[data-theme="dark"] .category-item.text-blue-300 *,
html.dark .category-item.active *,
html.dark .category-item.bg-blue-100 *,
html.dark .category-item.bg-blue-900\/30 *,
html.dark .category-item.text-blue-800 *,
html.dark .category-item.text-blue-300 *,
body[data-theme="dark"] .category-item.active *,
body[data-theme="dark"] .category-item.bg-blue-100 *,
body[data-theme="dark"] .category-item.bg-blue-900\/30 *,
body[data-theme="dark"] .category-item.text-blue-800 *,
body[data-theme="dark"] .category-item.text-blue-300 *,
body.dark .category-item.active *,
body.dark .category-item.bg-blue-100 *,
body.dark .category-item.bg-blue-900\/30 *,
body.dark .category-item.text-blue-800 *,
body.dark .category-item.text-blue-300 * {
    color: inherit !important;
}

/* 标签图标和特殊元素样式 */
.category-item.active svg,
.category-item.bg-blue-100 svg,
.category-item.text-blue-800 svg,
.category-item.active i,
.category-item.bg-blue-100 i,
.category-item.text-blue-800 i,
.category-item.active .ri-*,
.category-item.bg-blue-100 .ri-*,
.category-item.text-blue-800 .ri-* {
    color: rgb(29, 78, 216) !important;
}

html[data-theme="dark"] .category-item.active svg,
html[data-theme="dark"] .category-item.bg-blue-100 svg,
html[data-theme="dark"] .category-item.bg-blue-900\/30 svg,
html[data-theme="dark"] .category-item.text-blue-800 svg,
html[data-theme="dark"] .category-item.text-blue-300 svg,
html[data-theme="dark"] .category-item.active i,
html[data-theme="dark"] .category-item.bg-blue-100 i,
html[data-theme="dark"] .category-item.bg-blue-900\/30 i,
html[data-theme="dark"] .category-item.text-blue-800 i,
html[data-theme="dark"] .category-item.text-blue-300 i,
html[data-theme="dark"] .category-item.active .ri-*,
html[data-theme="dark"] .category-item.bg-blue-100 .ri-*,
html[data-theme="dark"] .category-item.bg-blue-900\/30 .ri-*,
html[data-theme="dark"] .category-item.text-blue-800 .ri-*,
html[data-theme="dark"] .category-item.text-blue-300 .ri-*,
html.dark .category-item.active svg,
html.dark .category-item.bg-blue-100 svg,
html.dark .category-item.bg-blue-900\/30 svg,
html.dark .category-item.text-blue-800 svg,
html.dark .category-item.text-blue-300 svg,
html.dark .category-item.active i,
html.dark .category-item.bg-blue-100 i,
html.dark .category-item.bg-blue-900\/30 i,
html.dark .category-item.text-blue-800 i,
html.dark .category-item.text-blue-300 i,
html.dark .category-item.active .ri-*,
html.dark .category-item.bg-blue-100 .ri-*,
html.dark .category-item.bg-blue-900\/30 .ri-*,
html.dark .category-item.text-blue-800 .ri-*,
html.dark .category-item.text-blue-300 .ri-*,
body[data-theme="dark"] .category-item.active svg,
body[data-theme="dark"] .category-item.bg-blue-100 svg,
body[data-theme="dark"] .category-item.bg-blue-900\/30 svg,
body[data-theme="dark"] .category-item.text-blue-800 svg,
body[data-theme="dark"] .category-item.text-blue-300 svg,
body[data-theme="dark"] .category-item.active i,
body[data-theme="dark"] .category-item.bg-blue-100 i,
body[data-theme="dark"] .category-item.bg-blue-900\/30 i,
body[data-theme="dark"] .category-item.text-blue-800 i,
body[data-theme="dark"] .category-item.text-blue-300 i,
body[data-theme="dark"] .category-item.active .ri-*,
body[data-theme="dark"] .category-item.bg-blue-100 .ri-*,
body[data-theme="dark"] .category-item.bg-blue-900\/30 .ri-*,
body[data-theme="dark"] .category-item.text-blue-800 .ri-*,
body[data-theme="dark"] .category-item.text-blue-300 .ri-*,
body.dark .category-item.active svg,
body.dark .category-item.bg-blue-100 svg,
body.dark .category-item.bg-blue-900\/30 svg,
body.dark .category-item.text-blue-800 svg,
body.dark .category-item.text-blue-300 svg,
body.dark .category-item.active i,
body.dark .category-item.bg-blue-100 i,
body.dark .category-item.bg-blue-900\/30 i,
body.dark .category-item.text-blue-800 i,
body.dark .category-item.text-blue-300 i,
body.dark .category-item.active .ri-*,
body.dark .category-item.bg-blue-100 .ri-*,
body.dark .category-item.bg-blue-900\/30 .ri-*,
body.dark .category-item.text-blue-800 .ri-*,
body.dark .category-item.text-blue-300 .ri-* {
    color: rgb(147, 197, 253) !important;
}

/* 桌面端样式优化 */
@media (min-width: 1024px) {
    .category-item.active,
    .category-item.bg-blue-100,
    .category-item.text-blue-800 {
        background-color: rgb(239, 246, 255) !important;
        color: rgb(29, 78, 216) !important;
    }
    
    .category-item.active:hover,
    .category-item.bg-blue-100:hover,
    .category-item.text-blue-800:hover {
        background-color: rgb(239, 246, 255) !important;
        color: rgb(29, 78, 216) !important;
    }
    
    [data-theme="dark"] .category-item.active,
    [data-theme="dark"] .category-item.bg-blue-900\/30,
    [data-theme="dark"] .category-item.text-blue-300,
    .dark .category-item.active,
    .dark .category-item.bg-blue-900\/30,
    .dark .category-item.text-blue-300 {
        background-color: rgba(30, 58, 138, 0.3) !important;
        color: rgb(147, 197, 253) !important;
    }
    
    [data-theme="dark"] .category-item.active:hover,
    [data-theme="dark"] .category-item.bg-blue-900\/30:hover,
    [data-theme="dark"] .category-item.text-blue-300:hover,
    .dark .category-item.active:hover,
    .dark .category-item.bg-blue-900\/30:hover,
    .dark .category-item.text-blue-300:hover {
        background-color: rgba(30, 58, 138, 0.3) !important;
        color: rgb(147, 197, 253) !important;
    }
}

/* 移动端样式优化 */
@media (max-width: 1023px) {
    .category-item.active,
    .category-item.bg-blue-100,
    .category-item.text-blue-800 {
        background-color: rgb(239, 246, 255) !important;
        color: rgb(29, 78, 216) !important;
    }
    
    [data-theme="dark"] .category-item.active,
    [data-theme="dark"] .category-item.bg-blue-900\/30,
    [data-theme="dark"] .category-item.text-blue-300,
    .dark .category-item.active,
    .dark .category-item.bg-blue-900\/30,
    .dark .category-item.text-blue-300 {
        background-color: rgba(30, 58, 138, 0.3) !important;
        color: rgb(147, 197, 253) !important;
    }
}

/* 触屏设备优化 */
@media (pointer: coarse) {
    .category-item:hover {
        background-color: transparent !important;
    }
    
    .category-item.active,
    .category-item.bg-blue-100,
    .category-item.text-blue-800 {
        background-color: rgb(239, 246, 255) !important;
        color: rgb(29, 78, 216) !important;
    }
    
    [data-theme="dark"] .category-item.active,
    [data-theme="dark"] .category-item.bg-blue-900\/30,
    [data-theme="dark"] .category-item.text-blue-300,
    .dark .category-item.active,
    .dark .category-item.bg-blue-900\/30,
    .dark .category-item.text-blue-300 {
        background-color: rgba(30, 58, 138, 0.3) !important;
        color: rgb(147, 197, 253) !important;
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .category-item:hover {
        background-color: transparent !important;
    }
    
    .category-item.active,
    .category-item.bg-blue-100,
    .category-item.text-blue-800 {
        background-color: rgb(239, 246, 255) !important;
        color: rgb(29, 78, 216) !important;
    }
    
    [data-theme="dark"] .category-item.active,
    [data-theme="dark"] .category-item.bg-blue-900\/30,
    [data-theme="dark"] .category-item.text-blue-300,
    .dark .category-item.active,
    .dark .category-item.bg-blue-900\/30,
    .dark .category-item.text-blue-300 {
        background-color: rgba(30, 58, 138, 0.3) !important;
        color: rgb(147, 197, 253) !important;
    }
} 