/* ===== 粉色少女心主题 ===== */
:root {
    --pink-main: #ff6b9d;
    --pink-light: #ffc2d6;
    --pink-soft: #ffe4ec;
    --white: #ffffff;
    --shadow-soft: 0 5px 20px rgba(255, 107, 157, 0.1);
    --shadow-hover: 0 8px 25px rgba(255, 107, 157, 0.15);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background: linear-gradient(135deg, #fff5f7 0%, #ffeef2 100%);
    min-height: 100vh;
    color: #555;
    line-height: 1.6;
}

/* 加载动画 */
#loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--pink-main), var(--pink-light));
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.heart-pulse {
    text-align: center;
    color: white;
    animation: pulse 1.5s infinite;
}

.heart-pulse i {
    font-size: 48px;
    margin-bottom: 10px;
    display: block;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* 网站容器 */
.site-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 顶部栏 */
.site-header {
    background: var(--white);
    border-radius: 20px;
    padding: 20px 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-soft);
    border: 2px solid var(--pink-light);
}

/* 修改这里：把 column 改成 row，并添加 space-between */
.header-content {
    display: flex;
    flex-direction: row; /* 改为行布局 */
    justify-content: space-between; /* 左右分开 */
    align-items: center; /* 垂直居中 */
    flex-wrap: wrap;
    gap: 20px;
}

/* 博客标题 */
.site-branding {
    text-align: left; /* 改为左对齐 */
    flex: 1; /* 占据剩余空间 */
    min-width: 300px;
}

.site-title {
    font-size: 32px;
    margin-bottom: 5px; /* 减少下边距 */
}

.site-title a {
    color: var(--pink-main);
    text-decoration: none;
}

.site-title a:hover {
    color: #ff4081;
}

.site-description {
    color: #888;
    font-size: 16px;
    font-style: italic;
}

/* 顶部搜索框样式 */
.header-search {
    min-width: 280px; /* 改为 min-width 而不是 width */
    max-width: 400px;
    flex-shrink: 0; /* 防止搜索框被压缩 */
}

.header-search form {
    display: flex;
}

.header-search .search-input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid var(--pink-light);
    border-radius: 25px 0 0 25px;
    font-size: 16px;
    outline: none;
    background: var(--pink-soft);
    color: #555;
    transition: all 0.3s ease;
}

.header-search .search-input:focus {
    border-color: var(--pink-main);
    box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.1);
}

.header-search .search-button {
    background: linear-gradient(to right, var(--pink-main), var(--pink-light));
    color: white;
    border: none;
    padding: 0 25px;
    border-radius: 0 25px 25px 0;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
}

.header-search .search-button:hover {
    background: linear-gradient(to right, #ff4081, #ff6b9d);
    transform: scale(1.05);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column; /* 在小屏幕上变回列布局 */
        text-align: center;
    }
    
    .site-branding {
        text-align: center;
        min-width: 100%;
    }
    
    .header-search {
        min-width: 100%;
        max-width: 100%;
    }
}

/* 主布局 */
.main-content-wrapper {
    width: 100%;
}

.main-content {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
    align-items: flex-start;
}

/* 侧边栏 */
.sidebar {
    width: 280px;
    flex-shrink: 0;
    background: var(--white);
    border-radius: 20px;
    padding: 25px;
    box-shadow: var(--shadow-soft);
    border: 2px solid var(--pink-light);
    position: sticky;
    top: 20px;
    overflow-y: auto;
}

/* 美化侧边栏滚动条 */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: var(--pink-soft);
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--pink-light);
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--pink-main);
}

/* 侧边栏小工具 */
.sidebar-widget {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px dashed var(--pink-light);
}

.sidebar-widget:last-child {
    border-bottom: none;
}

.sidebar-widget h3 {
    color: var(--pink-main);
    font-size: 18px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 修复分类目录换行问题 */
.sidebar-widget ul {
    list-style: none;
}

.sidebar-widget li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dotted #eee;
}

.sidebar-widget li:last-child {
    border-bottom: none;
}

.sidebar-widget a {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: var(--pink-soft);
    border-radius: 10px;
    text-decoration: none;
    color: #666;
    transition: all 0.3s ease;
}

.sidebar-widget a:hover {
    background: linear-gradient(to right, var(--pink-main), var(--pink-light));
    color: white;
    transform: translateX(5px);
}

