/* 基本样式重置 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    transition: all 0.3s ease;
}

:root {
    /* 主色调 */
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: #eef2ff;
    
    /* 辅助色 */
    --secondary-color: #8b5cf6;
    --secondary-hover: #7c3aed;
    
    /* 功能色 */
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    
    /* 中性色 */
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;
}

body {
    font-family: 'Inter', 'SF Pro Display', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    overflow-x: hidden;
}

/* 背景装饰 */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 100% 0%, #eef2ff 0%, transparent 50%),
                radial-gradient(circle at 0% 100%, #ede9fe 0%, transparent 50%);
    z-index: -1;
    pointer-events: none;
    opacity: 0.7;
}

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

/* 导航栏样式 */
.navbar {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    box-shadow: var(--shadow-md);
    padding: 1rem 0;
    border-bottom: none;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.02em;
}

.navbar-brand:hover {
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    position: relative;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    letter-spacing: -0.01em;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 15%;
    width: 70%;
    height: 2px;
    background-color: white;
    transform: scaleX(0);
    transition: transform 0.25s ease;
    border-radius: 1px;
}

.navbar-nav .nav-link:hover {
    color: white;
}

.navbar-nav .nav-link:hover::after {
    transform: scaleX(1);
}

.navbar-nav .nav-link.active {
    color: white;
    font-weight: 600;
}

.navbar-nav .nav-link.active::after {
    transform: scaleX(1);
    background-color: white;
}

/* 搜索框样式 */
.form-control {
    background-color: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: var(--radius-full) 0 0 var(--radius-full);
    color: var(--text-primary);
    transition: all 0.25s ease;
    font-size: 0.95rem;
    padding: 0.625rem 1rem;
    border-right: none;
}

.form-control:focus {
    background-color: var(--bg-primary);
    border-color: transparent;
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
    outline: none;
}

.form-control::placeholder {
    color: var(--text-tertiary);
}

.btn-outline-light {
    background-color: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 0 var(--radius-full) var(--radius-full) 0;
    color: white;
    transition: all 0.25s ease;
    font-size: 0.95rem;
    padding: 0.625rem 1.25rem;
    font-weight: 500;
}

.btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.3);
    color: white;
}

/* 页面标题样式 */
.page-title {
    margin: 2.5rem 0 2rem;
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    text-align: center;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hero区域样式 */
.hero-section {
    margin: 2rem 0 3rem;
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    position: relative;
}

.hero-bg {
    position: relative;
    height: 420px;
    background-size: cover;
    background-position: center;
    background-attachment: local;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.6), rgba(139, 92, 246, 0.6));
    backdrop-filter: blur(4px);
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 2rem;
    max-width: 800px;
    text-align: center;
}

.hero-title {
    font-size: 3.75rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 1rem;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.03em;
    animation: fadeInDown 0.8s ease-out;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 2rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.8s ease-out 0.2s both;
    font-weight: 400;
}

/* Hero区域动画 */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 文章列表样式 */
.post-list {
    margin-bottom: 3rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    padding: 0 1rem;
}

/* 文章卡片样式 */
article {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    position: relative;
    background-clip: padding-box;
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
    height: 100%;
}

/* 确保所有卡片内部元素与边缘有适当间距 */
article h2,
article .text-muted,
article p,
article .read-more-container {
    padding: 0 0.5rem;
}

article::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
    z-index: 1;
}

article:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

article:hover::before {
    transform: scaleX(1);
}

/* 图片容器优化 */
article .post-image-container {
    position: relative;
    margin: 0 0 1.5rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
}

article img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
    border-radius: 0;
    margin: 0;
    box-shadow: none;
}

article:hover img {
    transform: scale(1.02);
    box-shadow: none;
}

/* 图片悬停效果 */
article .post-image-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(139, 92, 246, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

article:hover .post-image-container::after {
    opacity: 1;
}

article h2 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    font-family: 'Inter', sans-serif;
    line-height: 1.35;
    letter-spacing: -0.02em;
    flex-shrink: 0;
    color: var(--text-primary);
    padding: 0 !important;
}

article h2 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.25s ease;
    display: inline-block;
}

article h2 a:hover {
    color: var(--primary-color);
}

article .text-muted {
    font-size: 0.825rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
    align-items: center;
    padding: 0 0 0.75rem 0 !important;
}

article .text-muted span {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

article .text-muted a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.25s ease;
    font-weight: 500;
    padding: 0.125rem 0;
}

article .text-muted a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

article p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
    font-size: 0.95rem;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: left;
    padding: 0 !important;
}

/* 阅读更多按钮容器 */
article .read-more-container {
    margin-top: auto;
    display: flex;
    justify-content: flex-start;
    padding: 0 !important;
}

