/*
Theme Name: 现代博客主题
Description: 一个简洁现代的个人博客WordPress主题，具有双栏布局和图片展示功能
Version: 1.0
Author: 开发者
*/

/* ========================================
   专业设计体系 - Modern Blog Theme
   ======================================== */

/* 设计令牌系统 */
:root {
    /* 色彩系统 - 优化版 */
    --color-primary: #2563eb;
    --color-primary-light: #3b82f6;
    --color-primary-lighter: #60a5fa;
    --color-primary-dark: #1d4ed8;
    --color-primary-darker: #1e40af;
    --color-secondary: #64748b;
    --color-accent: #f59e0b;
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-error: #ef4444;
    
    /* 交互状态色彩 - 动态主题色 */
    --color-interactive: var(--color-primary);
    --color-interactive-hover: var(--color-primary-light);
    --color-interactive-active: var(--color-primary-dark);
    --color-interactive-subtle: color-mix(in srgb, var(--color-primary) 10%, transparent);
    --color-interactive-subtle-hover: color-mix(in srgb, var(--color-primary) 15%, transparent);
    
    /* 中性色系 */
    --color-gray-50: #f8fafc;
    --color-gray-100: #f1f5f9;
    --color-gray-200: #e2e8f0;
    --color-gray-300: #cbd5e1;
    --color-gray-400: #94a3b8;
    --color-gray-500: #64748b;
    --color-gray-600: #475569;
    --color-gray-700: #334155;
    --color-gray-800: #1e293b;
    --color-gray-900: #0f172a;
    
    /* 语义化颜色 */
    --color-text-primary: var(--color-gray-900);
    --color-text-secondary: var(--color-gray-600);
    --color-text-tertiary: var(--color-gray-500);
    --color-text-inverse: #ffffff;
    --color-bg-primary: #ffffff;
    --color-bg-secondary: var(--color-gray-50);
    --color-bg-tertiary: var(--color-gray-100);
    --color-border-light: var(--color-gray-200);
    --color-border-medium: var(--color-gray-300);
    --color-border-dark: var(--color-gray-400);
    
    /* 字体系统 - 专业排版标准 */
    --font-family-primary: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    --font-family-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    
    /* 字体大小 - 专业排版标准 */
    --font-size-xs: 0.8rem;       /* 13px - 标签/分类 */
    --font-size-sm: 0.875rem;     /* 14px - 元数据/日期 */
    --font-size-base: 1rem;       /* 16px - 引用块 */
    --font-size-md: 1.0625rem;    /* 17px - 正文 */
    --font-size-lg: 1.3rem;       /* 21px - 三级标题 */
    --font-size-xl: 1.4rem;       /* 22px - 首页文章标题 */
    --font-size-2xl: 1.6rem;      /* 26px - 二级标题 */
    --font-size-3xl: 2.2rem;     /* 35px - 文章主标题 */
    --font-size-4xl: 2.5rem;     /* 40px - 超大标题 */
    
    /* 字体粗细 */
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;
    
    /* 行高 - 专业排版标准 */
    --line-height-tight: 1.2;      /* 文章主标题 */
    --line-height-normal: 1.3;     /* 二级标题 */
    --line-height-relaxed: 1.4;     /* 三级标题 */
    --line-height-loose: 1.6;      /* 引用块 */
    --line-height-article: 1.85;   /* 正文 - 最佳阅读体验 */
    --line-height-meta: 1.0;       /* 元数据/日期 */
    
    /* 间距系统 */
    --space-1: 0.25rem;   /* 4px */
    --space-2: 0.5rem;     /* 8px */
    --space-3: 0.75rem;    /* 12px */
    --space-4: 1rem;       /* 16px */
    --space-5: 1.25rem;    /* 20px */
    --space-6: 1.5rem;     /* 24px */
    --space-8: 2rem;       /* 32px */
    --space-10: 2.5rem;    /* 40px */
    --space-12: 3rem;      /* 48px */
    --space-16: 4rem;      /* 64px */
    --space-20: 5rem;      /* 80px */
    
    /* 圆角系统 */
    --radius-none: 0;
    --radius-sm: 0.25rem;   /* 4px */
    --radius-md: 0.375rem;  /* 6px */
    --radius-lg: 0.5rem;    /* 8px */
    --radius-xl: 0.75rem;   /* 12px */
    --radius-2xl: 1rem;     /* 16px */
    --radius-3xl: 1.5rem;   /* 24px */
    --radius-full: 9999px;
    
    /* 阴影系统 */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --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);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* 过渡动画 */
    --transition-fast: 150ms ease;
    --transition-normal: 200ms ease;
    --transition-slow: 300ms ease;
    --transition-bounce: 300ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    /* 交互反馈 */
    --interaction-scale: 1.02;
    --interaction-scale-small: 1.01;
    --interaction-translate: 2px;
    
    /* 断点系统 */
    --breakpoint-sm: 640px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 1024px;
    --breakpoint-xl: 1280px;
    --breakpoint-2xl: 1536px;
    
    /* Z-index 层级 */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
    
    /* 视觉层次 */
    --elevation-1: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    --elevation-2: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
    --elevation-3: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23);
    --elevation-4: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
    --elevation-5: 0 19px 38px rgba(0, 0, 0, 0.30), 0 15px 12px rgba(0, 0, 0, 0.22);
}

