/* 自定义唯美背景样式 - PaperMod 主题 */

:root {
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --text-primary: #2d3436;
    --text-secondary: #636e72;
    --accent: #6c5ce7;
    --accent-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* 页面整体背景 */
body {
    background: var(--bg-primary);
    background-image: 
        radial-gradient(at 0% 0%, rgba(102, 126, 234, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(118, 75, 162, 0.1) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.8;
}

/* 主容器美化 */
.main-container {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    margin: 2rem auto;
    max-width: 900px;
    padding: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.6);
}

/* 标题样式 */
h1, h2, h3 {
    color: var(--text-primary);
    font-weight: 700;
}

.post-content h1,
.post-content h2,
.post-content h3 {
    color: var(--accent);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

h2 {
    font-size: 1.8rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.4rem;
    margin-top: 1.5rem;
}

/* 文章卡片样式 */
.post-single {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(108, 92, 231, 0.1);
}

.post-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid rgba(108, 92, 231, 0.1);
}

.post-title {
    font-size: 2.2rem;
    color: var(--text-primary);
}

.post-meta {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* 文章内容区 */
.post-content {
    font-size: 1.1rem;
    color: var(--text-primary);
}

.post-content p {
    margin-bottom: 1.2rem;
}

.post-content strong {
    color: var(--accent);
    font-weight: 600;
}

/* 代码块 */
pre, code {
    background: rgba(108, 92, 231, 0.08) !important;
    border-radius: 8px;
    padding: 0.2em 0.4em;
    font-size: 0.9em;
    color: var(--text-primary);
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    line-height: 1.6;
    border: 1px solid rgba(108, 92, 231, 0.15);
}

pre {
    padding: 1rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

pre code {
    background: transparent !important;
    padding: 0;
    border: none;
}

/* 标签样式 */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 2rem;
}

.post-tags li a {
    background: var(--accent-gradient);
    color: white !important;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.post-tags li a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.4);
}

/* 引用样式 */
blockquote {
    border-left: 4px solid var(--accent);
    background: rgba(108, 92, 231, 0.05);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--text-secondary);
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    border-radius: 8px;
    overflow: hidden;
}

th, td {
    border: 1px solid rgba(108, 92, 231, 0.2);
    padding: 0.8rem 1rem;
    text-align: left;
}

th {
    background: var(--accent-gradient);
    color: white;
    font-weight: 600;
}

tr:nth-child(even) {
    background: rgba(108, 92, 231, 0.05);
}

/* 链接样式 */
a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s;
}

a:hover {
    border-bottom-color: var(--accent);
}

/* 响应式 */
@media (max-width: 768px) {
    .main-container {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .post-single {
        padding: 1.5rem;
    }
}

/* 顶部导航美化 */
.header {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

/* ==================== 分页导航修复 ==================== */
.pagination {
    display: flex; /* 启用 Flex 弹性布局 */
    flex-wrap: wrap; /* 允许空间不足时换行（适配移动端） */
    justify-content: center; /* 水平居中 */
    align-items: center; /* 垂直居中，解决高低不平的问题 */
    list-style: none; /* 移除可能存在的默认列表圆点 */
    padding: 0;
    margin-top: 2rem;
    gap: 0.8rem; /* 使用 gap 控制按钮间距，替代原来的 margin */
}

/* 清除由于 ul/li 结构带来的默认外边距 */
.pagination li {
    margin: 0;
}

.pagination a, .pagination span {
    display: inline-flex; /* 让按钮变成行内弹性盒子确保内部文字绝对居中 */
    justify-content: center;
    align-items: center;
    background: var(--bg-secondary);
    border: 1px solid rgba(108, 92, 231, 0.2);
    color: var(--text-primary);
    padding: 0 1rem;
    min-width: 2.5rem; /* 设定最小宽度，让数字按钮看起来像个正规的方块/圆角矩形 */
    height: 2.5rem; /* 统一高度，避免上一页/下一页文字跟数字的高度不同 */
    border-radius: 8px;
    transition: all 0.2s ease;
    text-decoration: none;
    box-sizing: border-box;
}

/* 悬停状态 & 当前所在页（Hugo 默认的 active 类）的高亮状态 */
.pagination a:hover,
.pagination .active a,
.pagination .active span,
.pagination .current {
    background: var(--accent-gradient);
    color: #ffffff !important;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3); /* 添加唯美发光阴影以呼应你的主题 */
}

/* 首页文章列表 */
.post-entry {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid rgba(108, 92, 231, 0.1);
}

.post-entry:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(108, 92, 231, 0.15);
}

/* 装饰性浮雕动画 */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.post-title::after {
    content: "";
    display: block;
    width: 60px;
    height: 3px;
    background: var(--accent-gradient);
    margin: 1rem auto 0;
    border-radius: 2px;
}