/* 阅读更多按钮样式 */
article .btn-primary {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
    border-radius: var(--radius-full);
    padding: 0.5rem 1.5rem;
    font-weight: 600;
    transition: all 0.25s ease;
    text-decoration: none;
    font-size: 0.85rem;
    box-shadow: var(--shadow-sm);
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.01em;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

article .btn-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

article .btn-primary::after {
    content: '→';
    font-size: 0.95rem;
    transition: transform 0.25s ease;
}

article .btn-primary:hover::after {
    transform: translateX(4px);
}

/* 阅读更多按钮样式 */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    border-radius: var(--radius-full);
    padding: 0.625rem 2rem;
    font-weight: 600;
    transition: all 0.25s ease;
    text-decoration: none;
    font-size: 0.95rem;
    box-shadow: var(--shadow-sm);
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.01em;
    display: inline-block;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: var(--shadow-md);
}

/* 文章详情容器 */
article.post-detail {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 0;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    position: relative;
    margin-bottom: 2.5rem;
}

/* 文章头部样式 */
article header {
    padding: 2.5rem 2.5rem 1.5rem;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    border-bottom: 1px solid var(--border-color);
}

/* 文章标题样式 */
article h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    line-height: 1.25;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 文章元数据样式 */
article .text-muted {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
}

article .text-muted span {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.25s ease;
}

article .text-muted a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.25s ease;
    font-weight: 500;
    padding: 0.125rem 0;
}

article .text-muted a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* 分类标签样式 */
.post-category-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 0.45rem 1.25rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
    box-shadow: var(--shadow-sm);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.post-category-badge:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: white;
    text-decoration: none;
}

/* 标签样式 */
article header .mb-4 {
    margin-bottom: 2rem !important;
}

article header .btn-sm {
    margin: 0.25rem 0.375rem 0.25rem 0;
    border-radius: var(--radius-full);
    font-size: 0.825rem;
    padding: 0.35rem 0.875rem;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    transition: all 0.25s ease;
    text-decoration: none;
    display: inline-block;
    font-weight: 500;
}

article header .btn-sm:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* 封面图片样式 */
.post-cover-image {
    margin: 0 -2.5rem 2rem;
    overflow: hidden;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    height: 350px;
    position: relative;
}

.post-cover-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
}

.post-cover-image img:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-xl);
}

/* 文章内容区域 */
article .content {
    padding: 2.5rem;
    color: var(--text-primary);
    line-height: 1.9;
    font-size: 1.075rem;
    background-color: var(--bg-primary);
}

/* 文章内容标题样式 */
article .content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-top: 3rem;
    margin-bottom: 1.75rem;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    padding-bottom: 0.875rem;
    border-bottom: 2px solid var(--border-color);
    letter-spacing: -0.025em;
}

article .content h3 {
    font-size: 1.6rem;
    font-weight: 600;
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.02em;
}

article .content h4 {
    font-size: 1.35rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.015em;
}

/* 文章内容段落样式 */
article .content p {
    margin-bottom: 1.75rem;
    text-align: justify;
    color: var(--text-secondary);
    line-height: 1.9;
    font-size: 1.075rem;
}

/* 文章内容图片样式 */
article .content img {
    max-width: 100%;
    height: auto;
    margin: 3rem auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: block;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    padding: 0.5rem;
    border: 1px solid var(--border-color);
}

article .content img:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-xl);
}

/* 文章内容引用样式 */
article .content blockquote {
    border-left: 4px solid var(--primary-color);
    margin: 2.5rem 0;
    padding: 1.75rem 2.25rem;
    background-color: var(--primary-light);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
    color: var(--text-secondary);
    position: relative;
    font-size: 1.125rem;
    line-height: 1.8;
}

article .content blockquote::before {
    content: '"';
    position: absolute;
    top: -15px;
    left: 12px;
    font-size: 4rem;
    color: var(--primary-color);
    opacity: 0.2;
    font-family: serif;
    font-style: normal;
}

/* 文章内容列表样式 */
article .content ul,
article .content ol {
    margin: 1.75rem 0 1.75rem 1.5rem;
    padding: 0;
}

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

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

article .content li {
    margin-bottom: 0.875rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

article .content li::marker {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.125rem;
}

/* 文章内容代码块样式 */
article .content pre {
    background-color: #1f2937;
    border: 1px solid #374151;
    border-radius: var(--radius-md);
    padding: 1.75rem;
    margin: 2.5rem 0;
    overflow-x: auto;
    box-shadow: var(--shadow-lg);
    position: relative;
}

article .content code {
    font-family: 'JetBrains Mono', 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.875rem;
    color: var(--primary-color);
    background-color: var(--bg-tertiary);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
}

article .content pre code {
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    color: #e5e7eb;
    font-size: 0.85rem;
    line-height: 1.7;
}

/* 文章内容分割线样式 */
article .content hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 3.5rem 0;
    position: relative;
}