/* 重置样式 */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 基础样式 */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
    color: var(--color-text-primary);
    background-color: var(--color-bg-secondary);
    font-weight: var(--font-weight-normal);
    letter-spacing: -0.01em;
}

/* 基础排版 */
h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    color: var(--color-text-primary);
    margin-bottom: var(--space-4);
    letter-spacing: -0.025em;
}

h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-base); }

p {
    margin-bottom: var(--space-4);
    line-height: var(--line-height-relaxed);
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

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

/* 按钮基础样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-3) var(--space-6);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    line-height: 1;
    border-radius: var(--radius-lg);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition-normal);
    text-decoration: none;
    white-space: nowrap;
    user-select: none;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-text-inverse);
    border-color: var(--color-primary);
}

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

.btn-secondary {
    background-color: var(--color-bg-primary);
    color: var(--color-text-secondary);
    border-color: var(--color-border-medium);
}

.btn-secondary:hover {
    background-color: var(--color-bg-tertiary);
    color: var(--color-text-primary);
    border-color: var(--color-border-dark);
}

/* 卡片组件 */
.card {
    background-color: var(--color-bg-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border-light);
    overflow: hidden;
    transition: var(--transition-normal);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-header {
    padding: var(--space-6);
    border-bottom: 1px solid var(--color-border-light);
}

.card-body {
    padding: var(--space-6);
}

.card-footer {
    padding: var(--space-6);
    border-top: 1px solid var(--color-border-light);
    background-color: var(--color-bg-tertiary);
}

/* ========================================
   布局系统
   ======================================== */

/* 主容器 */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-8);
    display: grid;
    grid-template-columns: 320px 1fr 320px;
    gap: var(--space-8);
    min-height: 100vh;
}

/* 网格系统 */
.grid {
    display: grid;
    gap: var(--space-6);
}

.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Flexbox 工具类 */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-start { justify-content: flex-start; }
.justify-end { justify-content: flex-end; }

/* 间距工具类 */
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

.p-1 { padding: var(--space-1); }
.p-2 { padding: var(--space-2); }
.p-3 { padding: var(--space-3); }
.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }
.p-8 { padding: var(--space-8); }

.m-1 { margin: var(--space-1); }
.m-2 { margin: var(--space-2); }
.m-3 { margin: var(--space-3); }
.m-4 { margin: var(--space-4); }
.m-6 { margin: var(--space-6); }
.m-8 { margin: var(--space-8); }

/* ========================================
   侧边栏设计
   ======================================== */

/* 左侧边栏 */
.left-sidebar {
    background: var(--color-bg-primary);
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border-light);
    height: fit-content;
    position: sticky;
    top: var(--space-8);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

/* 用户资料区域 */
.user-profile {
    text-align: center;
    margin-bottom: var(--space-8);
    padding-bottom: var(--space-8);
    border-bottom: 1px solid var(--color-border-light);
}

