/* 资讯中心筛选区域美化样式 */

/* 筛选卡片容器 */
.news-filters-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: none !important;
    border-radius: 20px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
    overflow: hidden;
    position: relative;
}

.news-filters-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), #4dabf7, #339af0);
}

.news-filters-card .card-body {
    padding: 2rem !important;
}

/* 筛选区域标题 - 统一设计 */
.filter-section-title {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #212121 !important;
    margin-bottom: 1rem !important;
    display: flex !important;
    align-items: center !important;
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.filter-section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, #1976d2, transparent);
    margin-left: 1rem;
}

.filter-section-title i {
    font-size: 1.1em;
    margin-right: 0.5rem;
    color: #1976d2;
}

/* 当前选择显示 - 统一设计 */
.current-selection-display {
    font-size: 12px !important;
    color: #1976d2 !important;
    background: rgba(25, 118, 210, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    margin-left: 0.75rem;
    font-weight: 500;
    border: 1px solid rgba(25, 118, 210, 0.2);
    font-family: inherit;
}

/* 筛选按钮容器 */
.filter-buttons-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0;
}

/* 统一的筛选按钮基础样式 - 统一设计 */
.filter-btn-base {
    background: linear-gradient(135deg, #ffffff, #fafafa) !important;
    border: 2px solid #1976d2 !important;
    color: #1976d2 !important;
    padding: 0.6rem 1rem !important;
    border-radius: 20px !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif !important;
    transition: all 0.15s ease-in-out !important;
    position: relative;
    overflow: hidden;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    cursor: pointer;
    outline: none;
    box-shadow: 0 1px 3px rgba(25, 118, 210, 0.1);
    transform: translateY(0);
}

.filter-btn-base:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.25);
}

.filter-btn-base::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.filter-btn-base:hover::before {
    left: 100%;
}

.filter-btn-base::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(0, 123, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.4s ease;
}

.filter-btn-base:hover::after {
    width: 120%;
    height: 120%;
}

.filter-btn-base:hover {
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.25) !important;
    border-color: #0056b3 !important;
    color: #0056b3 !important;
}

.filter-btn-base:active {
    transform: translateY(0) scale(0.98) !important;
    transition: all 0.1s ease !important;
}

