/* 分类管理页面样式 */
.admin-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 20px;
}

/* 页面头部样式 */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eaeaea;
}

.page-title {
    font-size: 24px;
    color: #333;
    margin: 0;
}

.page-actions {
    display: flex;
    gap: 10px;
}

/* 卡片样式 */
.card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 25px;
    overflow: hidden;
    position: relative;
}

.card-header {
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #eaeaea;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
    display: flex;
    align-items: center;
}

.card-header h3 i {
    margin-right: 8px;
    color: #4caf50;
}

.card-body {
    padding: 20px;
}

.card-tools {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 通用标题样式 */
h1, h2 {
    text-align: left;
    margin: 15px 0;
    color: #333;
}

h1 {
    font-size: 24px;
}

h2 {
    font-size: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

/* 表格样式 */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eaeaea;
}

.table th {
    background-color: #f8f9fa;
    color: #333;
    font-weight: 600;
}

.table tr:last-child td {
    border-bottom: none;
}

.table tr:hover {
    background-color: #f5f9ff;
}

.actions {
    display: flex;
    gap: 8px;
}

.text-muted {
    color: #999;
    font-style: italic;
}

/* 按钮样式 */
.btn {
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn i {
    margin-right: 5px;
    font-size: 16px;
}

.btn-primary {
    background-color: #4caf50;
    color: white;
}

.btn-primary:hover {
    background-color: #3d8b40;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    background-color: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background-color: #e0e0e0;
}

.btn-danger {
    background-color: #f44336;
    color: white;
}

.btn-danger:hover {
    background-color: #d32f2f;
}

.btn-sm {
    padding: 6px 10px;
    font-size: 12px;
}

/* 搜索框样式 */
.search-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-width: 200px;
    font-size: 14px;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='M21 21l-4.35-4.35'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 8px center;
    padding-left: 32px;
    transition: all 0.3s;
}

.search-input:focus {
    border-color: #4caf50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
    outline: none;
}

/* 提示消息样式 */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    position: relative;
    transition: opacity 0.5s;
}

.alert-success {
    background-color: #e8f5e9;
    color: #1b5e20;
    border-left: 4px solid #4caf50;
}

.alert-danger {
    background-color: #ffebee;
    color: #b71c1c;
    border-left: 4px solid #f44336;
}

/* 空状态样式 */
.empty-state {
    padding: 40px 20px;
    text-align: center;
    color: #666;
}

.empty-state i {
    font-size: 48px;
    color: #ccc;
    margin-bottom: 15px;
    display: block;
}

.empty-state p {
    margin-bottom: 20px;
    font-size: 16px;
}

/* 空状态样式 */
.empty-message {
    text-align: center;
    padding: 40px 20px;
    background-color: #f8f9fa;
    border-radius: 10px;
    margin-top: 30px;
}

.empty-message p {
    font-size: 1.2rem;
    color: #777;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-message p:before {
    content: "\f07b";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 10px;
    font-size: 1.5rem;
    color: #aaa;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .card-tools {
        width: 100%;
    }
    
    .search-input {
        width: 100%;
    }
    
    .table th,
    .table td {
        padding: 10px;
    }
    
    .actions {
        flex-wrap: wrap;
    }
    
    .form-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .form-actions .btn {
        width: 100%;
    }
}

