/* 文章内容样式 */
.article-content {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333333;
    max-width: none;
}

/* 标题样式 - 简洁风格 */
.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    font-weight: 600;
    margin-top: 24px;
    margin-bottom: 16px;
    line-height: 1.25;
    color: #1f2937;
}

.article-content h1 {
    font-size: 2em;
    border-bottom: 1px solid #e1e5e9;
    padding-bottom: 0.3em;
}

.article-content h2 {
    font-size: 1.5em;
    border-bottom: 1px solid #e1e5e9;
    padding-bottom: 0.3em;
}

.article-content h3 {
    font-size: 1.25em;
}

.article-content h4 {
    font-size: 1em;
}

.article-content h5 {
    font-size: 0.875em;
}

.article-content h6 {
    font-size: 0.85em;
    color: #6a737d;
}

/* 段落 */
.article-content p {
    margin-bottom: 16px;
    margin-top: 0;
}

/* 列表 */
.article-content ul,
.article-content ol {
    margin-bottom: 16px;
    margin-top: 0;
    padding-left: 2em;
}

.article-content ul {
    list-style-type: disc;
}

.article-content ol {
    list-style-type: decimal;
}

.article-content li {
    margin-bottom: 0.25em;
}

.article-content li > p {
    margin-bottom: 0;
}

.article-content li + li {
    margin-top: 0.25em;
}

/* 引用 - 简洁风格 */
.article-content blockquote {
    margin: 0 0 16px 0;
    padding: 0 1em;
    color: #6a737d;
    border-left: 0.25em solid #dfe2e5;
}

.article-content blockquote > :first-child {
    margin-top: 0;
}

.article-content blockquote > :last-child {
    margin-bottom: 0;
}

/* 代码 - 简洁风格 */
.article-content code {
    padding: 0.2em 0.4em;
    margin: 0;
    font-size: 85%;
    background-color: rgba(27, 31, 35, 0.05);
    border-radius: 3px;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
}

.article-content pre {
    padding: 16px;
    overflow: auto;
    font-size: 85%;
    line-height: 1.45;
    background-color: #f6f8fa;
    border-radius: 3px;
    margin-bottom: 16px;
    margin-top: 0;
}

.article-content pre code {
    display: inline;
    max-width: auto;
    padding: 0;
    margin: 0;
    overflow: visible;
    line-height: inherit;
    word-wrap: normal;
    background-color: transparent;
    border: 0;
}

/* 表格 */
.article-content table {
    border-spacing: 0;
    border-collapse: collapse;
    display: block;
    width: max-content;
    max-width: 100%;
    overflow: auto;
    margin-bottom: 16px;
    margin-top: 0;
}

.article-content table th {
    font-weight: 600;
}

.article-content table th,
.article-content table td {
    padding: 6px 13px;
    border: 1px solid #dfe2e5;
}

.article-content table tr {
    background-color: #fff;
    border-top: 1px solid #c6cbd1;
}

.article-content table tr:nth-child(2n) {
    background-color: #f6f8fa;
}

/* 图片 - 居中显示，最大宽度80% */
.article-content img {
    display: block;
    margin: 20px auto;
    max-width: 80%;
    height: auto;
    box-sizing: content-box;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 图片容器样式 - 针对被p标签包裹的图片 */
.article-content p img {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* 链接 - 简洁风格 */
.article-content a {
    color: #0366d6;
    text-decoration: none;
}

.article-content a:hover {
    text-decoration: underline;
}

/* 现代化按钮样式 */
.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e3a8a 100%);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
}

/* 导航项动态移动效果 */
.nav-item {
    padding-top: 0.5rem;
    padding-bottom: 0.75rem;
    transition: all 0.3s ease;
}

.nav-item:hover {
    padding-top: 0;
    padding-bottom: 1.25rem;
}

