/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    line-height: 1.8;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

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

/* 导航栏 */
.navbar {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    opacity: 0.8;
}

/* 首页样式 */
.hero {
    text-align: center;
    color: white;
    padding: 60px 0;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* 博客卡片 */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.blog-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.blog-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.blog-card h2 {
    margin-bottom: 1rem;
}

.blog-card h2 a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-card h2 a:hover {
    color: #667eea;
}

.blog-card p {
    color: #666;
    margin-bottom: 1rem;
}

.read-more {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    text-decoration: none;
    transition: background 0.3s ease;
}

.read-more:hover {
    background: #764ba2;
}

/* 文章页面样式 */
.blog-post {
    background: white;
    margin: 2rem auto;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.breadcrumb {
    padding: 1.5rem 2rem 0 2rem;
    font-size: 0.9rem;
    color: #666;
}

.breadcrumb-link {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-link:hover {
    color: #764ba2;
}

.breadcrumb-separator {
    margin: 0 0.5rem;
    color: #999;
}

.breadcrumb-current {
    color: #333;
    font-weight: 500;
}

.post-header {
    padding: 2rem 2rem 3rem 2rem;
    border-bottom: 1px solid #eee;
    text-align: center;
}

.post-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.post-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    color: #666;
    font-size: 0.9rem;
}

.post-content {
    padding: 2rem;
}

.post-content .section {
    margin-bottom: 2rem;
}

.post-content h2 {
    color: #667eea;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-content h3 {
    color: #764ba2;
    font-size: 1.4rem;
    margin: 1.5rem 0 1rem 0;
    border-left: 4px solid #667eea;
    padding-left: 1rem;
}

/* 通用组件 */
.highlight {
    background: linear-gradient(120deg, #a8e6cf 0%, #dcedc8 100%);
    padding: 1.5rem;
    border-radius: 10px;
    margin: 1rem 0;
    border-left: 5px solid #4caf50;
}

.warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    padding: 1rem;
    border-radius: 10px;
    margin: 1rem 0;
    border-left: 5px solid #f39c12;
}

.code-block {
    background: #2d3748;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 10px;
    font-family: 'Consolas', 'Monaco', monospace;
    overflow-x: auto;
    margin: 1rem 0;
    white-space: pre-wrap;
}

.steps {
    counter-reset: step-counter;
}

.step {
    counter-increment: step-counter;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #667eea;
    position: relative;
}

.step::before {
    content: counter(step-counter);
    position: absolute;
    left: -15px;
    top: 15px;
    background: #667eea;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.specs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.spec-item {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
}

.spec-item i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.download-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.download-link {
    background: #667eea;
    color: white;
    padding: 1rem;
    border-radius: 10px;
    text-decoration: none;
    text-align: center;
    transition: transform 0.3s ease;
}

.download-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.post-nav {
    margin-top: 3rem;
    text-align: center;
}

.nav-link {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    text-decoration: none;
    transition: background 0.3s ease;
}

.nav-link:hover {
    background: #764ba2;
}

/* 页脚 */
.footer {
    text-align: center;
    color: white;
    padding: 2rem 0;
    margin-top: 2rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .post-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .specs {
        grid-template-columns: 1fr;
    }
}