.filter-btn-base.active {
    background: linear-gradient(135deg, #007bff, #0056b3) !important;
    border-color: #007bff !important;
    color: white !important;
    box-shadow: 0 6px 25px rgba(0, 123, 255, 0.4) !important;
    transform: translateY(-1px);
}

.filter-btn-base.active:hover {
    transform: translateY(-3px) scale(1.02) !important;
    box-shadow: 0 8px 30px rgba(0, 123, 255, 0.5) !important;
}

/* 分类筛选按钮 */
.category-filter-btn {
    background: linear-gradient(135deg, #ffffff, #f8f9fa) !important;
    border: 2px solid #007bff !important;
    color: #007bff !important;
    padding: 0.75rem 1.25rem !important;
    border-radius: 25px !important;
    font-weight: 500 !important;
    font-size: 0.9rem !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative;
    overflow: hidden;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    cursor: pointer;
    outline: none;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
    transform: translateY(0);
}

.category-filter-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

.category-filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.category-filter-btn:hover::before {
    left: 100%;
}

.category-filter-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(0, 123, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.4s ease;
}

.category-filter-btn:hover::after {
    width: 120%;
    height: 120%;
}

.category-filter-btn:hover {
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.25) !important;
    border-color: #0056b3 !important;
    color: #0056b3 !important;
}

.category-filter-btn:active {
    transform: translateY(0) scale(0.98) !important;
    transition: all 0.1s ease !important;
}

.category-filter-btn.active {
    background: linear-gradient(135deg, #007bff, #0056b3) !important;
    border-color: #007bff !important;
    color: white !important;
    box-shadow: 0 6px 25px rgba(0, 123, 255, 0.4) !important;
    transform: translateY(-1px);
}

.category-filter-btn.active:hover {
    transform: translateY(-3px) scale(1.02) !important;
    box-shadow: 0 8px 30px rgba(0, 123, 255, 0.5) !important;
}

.category-filter-btn i {
    margin-right: 0.5rem;
    font-size: 0.9em;
}

/* 标签筛选按钮 - 统一样式 */
.tag-filter-btn {
    background: linear-gradient(135deg, #ffffff, #f8f9fa) !important;
    border: 2px solid #007bff !important;
    color: #007bff !important;
    padding: 0.6rem 1rem !important;
    border-radius: 20px !important;
    font-weight: 500 !important;
    font-size: 0.85rem !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    text-decoration: none !important;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    outline: none;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
    transform: translateY(0);
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.tag-filter-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

.tag-filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.tag-filter-btn:hover::before {
    left: 100%;
}

.tag-filter-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(0, 123, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.4s ease;
}

.tag-filter-btn:hover::after {
    width: 120%;
    height: 120%;
}

.tag-filter-btn:hover {
    border-color: #0056b3 !important;
    color: #0056b3 !important;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.25);
}

.tag-filter-btn:active {
    transform: translateY(0) scale(0.98);
    transition: all 0.1s ease;
}

.tag-filter-btn.active {
    background: linear-gradient(135deg, #007bff, #0056b3) !important;
    border-color: #007bff !important;
    color: white !important;
    box-shadow: 0 6px 25px rgba(0, 123, 255, 0.4) !important;
    transform: translateY(-1px);
}

.tag-filter-btn.active:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(0, 123, 255, 0.5) !important;
}

/* 排序选项 */
.sort-options-container {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 1rem;
    border: 1px solid #e9ecef;
}

.sort-option-btn {
    background: white !important;
    border: 2px solid #e9ecef !important;
    color: #495057 !important;
    padding: 0.75rem 1.25rem !important;
    border-radius: 12px !important;
    font-weight: 500 !important;
    font-size: 0.9rem !important;
    transition: all 0.3s ease !important;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    outline: none;
    box-shadow: none;
}

.sort-option-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25);
}

.sort-option-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), #4dabf7);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sort-option-btn i {
    position: relative;
    z-index: 1;
    margin-right: 0.5rem;
}

.sort-option-btn span {
    position: relative;
    z-index: 1;
}

.sort-option-btn:hover {
    border-color: var(--primary-color) !important;
    color: var(--primary-color) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.15);
}

