/* ===== 滚动条样式 ===== */
.scroll-bar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
.scroll-bar::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 9999px;
}
.scroll-bar::-webkit-scrollbar-thumb {
    background: #dc2626;
    border-radius: 9999px;
}
html {
    scroll-behavior: smooth;
}

/* ===== 表单输入框增强 ===== */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="password"],
textarea,
select {
    transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus,
textarea:focus,
select:focus {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1) !important;
}

/* ===== 搜索表单响应式优化 ===== */
@media (max-width: 1024px) {
    .search-form-row {
        flex-wrap: wrap !important;
    }
    .search-form-row > div {
        width: calc(50% - 0.25rem) !important;
    }
    .search-form-row > div:last-of-type {
        width: 100% !important;
    }
}
@media (max-width: 640px) {
    .search-form-row > div {
        width: 100% !important;
    }
}

/* ===== 分页样式 ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 4px;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
}
.pagination li {
    display: inline-block;
}
.pagination li a {
    display: block;
    padding: 6px 12px;
    color: #dc2626;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 14px;
}
.pagination li a:hover {
    background: #fef2f2;
    border-color: #dc2626;
}
.pagination li.active a {
    background: #dc2626;
    color: white;
    border-color: #dc2626;
    font-weight: 600;
}
.pagination li.disabled a {
    color: #9ca3af;
    cursor: not-allowed;
    pointer-events: none;
}

/* ===== 搜索提示弹窗 ===== */
.search-tip-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.search-tip-overlay.show {
    opacity: 1;
    visibility: visible;
}
.search-tip-box {
    background: white;
    border-radius: 16px;
    padding: 32px 40px;
    max-width: 360px;
    width: 90%;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
}
.search-tip-overlay.show .search-tip-box {
    transform: scale(1) translateY(0);
}
.search-tip-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}
.search-tip-icon i {
    font-size: 28px;
    color: #dc2626;
}
.search-tip-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
}
.search-tip-message {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 24px;
    line-height: 1.6;
}
.search-tip-btn {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    border: none;
    padding: 12px 40px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.3);
}
.search-tip-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4);
}

/* ===== 返回顶部按钮 ===== */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #dc2626 0%, #f97316 100%);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.3);
}
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}
.back-to-top:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4);
}

/* ===== 内容列表通用样式 ===== */
.content-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.2s;
}
.content-list-item:hover {
    background: linear-gradient(90deg, #fef2f2 0%, #fff7ed 100%);
}
.content-list-item .title {
    color: #374151;
    font-weight: 500;
    transition: color 0.2s;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.content-list-item:hover .title {
    color: #dc2626;
}
.content-list-item .date {
    color: #9ca3af;
    font-size: 12px;
    margin-left: 12px;
    flex-shrink: 0;
}

/* ===== 分类卡片通用样式 ===== */
.category-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}
.category-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}
.category-card-header {
    background: linear-gradient(135deg, #dc2626 0%, #f97316 100%);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.category-card-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.category-card-icon i {
    color: white;
    font-size: 18px;
}

/* ===== 搜索区域通用样式 ===== */
.search-box {
    position: relative;
}
.search-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
}
.search-input:focus {
    border-color: #dc2626;
    outline: none;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}
.search-button {
    position: absolute;
    right: 4px;
    top: 4px;
    bottom: 4px;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    border: none;
    padding: 0 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}
.search-button:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
}

/* ===== 标签通用样式 ===== */
.tag {
    display: inline-block;
    padding: 4px 12px;
    background: #f3f4f6;
    color: #374151;
    border-radius: 9999px;
    font-size: 12px;
    transition: all 0.2s;
}
.tag:hover {
    background: linear-gradient(135deg, #dc2626 0%, #f97316 100%);
    color: white;
}

/* ===== 加载状态样式 ===== */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-top-color: #dc2626;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #9ca3af;
}
.empty-state i {
    font-size: 48px;
    margin-bottom: 12px;
}

/* ===== 弹窗通用样式 ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}
.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}
.modal-content {
    background: white;
    border-radius: 12px;
    padding: 24px;
    max-width: 90%;
    width: 400px;
    transform: scale(0.9);
    transition: all 0.3s;
}
.modal-overlay.show .modal-content {
    transform: scale(1);
}