/* 分类层次结构展示 */
.category-tree-item {
    margin: 5px 0;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.category-tree-item:hover {
    background-color: #f5f5f5;
}

.category-children {
    margin-left: 20px;
    border-left: 1px dashed #ccc;
    padding-left: 15px;
}

/* 动画效果 */
.fade-in {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 分类卡片中的横排统计信息 */
.category-stats-row {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px dashed #eaeaea;
}

.category-stats-row span {
    display: flex;
    align-items: center;
    font-size: 0.95rem;
}

.category-stats-row span i {
    margin-right: 6px;
    color: #666;
}

.category-stats-row a {
    text-decoration: none;
    color: #4a7bff;
    padding: 6px 12px;
    border-radius: 4px;
    background-color: rgba(74, 123, 255, 0.1);
    transition: all 0.3s ease;
}

.category-stats-row a:hover {
    background-color: rgba(74, 123, 255, 0.2);
    color: #3665e0;
    transform: translateY(-2px);
}

.category-stats-row a span {
    font-weight: 500;
}

/* 美化分类卡片 */
.category-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: rgba(74, 123, 255, 0.3);
}

.category-card-header {
    background: linear-gradient(135deg, #4a7bff, #3665e0);
    padding: 18px;
}

.category-card-header h3 {
    margin: 0;
    color: white;
    font-weight: 600;
    font-size: 1.2rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.category-card-header h3 i {
    margin-right: 10px;
    font-size: 1.1em;
}

.category-card-body {
    padding: 20px;
}

.category-card-body p {
    color: #555;
    line-height: 1.5;
    margin-bottom: 0;
    min-height: 60px;
    font-size: 0.95rem;
}

/* 分类页面标题和容器 */
.categories-container {
    padding: 30px 20px;
    max-width: 1600px;
    margin: 0 auto;
}

.categories-container h1 {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    font-size: 24px;
    margin: 20px 0;
    color: #222;
    padding-bottom: 15px;
    border-bottom: 2px solid #e8e8e8;
    position: relative;
    font-weight: 600;
    text-align: left;
}

.categories-container h1:after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    transform: none;
    width: 120px;
    height: 2px;
    background-color: #1a73e8;
}

.categories-container h1 i {
    color: #1a73e8;
    margin-right: 12px;
    font-size: 28px;
    background-color: rgba(26,115,232,0.08);
    padding: 10px;
    border-radius: 10px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.back-link {
    margin-bottom: 25px;
    text-align: left;
}

.back-link a {
    display: inline-flex;
    align-items: center;
    color: #4a7bff;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 5px;
    background-color: rgba(74, 123, 255, 0.08);
    transition: all 0.2s ease;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-left: 0;
}

.back-link a:hover {
    background-color: rgba(74, 123, 255, 0.15);
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}

.back-link i {
    margin-right: 8px;
}

@media (max-width: 768px) {
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .categories-container h1 {
        font-size: 1.6rem;
    }
}

/* 分类标签样式 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
    padding: 18px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.03);
    justify-content: flex-start;
    margin-top: 20px;
}

.category-tag {
    display: inline-flex;
    align-items: center;
    background-color: #f8f9fa;
    border-radius: 30px;
    padding: 8px 14px;
    color: #444;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid #eee;
    white-space: nowrap;
    margin: 0;
    font-size: 13px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
    font-weight: 500;
}

.category-tag:hover, .category-tag.active {
    background-color: #1a73e8;
    color: white;
    border-color: #1a73e8;
    box-shadow: 0 3px 8px rgba(26,115,232,0.3);
    transform: translateY(-3px);
}

.category-tag i {
    margin-right: 6px;
    font-size: 13px;
    color: #1a73e8;
    transition: all 0.2s ease;
}

.category-tag:hover i, .category-tag.active i {
    color: #fff;
}

.tag-count {
    background-color: rgba(0,0,0,0.08);
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 11px;
    margin-left: 8px;
    transition: all 0.2s ease;
    font-weight: 600;
}

.category-tag:hover .tag-count, .category-tag.active .tag-count {
    background-color: rgba(255,255,255,0.25);
    color: #fff;
}

.tag-section {
    margin-top: 50px;
    margin-bottom: 25px;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.tag-section h2, .articles-section h2 {
    font-size: 20px;
    margin: 25px 0 20px;
    color: #222;
    font-weight: 600;
    position: relative;
    padding-left: 15px;
    display: flex;
    align-items: center;
    align-self: flex-start;
    text-align: left;
}

.tag-section h2:before, .articles-section h2:before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background-color: #1a73e8;
    border-radius: 2px;
}

/* 文章栏目标题样式 */
.articles-section {
    margin-top: 50px;
}

.articles-section h2 {
    font-size: 20px;
    margin: 25px 0 20px;
    color: #222;
    font-weight: 600;
    position: relative;
    padding-left: 15px;
    display: flex;
    align-items: center;
    align-self: flex-start;
    text-align: left;
}

.articles-section h2 i {
    margin-right: 10px;
    color: #4a7bff;
}

.articles-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 100%;
}

.article-card {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: row;
    height: auto;
    min-height: 140px;
    border: 1px solid rgba(0,0,0,0.05);
    width: 100%;
    margin-bottom: 15px;
    max-width: 100%;
}

.article-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.article-image {
    height: 140px;
    width: 140px;
    min-width: 140px;
    overflow: hidden;
    position: relative;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 图片类型特殊样式 */
.article-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-img.cover-type {
    object-fit: cover;
}

.article-img.normal-type {
    object-position: center top;
}

/* 图片加载状态 */
.image-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 默认图片和封面样式 */
.article-img.default-img {
    object-fit: contain;
    padding: 10px;
}

.article-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
}

.article-content h3 {
    margin-top: 0;
    margin-bottom: 5px;
    font-size: 1.1rem;
    line-height: 1.3;
}

.article-content h3 a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.article-content h3 a:hover {
    color: #4a7bff;
}

.article-meta {
    margin-bottom: 8px;
    font-size: 0.8rem;
    color: #777;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.article-meta span {
    display: inline-flex;
    align-items: center;
}

.article-meta img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-right: 5px;
    object-fit: cover;
    display: inline-block;
}

.article-meta i {
    margin-right: 4px;
    color: #999;
}

/* 作者头像样式 */
.author-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    display: inline-block;
    vertical-align: middle;
    margin-right: 5px;
}

