/* 人工智能博客 - 深蓝科技风 + 霓虹发光效果 */

/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #00d4ff;
    --primary-glow: rgba(0, 212, 255, 0.5);
    --secondary-color: #0a192f;
    --accent-color: #7b2cbf;
    --accent-glow: rgba(123, 44, 191, 0.4);
    --neural-color: #00ff88;
    --background-color: #0a0e27;
    --surface-color: #112240;
    --surface-hover: #1d3557;
    --text-primary: #e6f1ff;
    --text-secondary: #8892b0;
    --text-muted: #495670;
    --border-color: #233554;
    --gradient-primary: linear-gradient(135deg, #00d4ff 0%, #7b2cbf 100%);
    --gradient-glow: linear-gradient(90deg, #00d4ff, #00ff88, #7b2cbf);
    --card-shadow: 0 4px 20px rgba(0, 212, 255, 0.1);
    --card-shadow-hover: 0 8px 40px rgba(0, 212, 255, 0.25);
    --neon-glow: 0 0 20px rgba(0, 212, 255, 0.5), 0 0 40px rgba(0, 212, 255, 0.3);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
    position: relative;
}

/* 神经网络背景动画 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(0, 212, 255, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(123, 44, 191, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(0, 255, 136, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

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

/* 导航栏 - 科技感设计 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(10, 14, 39, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 16px 0;
}

.navbar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient-glow);
    opacity: 0.3;
}

.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: 10px;
    text-shadow: var(--neon-glow);
}

.logo-icon {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.logo-icon::before {
    content: '◈';
    font-size: 1.2rem;
}

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

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

.nav-links a:hover {
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* 英雄区域 - 未来感设计 */
.hero {
    padding: 160px 0 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 600px;
    height: 600px;
    transform: translate(-50%, -50%);
    background:
        radial-gradient(circle, transparent 20%, var(--surface-color) 20%, var(--surface-color) 80%, transparent 80%),
        radial-gradient(circle, transparent 20%, var(--surface-color) 20%, var(--surface-color) 80%, transparent 80%);
    background-size: 50px 50px;
    background-position: 0 0, 25px 25px;
    opacity: 0.3;
    animation: neuralGrid 20s linear infinite;
}

@keyframes neuralGrid {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    position: relative;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: var(--gradient-glow);
    animation: glowLine 2s ease-in-out infinite;
}

@keyframes glowLine {
    0%, 100% { opacity: 0.5; width: 100px; }
    50% { opacity: 1; width: 150px; }
}

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

.hero-tags {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
}

.tag {
    padding: 10px 20px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    position: relative;
}

.tag::before {
    content: '◇';
    color: var(--primary-color);
    margin-right: 6px;
}

.tag:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: var(--neon-glow);
    transform: translateY(-3px);
}

/* 分类入口区域 */
.categories-section {
    padding: 40px 0;
    border-bottom: 1px solid var(--border-color);
}

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

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

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

.category-link:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: var(--neon-glow);
    transform: translateY(-2px);
}

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

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 40px;
    position: relative;
    display: inline-block;
    color: var(--text-primary);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--gradient-primary);
}

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

/* 文章网格 - 科技风格 */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 30px;
}

/* 文章卡片 - 霓虹效果 */
.article-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    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;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.article-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-color);
    box-shadow: var(--card-shadow-hover);
}

.card-image {
    width: 100%;
    height: 180px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    position: relative;
    overflow: hidden;
}

.card-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h40v40H0V0zm20 20h20v20H20V20zM0 20h20v20H0V20z' fill='%23ffffff' fill-opacity='0.05'/%3E%3C/svg%3E");
}

.card-content {
    padding: 24px;
}

.card-category {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(0, 212, 255, 0.1);
    color: var(--primary-color);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 12px;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.card-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.5;
}

.card-excerpt {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.7;
}

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

.card-meta .read-time {
    display: flex;
    align-items: center;
    gap: 6px;
}