.profile-image {
    width: 96px;
    height: 96px;
    border-radius: var(--radius-full);
    margin: 0 auto var(--space-6);
    display: block;
    object-fit: cover;
    border: 3px solid var(--color-primary);
    transition: var(--transition-normal);
    box-shadow: var(--shadow-md);
}

.profile-image:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary-light);
}

.user-name {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--space-2);
    color: var(--color-text-primary);
    letter-spacing: -0.025em;
}

.user-description {
    font-size: var(--font-size-sm);
    color: var(--color-text-tertiary);
    margin-bottom: var(--space-6);
    line-height: var(--line-height-relaxed);
    max-width: 240px;
    margin-left: auto;
    margin-right: auto;
}

/* 社交图标设计 */
.social-icons {
    display: flex;
    justify-content: center;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.social-icons a {
    color: var(--color-text-tertiary);
    font-size: var(--font-size-base);
    text-decoration: none;
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--color-bg-tertiary);
    border-radius: var(--radius-full);
    border: 1px solid var(--color-border-light);
    position: relative;
    overflow: hidden;
}

.social-icons a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    opacity: 0;
    transition: var(--transition-normal);
    border-radius: var(--radius-full);
}

.social-icons a:hover {
    color: var(--color-text-inverse);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.social-icons a:hover::before {
    opacity: 1;
}

.social-icons a svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    position: relative;
    z-index: 2;
    transition: var(--transition-normal);
}

.social-icons a:hover svg {
    transform: scale(1.1);
}

/* ========================================
   导航菜单设计
   ======================================== */

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-navigation li {
    margin-bottom: var(--space-2);
    position: relative;
}

.main-navigation a {
    color: var(--color-text-secondary, #666);
    text-decoration: none;
    padding: var(--space-3, 12px) var(--space-4, 16px);
    display: block;
    transition: var(--transition-normal, all 0.3s ease);
    font-size: var(--font-size-sm, 14px);
    font-weight: var(--font-weight-medium, 500);
    border-radius: var(--radius-lg, 8px);
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.main-navigation a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-primary, #2563eb);
    opacity: 0;
    transition: var(--transition-normal, all 0.3s ease);
    border-radius: var(--radius-lg, 8px);
    z-index: -1;
}

.main-navigation a:hover {
    color: var(--color-interactive) !important;
    background: var(--color-interactive-subtle-hover);
    transform: translateX(var(--interaction-translate));
    box-shadow: var(--shadow-sm);
    border-color: var(--color-interactive);
    z-index: 10;
}

.main-navigation a:hover::before {
    opacity: 1;
}

.main-navigation a.current,
.main-navigation .current-menu-item a {
    color: var(--color-interactive) !important;
    background: var(--color-interactive-subtle);
    border-color: var(--color-interactive);
    box-shadow: var(--shadow-xs);
    font-weight: var(--font-weight-semibold);
    position: relative;
}

/* 选中菜单项的hover状态 - 使用主题色加粗而非白色 */
.main-navigation a.current:hover,
.main-navigation .current-menu-item a:hover {
    color: var(--color-interactive) !important;
    background: var(--color-interactive-subtle-hover);
    font-weight: var(--font-weight-bold);
    transform: translateX(var(--interaction-translate));
    box-shadow: var(--shadow-sm);
}

.main-navigation a.current::before,
.main-navigation .current-menu-item a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--color-interactive);
    border-radius: 0 2px 2px 0;
    opacity: 1;
}

.main-navigation a span {
    position: relative;
    z-index: 10;
    display: block;
}

/* 子菜单样式 */
.main-navigation .sub-menu {
    margin-left: var(--space-4);
    margin-top: var(--space-2);
    border-left: 2px solid var(--color-border-light);
    padding-left: var(--space-4);
}

.main-navigation .sub-menu a {
    padding: var(--space-2) var(--space-4);
    font-size: var(--font-size-xs);
    background: var(--color-bg-tertiary);
    color: var(--color-text-tertiary);
    border-radius: var(--radius-md);
    position: relative;
    z-index: 1;
}

