/* 区块链博客 - 金融科技风格 */

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

:root {
    --primary-color: #f0b90b;
    --primary-hover: #d4a006;
    --secondary-color: #00d4ff;
    --accent-color: #00ff88;
    --gold-gradient: linear-gradient(135deg, #f0b90b 0%, #d4a006 50%, #c49000 100%);
    --cyan-gradient: linear-gradient(90deg, #00d4ff, #00ff88);
    --background-color: #0a0e14;
    --surface-color: #12161c;
    --surface-hover: #1a1f26;
    --text-primary: #e6e8eb;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --border-color: #2d333b;
    --card-shadow: 0 4px 16px rgba(240, 185, 11, 0.1);
    --card-shadow-hover: 0 8px 32px rgba(240, 185, 11, 0.2);
    --glow-effect: 0 0 20px rgba(240, 185, 11, 0.3);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'SF Pro Display', -apple-system, sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.75;
    min-height: 100vh;
}

/* 区块链网格背景 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        linear-gradient(rgba(240, 185, 11, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(240, 185, 11, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: -1;
}

/* 渐变光晕背景 */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 10% 20%, rgba(240, 185, 11, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 90% 80%, rgba(0, 212, 255, 0.06) 0%, transparent 50%);
    pointer-events: none;
    z-index: -2;
}

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

/* 导航栏 - 金融科技风格 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(10, 14, 20, 0.95);
    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: 2px;
    background: var(--gold-gradient);
    opacity: 0.5;
}

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

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

.logo::before {
    content: '⧫';
    font-size: 1.5rem;
}

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

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

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

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

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

/* 英雄区域 */
.hero {
    padding: 140px 0 72px;
    text-align: center;
    position: relative;
    background: linear-gradient(180deg, var(--background-color) 0%, var(--surface-color) 100%);
}

.hero::before {
    content: '';
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    height: 300px;
    background: radial-gradient(ellipse, rgba(240, 185, 11, 0.12) 0%, transparent 60%);
    animation: blockPulse 8s ease-in-out infinite;
}

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

.hero::after {
    content: '⧫ ◊ ⬡ ⬢ ◈ ⌬';
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1rem;
    color: var(--text-muted);
    letter-spacing: 16px;
    opacity: 0.35;
}

.hero h1 {
    font-size: 2.6rem;
    font-weight: 800;
    margin-bottom: 18px;
    color: var(--text-primary);
    position: relative;
}

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

.hero h1::after {
    content: ' ⧫';
    color: var(--primary-color);
}

.hero .subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 650px;
    margin: 0 auto 32px;
    line-height: 1.65;
}

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

.tag {
    padding: 8px 18px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    position: relative;
}

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

.tag:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: var(--glow-effect);
}

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

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

.category-link {
    padding: 10px 20px;
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.88rem;
    transition: all 0.2s 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(--glow-effect);
}

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

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 36px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title::before {
    content: '⧫';
    color: var(--primary-color);
    font-size: 1.3rem;
}

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

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

.article-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--gold-gradient);
    opacity: 0;
    transition: opacity 0.2s ease;
}

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

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

.card-image {
    width: 100%;
    height: 130px;
    background: var(--gold-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    position: relative;
    color: var(--background-color);
}

.card-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(10, 14, 20, 0.2) 0%, transparent 100%);
}

.card-content {
    padding: 20px;
}

.card-category {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(240, 185, 11, 0.12);
    color: var(--primary-color);
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.card-category::before {
    content: '⬡ ';
    color: var(--secondary-color);
}

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

.card-excerpt {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 16px;
    line-height: 1.6;
}

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

.card-meta .read-time::before {
    content: '⧫';
    color: var(--primary-color);
    margin-right: 5px;
}

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

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

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

.links-title::after {
    content: ' ⧫';
    color: var(--primary-color);
}

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

.link-category {
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 16px;
    transition: all 0.2s ease;
}

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

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

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

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

.link-item {
    padding: 5px 10px;
    background: rgba(240, 185, 11, 0.08);
    border: 1px solid rgba(240, 185, 11, 0.2);
    border-radius: 3px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.75rem;
    transition: all 0.15s ease;
}

.link-item:hover {
    background: rgba(240, 185, 11, 0.15);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* 页脚 */
.footer {
    padding: 48px 0 28px;
    border-top: 1px solid var(--border-color);
    margin-top: 48px;
    position: relative;
}

.footer::before {
    content: '⧫ ◊ ⬡ ⬢ ◈ ⌬ ⧫';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--primary-color);
    letter-spacing: 10px;
    opacity: 0.35;
    font-size: 0.8rem;
}

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

.footer-section h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 14px;
    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.85rem;
    line-height: 1.75;
    text-decoration: none;
    display: block;
    transition: color 0.2s ease;
}

.footer-section a:hover {
    color: var(--primary-color);
}

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

.footer-bottom::before {
    content: '⧫ Blockchain Blog ⧫';
    display: block;
    margin-bottom: 10px;
    color: var(--primary-color);
    font-size: 0.75rem;
    letter-spacing: 4px;
}

/* 文章详情页 */
.article-header {
    padding: 120px 0 48px;
    text-align: center;
    background: linear-gradient(180deg, var(--background-color) 0%, var(--surface-color) 100%);
}

.article-header .category {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(240, 185, 11, 0.12);
    color: var(--primary-color);
    border-radius: 3px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
}

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

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

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

.article-header h1::after {
    content: ' ⧫';
    color: var(--primary-color);
}

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

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

.article-content {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 24px 64px;
}

.article-content h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 38px 0 16px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.article-content h2::before {
    content: '⧫';
    color: var(--primary-color);
}

.article-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 28px 0 12px;
    color: var(--text-primary);
}

.article-content h3::before {
    content: '⬡ ';
    color: var(--secondary-color);
}

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

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

.article-content li {
    margin-bottom: 8px;
    line-height: 1.7;
}

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

.article-content blockquote {
    border-left: 3px solid var(--primary-color);
    padding: 12px 18px;
    margin: 20px 0;
    background: rgba(240, 185, 11, 0.08);
    border-radius: 0 4px 4px 0;
    color: var(--text-secondary);
}

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

.article-content .tip-box {
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 4px;
    padding: 16px;
    margin: 20px 0;
}

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

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

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

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

.article-content code {
    background: rgba(240, 185, 11, 0.12);
    padding: 3px 8px;
    border-radius: 3px;
    font-family: 'Fira Code', monospace;
    color: var(--primary-color);
    font-size: 0.85rem;
}

/* 分类页 */
.category-header {
    padding: 120px 0 48px;
    text-align: center;
    background: linear-gradient(180deg, var(--background-color) 0%, var(--surface-color) 100%);
}

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

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

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

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

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

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

    .nav-links {
        display: none;
    }

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

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

    .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;
}

::-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(16px);
    animation: fadeIn 0.5s ease forwards;
}

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