.count {
    background: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    color: var(--pink-main);
    font-weight: bold;
    margin-left: 10px;
}

.sidebar-widget a:hover .count {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* 标签云 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-cloud a {
    background: var(--pink-soft);
    padding: 5px 12px;
    border-radius: 15px;
    text-decoration: none;
    color: #666;
    font-size: 13px !important;
}

.tag-cloud a:hover {
    background: var(--pink-main);
    color: white;
    transform: translateY(-2px);
}

/* 可爱语录 */
.cute-quote {
    background: linear-gradient(135deg, var(--pink-soft), #fff0f5);
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    border: 2px dashed var(--pink-light);
}

.cute-quote i {
    color: var(--pink-main);
    font-size: 24px;
    margin-bottom: 10px;
    display: block;
}

.cute-quote p {
    color: var(--pink-main);
    font-weight: bold;
    font-style: italic;
}

/* 内容区域 */
.content-area {
    flex: 1;
    background: var(--white);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow-soft);
    border: 2px solid var(--pink-light);
    min-width: 0;
}

/* 教程列表样式 */
.tutorial-list {
    background: var(--white);

    box-shadow: var(--shadow-soft);

}

.section-title {
    color: var(--pink-main);
    font-size: 24px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--pink-light);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 教程项目列表 */
.tutorial-items {
    list-style: none;
}

.tutorial-item {
    margin-bottom: 10px;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.tutorial-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

/* 教程链接 - 整个区域可点击 */
.tutorial-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: var(--pink-soft);
    text-decoration: none;
    color: inherit;
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
}

.tutorial-link:hover {
    background: linear-gradient(to right, var(--pink-soft), #fff0f5);
    border-left: 4px solid var(--pink-main);
    padding-left: 24px;
}

/* 教程内容 */
.tutorial-content {
    flex: 1;
}

.tutorial-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    transition: color 0.3s ease;
}

.tutorial-link:hover .tutorial-title {
    color: var(--pink-main);
}

/* 教程元信息 */
.tutorial-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #888;
}

.tutorial-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.tutorial-meta i {
    color: var(--pink-main);
    font-size: 12px;
}