.main-navigation .sub-menu a:hover {
    background: var(--color-primary);
    color: var(--color-text-inverse) !important;
    transform: translateX(2px);
    z-index: 10;
}


/* ========================================
   主内容区域设计
   ======================================== */

.main-content {
    background: var(--color-bg-primary);
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border-light);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

/* 内容头部 */
.content-header {
    margin-bottom: var(--space-8);
    padding-bottom: var(--space-6);
    border-bottom: 1px solid var(--color-border-light);
}

.content-header h1 {
    font-size: var(--font-size-3xl);
    color: var(--color-text-primary);
    margin-bottom: var(--space-2);
    font-weight: var(--font-weight-bold);
    letter-spacing: -0.025em;
}

.content-header p {
    color: var(--color-text-tertiary);
    font-size: var(--font-size-sm);
    line-height: var(--line-height-relaxed);
}

/* ========================================
   文章列表设计
   ======================================== */

.post-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.post-item {
    border-bottom: 1px solid var(--color-border-light);
    padding: var(--space-6) 0;
    display: flex;
    gap: var(--space-6);
    align-items: center; /* 改为居中对齐，确保左右区域在同一水平中轴线 */
    min-height: 140px;
    position: relative;
    transition: var(--transition-normal);
    border-radius: var(--radius-xl);
    margin-bottom: var(--space-2);
}

.post-item:hover {
    background: var(--color-bg-tertiary);
    padding: var(--space-6);
    margin: 0 calc(-1 * var(--space-6)) var(--space-2) calc(-1 * var(--space-6));
    box-shadow: var(--shadow-md);
    transform: translateY(-2px) scale(var(--interaction-scale-small));
    border-color: var(--color-border-medium);
}

.post-item:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-border-light), transparent);
}

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

.post-title {
    font-size: var(--font-size-xl);  /* 22px - 首页文章标题 */
    font-weight: var(--font-weight-bold);  /* 700 - Bold */
    margin: 0;
    line-height: var(--line-height-normal);  /* 1.3em */
    text-align: left; /* 确保标题左对齐 */
    color: var(--color-text-primary);
    padding-right: 0; /* 确保标题没有右内边距 */
    box-sizing: border-box;
}

.post-title a {
    color: var(--color-text-primary);
    text-decoration: none;
    transition: var(--transition-normal);
}

.post-title a:hover {
    color: var(--color-primary);
}

.post-excerpt {
    color: var(--color-text-secondary);  /* 使用浅色文本 */
    margin: 0;
    line-height: 1.7;  /* 1.7em - 文章摘要最佳行高 */
    font-size: var(--font-size-base);  /* 16px - 文章摘要 */
    text-align: left; /* 确保描述左对齐 */
    font-weight: var(--font-weight-normal);  /* 400 - Regular */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1; /* 占据剩余空间 */
}

.post-thumbnail {
    flex-shrink: 0;
    width: 180px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-thumbnail:hover img {
    transform: scale(1.05);
}

.post-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* 改为空间分布，确保内容垂直居中 */
    padding: 0;
    gap: var(--space-3);
    height: 120px; /* 与图片高度保持一致 */
    min-height: 120px;
    position: relative; /* 为绝对定位做准备 */
    box-sizing: border-box; /* 确保边框和内边距包含在宽度内 */
}

.post-images {
    margin-bottom: 15px;
}

.post-images img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 10px;
}

.post-images.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.post-meta {
    display: grid;
    grid-template-columns: 1fr auto; /* 分类占据剩余空间，时间固定宽度 */
    align-items: center;
    font-size: var(--font-size-xs);
    margin: 0;
    padding: 0; /* 确保元数据区域没有内边距 */
    gap: var(--space-3);
    width: 100%; /* 确保占满整个宽度 */
    box-sizing: border-box;
}