.article-meta a {
    color: #4a7bff;
    text-decoration: none;
}

/* 文章摘要样式 */
.article-excerpt {
    font-size: 14px;
    color: #666;
    max-width: 220px;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
    font-style: italic;
    letter-spacing: 0.2px;
    position: relative;
    margin-left: 5px;
    transition: all 0.3s ease;
    line-height: 1.5;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    box-orient: vertical;
    -webkit-box-orient: vertical;
    word-break: break-word;
    word-wrap: break-word;
    background-color: #f8faff;
    padding: 10px 15px;
    border-radius: 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid #e0e8f5;
}

/* 逗号样式 */
.article-excerpt .comma {
    color: #1a73e8;
    font-weight: bold;
    margin: 0 2px;
    display: inline-block;
    transform: translateY(-1px);
}

.article-card:hover .article-excerpt {
    color: #444;
    border-color: #1a73e8;
    background-color: #edf5ff;
    box-shadow: 0 3px 10px rgba(26,115,232,0.1);
}

.read-more {
    padding: 5px 12px;
    font-size: 13px;
    border-radius: 20px;
    margin-left: 8px;
    flex-shrink: 0;
    display: inline-block;
    background-color: #f0f4fd;
    border: 1px solid #e0e8f5;
    color: #1a73e8;
    transition: all 0.2s ease;
    text-decoration: none;
    font-weight: 600;
    position: relative;
    top: -5px;
}

.read-more:hover {
    background-color: #1a73e8;
    color: white;
    border-color: #1a73e8;
    box-shadow: 0 3px 8px rgba(26,115,232,0.3);
}

@media (max-width: 768px) {
    .article-card {
        min-height: 120px;
    }
    
    .article-image {
        width: 100px;
        min-width: 100px;
        height: 120px;
    }
    
    .article-content h3 {
        font-size: 0.95rem;
    }
    
    .article-content {
        padding: 10px;
    }
}

/* 分页控件样式 */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    gap: 6px;
    width: 100%;
}

.pagination button {
    background: white;
    border: 1px solid #e0e8f5;
    border-radius: 8px;
    padding: 9px 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    color: #444;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}

.pagination button:hover {
    background-color: #f0f4fd;
    border-color: #c0d0e8;
    box-shadow: 0 3px 8px rgba(0,0,0,0.08);
}

.pagination button.active {
    background-color: #1a73e8;
    color: white;
    border-color: #1a73e8;
    box-shadow: 0 3px 8px rgba(26,115,232,0.3);
}

.pagination button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
    background-color: #f9f9f9;
    box-shadow: none;
}

/* 文章工具栏样式 */
.articles-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    flex-wrap: wrap;
    gap: 15px;
}

/* 搜索框样式 */
.search-box {
    position: relative;
    flex: 1;
    max-width: 500px;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #8a8a8a;
    font-size: 16px;
    pointer-events: none;
}

.search-box input {
    width: 100%;
    padding: 12px 15px 12px 42px;
    border: 1px solid #e0e8f5;
    border-radius: 30px;
    font-size: 14px;
    background-color: #f8faff;
    transition: all 0.3s ease;
    color: #333;
}

.search-box input:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26,115,232,0.15);
    background-color: #fff;
}

.search-box input::placeholder {
    color: #aaa;
    font-style: italic;
}

/* 搜索结果计数 */
.search-results-count {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #666;
    background-color: #f0f4fd;
    padding: 3px 10px;
    border-radius: 15px;
    display: none;
    animation: fadeIn 0.3s ease;
}

/* 过滤选项样式 */
.filter-options {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-options label {
    font-size: 14px;
    color: #666;
    margin-right: 5px;
    font-weight: 500;
}

.filter-options select {
    padding: 10px 35px 10px 15px;
    border: 1px solid #e0e8f5;
    border-radius: 30px;
    font-size: 14px;
    background-color: #f8faff;
    color: #333;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%231a73e8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    transition: all 0.3s ease;
}

.filter-options select:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26,115,232,0.15);
    background-color: #fff;
}

/* 最近发布标签样式 */
.recent-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #ff4757;
    color: white;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(255,71,87,0.3);
    animation: pulse 2s infinite;
    display: flex;
    align-items: center;
    gap: 4px;
}

.recent-badge i {
    font-size: 9px;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255,71,87,0.6);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(255,71,87,0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255,71,87,0);
    }
}

/* 最近发布的文章高亮样式 */
.recent-article {
    position: relative;
    overflow: visible !important;
}