/* 右侧箭头 */
.tutorial-arrow {
    color: var(--pink-main);
    font-size: 14px;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.tutorial-link:hover .tutorial-arrow {
    opacity: 1;
    transform: translateX(3px);
}

/* 无教程状态 */
.no-tutorials {
    text-align: center;
    padding: 60px 20px;
    color: #aaa;
}

.no-tutorials i {
    font-size: 50px;
    color: var(--pink-light);
    margin-bottom: 15px;
    display: block;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px dashed var(--pink-light);
}

.pagination a {
    background: var(--pink-soft);
    padding: 10px 20px;
    border-radius: 20px;
    text-decoration: none;
    color: #666;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background: linear-gradient(to right, var(--pink-main), var(--pink-light));
    color: white;
    transform: translateY(-2px);
}

/* 底部样式 */
.site-footer {
    text-align: center;
    padding: 30px 20px;
    margin-top: 40px;
    color: #888;
    font-size: 14px;
    background: var(--white);
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    border: 2px solid var(--pink-light);
}

.copyright {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.copyright p {
    margin: 0;
    line-height: 1.6;
}

.copyright i {
    margin: 0 5px;
    animation: heartbeat 1.5s ease-in-out infinite;
}

/* 防止内容溢出 */
.content-area * {
    max-width: 100%;
}

/* 长文本自动换行 */
.post-excerpt,
.post-content,
.comment-content {
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

/* 确保代码块不溢出 */
pre, code {
    white-space: pre-wrap;
    word-wrap: break-word;
    max-width: 100%;
    display: block;
    overflow-x: auto;
    background: #f9f9f9;
    padding: 10px;
    border-radius: 5px;
    border-left: 3px solid var(--pink-main);
}

/* 长链接自动换行 */
a {
    word-break: break-word;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .main-content {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        position: relative;
        top: 0;
        max-height: none;
        order: 2;
    }
    
    .content-area {
        order: 1;
    }
}

@media (max-width: 768px) {
    .site-wrapper {
        padding: 15px;
    }
    
    .site-header {
        padding: 15px;
    }
    
    .site-title {
        font-size: 24px;
    }
    
    .sidebar,
    .content-area {
        padding: 20px;
    }
    
    .tutorial-list {
        padding: 20px;
    }
    
    .tutorial-link {
        padding: 15px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .tutorial-arrow {
        align-self: flex-end;
    }
    
    .tutorial-meta {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .section-title {
        font-size: 20px;
    }
    
    .copyright {
        flex-direction: column;
        gap: 10px;
    }
}

/* ===== 分类目录特色样式 ===== */

/* 删除原有的侧边栏分类样式 */
.sidebar-widget ul {
    list-style: none;
}

.sidebar-widget li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dotted #eee;
}

/* 添加新的特色分类样式 */
.category-list {
    list-style: none;
    margin-top: 15px;
}

.category-list li {
    margin-bottom: 12px;
    position: relative;
    padding-left: 0; /* 去掉左边的padding，因为不要emoji了 */
}

/* 去掉emoji图标 */
.category-list li::before {
    display: none; /* 隐藏emoji图标 */
}

.category-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.1), rgba(255, 194, 214, 0.1));
    border-radius: 12px;
    text-decoration: none;
    color: #555;
    border: 1px solid rgba(255, 107, 157, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-link:hover {
    background: linear-gradient(135deg, var(--pink-main), var(--pink-light));
    color: white;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(255, 107, 157, 0.25);
    border-color: transparent;
}

.category-img img{
    width: 20px;
    height: 20px;
}

/* 分类名称 - 特色字体 */
.category-name {
    font-family: 'Arial Rounded MT Bold', 'Helvetica Rounded', Arial, sans-serif;
    font-weight: bold;
    font-size: 15px;
    letter-spacing: 0.5px;
    background: linear-gradient(90deg, #ff6b9d, #ff8fab);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    padding: 2px 0;
}

.category-link:hover .category-name {
    -webkit-text-fill-color: white;
    background: none;
}

/* 文章数量徽章 - 去掉括号 */
.category-count {
    background: linear-gradient(135deg, #ff6b9d, #ff4081);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    min-width: 25px; /* 调小一点，因为去掉括号了 */
    text-align: center;
    box-shadow: 0 3px 8px rgba(255, 107, 157, 0.3);
    transition: all 0.3s ease;
}

.category-link:hover .category-count {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* 标签云美化 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.tag-cloud a {
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.1), rgba(255, 194, 214, 0.2));
    padding: 6px 14px;
    border-radius: 20px;
    text-decoration: none;
    color: #ff6b9d;
    font-size: 13px !important;
    font-weight: 500;
    border: 1px solid rgba(255, 107, 157, 0.2);
    transition: all 0.3s ease;
}

.tag-cloud a:hover {
    background: linear-gradient(135deg, var(--pink-main), var(--pink-light));
    color: white;
    transform: translateY(-3px) rotate(2deg);
    box-shadow: 0 5px 15px rgba(255, 107, 157, 0.25);
}

/* 分类标题美化 */
.sidebar-widget h3 {
    color: var(--pink-main);
    font-size: 20px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--pink-light);
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Arial Rounded MT Bold', 'Helvetica Rounded', Arial, sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
}

.sidebar-widget h3::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--pink-main), transparent);
}

.sidebar-widget h3 i {
    background: linear-gradient(135deg, var(--pink-main), var(--pink-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 22px;
}

/* ===== 文章内容字体样式 ===== */

/* 文章主体内容 */
.post-body {
    font-size: 15px; /* 设置字体大小 */
    line-height: 1.8;
    color: #333;
}

/* 文章正文段落样式 */
.post-body p {
    font-weight: 600; /* 正常加粗，去掉 !important */
    margin-bottom: 20px;
}

/* 标题样式保持 */
.post-content h1 {
    color: var(--pink-main);
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--pink-light);
}

/* 其他标题也调整 */
.post-body h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--pink-main);
    margin: 25px 0 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--pink-light);
}

.post-body h3 {
    font-size: 18px;
    font-weight: 700;
    color: #555;
    margin: 20px 0 12px;
}

/* 列表项也加粗 */
.post-body ul,
.post-body ol {
    margin-left: 20px;
    margin-bottom: 20px;
}

.post-body li {
    font-weight: 600;
    margin-bottom: 8px;
}

/* 代码块样式调整 */
.post-body code {
    background: var(--pink-soft);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Consolas', monospace;
    color: var(--pink-main);
    font-weight: 500;
    font-size: 14px;
}