.post-category {
    background: var(--color-primary);  /* 使用主题色背景 */
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    color: var(--color-text-inverse);  /* 使用反色文本 */
    font-weight: var(--font-weight-medium);  /* 500 - Medium */
    white-space: nowrap;
    font-size: var(--font-size-xs);  /* 13px - 标签/分类 */
    text-align: left; /* 确保分类左对齐 */
    justify-self: start; /* 确保分类在网格左侧 */
    max-width: fit-content; /* 分类标签不占据过多空间 */
    line-height: var(--line-height-meta);  /* 1.0em */
}

.post-date {
    color: var(--color-text-tertiary);
    font-weight: var(--font-weight-normal);  /* 400 - Regular */
    white-space: nowrap;
    font-size: var(--font-size-sm);  /* 14px - 元数据/日期 */
    text-align: right; /* 确保时间右对齐 */
    justify-self: end; /* 确保时间在网格右侧 */
    min-width: fit-content; /* 时间文本不换行 */
    padding: 0; /* 确保时间文本没有内边距 */
    margin: 0; /* 确保时间文本没有外边距 */
    box-sizing: border-box;
    line-height: var(--line-height-meta);  /* 1.0em */
}

/* 右侧边栏 */
.right-sidebar {
    background: var(--color-bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-8) var(--space-5);
    box-shadow: var(--shadow-sm);
    height: fit-content;
}

.sidebar-widget {
    margin-bottom: 30px;
}

.sidebar-widget h3 {
    font-size: var(--font-size-base);
    color: var(--color-text-primary);
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-2);
    border-bottom: 1px solid var(--color-border-light);
}

.sidebar-widget ul {
    list-style: none;
}

.sidebar-widget li {
    margin-bottom: 8px;
}

.sidebar-widget a {
    color: var(--color-text-tertiary);
    text-decoration: none;
    font-size: var(--font-size-sm);
    transition: var(--transition-normal);
}

.sidebar-widget a:hover {
    color: var(--color-primary);
}

/* 页脚 */
.site-footer {
    text-align: center;
    margin-top: var(--space-8);
    padding: var(--space-5);
    color: var(--color-text-tertiary);
    font-size: var(--font-size-xs);
}

.site-info p {
    margin: var(--space-1) 0;
}

.icp-info {
    font-size: var(--font-size-xs);
    color: var(--color-text-tertiary);
    margin-top: var(--space-2);
}

/* 单篇文章页面样式 */
/* 单篇文章页面整体样式 - 移除重复的卡片样式 */
.single-post {
    margin-bottom: var(--space-8);
    /* 移除背景、圆角、阴影，使用父容器 .main-content 的样式 */
}

.post-header {
    margin-bottom: var(--space-8);
    padding-bottom: var(--space-6);
    border-bottom: 2px solid var(--color-border-light);
    position: relative;
}

.post-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--color-primary);
}

.post-header .post-title {
    font-size: var(--font-size-3xl);  /* 35px - 文章主标题 */
    font-weight: var(--font-weight-bold);  /* 700 - Bold */
    margin-bottom: var(--space-4);
    color: var(--color-text-primary);
    line-height: var(--line-height-tight);  /* 1.2em */
    text-align: left;
}

/* 文章元数据样式 - 专业排版标准 */
.single-post .post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    align-items: center;
    font-size: var(--font-size-sm);  /* 14px - 元数据/日期 */
    color: var(--color-text-secondary);
    margin-bottom: var(--space-4);
    line-height: var(--line-height-meta);  /* 1.0em */
}

.single-post .post-category {
    background: var(--color-primary);
    color: var(--color-text-inverse);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);  /* 13px - 标签/分类 */
    font-weight: var(--font-weight-medium);  /* 500 - Medium */
    line-height: var(--line-height-meta);
}

.single-post .post-date {
    color: var(--color-text-tertiary);
    font-weight: var(--font-weight-normal);  /* 400 - Regular */
    line-height: var(--line-height-meta);
}

.single-post .post-author {
    color: var(--color-text-secondary);
    font-weight: var(--font-weight-normal);  /* 400 - Regular */
    line-height: var(--line-height-meta);
}

/* 文章特色图片样式 */
.post-featured-image {
    margin-bottom: var(--space-8);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.post-featured-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
    transition: transform var(--transition-slow);
}

.post-featured-image:hover img {
    transform: scale(1.02);
}

