/* 博客页面样式 - 基于 #5b8ce8 蓝色配色 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f5f9ff 0%, #e8f4fd 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* 背景装饰元素 */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, 
        transparent 0%,
        rgba(181, 207, 238, 0.03) 25%,
        transparent 50%,
        rgba(155, 184, 232, 0.03) 75%,
        transparent 100%
    );
    z-index: -2;
    animation: floatBackground 20s linear infinite;
}

@keyframes floatBackground {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 浮动圆圈装饰 */
.floating-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.floating-circle {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(181, 207, 238, 0.1), rgba(155, 184, 232, 0.05));
    animation: float 15s infinite ease-in-out;
}

.floating-circle:nth-child(1) {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.floating-circle:nth-child(2) {
    width: 60px;
    height: 60px;
    top: 60%;
    right: 10%;
    animation-delay: 5s;
}

.floating-circle:nth-child(3) {
    width: 100px;
    height: 100px;
    top: 80%;
    left: 20%;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-30px) rotate(120deg); }
    66% { transform: translateY(20px) rotate(240deg); }
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e5e5e5;
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: #5b8ce8;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    margin-left: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #64748b;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #5b8ce8;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #5b8ce8;
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* 汉堡菜单 */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
}

.hamburger.active .bar:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* 博客头部 */
.blog-hero {
    padding: 120px 0 30px;
    background: linear-gradient(135deg, #f5f9ff 0%, #e8f4fd 100%);
    text-align: center;
    position: relative;
}

.hero-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 25px;
}

/* 分类导航 */
.category-nav {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 35px;
    flex-wrap: wrap;
}

.category-btn {
    padding: 10px 20px;
    border: 2px solid #c5d9f1;
    border-radius: 25px;
    background: #ffffff;
    color: #5b8ce8;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-btn:hover,
.category-btn.active {
    border-color: #5b8ce8;
    background: #5b8ce8;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(91, 140, 232, 0.3);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 主内容区域 */
main {
    padding: 40px 0;
}

/* 页面头部 */
header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

header p {
    font-size: 1.1rem;
    color: #5a6c7d;
    max-width: 600px;
    margin: 0 auto;
}

/* 分类导航 - 已在头部hero区域定义新样式 */

/* 搜索框 */
.search-container {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
}

.search-input {
    width: 100%;
    max-width: 500px;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(181, 207, 238, 0.5);
    border-radius: 25px;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.search-input:focus {
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.search-input::placeholder {
    color: #95a5a6;
}

/* 博客网格 */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* 博客卡片 */
.blog-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.blog-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(181, 207, 238, 0.3);
}

.blog-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.blog-title:hover {
    color: #4a90e2;
    cursor: pointer;
}

.blog-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.blog-category {
    background: #5b8ce8;
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(122, 156, 214, 0.3);
}

.blog-date {
    color: #95a5a6;
    font-size: 0.85rem;
}

.blog-excerpt {
    color: #5a6c7d;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.blog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    background: rgba(181, 207, 238, 0.2);
    color: #4a90e2;
    padding: 0.25rem 0.5rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 500;
}

.blog-actions {
    padding: 1rem 1.5rem;
    background: rgba(248, 251, 255, 0.5);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.read-btn {
    background: #5b8ce8;
    color: white;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.read-btn:hover {
    background: #4a7bc8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(91, 140, 232, 0.4);
}

.blog-stats {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #95a5a6;
    font-size: 0.85rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: #95a5a6;
}

/* 响应式设计 */
@media (max-width: 768px) {
    /* 移动端导航菜单 */
    .hamburger {
        display: flex;
        z-index: 1001;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: rgba(255, 255, 255, 0.98);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 20px 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        margin: 10px 0;
        margin-left: 0;
    }

    .container {
        padding: 1rem;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 20px;
    }
    
    .category-nav {
        gap: 6px;
        margin-bottom: 25px;
    }
    
    .category-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .blog-actions {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .read-btn {
        text-align: center;
        justify-content: center;
    }
}