.post-body pre {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    overflow-x: auto;
    margin: 20px 0;
    border-left: 4px solid var(--pink-main);
    font-size: 14px;
    font-weight: 500;
}

/* 链接样式 */
.post-body a {
    color: var(--pink-main);
    text-decoration: none;
    font-weight: 700;
    border-bottom: 1px dashed var(--pink-light);
    transition: all 0.3s ease;
}

.post-body a:hover {
    color: #ff4081;
    border-bottom: 1px solid var(--pink-main);
}

/* 引用块样式 */
.post-body blockquote {
    border-left: 4px solid var(--pink-main);
    padding: 15px 20px;
    margin: 20px 0;
    background: var(--pink-soft);
    border-radius: 0 10px 10px 0;
    font-style: normal;  /* 改为 normal，去掉斜体 */
    font-weight: 600;
}

/* 表格样式 */
.post-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-weight: 600;
}

.post-body th {
    background: var(--pink-soft);
    color: var(--pink-main);
    padding: 10px;
    text-align: left;
    font-weight: 700;
}

.post-body td {
    padding: 10px;
    border-bottom: 1px solid var(--pink-light);
}

/* 图片样式 */
.post-body img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 20px 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .post-body {
        font-size: 14px; /* 移动端稍微小一点 */
    }
    
    .post-content h1 {
        font-size: 24px;
    }
    
    .post-body h2 {
        font-size: 20px;
    }
    
    .post-body h3 {
        font-size: 17px;
    }
}

/* ===== 移动端优化 ===== */

@media (max-width: 480px) {
    /* 进一步缩小字体 */
    .post-body {
        font-size: 13px;
        line-height: 1.7;
    }
    
    .post-content h1 {
        font-size: 20px;
        margin-bottom: 10px;
    }
    
    .post-body h2 {
        font-size: 16px;
        margin: 15px 0 10px;
    }
    
    .post-body h3 {
        font-size: 15px;
        margin: 12px 0 8px;
    }
    
    /* 列表项间距调整 */
    .post-body li {
        margin-bottom: 6px;
    }
    
    /* 代码块调整 */
    pre, code {
        font-size: 12px;
        padding: 8px;
    }
    
    /* 表格强制换行 */
    .post-body table {
        font-size: 12px;
    }
    
    .post-body th,
    .post-body td {
        padding: 6px 8px;
    }
    
    /* 修复所有溢出元素 */
    * {
        max-width: 100%;
        box-sizing: border-box;
    }
    
    img, video, iframe {
        max-width: 100%;
        height: auto;
    }
}

/* ===== 修改文章正文内的超链接为蓝色 ===== */

/* 只针对文章正文中的超链接改为蓝色 */
.post-body a, 
.post-body a:link, 
.post-body a:visited {
    color: #1a0dab !important; /* 标准链接蓝色 */
    border-bottom: 1px dashed #a0a0ff !important;
}

/* 文章正文内链接悬停状态 */
.post-body a:hover, 
.post-body a:active {
    color: #B004F8!important; /* 悬停时的紫色 */
    border-bottom: 1px solid #6600cc !important;
}

/* 保留其他部分的粉色样式（不需要修改的部分）*/
/* 博客标题链接 - 保持粉色 */
.site-title a {
    color: var(--pink-main) !important;
}

.site-title a:hover {
    color: #ff4081 !important;
}

/* 分类目录链接 - 保持原有样式 */
.category-link {
    color: #555 !important; /* 保持原有灰色 */
}

.category-link:hover {
    color: white !important;
}

/* 分类名称渐变效果 - 保持粉色 */
.category-name {
    background: linear-gradient(90deg, #ff6b9d, #ff8fab) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

.category-link:hover .category-name {
    -webkit-text-fill-color: white !important;
    background: none !important;
}

/* 文章数量徽章 - 保持粉色 */
.category-count {
    background: linear-gradient(135deg, #ff6b9d, #ff4081) !important;
}

/* 标签云链接 - 保持粉色 */
.tag-cloud a {
    color: #ff6b9d !important;
}

.tag-cloud a:hover {
    color: white !important;
}

/* 教程链接 - 保持原有样式 */
.tutorial-link:hover .tutorial-title {
    color: var(--pink-main) !important;
}

/* 分页链接 - 保持原有样式 */
.pagination a {
    color: #666 !important;
}

.pagination a:hover {
    color: white !important;
}

