
/* categories.css - 专栏筛选样式 */
/* 排序表单样式 */
.sort-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sort-submit-btn {
    padding: 0.4rem 0.8rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
}

.sort-submit-btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-1px);
}

.category-form {
    width: 100%;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .sort-form {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .sort-submit-btn {
        width: 100%;
    }
}
/* 更新博客卡片中的专栏标签样式 */
.blog-card {
    position: relative;
    overflow: hidden; /* 确保标签不会超出圆角 */
}

.blog-category {
    position: absolute;
    top: 15px;
    right: 15px;
    color: white !important; /* 强制白色文字 */
    padding: 6px 12px;
    border-radius: 20px; /* 更大的圆角 */
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase; /* 字母大写 */
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); /* 添加阴影增强可读性 */
    z-index: 2; /* 确保在内容之上 */
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border: 2px solid rgba(255, 255, 255, 0.3); /* 白色边框增强对比度 */
}

/* 为特定专栏颜色优化文字对比度 */
.blog-category[style*="#3776ab"], /* Python教程 - 蓝色 */
.blog-category[style*="#667eea"], /* 默认蓝色 */
.blog-category[style*="#8e44ad"] { /* 阆风谠逸 - 紫色 */
    color: white !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.blog-category[style*="#e44d26"], /* Web开发 - 橙色 */
.blog-category[style*="#27ae60"], /* 北岸行记 - 绿色 */
.blog-category[style*="#95a5a6"] { /* 其他 - 灰色 */
    color: white !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* 确保博客内容不会与标签重叠 */
.blog-content {
    position: relative;
    z-index: 1;
    padding-top: 5px; /* 为标签留出空间 */
}
/* 排序控制样式 */
.sort-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    color: #2c3e50;
}

.sort-select {
    padding: 8px 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: #f8f9fa;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.sort-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: white;
}

/* 移动端排序控制 */
@media (max-width: 768px) {
    .categories-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .sort-controls {
        width: 100%;
        justify-content: space-between;
    }

    .sort-select {
        flex: 1;
        max-width: 150px;
    }
}

/* 更新清除筛选链接，包含排序参数 */
.clear-filter {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
}

.clear-filter:hover {
    text-decoration: underline;
}
/* 专栏筛选容器 */
.categories-filter {
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.categories-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.categories-header h2 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 600;
}

/* 桌面端专栏列表 */
.categories-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.category-item {
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    color: #2c3e50;
    background: #f8f9fa;
}

.category-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.category-item.active {
    color: white;
    border-color: transparent;
}

/* 移动端专栏下拉菜单 */
.categories-dropdown {
    display: none;
    width: 100%;
}

.categories-select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    background: #f8f9fa;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%236c757d'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
}

.categories-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 当前筛选状态 */
.current-filter {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.current-filter-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-category {
    background: #667eea;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.clear-filter {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.clear-filter:hover {
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .categories-list {
        display: none;
    }

    .categories-dropdown {
        display: block;
    }

    .categories-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .current-filter {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* 无博客消息样式 */
.no-blogs-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px dashed #dee2e6;
}

.no-blogs-message i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.no-blogs-message h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #2c3e50;
}

.no-blogs-message p {
    font-size: 1.1rem;
    margin-bottom: 20px;
}