article .content hr::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

/* 代码块样式优化 */
pre {
    background-color: #1f2937;
    border: 1px solid #374151;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin: 2rem 0;
    overflow-x: auto;
    box-shadow: var(--shadow-lg);
    position: relative;
}

code {
    font-family: 'JetBrains Mono', 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.875rem;
    color: var(--primary-color);
    background-color: var(--bg-tertiary);
    padding: 0.2rem 0.4rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
}

pre code {
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    color: #e5e7eb;
    font-size: 0.85rem;
    line-height: 1.6;
}

/* 引用样式优化 */
blockquote {
    border-left: 4px solid var(--primary-color);
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    background-color: var(--primary-light);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
    color: var(--text-secondary);
    position: relative;
    font-size: 1.05rem;
    line-height: 1.8;
}

blockquote::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 10px;
    font-size: 3rem;
    color: var(--primary-color);
    opacity: 0.3;
    font-family: serif;
    font-style: normal;
}

/* 列表样式优化 */
ul,
ol {
    margin: 1.5rem 0 1.5rem 1.5rem;
    padding: 0;
}

ul {
    list-style-type: disc;
}

ol {
    list-style-type: decimal;
}

li {
    margin-bottom: 0.75rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

li::marker {
    color: var(--primary-color);
    font-weight: 600;
}

/* 分割线样式 */
hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 3rem 0;
    position: relative;
}

hr::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

/* 侧边栏样式 */
.card {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    overflow: hidden;
    background-clip: padding-box;
    margin-bottom: 1.5rem;
}

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

.card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.25rem;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
}

.card-body {
    padding: 1.25rem;
}

/* 博主介绍样式 */
.avatar-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.avatar {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border: 3px solid var(--primary-color);
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
}

.avatar:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-xl);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.25rem;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.social-link:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.tags .badge {
    margin-bottom: 0.5rem;
}

/* 最新文章样式 */
.list-group {
    border: none;
}

.list-group-item {
    background-color: transparent;
    border: none;
    border-bottom: 1px solid var(--border-color);
    padding: 0.875rem 0;
    transition: all 0.25s ease;
    color: var(--text-primary);
}

.list-group-item:last-child {
    border-bottom: none;
}

.list-group-item:hover {
    color: var(--primary-color);
    padding-left: 0.75rem;
    background-color: var(--primary-light);
    border-radius: var(--radius-sm);
}

.list-group-item a {
    color: inherit;
    text-decoration: none;
    transition: color 0.25s ease;
    font-size: 0.95rem;
    line-height: 1.5;
    font-weight: 500;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.list-group-item a:hover {
    color: var(--primary-color);
}

/* 标签样式 */
.btn-sm {
    margin: 0.25rem 0.125rem;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    padding: 0.3rem 0.85rem;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    transition: all 0.25s ease;
    text-decoration: none;
    display: inline-block;
    font-weight: 500;
}

.btn-sm:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* 分类样式 */
.badge {
    background-color: var(--primary-light);
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.75rem;
    padding: 0.35rem 0.65rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--primary-color);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* 评论样式 */
.comments-section {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    margin-bottom: 2.5rem;
    box-shadow: var(--shadow-lg);
}

.comments-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.02em;
}

.comment-item {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.comment-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.comment-author {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
    font-size: 1.05rem;
}

.comment-meta {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    margin-bottom: 1rem;
}

.comment-content {
    color: var(--text-secondary);
    font-size: 0.975rem;
    line-height: 1.8;
}

/* 表单样式 */
.form-group {
    margin-bottom: 2rem;
}

.form-label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    background-clip: padding-box;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all 0.25s ease;
    font-family: 'Inter', sans-serif;
}

.form-control:focus {
    border-color: var(--primary-color);
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(99, 102, 241, 0.15);
    background-color: var(--bg-primary);
}

/* 按钮基础样式 */
.btn {
    display: inline-block;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: var(--radius-full);
    transition: all 0.25s ease;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.01em;
    text-decoration: none;
}

