/* 博客页面统一配色 - 中国古风风格 */

.blog-container {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    gap: 30px;
}

.blog-main {
    flex: 1;
    min-width: 0;
}

.blog-sidebar {
    flex: 0 0 280px;
    position: sticky;
    top: 20px;
    height: fit-content;
}

.sidebar-section {
    background: var(--card-color);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(46, 66, 72, 0.1);
    margin-bottom: 20px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.sidebar-header {
	padding: 1.5rem;
	border-bottom: 1px solid var(--border-color);
}

.sidebar-header h2 {
	color: var(--primary-color);
	font-size: 1.5rem;
	font-weight: 700;
}

.sidebar-content {
    padding: 20px;
}

.blog-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 0;
    border-bottom: 2px solid var(--border-color);
}

.blog-header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 700;
}

.blog-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.blog-post-card {
    background: var(--card-color);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(46, 66, 72, 0.08);
    margin-bottom: 30px;
    padding: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(46, 66, 72, 0.1);
}

.blog-post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(46, 66, 72, 0.15);
    border-color: var(--accent-color);
}

.blog-post-title {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    text-decoration: none;
    font-weight: 600;
}

.blog-post-title:hover {
    color: var(--accent-color);
}

.blog-post-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.blog-post-author {
    display: flex;
    align-items: center;
    gap: 5px;
}

.blog-post-date {
    display: flex;
    align-items: center;
    gap: 5px;
}

.blog-post-excerpt {
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 1.05rem;
}

.blog-post-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.blog-tag {
    background: linear-gradient(135deg, 
        rgba(90, 118, 128, 0.15), 
        rgba(230, 239, 242, 0.8)
    );
    color: var(--secondary-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(90, 118, 128, 0.3);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 
        0 1px 6px rgba(90, 118, 128, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.blog-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.15),
        transparent
    );
    transition: left 0.3s ease;
}

.blog-tag:hover::before {
    left: 100%;
}

