/* IPO博客 - 专业金融配色方案 */
/* 主色：#1e3a8a（深蓝色）辅助色：#f59e0b（金色）背景色：#0f172a 表面色：#1e293b */

:root {
    --primary: #1e3a8a;
    --primary-light: #3b82f6;
    --secondary: #f59e0b;
    --secondary-light: #fbbf24;
    --bg-dark: #0f172a;
    --bg-surface: #1e293b;
    --bg-surface-light: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-color: #334155;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.8;
    min-height: 100vh;
}

a {
    color: var(--secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-light);
}

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

/* 头部导航 */
.header {
    background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-dark) 100%);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    color: white;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav {
    display: flex;
    gap: 30px;
}

.nav a {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 8px 0;
    position: relative;
}

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

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

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

/* Hero区域 */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, #0f172a 100%);
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23f59e0b' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.3;
}

.hero h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.hero h1 span {
    color: var(--secondary);
}

.hero p {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 30px;
    position: relative;
    z-index: 1;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-top: 40px;
    position: relative;
    z-index: 1;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 36px;
    font-weight: 700;
    color: var(--secondary);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 14px;
}

/* 分类区域 */
.categories-section {
    padding: 60px 0;
}

.section-title {
    font-size: 32px;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--secondary), var(--primary-light));
    margin: 15px auto 0;
    border-radius: 2px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.category-card {
    background: var(--bg-surface);
    border-radius: 12px;
    padding: 30px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--secondary), var(--primary-light));
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-light);
    box-shadow: 0 20px 40px rgba(30, 58, 138, 0.2);
}

.category-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 20px;
}

.category-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.category-card p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.category-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--secondary);
    font-weight: 500;
    font-size: 14px;
}

.category-link:hover {
    gap: 10px;
}

/* 文章列表 */
.articles-section {
    padding: 60px 0;
    background: var(--bg-surface);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.article-card {
    background: var(--bg-dark);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.article-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}

.article-content {
    padding: 25px;
}

.article-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 13px;
    color: var(--text-muted);
}

.article-tag {
    background: var(--bg-surface-light);
    padding: 4px 12px;
    border-radius: 20px;
    color: var(--secondary);
    font-weight: 500;
}

.article-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
    line-height: 1.4;
}

.article-card h3 a {
    color: var(--text-primary);
}

.article-card h3 a:hover {
    color: var(--secondary);
}

.article-excerpt {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 15px;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--secondary);
    font-weight: 500;
    font-size: 14px;
}

.read-more:hover {
    gap: 10px;
}

/* 文章详情页 */
.article-page {
    padding: 60px 0;
}

.article-header {
    text-align: center;
    margin-bottom: 40px;
}

.article-header h1 {
    font-size: 36px;
    margin-bottom: 20px;
    line-height: 1.3;
}

.article-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    color: var(--text-secondary);
    font-size: 14px;
}

.article-body {
    max-width: 800px;
    margin: 0 auto;
}

.article-body h2 {
    font-size: 24px;
    margin: 40px 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.article-body h3 {
    font-size: 20px;
    margin: 30px 0 15px;
}

.article-body p {
    margin-bottom: 20px;
    text-align: justify;
}

.article-body ul, .article-body ol {
    margin: 20px 0;
    padding-left: 30px;
}

.article-body li {
    margin-bottom: 10px;
}

.article-body blockquote {
    background: var(--bg-surface);
    border-left: 4px solid var(--secondary);
    padding: 20px 25px;
    margin: 25px 0;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--text-secondary);
}

/* 分类详情页 */
.category-page {
    padding: 60px 0;
}

.category-header {
    text-align: center;
    margin-bottom: 50px;
}

.category-header h1 {
    font-size: 36px;
    margin-bottom: 20px;
}

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

/* 外链区域 */
.external-links {
    background: var(--bg-surface);
    padding: 40px 0;
    margin-top: 60px;
}

.external-links h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--text-secondary);
}

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

.links-grid a {
    background: var(--bg-dark);
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 13px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.links-grid a:hover {
    border-color: var(--secondary);
    background: var(--bg-surface-light);
}

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

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

.footer-section h4 {
    font-size: 16px;
    margin-bottom: 15px;
    color: var(--secondary);
}

.footer-section p, .footer-section li {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

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

/* 面包屑导航 */
.breadcrumb {
    background: var(--bg-surface);
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-secondary);
}

.breadcrumb-list a {
    color: var(--text-secondary);
}

.breadcrumb-list a:hover {
    color: var(--secondary);
}

.breadcrumb-separator {
    color: var(--text-muted);
}

/* 相关文章推荐 */
.related-articles {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
}

.related-articles h3 {
    font-size: 20px;
    margin-bottom: 25px;
}

.related-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

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

.related-item:hover {
    border-color: var(--primary-light);
}

.related-item h4 {
    font-size: 16px;
    margin-bottom: 8px;
}

.related-item h4 a {
    color: var(--text-primary);
}

.related-item h4 a:hover {
    color: var(--secondary);
}

.related-item p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }

    .nav {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero h1 {
        font-size: 32px;
    }

    .hero-stats {
        flex-direction: column;
        gap: 30px;
    }

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

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

    .article-header h1 {
        font-size: 28px;
    }

    .article-info {
        flex-direction: column;
        gap: 10px;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .links-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 50px 0;
    }

    .hero h1 {
        font-size: 26px;
    }

    .hero p {
        font-size: 15px;
    }

    .section-title {
        font-size: 24px;
    }

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

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

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

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

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

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