/* SuCos 博客系统 - 组件与响应式样式 */

/* ==================== 改进的文章卡片 ==================== */
.article-card-v2 {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 2rem;
    border: 1px solid rgba(139, 115, 85, 0.08);
}

.article-card-v2:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px rgba(0,0,0,0.12);
    border-color: var(--orange-warm);
}

.article-featured-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #8B7355;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.article-featured-badge i {
    animation: pulse 2s ease-in-out infinite;
}

/* ==================== 优化的评论样式 ==================== */
.comment-enhanced {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 3px solid var(--cream-dark);
    transition: all 0.3s ease;
}

.comment-enhanced:hover {
    border-left-color: var(--orange-warm);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    transform: translateX(4px);
}

.comment-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cream-dark), var(--orange-warm));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.comment-author {
    font-weight: 600;
    color: var(--orange-warm);
    font-size: 1.05rem;
}

.comment-admin-badge {
    background: var(--orange-warm);
    color: white;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    margin-left: 0.5rem;
}

/* ==================== 进度指示器 ==================== */
.progress-indicator {
    position: relative;
    height: 6px;
    background: var(--cream-dark);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-animated {
    height: 100%;
    background: linear-gradient(90deg, var(--orange-warm), var(--brown-light));
    border-radius: 3px;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

.progress-bar-animated::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255,255,255,0.3),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ==================== 标签云增强 ==================== */
.tag-cloud-v2 .tag {
    font-size: calc(0.8rem + var(--tag-weight, 0) * 0.3rem);
    padding: 0.4rem 0.8rem;
    margin: 0.3rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: white;
    border: 2px solid var(--cream-dark);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tag-cloud-v2 .tag:hover {
    transform: scale(1.1) rotate(-2deg);
    border-color: var(--orange-warm);
    box-shadow: 0 4px 12px rgba(255, 179, 71, 0.3);
}

/* ==================== 侧边栏优化 ==================== */
.sidebar-sticky {
    position: sticky;
    top: 80px;
}

.sidebar h5 {
    position: relative;
    padding-left: 1rem;
}

.sidebar h5::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: linear-gradient(to bottom, var(--orange-warm), var(--brown-light));
    border-radius: 2px;
}

/* ==================== 响应式图片 ==================== */
.img-responsive {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.img-responsive:hover {
    transform: scale(1.02);
}

/* ==================== 徽章样式 ==================== */
.badge-enhanced {
    padding: 0.4rem 0.8rem;
    font-weight: 500;
    border-radius: 12px;
    font-size: 0.85rem;
}

.badge-glow {
    box-shadow: 0 0 12px currentColor;
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 8px currentColor; }
    50% { box-shadow: 0 0 16px currentColor; }
}

/* ==================== 分页美化 ==================== */
.pagination {
    gap: 0.5rem;
}

.pagination .page-item .page-link {
    border: 2px solid transparent;
    border-radius: 8px;
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination .page-item.active .page-link {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 179, 71, 0.3);
}

/* ==================== 移动端优化 ==================== */
@media (max-width: 768px) {
    /* 更大的触摸目标 */
    .btn, .page-link {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* 统计卡片堆叠优化 */
    .stat-card {
        margin-bottom: 1rem;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
    
    /* 表单间距优化 */
    .form-control, .form-select {
        font-size: 16px; /* 防止iOS缩放 */
        padding: 0.75rem;
    }
    
    /* 评论区优化 */
    .comment-avatar {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
}

/* ==================== 打印样式 ==================== */
@media print {
    .navbar, .sidebar, .footer, .btn, .pagination {
        display: none !important;
    }
    
    .article-content {
        max-width: 100%;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ==================== 无障碍优化 ==================== */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--orange-warm);
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: 0 0 8px 0;
    z-index: 10000;
}

.skip-to-content:focus {
    top: 0;
}

/* 聚焦指示器增强 */
:focus-visible {
    outline: 3px solid var(--orange-warm);
    outline-offset: 2px;
    border-radius: 4px;
}