.btn-check:checked + .sort-option-btn {
    background: linear-gradient(135deg, var(--primary-color), #4dabf7) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.3) !important;
}

.btn-check:checked + .sort-option-btn::before {
    opacity: 1;
}

/* 重置按钮 */
.reset-filters-btn {
    background: linear-gradient(135deg, #6c757d, #495057) !important;
    border: none !important;
    color: white !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 25px !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    position: relative;
    overflow: hidden;
}

.reset-filters-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.reset-filters-btn:hover::before {
    left: 100%;
}

.reset-filters-btn:hover {
    transform: translateY(-2px) scale(1.05) !important;
    box-shadow: 0 8px 25px rgba(108, 117, 125, 0.3) !important;
    background: linear-gradient(135deg, #5a6268, #343a40) !important;
}

.reset-filters-btn i {
    margin-right: 0.5rem;
    transition: transform 0.3s ease;
}

.reset-filters-btn:hover i {
    transform: rotate(180deg);
}

/* 筛选区域分隔线 */
.filter-section-divider {
    border: none !important;
    height: 1px !important;
    background: linear-gradient(90deg, transparent, #dee2e6, transparent) !important;
    margin: 1.5rem 0 !important;
}

/* 当前筛选状态显示 */
.current-filters-display {
    flex: 1;
    min-width: 0;
}

.filter-status-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #495057;
    font-size: 0.9rem;
    white-space: nowrap;
}

.filter-status-label i {
    color: var(--primary-color);
}

#active-filters-container {
    min-height: 1.5rem;
    align-items: center;
}

#no-filters-text {
    font-size: 0.85rem;
    font-style: italic;
}

/* 筛选标签样式 */
.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: linear-gradient(135deg, var(--primary-color), #4dabf7);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.2);
    animation: filterTagAppear 0.3s ease-out;
}

.filter-tag i {
    font-size: 0.75em;
}

.filter-tag-remove {
    background: none;
    border: none;
    color: white;
    padding: 0;
    margin-left: 0.25rem;
    cursor: pointer;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.filter-tag-remove:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.filter-tag-remove i {
    font-size: 0.7em;
}

/* 标签筛选标签样式 */
.tag-filter-tag {
    background: linear-gradient(135deg, #6c757d, #495057);
    color: white;
}

/* 排序状态显示 */
.sort-status {
    white-space: nowrap;
}

.sort-status i {
    color: #6c757d;
    margin-right: 0.25rem;
}

/* 已选筛选项显示栏 */
.selected-filters-card {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 1px solid #dee2e6;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.selected-filters-label {
    color: #495057;
    font-size: 0.9rem;
    white-space: nowrap;
}

.selected-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
    animation: selectedFilterAppear 0.3s ease-out;
    transition: all 0.2s ease;
}

.selected-filter-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.selected-filter-tag .filter-type {
    font-size: 0.7rem;
    opacity: 0.8;
    margin-right: 0.25rem;
}

.selected-filter-tag .remove-filter {
    background: none;
    border: none;
    color: white;
    padding: 0;
    margin-left: 0.25rem;
    cursor: pointer;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    font-size: 0.7rem;
}

.selected-filter-tag .remove-filter:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

#clearAllFiltersBtn {
    border-radius: 20px;
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
    transition: all 0.3s ease;
}

#clearAllFiltersBtn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.2);
}

/* 动画效果 */
@keyframes selectedFilterAppear {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes selectedFilterRemove {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    to {
        opacity: 0;
        transform: scale(0.8) translateY(-10px);
    }
}

@keyframes filterTagAppear {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes filterTagRemove {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.8);
    }
}

/* 动画效果 */
@keyframes filterButtonPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.filter-button-pulse {
    animation: filterButtonPulse 0.3s ease-in-out;
}

/* 点击涟漪效果 */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

/* 选中状态的闪烁效果 */
@keyframes selectedGlow {
    0%, 100% { box-shadow: 0 6px 20px rgba(13, 110, 253, 0.3); }
    50% { box-shadow: 0 6px 25px rgba(13, 110, 253, 0.5); }
}

.category-filter-btn.active.glow-effect {
    animation: selectedGlow 1.5s ease-in-out;
}

.tag-filter-btn.active.glow-effect {
    animation: selectedGlow 1.5s ease-in-out;
}

/* 点击涟漪效果 */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

/* 选中状态的闪烁效果 */
@keyframes selectedGlow {
    0%, 100% { box-shadow: 0 6px 20px rgba(13, 110, 253, 0.3); }
    50% { box-shadow: 0 6px 25px rgba(13, 110, 253, 0.5); }
}

.category-filter-btn.active.glow-effect {
    animation: selectedGlow 1.5s ease-in-out;
}

.tag-filter-btn.active.glow-effect {
    animation: selectedGlow 1.5s ease-in-out;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .news-filters-card .card-body {
        padding: 1.5rem !important;
    }
    
    .filter-section-title {
        font-size: 1rem !important;
    }
    
    .filter-section-title::after {
        display: none;
    }
    
    .filter-buttons-container {
        gap: 0.5rem;
    }
    
    .category-filter-btn,
    .tag-filter-btn {
        padding: 0.6rem 1rem !important;
        font-size: 0.85rem !important;
    }
    
    .sort-options-container {
        padding: 0.75rem;
    }
    
    .sort-option-btn {
        padding: 0.6rem 1rem !important;
        font-size: 0.85rem !important;
        margin-right: 0.25rem;
    }
    
    .current-selection-display {
        margin-left: 0.5rem;
        margin-top: 0.25rem;
    }
}