/* 主要按钮样式 */
.btn-primary {
    color: #fff;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    color: #fff;
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* 次要按钮样式 */
.btn-secondary {
    color: var(--text-primary);
    background-color: var(--bg-tertiary);
    border-color: var(--border-color);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    color: var(--text-primary);
    background-color: var(--bg-primary);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* 危险按钮样式 */
.btn-danger {
    color: #fff;
    background-color: var(--error-color);
    border-color: var(--error-color);
    box-shadow: var(--shadow-sm);
}

.btn-danger:hover {
    color: #fff;
    background-color: #dc2626;
    border-color: #dc2626;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* 分页样式 */
.pagination {
    margin: 3rem 0;
    justify-content: center;
    gap: 0.5rem;
}

.page-item {
    margin: 0;
}

.page-link {
    color: var(--text-primary);
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.25s ease;
    font-size: 0.95rem;
    box-shadow: var(--shadow-sm);
}

.page-link:hover {
    color: var(--primary-color);
    background-color: var(--bg-secondary);
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.page-item.active .page-link {
    color: #fff;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.page-item.disabled .page-link {
    color: var(--text-tertiary);
    background-color: var(--bg-tertiary);
    border-color: var(--border-color);
    cursor: not-allowed;
}

/* 页脚样式 */
footer {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
    border-top: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

footer .container {
    position: relative;
    z-index: 1;
}

footer p {
    margin: 0;
    font-size: 0.95rem;
    text-align: center;
    opacity: 0.9;
    line-height: 1.6;
}

footer p a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.25s ease;
    opacity: 0.9;
    position: relative;
}

footer p a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: white;
    transform: scaleX(0);
    transition: transform 0.25s ease;
}

footer p a:hover {
    opacity: 1;
    text-decoration: none;
}

footer p a:hover::after {
    transform: scaleX(1);
}

/* 响应式设计 */
/* 大屏幕设备（桌面，992px及以下） */
@media (max-width: 992px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    article {
        padding: 1.75rem;
    }
    
    .post-detail {
        padding: 1.75rem;
    }
    
    .post-detail-title {
        font-size: 1.8rem;
    }
}

/* 中等屏幕设备（平板，768px及以下） */
@media (max-width: 768px) {
    .post-list {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1rem;
    }
    
    /* 侧边栏在移动端居中显示 */
    .col-lg-4, .col-md-4 {
        text-align: center;
    }
    
    /* 侧边栏卡片在移动端调整 */
    .card {
        margin-bottom: 1rem;
    }
    
    .social-links {
        gap: 0.75rem;
    }
    
    .social-link {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
    .container {
        padding: 0 10px;
    }
    
    /* 导航栏调整 */
    .navbar-brand {
        font-size: 1.3rem;
    }
    
    /* Hero区域调整 */
    .hero-bg {
        height: 300px;
    }
    
    .hero-title {
        font-size: 2.25rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    /* 文章卡片调整 */
    article {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    article img {
        margin-bottom: 1.25rem;
    }
    
    article h2 {
        font-size: 1.35rem;
    }
    
    /* 文章详情调整 */
    .post-detail {
        padding: 1.5rem;
    }
    
    .post-detail-title {
        font-size: 1.6rem;
    }
    
    /* 按钮调整 */
    .btn-primary {
        padding: 0.45rem 1.5rem;
        font-size: 0.85rem;
    }
    
    /* 页脚调整 */
    footer {
        padding: 1.5rem 0;
    }
    
    footer p {
        font-size: 0.85rem;
    }
}

/* 小屏幕设备（手机，576px及以下） */
@media (max-width: 576px) {
    /* Hero区域进一步调整 */
    .hero-bg {
        height: 250px;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    /* 文章卡片进一步调整 */
    article {
        padding: 1.25rem;
        margin-bottom: 1.25rem;
    }
    
    article h2 {
        font-size: 1.25rem;
        margin-bottom: 0.85rem;
    }
    
    article p {
        font-size: 0.95rem;
        margin-bottom: 1.25rem;
    }
    
    /* 文章详情进一步调整 */
    .post-detail {
        padding: 1.25rem;
    }
    
    .post-detail-title {
        font-size: 1.4rem;
    }
    
    .post-detail-meta {
        font-size: 0.8rem;
        gap: 0.75rem;
    }
    
    /* 代码块调整 */
    pre {
        padding: 0.85rem;
        font-size: 0.85rem;
    }
    
    code {
        font-size: 0.8rem;
    }
    
    /* 引用调整 */
    blockquote {
        padding: 0.85rem 1.25rem;
        margin: 1.25rem 0;
    }
    
    /* 搜索框调整 */
    .form-control {
        font-size: 0.95rem;
    }
    
    .btn-outline-light {
        font-size: 0.95rem;
    }
}

/* 搜索样式 */
.search-form {
    margin-bottom: 2rem;
}

.search-input {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.search-input:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* 404页面样式 */
.error-404 {
    text-align: center;
    padding: 3rem 0;
}

.error-404 h1 {
    font-size: 6rem;
    font-weight: 700;
    color: #007bff;
    margin-bottom: 1rem;
}

.error-404 h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #212529;
}

.error-404 p {
    font-size: 1.125rem;
    color: #6c757d;
    margin-bottom: 2rem;
}