.recent-article::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border: 2px solid #ff4757;
    border-radius: 14px;
    pointer-events: none;
    z-index: 0;
    animation: pulse-border 2s infinite;
}

@keyframes pulse-border {
    0% {
        box-shadow: 0 0 0 0 rgba(255,71,87,0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255,71,87,0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255,71,87,0);
    }
}

/* 响应式调整 */
@media (min-width: 1601px) {
    .categories-container {
        max-width: 1800px;
        padding: 30px 40px;
    }
    
    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    }
}

@media (max-width: 1200px) {
    .categories-container {
        max-width: 1400px;
    }
}

@media (max-width: 992px) {
    .categories-container {
        max-width: 100%;
    }
    
    .article-content h3 {
        width: 220px;
    }
    
    .article-excerpt {
        max-width: 180px;
    }
}

@media (max-width: 768px) {
    body {
        background-color: #f5f5f5;
        margin: 0;
        padding: 0;
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
        -webkit-overflow-scrolling: touch;
    }
    
    .container, .categories-container {
        padding: 10px;
    }
    
    .categories-container h1 {
        font-size: 20px;
        margin: 15px 0;
    }
    
    .categories-container h1 i {
        font-size: 22px;
        padding: 8px;
    }
    
    .tag-section h2, .articles-section h2 {
        font-size: 18px;
    }
    
    .article-card {
        padding: 0;
    }
    
    .article-image {
        height: 180px;
    }
    
    .article-content h3 {
        font-size: 16px;
    }
    
    .category-tag {
        font-size: 12px;
        padding: 8px 15px;
        margin: 4px;
    }
    
    .pagination button {
        padding: 7px 12px;
        font-size: 13px;
    }
    
    .articles-toolbar {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .articles-toolbar .search-box {
        max-width: 100%;
        width: 100%;
    }
    
    .articles-toolbar .filter-options {
        width: 100%;
    }
    
    .articles-toolbar .filter-options select {
        flex: 1;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .back-link {
        text-align: left;
    }
    
    .tag-cloud {
        justify-content: flex-start;
    }
}

@media (max-width: 576px) {
    .container, .categories-container {
        padding: 8px;
    }
    
    .categories-container h1 {
        font-size: 18px;
        padding-bottom: 12px;
    }
    
    .categories-container h1 i {
        font-size: 20px;
        padding: 6px;
    }
    
    .tag-cloud, .articles-grid {
        padding: 10px;
        gap: 8px;
    }
    
    .category-tag {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .article-image {
        height: 150px;
    }
    
    .article-content h3 {
        font-size: 15px;
    }
    
    .read-more {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .article-meta {
        font-size: 12px;
    }
    
    .pagination button {
        padding: 5px 10px;
        font-size: 12px;
        min-width: 35px;
    }
}

@media (max-width: 480px) {
    .container, .categories-container {
        padding: 5px;
    }
    
    .categories-container h1 {
        font-size: 16px;
        margin: 12px 0 10px;
    }
    
    .categories-container h1:after {
        width: 80px;
    }
    
    .back-link {
        margin-bottom: 15px;
    }
    
    .back-link a {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .tag-section h2, .articles-section h2 {
        font-size: 16px;
        margin: 15px 0 12px;
    }
    
    .article-image {
        height: 140px;
    }
    
    .article-content h3 {
        font-size: 14px;
    }
    
    .read-more {
        padding: 4px 10px;
        font-size: 11px;
    }
    
    .article-meta {
        font-size: 11px;
    }
    
    .pagination button {
        padding: 3px 8px;
        font-size: 11px;
        min-width: 30px;
    }
    
    .empty-message, .loading-indicator {
        padding: 30px 15px;
    }
    
    .empty-message p {
        font-size: 1rem;
    }
    
    .category-tag {
        padding: 6px 10px;
        font-size: 11px;
    }
    
    .tag-count {
        padding: 1px 5px;
        font-size: 9px;
    }
}

/* 表单样式 */
.category-form {
    max-width: 700px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #777;
    font-size: 13px;
}

.form-group input[type="text"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    transition: all 0.3s;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #4caf50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
    outline: none;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    justify-content: flex-start;
}

.required {
    color: #f44336;
    margin-left: 3px;
}

/* 添加分类卡片样式 */
.add-category-card {
    display: none;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(-20px);
}

.add-category-card.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.close-btn:hover {
    background-color: rgba(0, 0, 0, 0.1);
    color: #333;
}

/* 加载指示器 */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
    color: #666;
}

.loading-indicator i {
    font-size: 2rem;
    color: #4a7bff;
    margin-bottom: 15px;
}

.error-message {
    background-color: #ffebee;
    color: #b71c1c;
    padding: 15px;
    border-radius: 5px;
    margin: 20px 0;
    text-align: center;
}