/* 首页专用样式 */

.loading-container, .error-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    text-align: center;
}

.loading-spinner i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.error-message {
    color: var(--text-light);
}

.error-message i {
    font-size: 2rem;
    color: #e74c3c;
    margin-bottom: 1rem;
}

.retry-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 1rem;
}

.retry-btn:hover {
    background: var(--primary-dark);
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: var(--text-light);
    text-align: center;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--text-light);
}

/* 文章项样式增强 */
.news-item {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.news-item:hover {
    transform: translateY(-2px);
}

.news-category {
    background: var(--primary-color);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
}

/* 文章列表中的标签样式 */
.news-tag-container {
    margin: 0;
}

.news-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: 1px solid transparent;
}

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

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

.news-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

/* 侧边栏标签云样式 */
.sidebar-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1rem;
}

.sidebar-tag-item {
    background: linear-gradient(135deg, #f8f9ff, #ffffff);
    color: var(--primary-color);
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(93, 63, 211, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.sidebar-tag-item::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;
}

.sidebar-tag-item:hover::before {
    left: 100%;
}

.sidebar-tag-item:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(93, 63, 211, 0.3);
    border-color: var(--primary-light);
    text-decoration: none;
}

/* 特殊标签样式 */
.sidebar-tag-item.popular {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    border-color: var(--primary-light);
    box-shadow: 0 2px 8px rgba(93, 63, 211, 0.2);
}

.sidebar-tag-item.popular:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    box-shadow: 0 6px 20px rgba(93, 63, 211, 0.4);
}

.sidebar-tag-item.tag-hot {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    border-color: #ff6b6b;
    position: relative;
}

.sidebar-tag-item.tag-hot::after {
    content: '🔥';
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 0.7rem;
}

.sidebar-tag-item.tag-new {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    color: white;
    border-color: #4ecdc4;
    position: relative;
}

.sidebar-tag-item.tag-new::after {
    content: '✨';
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 0.7rem;
}