/* Hero背景渐变 */
.hero-gradient {
    background: linear-gradient(135deg, #1e3a8a 0%, #3730a3 50%, #581c87 100%);
}

/* 卡片悬停效果 */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* 文字截断 */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 背景动画 */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.floating {
    animation: float 6s ease-in-out infinite;
}

/* 液态渐变动画 */
@keyframes liquid-morph {
    0%, 100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
        transform: rotate(0deg) scale(1);
    }
    25% {
        border-radius: 30% 70% 60% 40% / 50% 60% 40% 50%;
        transform: rotate(90deg) scale(1.05);
    }
    50% {
        border-radius: 70% 30% 40% 60% / 30% 50% 60% 40%;
        transform: rotate(180deg) scale(0.95);
    }
    75% {
        border-radius: 40% 60% 70% 30% / 70% 40% 30% 60%;
        transform: rotate(270deg) scale(1.1);
    }
}

.liquid-blob {
    animation: liquid-morph 20s ease-in-out infinite;
}

.blob-1 {
    animation-duration: 35s;
    animation-timing-function: ease-in-out;
}

.blob-2 {
    animation-duration: 42s;
    animation-direction: reverse;
    animation-timing-function: cubic-bezier(0.4, 0, 0.6, 1);
}

.blob-3 {
    animation-duration: 38s;
    animation-timing-function: ease-out;
}

/* 流动路径动画 */
@keyframes flow {
    0% {
        stroke-dasharray: 0 200;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 100 200;
        stroke-dashoffset: -50;
    }
    100% {
        stroke-dasharray: 0 200;
        stroke-dashoffset: -200;
    }
}

.flowing-path {
    animation: flow 8s ease-in-out infinite;
}

/* 代码动画 */
@keyframes code-fade {
    0%, 100% { opacity: 0.1; }
    50% { opacity: 0.3; }
}

.code-animation {
    animation: code-fade 4s ease-in-out infinite;
}

/* 流线型光效动画 */
@keyframes flowing-light {
    0%, 100% {
        transform: scale(1) translateX(0);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.05) translateX(10px);
        opacity: 0.4;
    }
}

.flowing-light {
    animation: flowing-light 12s ease-in-out infinite;
}

/* 随机线条动画 */
@keyframes random-fade {
    0%, 100% { opacity: 0.1; }
    30% { opacity: 0.2; }
    70% { opacity: 0.15; }
}

.random-lines {
    animation: random-fade 8s ease-in-out infinite;
}

/* 几何图形动画 */
@keyframes geometric-float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.12;
    }
    50% {
        transform: translateY(-5px) rotate(5deg);
        opacity: 0.18;
    }
}

.geometric-shapes {
    animation: geometric-float 6s ease-in-out infinite;
}

/* 几何点闪烁 */
@keyframes dot-twinkle {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.2);
    }
}

.geometric-dot {
    animation: dot-twinkle 4s ease-in-out infinite;
}

/* 渐变文字 */
.gradient-text {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 水平分割线 */
.article-content hr {
    height: 0.25em;
    padding: 0;
    margin: 24px 0;
    background-color: #e1e4e8;
    border: 0;
}

/* 强调 */
.article-content strong {
    font-weight: 600;
}

.article-content em {
    font-style: italic;
}

/* 删除线 */
.article-content del {
    text-decoration: line-through;
}

/* 任务列表 */
.article-content input[type="checkbox"] {
    margin-right: 0.5em;
}

/* 确保首个元素没有上边距 */
.article-content > *:first-child {
    margin-top: 0 !important;
}

/* 确保最后元素没有下边距 */
.article-content > *:last-child {
    margin-bottom: 0 !important;
}

/* 响应式处理 */
@media (max-width: 768px) {
    .article-content {
        font-size: 14px;
    }

    .article-content h1 {
        font-size: 1.6em;
    }

    .article-content h2 {
        font-size: 1.4em;
    }

    .article-content h3 {
        font-size: 1.2em;
    }

    .article-content pre {
        padding: 12px;
    }

    .article-content table {
        font-size: 14px;
    }

    .article-content table th,
    .article-content table td {
        padding: 4px 8px;
    }
}