/* 边缘计算博客 - 网络节点科技风格 */
/* 配色方案：科技绿、节点蓝、深色背景、连接线装饰 */

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

:root {
    --primary-color: #10B981;
    --secondary-color: #3B82F6;
    --accent-color: #6366F1;
    --background-color: #0D1117;
    --surface-color: #161B22;
    --surface-hover: #21262D;
    --text-primary: #E6EDF3;
    --text-secondary: #8B949E;
    --text-muted: #6E7681;
    --border-color: #30363D;
    --node-gradient: linear-gradient(135deg, #10B981 0%, #3B82F6 50%, #6366F1 100%);
    --connection-line: linear-gradient(90deg, transparent 0%, #10B981 50%, transparent 100%);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
}

/* 网络节点背景装饰 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 10% 20%, rgba(16, 185, 129, 0.15) 0%, transparent 30%),
        radial-gradient(circle at 90% 80%, rgba(59, 130, 246, 0.15) 0%, transparent 30%),
        radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.1) 0%, transparent 40%);
    z-index: -1;
}

/* 连接线网格 */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(16, 185, 129, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(16, 185, 129, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
}

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

/* 导航栏 - 节点连接效果 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(13, 17, 23, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 16px 0;
}

.navbar::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--node-gradient);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo::before {
    content: '⬡';
    font-size: 1.8rem;
    color: var(--secondary-color);
}

.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-links a::after {
    content: '◉';
    position: absolute;
    right: -12px;
    color: var(--primary-color);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-links a:hover::after {
    opacity: 1;
}

/* 英雄区域 - 网络拓扑意境 */
.hero {
    padding: 140px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 50px;
    left: 50%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
    opacity: 0.3;
    animation: nodePulse 4s ease-in-out infinite;
}

@keyframes nodePulse {
    0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.3; }
    50% { transform: translateX(-50%) scale(1.5); opacity: 0.5; }
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.hero h1::before {
    content: '⬡ ';
    color: var(--primary-color);
}

.hero .subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 30px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 30px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.stat-item::before {
    content: '◉';
    color: var(--secondary-color);
}

/* 分类导航 - 节点样式 */
.categories-section {
    padding: 40px 0;
    background: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
}

.categories-grid {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.category-link {
    padding: 10px 20px;
    background: var(--surface-hover);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.category-link::before {
    content: '◉';
    font-size: 0.7rem;
    color: var(--primary-color);
}

.category-link:hover {
    background: var(--node-gradient);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.category-link:hover::before {
    color: white;
}

/* 文章区域 */
.articles-section {
    padding: 60px 0;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 40px;
    text-align: center;
}

.section-title::before {
    content: '⬡ ';
    color: var(--primary-color);
}

/* 文章网格 - 节点网格设计 */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

/* 文章卡片 - 网络节点风格 */
.article-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.4s ease;
    cursor: pointer;
    text-decoration: none;
    display: block;
    position: relative;
}

.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--node-gradient);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.article-card:hover::before {
    opacity: 1;
}

.article-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-color);
    box-shadow: 0 12px 40px rgba(16, 185, 129, 0.2);
}

.card-header {
    padding: 20px 20px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-header::before {
    content: '◉';
    font-size: 1rem;
    color: var(--secondary-color);
}

.card-category {
    display: inline-block;
    padding: 6px 12px;
    background: var(--surface-hover);
    color: var(--primary-color);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.article-card h3 {
    padding: 16px 20px 12px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
}

.article-card p {
    padding: 0 20px 16px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.card-meta {
    padding: 12px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.card-meta span::before {
    content: '⚡ ';
    color: var(--primary-color);
}

/* 分类页面样式 */
.category-header {
    padding: 120px 0 60px;
    text-align: center;
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.1) 0%, var(--background-color) 100%);
}

.category-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.category-header h1::before {
    content: '⬡ ';
    color: var(--primary-color);
}

.category-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* 文章页面样式 */
.article-header {
    padding: 120px 0 60px;
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.1) 0%, var(--background-color) 100%);
}

.article-header .category {
    display: inline-block;
    padding: 8px 16px;
    background: var(--surface-hover);
    color: var(--primary-color);
    border-radius: 12px;
    font-size: 0.85rem;
    text-decoration: none;
    margin-bottom: 16px;
}

.article-header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    line-height: 1.4;
}

.article-header .meta {
    display: flex;
    gap: 20px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.article-header .meta span::before {
    content: '⚡ ';
    color: var(--primary-color);
}

.article-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

.article-content h2 {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 40px 0 20px;
    padding-left: 16px;
    border-left: 4px solid var(--primary-color);
    position: relative;
}

.article-content h2::before {
    content: '◉';
    position: absolute;
    left: -8px;
    color: var(--secondary-color);
}

.article-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 30px 0 16px;
}

.article-content p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 16px;
}

.article-content ul {
    margin: 16px 0;
    padding-left: 24px;
}

.article-content li {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 8px;
    position: relative;
}

.article-content li::before {
    content: '◉';
    color: var(--primary-color);
    position: absolute;
    left: -16px;
}

.tip-box {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin: 24px 0;
    position: relative;
}

.tip-box::before {
    content: '⬡';
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 1.5rem;
    color: var(--primary-color);
    opacity: 0.5;
}

.tip-box h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
    padding-left: 24px;
}

.tip-box p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 0;
    padding-left: 24px;
}

blockquote {
    background: var(--surface-color);
    border: 1px solid var(--primary-color);
    border-radius: 12px;
    padding: 20px 24px;
    margin: 24px 0;
    font-style: italic;
    color: var(--text-primary);
    position: relative;
}

blockquote::before {
    content: '⬡';
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 1.5rem;
    color: var(--secondary-color);
}

/* 外链区域 */
.links-section {
    padding: 40px 0;
    background: var(--surface-color);
    border-top: 1px solid var(--border-color);
}

.links-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 24px;
    text-align: center;
}

.links-title::before {
    content: '◉ ';
    color: var(--primary-color);
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.link-category {
    background: var(--surface-hover);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
}

.link-category-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.link-category-title::before {
    content: '⬡ ';
    color: var(--primary-color);
}

.link-category-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.link-item {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.link-item:hover {
    color: var(--primary-color);
}

.link-item::before {
    content: '→';
    color: var(--secondary-color);
    opacity: 0.5;
}

/* 页脚 */
.footer {
    padding: 40px 0;
    background: var(--surface-color);
    border-top: 1px solid var(--border-color);
    margin-top: 40px;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--node-gradient);
}

.footer-bottom {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-bottom::before {
    content: '⬡ ';
    color: var(--primary-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero .subtitle {
        font-size: 1rem;
    }

    .nav-links {
        display: none;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }

    .categories-grid {
        gap: 8px;
    }

    .category-link {
        padding: 8px 14px;
        font-size: 0.8rem;
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: 20px;
    }
}

/* 动画 */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 数据流动动画 */
@keyframes dataFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 滚动条 */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--background-color);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

::selection {
    background: var(--primary-color);
    color: white;
}