.sidebar-tag-item.tag-expert {
    background: linear-gradient(135deg, #ffecd2, #fcb69f);
    color: #8b4513;
    border-color: #fcb69f;
    position: relative;
}

.sidebar-tag-item.tag-expert::after {
    content: '👨‍🎓';
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 0.7rem;
}

/* 标签文章数量样式 */
.tag-count {
    font-size: 0.7rem;
    opacity: 0.8;
    margin-left: 0.3rem;
    font-weight: 400;
}

/* 多彩标签颜色系统 */
.tag-color-1,
.news-tag.tag-color-1 {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: #667eea;
}

.tag-color-2,
.news-tag.tag-color-2 {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: white;
    border-color: #f093fb;
}

.tag-color-3,
.news-tag.tag-color-3 {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: white;
    border-color: #4facfe;
}

.tag-color-4,
.news-tag.tag-color-4 {
    background: linear-gradient(135deg, #43e97b, #38f9d7);
    color: white;
    border-color: #43e97b;
}

.tag-color-5,
.news-tag.tag-color-5 {
    background: linear-gradient(135deg, #fa709a, #fee140);
    color: white;
    border-color: #fa709a;
}

.tag-color-6,
.news-tag.tag-color-6 {
    background: linear-gradient(135deg, #a8edea, #fed6e3);
    color: #333;
    border-color: #a8edea;
}

.tag-color-7,
.news-tag.tag-color-7 {
    background: linear-gradient(135deg, #ffecd2, #fcb69f);
    color: #8b4513;
    border-color: #ffecd2;
}

.tag-color-8,
.news-tag.tag-color-8 {
    background: linear-gradient(135deg, #ff9a9e, #fecfef);
    color: #333;
    border-color: #ff9a9e;
}

.tag-color-9,
.news-tag.tag-color-9 {
    background: linear-gradient(135deg, #a18cd1, #fbc2eb);
    color: white;
    border-color: #a18cd1;
}

.tag-color-10,
.news-tag.tag-color-10 {
    background: linear-gradient(135deg, #fad0c4, #ffd1ff);
    color: #333;
    border-color: #fad0c4;
}

.tag-color-11,
.news-tag.tag-color-11 {
    background: linear-gradient(135deg, #ff8a80, #ffb74d);
    color: white;
    border-color: #ff8a80;
}

.tag-color-12,
.news-tag.tag-color-12 {
    background: linear-gradient(135deg, #81c784, #aed581);
    color: white;
    border-color: #81c784;
}

/* 热度样式 */
.tag-super-hot,
.news-tag.tag-super-hot {
    position: relative;
    animation: pulse 2s infinite;
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.6) !important;
}

.tag-super-hot::after,
.news-tag.tag-super-hot::after {
    content: '🔥🔥🔥';
    position: absolute;
    top: -8px;
    right: -8px;
    font-size: 0.6rem;
    animation: bounce 1s infinite;
}

.tag-very-hot,
.news-tag.tag-very-hot {
    position: relative;
    box-shadow: 0 0 15px rgba(255, 107, 107, 0.4) !important;
}

.tag-very-hot::after,
.news-tag.tag-very-hot::after {
    content: '🔥🔥';
    position: absolute;
    top: -6px;
    right: -6px;
    font-size: 0.6rem;
}

.tag-hot,
.news-tag.tag-hot {
    position: relative;
    box-shadow: 0 0 10px rgba(255, 152, 0, 0.4) !important;
}

.tag-hot::after,
.news-tag.tag-hot::after {
    content: '🔥';
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 0.6rem;
}

.tag-warm,
.news-tag.tag-warm {
    position: relative;
    box-shadow: 0 0 8px rgba(255, 193, 7, 0.3) !important;
}

.tag-warm::after,
.news-tag.tag-warm::after {
    content: '⭐';
    position: absolute;
    top: -4px;
    right: -4px;
    font-size: 0.6rem;
}

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

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-3px); }
    60% { transform: translateY(-2px); }
}

/* 颜色标签悬停效果增强 */
.tag-color-1:hover,
.tag-color-2:hover,
.tag-color-3:hover,
.tag-color-4:hover,
.tag-color-5:hover,
.tag-color-9:hover,
.tag-color-11:hover,
.tag-color-12:hover,
.news-tag.tag-color-1:hover,
.news-tag.tag-color-2:hover,
.news-tag.tag-color-3:hover,
.news-tag.tag-color-4:hover,
.news-tag.tag-color-5:hover,
.news-tag.tag-color-9:hover,
.news-tag.tag-color-11:hover,
.news-tag.tag-color-12:hover {
    filter: brightness(1.1);
    transform: translateY(-3px) scale(1.05);
}

.tag-color-6:hover,
.tag-color-7:hover,
.tag-color-8:hover,
.tag-color-10:hover,
.news-tag.tag-color-6:hover,
.news-tag.tag-color-7:hover,
.news-tag.tag-color-8:hover,
.news-tag.tag-color-10:hover {
    filter: brightness(0.9);
    transform: translateY(-3px) scale(1.05);
    color: #333;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar-tag-cloud {
        gap: 0.4rem;
    }
    
    .sidebar-tag-item {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }

    .news-tag {
        font-size: 0.75rem;
        padding: 0.25rem 0.6rem;
    }
    
    .news-tag-container {
        margin: 0;
    }
    
    .news-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }
    
    .news-meta-left {
        gap: 1rem;
    }

    .tag-count {
        font-size: 0.65rem;
        margin-left: 0.2rem;
    }

    .tag-super-hot::after,
    .tag-very-hot::after,
    .tag-hot::after,
    .tag-warm::after,
    .news-tag.tag-super-hot::after,
    .news-tag.tag-very-hot::after,
    .news-tag.tag-hot::after,
    .news-tag.tag-warm::after {
        font-size: 0.5rem;
        top: -3px;
        right: -3px;
    }
}

/* 加载状态 */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    color: var(--secondary-color);
}

.loading-container p {
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* 错误状态 */
.error-container {
    background-color: rgba(var(--danger-rgb), 0.1);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem 0;
    text-align: center;
}

.error-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--danger-color);
}

.error-message i {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.retry-btn {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.retry-btn:hover {
    background-color: var(--primary-dark);
}

/* 空状态 */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    color: var(--text-light);
}

.empty-state i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.6;
}

.empty-state.small {
    padding: 1rem;
}

.empty-state.small i {
    font-size: 1.5rem;
}

/* 确保侧边栏的标签云正确显示 */
.sidebar-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
} 