/* 强制夜间模式搜索输入框样式 - 只在夜间模式下生效 */
/* 解决缓存和主题冲突问题，不影响日间模式 */

/* 夜间模式选择器 - 确保只在夜间模式下应用深色背景 */
body.dark-theme .search-input,
body.theme-dark .search-input,
.zib-theme-dark .search-input,
.dark-mode .search-input,
body[data-theme="dark"] .search-input,
html[data-theme="dark"] .search-input,
html.dark .search-input,
body.dark .search-input {
    background: #1f1f1f !important;
    border-color: #555555 !important;
    color: #f0f0f0 !important;
    transition: all 0.2s ease !important;
}

/* 夜间模式占位符文字样式 */
body.dark-theme .search-input::placeholder,
body.theme-dark .search-input::placeholder,
.zib-theme-dark .search-input::placeholder,
.dark-mode .search-input::placeholder,
body[data-theme="dark"] .search-input::placeholder,
html[data-theme="dark"] .search-input::placeholder,
html.dark .search-input::placeholder,
body.dark .search-input::placeholder {
    color: #999999 !important;
    opacity: 1 !important;
}

/* 夜间模式焦点状态 */
body.dark-theme .search-input:focus,
body.theme-dark .search-input:focus,
.zib-theme-dark .search-input:focus,
.dark-mode .search-input:focus,
body[data-theme="dark"] .search-input:focus,
html[data-theme="dark"] .search-input:focus,
html.dark .search-input:focus,
body.dark .search-input:focus {
    border-color: #4285f4 !important;
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.3) !important;
    background: #1f1f1f !important;
}

/* 夜间模式悬停状态 */
body.dark-theme .search-input:hover,
body.theme-dark .search-input:hover,
.zib-theme-dark .search-input:hover,
.dark-mode .search-input:hover,
body[data-theme="dark"] .search-input:hover,
html[data-theme="dark"] .search-input:hover,
html.dark .search-input:hover,
body.dark .search-input:hover {
    border-color: #4285f4 !important;
    background: #1f1f1f !important;
}

/* 夜间模式自动填充兼容性 */
body.dark-theme .search-input:-webkit-autofill,
body.theme-dark .search-input:-webkit-autofill,
.zib-theme-dark .search-input:-webkit-autofill,
.dark-mode .search-input:-webkit-autofill,
body[data-theme="dark"] .search-input:-webkit-autofill,
html[data-theme="dark"] .search-input:-webkit-autofill,
html.dark .search-input:-webkit-autofill,
body.dark .search-input:-webkit-autofill {
    -webkit-text-fill-color: #f0f0f0 !important;
    -webkit-box-shadow: 0 0 0 1000px #1f1f1f inset !important;
    background-color: #1f1f1f !important;
}

/* 确保日间模式保持正常的白色背景 */
body:not(.dark-theme):not(.theme-dark):not(.dark-mode):not(.dark):not([data-theme="dark"]) .search-input {
    background: #ffffff !important;
    border-color: #dadce0 !important;
    color: #1a1a1a !important;
}

body:not(.dark-theme):not(.theme-dark):not(.dark-mode):not(.dark):not([data-theme="dark"]) .search-input::placeholder {
    color: #9aa0a6 !important;
    opacity: 1 !important;
}

body:not(.dark-theme):not(.theme-dark):not(.dark-mode):not(.dark):not([data-theme="dark"]) .search-input:focus {
    border-color: #1a73e8 !important;
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.15) !important;
    background: #ffffff !important;
}

body:not(.dark-theme):not(.theme-dark):not(.dark-mode):not(.dark):not([data-theme="dark"]) .search-input:hover {
    border-color: #1a73e8 !important;
    background: #ffffff !important;
}

/* 夜间模式搜索表单容器 */
body.dark-theme .search-form-container,
body.theme-dark .search-form-container,
.zib-theme-dark .search-form-container,
.dark-mode .search-form-container,
body[data-theme="dark"] .search-form-container,
html[data-theme="dark"] .search-form-container,
html.dark .search-form-container,
body.dark .search-form-container {
    background: #2d2d2d !important;
    border-color: #404040 !important;
    color: #f0f0f0 !important;
}

/* 夜间模式搜索结果容器 */
body.dark-theme .search-results-container,
body.theme-dark .search-results-container,
.zib-theme-dark .search-results-container,
.dark-mode .search-results-container,
body[data-theme="dark"] .search-results-container,
html[data-theme="dark"] .search-results-container,
html.dark .search-results-container,
body.dark .search-results-container {
    background: #1a1a1a !important;
    color: #f0f0f0 !important;
}

/* 夜间模式搜索结果占位符 */
body.dark-theme .search-results-placeholder,
body.theme-dark .search-results-placeholder,
.zib-theme-dark .search-results-placeholder,
.dark-mode .search-results-placeholder,
body[data-theme="dark"] .search-results-placeholder,
html[data-theme="dark"] .search-results-placeholder,
html.dark .search-results-placeholder,
body.dark .search-results-placeholder {
    background: #2d2d2d !important;
    border-color: #404040 !important;
    color: #999999 !important;
}

/* 夜间模式搜索结果表格 */
body.dark-theme .search-results-table,
body.theme-dark .search-results-table,
.zib-theme-dark .search-results-table,
.dark-mode .search-results-table,
body[data-theme="dark"] .search-results-table,
html[data-theme="dark"] .search-results-table,
html.dark .search-results-table,
body.dark .search-results-table {
    background: #1a1a1a !important;
    color: #f0f0f0 !important;
}

/* 夜间模式表格头部 */
body.dark-theme .search-results-table thead,
body.theme-dark .search-results-table thead,
.zib-theme-dark .search-results-table thead,
.dark-mode .search-results-table thead,
body[data-theme="dark"] .search-results-table thead,
html[data-theme="dark"] .search-results-table thead,
html.dark .search-results-table thead,
body.dark .search-results-table thead {
    background: #2d2d2d !important;
}

/* 夜间模式表格单元格 */
body.dark-theme .search-results-table th,
body.dark-theme .search-results-table td,
body.theme-dark .search-results-table th,
body.theme-dark .search-results-table td,
.zib-theme-dark .search-results-table th,
.zib-theme-dark .search-results-table td,
.dark-mode .search-results-table th,
.dark-mode .search-results-table td,
body[data-theme="dark"] .search-results-table th,
body[data-theme="dark"] .search-results-table td,
html[data-theme="dark"] .search-results-table th,
html[data-theme="dark"] .search-results-table td,
html.dark .search-results-table th,
html.dark .search-results-table td,
body.dark .search-results-table th,
body.dark .search-results-table td {
    border-color: #404040 !important;
    color: #f0f0f0 !important;
}

/* 夜间模式搜索结果项悬停 */
body.dark-theme tr.search-result-item:hover,
body.theme-dark tr.search-result-item:hover,
.zib-theme-dark tr.search-result-item:hover,
.dark-mode tr.search-result-item:hover,
body[data-theme="dark"] tr.search-result-item:hover,
html[data-theme="dark"] tr.search-result-item:hover,
html.dark tr.search-result-item:hover,
body.dark tr.search-result-item:hover {
    background: #2d2d2d !important;
}