/* 博客页面样式 - 浅苔青暗调主题 */

/* ========== 博客导航 ========== */
.blog-nav {
    padding: 15px;
}

.nav-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.nav-list {
    list-style: none;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 4px;
}

.nav-item:hover {
    background: rgba(94, 234, 212, 0.1);
}

.nav-item.active {
    background: rgba(94, 234, 212, 0.2);
    border-left: 3px solid var(--primary);
}

.nav-icon {
    font-size: 16px;
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.nav-text {
    flex: 1;
    font-size: 13px;
    color: var(--text);
}

.nav-count {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(94, 234, 212, 0.15);
    color: var(--primary);
    min-width: 20px;
    text-align: center;
}

/* 返回主页按钮 */
.back-home {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: calc(100% - 30px);
    margin: 15px;
    padding: 12px 20px;
    border-radius: 10px;
    background: var(--item_bg_color);
    border: 1px solid var(--border);
    color: var(--primary);
    font-size: 14px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.back-home:hover {
    background: var(--primary);
    color: var(--bg);
    transform: translateY(-2px);
}

.back-home svg {
    width: 18px;
    height: 18px;
}

/* ========== 博客头部 ========== */
.blog-header {
    text-align: center;
}

.blog-description {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 25px;
}

/* 搜索框 */
.search-box {
    position: relative;
    max-width: 400px;
    margin: 0 auto 20px;
}

.search-box input {
    width: 100%;
    padding: 12px 45px 12px 45px;
    border-radius: 25px;
    border: 1px solid var(--border);
    background: var(--item_bg_color);
    color: var(--text);
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
}

.search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(94, 234, 212, 0.2);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-box input.searching {
    border-color: var(--primary);
    animation: searchPulse 1s ease infinite;
}

@keyframes searchPulse {
    0%, 100% {
        box-shadow: 0 0 5px rgba(94, 234, 212, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(94, 234, 212, 0.5);
    }
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--primary);
    pointer-events: none;
}

.search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--primary);
    color: var(--bg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-50%) scale(1.05);
}

.search-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.search-btn svg {
    width: 16px;
    height: 16px;
}

/* 标签筛选 */
.filter-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

.filter-tag {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    background: rgba(94, 234, 212, 0.1);
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-tag:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-tag.active {
    background: var(--primary);
    color: var(--bg);
    border-color: var(--primary);
}

/* ========== 文章列表 ========== */
.blog-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 30px;
}

/* 文章卡片 */
.blog-card {
    display: flex;
    background: var(--item_bg_color);
    border-radius: 15px;
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(94, 234, 212, 0.1);
    border-color: var(--primary);
}

.blog-card.featured {
    border-left: 4px solid var(--primary);
}

.blog-card-left {
    width: 200px;
    min-height: 150px;
    flex-shrink: 0;
    overflow: hidden;
}

.blog-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-cover {
    transform: scale(1.05);
}

.blog-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(94, 234, 212, 0.1), rgba(45, 212, 191, 0.1));
    font-size: 48px;
    overflow: hidden;
}

.default-blog-cover-svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-card-right {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.blog-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.blog-category {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
}

.blog-category.tech {
    background: rgba(94, 234, 212, 0.2);
    color: var(--primary);
}

.blog-category.project {
    background: rgba(45, 212, 191, 0.2);
    color: var(--primary-dark);
}

.blog-category.hardware {
    background: rgba(153, 246, 228, 0.2);
    color: var(--primary-light);
}

.blog-category.life {
    background: rgba(209, 250, 229, 0.2);
    color: var(--text);
}

.blog-date {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

.blog-date svg {
    width: 14px;
    height: 14px;
}

.blog-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 10px;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.blog-card:hover .blog-title {
    color: var(--primary);
}

.blog-excerpt {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 15px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.blog-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.blog-tag {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    background: rgba(94, 234, 212, 0.1);
    color: var(--primary);
    border: 1px solid var(--border);
}

.blog-readmore {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--bg);
    background: var(--primary);
    border: 1px solid var(--primary);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.blog-readmore:hover {
    gap: 10px;
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(94, 234, 212, 0.3);
}

.blog-readmore svg {
    width: 16px;
    height: 16px;
}

/* ========== 分页 ========== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
    padding: 20px 0;
}

.page-btn {
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--item_bg_color);
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.page-btn:hover:not(:disabled) {
    background: var(--primary);
    color: var(--bg);
    border-color: var(--primary);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-info {
    font-size: 14px;
    color: var(--text-muted);
}

/* ========== 空状态 ========== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.empty-text {
    font-size: 16px;
    color: var(--text-muted);
}

/* ========== 响应式适配 ========== */
@media (max-width: 800px) {
    .blog-card {
        flex-direction: column;
    }
    
    .blog-card-left {
        width: 100%;
        height: 180px;
        min-height: auto;
    }
    
    .blog-card-right {
        padding: 15px;
    }
    
    .blog-title {
        font-size: 16px;
    }
    
    .blog-excerpt {
        font-size: 13px;
    }
    
    .search-box {
        max-width: 100%;
        margin: 0 10px 20px;
    }
    
    .filter-tags {
        padding: 0 10px;
    }
}

/* 移动端悬浮按钮 */
@media (max-width: 800px) {
    .mobile-floating-btns {
        position: fixed;
        top: 15px;
        left: 15px;
        z-index: 1000;
        display: flex;
        gap: 10px;
    }

    .mobile-float-btn {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        background: var(--card);
        border: 1px solid var(--border);
        color: var(--primary);
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        text-decoration: none;
    }

    .mobile-float-btn:hover {
        background: var(--primary);
        color: var(--bg);
        transform: scale(1.05);
    }

    .mobile-float-btn svg {
        width: 20px;
        height: 20px;
    }
}

/* 桌面端隐藏移动端悬浮按钮 */
@media (min-width: 801px) {
    .mobile-floating-btns {
        display: none;
    }
}

@media (max-width: 480px) {
    .blog-meta {
        gap: 10px;
    }
    
    .blog-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .pagination {
        gap: 10px;
    }
    
    .page-btn {
        padding: 8px 15px;
        font-size: 13px;
    }
}