/* 文章详情页内容样式 - 专业排版标准 */
.single-post .post-content {
    line-height: var(--line-height-article);  /* 1.85em - 最佳阅读体验 */
    font-size: var(--font-size-md);  /* 17px - 正文 */
    color: var(--color-text-primary);
    margin-bottom: var(--space-8);
    padding: 0;
    height: auto;
    min-height: auto;
    display: block;
    position: static;
    box-sizing: border-box;
    flex: none;
    justify-content: initial;
    gap: 0;
    font-weight: var(--font-weight-normal);  /* 400 - Regular */
}

/* 文章内容段落样式 - 专业排版标准 */
.single-post .post-content p {
    margin-bottom: var(--space-6);
    text-align: justify;
    text-indent: 2em;
    line-height: var(--line-height-article);  /* 1.85em - 最佳阅读体验 */
    font-size: var(--font-size-md);  /* 17px - 正文 */
    font-weight: var(--font-weight-normal);  /* 400 - Regular */
    color: var(--color-text-primary);
}

/* 文章内容标题样式 - 专业排版标准 */
.single-post .post-content h2,
.single-post .post-content h3,
.single-post .post-content h4 {
    margin: var(--space-8) 0 var(--space-4) 0;
    color: var(--color-text-primary);
    font-weight: var(--font-weight-semibold);  /* 600 - Semi-Bold */
    line-height: var(--line-height-normal);  /* 1.3em */
    position: relative;
    padding-left: var(--space-4);
}

.single-post .post-content h2::before,
.single-post .post-content h3::before,
.single-post .post-content h4::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--color-primary);
    border-radius: var(--radius-sm);
}

.single-post .post-content h2 {
    font-size: var(--font-size-2xl);  /* 26px - 二级标题 */
    border-bottom: 2px solid var(--color-border-light);
    padding-bottom: var(--space-2);
    line-height: var(--line-height-normal);  /* 1.3em */
}

.single-post .post-content h3 {
    font-size: var(--font-size-lg);  /* 21px - 三级标题 */
    line-height: var(--line-height-relaxed);  /* 1.4em */
}

.single-post .post-content h4 {
    font-size: var(--font-size-lg);  /* 21px - 四级标题 */
    line-height: var(--line-height-relaxed);  /* 1.4em */
}

/* 文章内容图片样式 */
.single-post .post-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    margin: var(--space-6) 0;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-normal);
}

.single-post .post-content img:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

/* 文章内容列表样式 */
.single-post .post-content ul,
.single-post .post-content ol {
    margin: var(--space-4) 0;
    padding-left: var(--space-6);
}

.single-post .post-content li {
    margin-bottom: var(--space-2);
    line-height: var(--line-height-relaxed);
}

/* 文章内容引用样式 - 专业排版标准 */
.single-post .post-content blockquote {
    margin: var(--space-6) 0;
    padding: var(--space-4) var(--space-6);
    background: var(--color-bg-secondary);
    border-left: 4px solid var(--color-primary);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    font-style: italic;
    color: var(--color-text-secondary);
    font-size: var(--font-size-base);  /* 16px - 引用块 */
    line-height: var(--line-height-loose);  /* 1.6em */
    font-weight: var(--font-weight-normal);  /* 400 - Regular */
}

.post-gallery {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.post-gallery h3 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.gallery-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-item img:hover {
    transform: scale(1.05);
}

.post-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.post-tags h4 {
    margin-bottom: 10px;
    color: #666;
    font-size: 14px;
}

.tag-link {
    display: inline-block;
    background: #f8f9fa;
    color: #666;
    padding: 4px 8px;
    margin: 2px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 12px;
    transition: all 0.3s ease;
}

.tag-link:hover {
    background: var(--color-primary);
    color: var(--color-text-inverse);
}

/* 文章导航 */
.post-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.nav-previous,
.nav-next {
    flex: 1;
}

.nav-next {
    text-align: right;
}

.post-navigation a {
    color: #666;
    text-decoration: none;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: inline-block;
}

.post-navigation a:hover {
    background: var(--color-primary);
    color: var(--color-text-inverse);
    border-color: var(--color-primary);
}

/* 页面样式 */
.page-content {
    margin-bottom: 40px;
}

.page-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.page-title {
    font-size: 28px;
    color: #2c3e50;
    margin-bottom: 15px;
}

.page-featured-image {
    margin-bottom: 30px;
}

.page-featured-image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
}