.card-meta .read-time::before {
    content: '◉';
    color: var(--neural-color);
}

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

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

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

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

.link-category {
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
}

.link-category:hover {
    border-color: var(--primary-color);
    box-shadow: var(--card-shadow);
}

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

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

.link-item {
    padding: 6px 12px;
    background: rgba(0, 212, 255, 0.05);
    border: 1px solid rgba(0, 212, 255, 0.1);
    border-radius: 4px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.link-item:hover {
    background: rgba(0, 212, 255, 0.15);
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

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

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

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 18px;
    color: var(--text-primary);
}

.footer-section h3::before {
    content: '◆ ';
    color: var(--primary-color);
}

.footer-section p,
.footer-section a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.8;
    text-decoration: none;
    display: block;
    transition: all 0.3s ease;
}

.footer-section a:hover {
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-bottom::before {
    content: '◈ ◈ ◈';
    display: block;
    margin-bottom: 10px;
    color: var(--primary-color);
    letter-spacing: 20px;
}

/* 文章详情页样式 */
.article-header {
    padding: 140px 0 60px;
    text-align: center;
    position: relative;
}

.article-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 300px;
    background: linear-gradient(180deg, rgba(0, 212, 255, 0.05) 0%, transparent 100%);
    pointer-events: none;
}

.article-header .category {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(0, 212, 255, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.article-header h1 {
    font-size: 2.4rem;
    font-weight: 700;
    max-width: 800px;
    margin: 0 auto 24px;
    line-height: 1.4;
    color: var(--text-primary);
}

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

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

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

.article-content h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 48px 0 20px;
    color: var(--text-primary);
    position: relative;
    padding-left: 20px;
}

.article-content h2::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

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

.article-content p {
    margin-bottom: 20px;
    color: var(--text-secondary);
    line-height: 1.9;
}

.article-content ul,
.article-content ol {
    margin-bottom: 24px;
    padding-left: 24px;
    color: var(--text-secondary);
}

.article-content li {
    margin-bottom: 10px;
    line-height: 1.8;
}

.article-content li::marker {
    color: var(--primary-color);
}

.article-content blockquote {
    border-left: 3px solid var(--primary-color);
    padding: 16px 24px;
    margin: 24px 0;
    background: rgba(0, 212, 255, 0.05);
    border-radius: 0 8px 8px 0;
    color: var(--text-secondary);
}

.article-content blockquote::before {
    content: '◈';
    color: var(--primary-color);
    margin-right: 10px;
}

.article-content .tip-box {
    background: rgba(123, 44, 191, 0.1);
    border: 1px solid rgba(123, 44, 191, 0.2);
    border-radius: 8px;
    padding: 20px;
    margin: 24px 0;
}

.article-content .tip-box h4 {
    color: var(--accent-color);
    font-size: 1rem;
    margin-bottom: 10px;
}

.article-content .tip-box h4::before {
    content: '◆ ';
}

.article-content .tip-box p {
    margin-bottom: 0;
}

.article-content pre {
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin: 24px 0;
    overflow-x: auto;
}

.article-content pre code {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.article-content code {
    background: rgba(0, 212, 255, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'SF Mono', monospace;
    color: var(--primary-color);
}

/* 分类页面样式 */
.category-header {
    padding: 140px 0 60px;
    text-align: center;
}

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

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

.category-header .description {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.8;
}

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

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

    .nav-links {
        display: none;
    }

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

    .article-header h1 {
        font-size: 1.6rem;
    }

    .article-header .meta {
        flex-direction: column;
        gap: 12px;
    }

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

    .categories-grid {
        flex-direction: column;
        align-items: center;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

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

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

/* 选择文本样式 */
::selection {
    background: var(--primary-color);
    color: var(--background-color);
}

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

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

/* 脉冲动画 */
@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* 科技线条动画 */
.tech-line {
    position: relative;
}

.tech-line::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    background: var(--gradient-glow);
    animation: pulse 2s ease-in-out infinite;
}