.blog-tag:hover {
    background: linear-gradient(135deg, 
        rgba(74, 157, 156, 0.9), 
        rgba(90, 118, 128, 0.8)
    );
    color: var(--card-color);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    box-shadow: 
        0 4px 12px rgba(74, 157, 156, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.read-more-btn {
    display: inline-block;
    background: linear-gradient(135deg, 
        rgba(46, 66, 72, 0.9), 
        rgba(90, 118, 128, 0.9)
    );
    color: var(--card-color);
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 
        0 3px 12px rgba(46, 66, 72, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

/* 玻璃反光效果 */
.read-more-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: left 0.5s ease;
}

.read-more-btn:hover::before {
    left: 100%;
}

.read-more-btn:hover {
    background: linear-gradient(135deg, 
        rgba(90, 118, 128, 0.9), 
        rgba(74, 157, 156, 0.9)
    );
    transform: translateY(-2px);
    box-shadow: 
        0 6px 20px rgba(46, 66, 72, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

/* 筛选状态显示 */
.filter-status {
    background: rgba(74, 157, 156, 0.1);
    border: 1px solid var(--accent-color);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    display: none;
    align-items: center;
    justify-content: space-between;
}

.filter-text {
    color: var(--primary-color);
    font-weight: 500;
    margin: 0;
}

.clear-filter {
    background: linear-gradient(135deg, 
        rgba(74, 157, 156, 0.9), 
        rgba(90, 118, 128, 0.85)
    );
    color: var(--card-color);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 
        0 2px 8px rgba(74, 157, 156, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.clear-filter::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.4s ease;
}

.clear-filter:hover::before {
    left: 100%;
}

.clear-filter:hover {
    background: linear-gradient(135deg, 
        rgba(90, 118, 128, 0.9), 
        rgba(46, 66, 72, 0.9)
    );
    transform: translateY(-1px);
    box-shadow: 
        0 4px 12px rgba(74, 157, 156, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.3);
}

/* 搜索框样式 */
.search-box {
    position: relative;
    margin-bottom: 15px;
}

.search-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
    background: var(--card-color);
    color: var(--text-color);
}

.search-input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(74, 157, 156, 0.1);
}

.search-input::placeholder {
    color: var(--text-secondary);
}

.search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, 
        rgba(74, 157, 156, 0.9), 
        rgba(90, 118, 128, 0.8)
    );
    color: var(--card-color);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 
        0 2px 8px rgba(74, 157, 156, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.25),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

.search-btn:hover {
    background: linear-gradient(135deg, 
        rgba(90, 118, 128, 0.9), 
        rgba(74, 157, 156, 0.9)
    );
    transform: translateY(-50%) scale(1.08);
    box-shadow: 
        0 4px 15px rgba(74, 157, 156, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.35),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(46, 66, 72, 0.15);
    z-index: 100;
    max-height: 300px;
    overflow-y: auto;
    border-top: 1px solid var(--border-color);
    margin-top: 5px;
}

.search-result-item {
    padding: 10px;
    border-bottom: 1px solid rgba(46, 66, 72, 0.1);
}

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

.search-result-title {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 5px;
}

.search-result-title:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.search-result-excerpt {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* 标签样式 */
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-item {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, 
        rgba(230, 239, 242, 0.8), 
        rgba(255, 255, 255, 0.6)
    );
    color: var(--text-color);
    padding: 8px 12px;
    margin: 4px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    border: 1px solid rgba(141, 169, 182, 0.3);
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 
        0 2px 8px rgba(47, 72, 88, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    position: relative;
    overflow: hidden;
}

.tag-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.4s ease;
}

.tag-item:hover::before {
    left: 100%;
}

.tag-item:hover {
    background: linear-gradient(135deg, 
        rgba(74, 157, 156, 0.9), 
        rgba(46, 66, 72, 0.9)
    );
    color: var(--card-color);
    transform: translateY(-1px);
    box-shadow: 
        0 6px 16px rgba(47, 72, 88, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    text-decoration: none;
    border-color: rgba(255, 255, 255, 0.2);
}

.tag-count {
    background: var(--text-secondary);
    color: var(--card-color);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.75rem;
    margin-left: 8px;
    transition: all 0.3s ease;
}

.tag-item:hover .tag-count {
    background: rgba(255, 255, 255, 0.3);
}

/* 月份归档样式 */
.month-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.month-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, 
        rgba(230, 239, 242, 0.8), 
        rgba(255, 255, 255, 0.6)
    );
    color: var(--text-color);
    padding: 8px 12px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    border: 1px solid rgba(141, 169, 182, 0.3);
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 
        0 2px 8px rgba(47, 72, 88, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    margin-bottom: 6px;
    position: relative;
    overflow: hidden;
}

.month-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.4s ease;
}

.month-item:hover::before {
    left: 100%;
}

.month-item:hover {
    background: linear-gradient(135deg, 
        rgba(74, 157, 156, 0.9), 
        rgba(46, 66, 72, 0.9)
    );
    color: var(--card-color);
    transform: translateY(-1px);
    box-shadow: 
        0 6px 16px rgba(47, 72, 88, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    text-decoration: none;
    border-color: rgba(255, 255, 255, 0.2);
}

.month-count {
    background: var(--text-secondary);
    color: var(--card-color);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.75rem;
    margin-left: 8px;
    transition: all 0.3s ease;
}

.month-item:hover .month-count {
    background: rgba(255, 255, 255, 0.3);
}

.month-name {
    font-size: 0.9rem;
}

.month-count {
    background: var(--secondary-color);
    color: var(--card-color);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
}

/* 分类导航样式 */
.category-tree {
    display: flex;
    flex-direction: column;
}

.category-node, .category-child, .category-grandchild {
    margin-bottom: 4px;
}

.category-header, .child-header, .grandchild-header {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.category-header:hover, .child-header:hover, .grandchild-header:hover {
    background: rgba(74, 157, 156, 0.1);
}

.category-toggle {
    cursor: pointer;
    user-select: none;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 6px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: transform 0.2s ease;
}

.category-toggle.expanded {
    transform: rotate(90deg);
    color: var(--accent-color);
}

.category-spacer {
    width: 16px;
    margin-right: 6px;
}

.category-link {
    flex: 1;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.category-link:hover {
    color: var(--accent-color);
}

.category-link.active {
    color: var(--accent-color);
    font-weight: 500;
}

.category-count {
    background: var(--secondary-color);
    color: var(--card-color);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.7rem;
    margin-left: 8px;
}

.category-children {
    margin-left: 16px;
    margin-top: 4px;
}

.child-header {
    padding-left: 8px;
}

.grandchild-header {
    padding-left: 16px;
}

/* 博客详情页特有样式 */
.blog-post-content {
    background: var(--card-color);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(46, 66, 72, 0.1);
    padding: 40px;
    line-height: 1.8;
    font-size: 1.1rem;
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.blog-post-content h1,
.blog-post-content h2,
.blog-post-content h3,
.blog-post-content h4,
.blog-post-content h5,
.blog-post-content h6 {
    color: var(--primary-color);
    margin-top: 30px;
    margin-bottom: 15px;
    line-height: 1.4;
}

.blog-post-content h1 {
    font-size: 2.2rem;
    border-bottom: 3px solid var(--accent-color);
    padding-bottom: 10px;
}

.blog-post-content h2 {
    font-size: 1.8rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 8px;
}

.blog-post-content h3 {
    font-size: 1.5rem;
    color: var(--accent-color);
}

.blog-post-content p {
    margin-bottom: 20px;
    text-align: justify;
}

.blog-post-content ul,
.blog-post-content ol {
    margin-bottom: 20px;
    padding-left: 30px;
}

.blog-post-content li {
    margin-bottom: 8px;
}

.blog-post-content blockquote {
    border-left: 4px solid var(--accent-color);
    background: rgba(74, 157, 156, 0.05);
    padding: 20px 25px;
    margin: 25px 0;
    font-style: italic;
    border-radius: 0 8px 8px 0;
    color: var(--text-secondary);
}

.blog-post-content code {
    background: rgba(46, 66, 72, 0.05);
    padding: 4px 8px;
    border-radius: 4px;
    font-family: var(--code-font);
    font-size: 0.9em;
    color: var(--primary-color);
    border: 1px solid rgba(46, 66, 72, 0.1);
}

.blog-post-content pre {
    background: rgba(46, 66, 72, 0.03);
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
    border: 1px solid var(--border-color);
}

.blog-post-content pre code {
    background: none;
    padding: 0;
    color: var(--text-color);
    border: none;
}

.blog-post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: var(--card-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(46, 66, 72, 0.08);
}

.blog-post-content table th,
.blog-post-content table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.blog-post-content table th {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--card-color);
    font-weight: 600;
}

.blog-post-content table tr:last-child td {
    border-bottom: none;
}

.blog-post-content table tr:hover {
    background: var(--hover-bg);
}

.blog-post-content a {
    color: var(--accent-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.blog-post-content a:hover {
    color: var(--primary-color);
    border-bottom-color: var(--accent-color);
}

/* 博客导航链接 */
.blog-navigation {
    margin-bottom: 30px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.95rem;
    padding: 8px 16px;
    border-radius: 20px;
    background: linear-gradient(135deg, 
        rgba(230, 239, 242, 0.8), 
        rgba(255, 255, 255, 0.6)
    );
    transition: all 0.3s ease;
    border: 1px solid rgba(141, 169, 182, 0.3);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 
        0 2px 8px rgba(47, 72, 88, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.back-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.4s ease;
}

.back-link:hover::before {
    left: 100%;
}

.back-link:hover {
    background: linear-gradient(135deg, 
        rgba(74, 157, 156, 0.9), 
        rgba(46, 66, 72, 0.9)
    );
    color: var(--card-color);
    transform: translateX(-8px);
    box-shadow: 
        0 6px 16px rgba(47, 72, 88, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

/* 博客文章头部 */
.blog-post-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
}

.blog-post-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    line-height: 1.3;
}

.blog-post-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-bottom: 20px;
    font-size: 1rem;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.blog-post-author,
.blog-post-date {
    display: flex;
    align-items: center;
    gap: 8px;
}

.blog-post-tags {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.blog-tag {
    background: linear-gradient(135deg, 
        rgba(74, 157, 156, 0.9), 
        rgba(46, 66, 72, 0.9)
    );
    color: var(--card-color);
    padding: 6px 16px;
    border-radius: 25px;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 
        0 2px 8px rgba(74, 157, 156, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.blog-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.4s ease;
}

.blog-tag:hover::before {
    left: 100%;
}

.blog-tag:hover {
    background: linear-gradient(135deg, 
        rgba(46, 66, 72, 0.9), 
        rgba(90, 118, 128, 0.9)
    );
    transform: translateY(-2px);
    box-shadow: 
        0 6px 16px rgba(46, 66, 72, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.3);
}

.blog-post-footer {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px solid var(--border-color);
    text-align: center;
}

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

    .blog-sidebar {
        flex: none;
        position: static;
        order: -1;
    }

    .sidebar-section {
        margin-bottom: 15px;
    }

    .blog-post-card {
        padding: 20px;
    }

    .blog-header h1 {
        font-size: 2rem;
    }

    .blog-post-content {
        padding: 25px;
    }
    
    .blog-post-title {
        font-size: 2rem;
    }
    
    .blog-post-meta {
        flex-direction: column;
        gap: 15px;
    }
}