.page-content-text {
    line-height: 1.8;
    font-size: 16px;
}

/* 分页样式 */
.pagination {
    margin-top: 40px;
    text-align: center;
}

.pagination .nav-links {
    display: inline-flex;
    gap: 10px;
}

.pagination a,
.pagination span {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #666;
    transition: all 0.3s ease;
}

.pagination a:hover,
.pagination .current {
    background: var(--color-primary);
    color: var(--color-text-inverse);
    border-color: var(--color-primary);
}

/* 搜索页面样式 */
.search-term {
    color: var(--color-primary);
    font-weight: var(--font-weight-bold);
}

.no-results {
    text-align: center;
    padding: 40px 20px;
}

.no-results p {
    font-size: 18px;
    color: #666;
    margin-bottom: 30px;
}

.search-suggestions {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    text-align: left;
    max-width: 400px;
    margin: 0 auto;
}

.search-suggestions h3 {
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 16px;
}

.search-suggestions ul {
    list-style: none;
    padding: 0;
}

.search-suggestions li {
    padding: 5px 0;
    color: #666;
    position: relative;
    padding-left: 20px;
}

.search-suggestions li:before {
    content: "•";
    color: var(--color-primary);
    position: absolute;
    left: 0;
}

/* 无图片时的布局 */
.post-item.no-thumbnail {
    flex-direction: column;
    min-height: auto;
}

.post-item.no-thumbnail .post-content {
    min-height: auto;
    padding: 0;
}

/* 文章列表悬停效果 */
.post-item {
    transition: all 0.3s ease;
    border-radius: 8px;
    margin-bottom: 5px;
}

.post-item:hover {
    background: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-radius: 8px;
    padding: 20px;
    margin: 0 -20px 5px -20px;
}

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

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 15px;
    }
    
    .left-sidebar,
    .right-sidebar {
        order: 2;
    }
    
    .main-content {
        order: 1;
    }
    
    .post-item {
        flex-direction: column;
        gap: 15px;
        padding: 15px 0;
        min-height: auto;
        align-items: stretch; /* 移动端使用拉伸对齐 */
    }
    
    .post-thumbnail {
        width: 100%;
        height: 180px;
        align-self: center; /* 确保图片居中 */
    }
    
    .post-content {
        min-height: auto;
        height: auto; /* 移动端取消固定高度 */
        padding: 0;
        justify-content: flex-start; /* 移动端使用顶部对齐 */
    }
    
    .post-item:hover {
        transform: none;
        padding: 15px;
        margin: 0 -15px 5px -15px;
    }
    
    .post-images.grid {
        grid-template-columns: 1fr;
    }
    
    .post-header .post-title {
        font-size: 24px;
    }
    
    .post-featured-image img {
        height: 250px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .post-navigation {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-next {
        text-align: left;
    }
}

@media (max-width: 480px) {
    .main-content,
    .left-sidebar,
    .right-sidebar {
        padding: 20px 15px;
    }
    
    .post-title {
        font-size: 18px;
    }
    
    .post-header .post-title {
        font-size: 20px;
    }
    
    .post-featured-image img {
        height: 200px;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   微信公众号二维码弹窗样式
   ======================================== */

.wechat-qr-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.qr-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    cursor: pointer;
}

.qr-content {
    position: relative;
    background: var(--color-bg-primary);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-2xl);
    max-width: 400px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    animation: qrModalSlideIn 0.3s ease-out;
    border: 1px solid var(--color-border-light);
}

@keyframes qrModalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.qr-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-6) var(--space-8) var(--space-4);
    border-bottom: 1px solid var(--color-border-light);
    background: var(--color-bg-tertiary);
}

.qr-header h3 {
    margin: 0;
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-primary);
}

.qr-close {
    background: none;
    border: none;
    font-size: var(--font-size-2xl);
    color: var(--color-text-tertiary);
    cursor: pointer;
    padding: var(--space-2);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    transition: var(--transition-normal);
}

.qr-close:hover {
    background: var(--color-bg-tertiary);
    color: var(--color-text-primary);
    transform: scale(1.1);
}

.qr-body {
    padding: var(--space-8);
    text-align: center;
}

.qr-body img {
    width: 200px;
    height: 200px;
    max-width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--space-4);
    border: 1px solid var(--color-border-light);
}

.qr-body p {
    margin: 0;
    color: var(--color-text-tertiary);
    font-size: var(--font-size-sm);
    line-height: var(--line-height-relaxed);
}

/* 响应式调整 */
@media (max-width: 480px) {
    .qr-content {
        width: 95%;
        margin: var(--space-4);
    }
    
    .qr-body img {
        width: 160px;
        height: 160px;
    }
    
    .qr-header {
        padding: var(--space-4) var(--space-6) var(--space-3);
    }
    
    .qr-header h3 {
        font-size: var(--font-size-base);
    }
    
    .qr-body {
        padding: var(--space-6);
    }
}

/* ========================================
   微交互和动画效果
   ======================================== */

/* 页面加载动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-item {
    animation: fadeInUp 0.6s ease-out;
}

.post-item:nth-child(1) { animation-delay: 0.1s; }
.post-item:nth-child(2) { animation-delay: 0.2s; }
.post-item:nth-child(3) { animation-delay: 0.3s; }
.post-item:nth-child(4) { animation-delay: 0.4s; }
.post-item:nth-child(5) { animation-delay: 0.5s; }

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

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

::-webkit-scrollbar-thumb {
    background: var(--color-border-medium);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-border-dark);
}

/* 选择文本样式 */
::selection {
    background: var(--color-primary);
    color: var(--color-text-inverse);
}

::-moz-selection {
    background: var(--color-primary);
    color: var(--color-text-inverse);
}

/* ========================================
   Hover状态优化
   ======================================== */

/* 确保所有hover状态的文本可见性 */
*:hover {
    text-decoration: none !important;
}

/* 按钮hover状态优化 */
.btn:hover,
.btn:focus {
    text-decoration: none;
    color: inherit;
}

/* 链接hover状态优化 */
a:hover,
a:focus {
    text-decoration: none;
}

/* 导航链接hover状态 */
.main-navigation a:hover,
.main-navigation a:focus {
    text-decoration: none;
    color: var(--color-text-inverse) !important;
}

/* 确保导航菜单文本在hover时始终可见 */
.main-navigation a:hover span,
.main-navigation a:focus span {
    color: var(--color-text-inverse, #ffffff) !important;
    position: relative;
    z-index: 20;
    display: block;
}

.main-navigation .sub-menu a:hover,
.main-navigation .sub-menu a:focus {
    color: var(--color-text-inverse, #ffffff) !important;
}

/* 强制修复导航菜单hover状态 */
.main-navigation a:hover,
.main-navigation a:focus,
.main-navigation a:hover *,
.main-navigation a:focus * {
    color: #ffffff !important;
    text-shadow: none !important;
}

/* 确保所有导航文本在hover时可见 */
.main-navigation li:hover a,
.main-navigation li:hover a span {
    color: #ffffff !important;
    text-decoration: none !important;
}

/* 社交图标hover状态 */
.social-icons a:hover,
.social-icons a:focus {
    text-decoration: none;
}

/* 文章标题hover状态 */
.post-title a:hover,
.post-title a:focus {
    text-decoration: none;
}

/* 侧边栏链接hover状态 */
.sidebar-widget a:hover,
.sidebar-widget a:focus {
    text-decoration: none;
}

/* 标签链接hover状态 */
.tag-link:hover,
.tag-link:focus {
    text-decoration: none;
}

/* 分页链接hover状态 */
.pagination a:hover,
.pagination a:focus {
    text-decoration: none;
}

/* 文章导航hover状态 */
.post-navigation a:hover,
.post-navigation a:focus {
    text-decoration: none;
}
