/*
Name: 主题喵 ZTMiao
Version: 1.0.0
Description: 复刻版主题喵风格
Author: YourName
*/

/* --- 全局基础样式 --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Microsoft YaHei", sans-serif; background-color: #ffffff; color: #333; line-height: 1.6; }
a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* --- 顶部导航栏 --- */
.header { background: #fff; box-shadow: 0 2px 12px rgba(0,0,0,0.06); position: sticky; top: 0; z-index: 999; height: 60px; display: flex; align-items: center; }
.header-inner { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 15px; display: flex; justify-content: space-between; align-items: center; }
.header-logo { width: 200px;border-radius: 50%; font-size: 22px; font-weight: bold; color: #007bff; display: flex; align-items: center; gap: 8px; }
.header-logo img {max-width: 100%;}

/* 电脑端导航 */
.nav-menu { display: flex; gap: 30px;align-items: center; }
.nav-menu li a { font-size: 15px; font-weight: 500; color: #444; }
.nav-menu li a:hover { color: #007bff; }

/* 汉堡菜单按钮 (默认隐藏) */
.hamburger { display: none; cursor: pointer; flex-direction: column; gap: 5px; padding: 5px; }
.hamburger span { display: block; width: 24px; height: 2px; background: #333; transition: 0.3s; }

/* --- 手机端侧边栏 (抽屉效果) --- */
.mobile-sidebar { position: fixed; top: 0; left: -280px; width: 280px; height: 100%; background: #fff; z-index: 1001; padding: 20px; box-shadow: 2px 0 10px rgba(0,0,0,0.1); transition: left 0.3s ease-in-out; overflow-y: auto; }
.mobile-sidebar.active { left: 0; }
.mobile-sidebar .logo { margin-bottom: 30px; }
.mobile-nav li { border-bottom: 1px solid #f0f0f0; }
.mobile-nav li a { display: block; padding: 15px 0; font-size: 16px; color: #555; }

/* 遮罩层 */
.overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 1000; opacity: 0; visibility: hidden; transition: 0.3s; }
.overlay.active { opacity: 1; visibility: visible; }

/* --- 公告栏 --- */
.announcement { max-width: 1200px; margin: 20px auto; 

background: #00c3ff;  /* fallback for old browsers */
background: -webkit-linear-gradient(to right, #ffff1c, #00c3ff);  /* Chrome 10-25, Safari 5.1-6 */
background: linear-gradient(to right, #ffff1c, #00c3ff); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */

 padding: 15px 20px; border-radius: 8px; font-size: 14px; color: #666; border-left: 4px solid #007bff; display: flex; align-items: center; }
.announcement i { margin-right: 10px; color: #007bff; }


/* --- 主体内容区 --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 15px 0px; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin: 30px 0 20px; padding-left: 12px; border-left: 4px solid #007bff; }
.section-header h2 { font-size: 20px; font-weight: 600; }
.section-header .more { font-size: 10px; color: #999; }

/* 卡片网格布局 */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;}
.card {border: 1px solid #e1e1e1; background: #fff; border-radius: 5px; overflow: hidden; transition: transform 0.3s, box-shadow 0.3s; cursor: pointer; }
.card:hover { transform: translateY(-6px); box-shadow: 0 15px 30px rgba(0,0,0,0.1); }
.card-img { width: 100%; height: 170px; background: #eee; object-fit: cover; }
.card-body { padding: 15px; }
.card-title { font-size: 16px; margin-bottom: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.card-info { display: flex; justify-content: space-between; font-size: 12px; color: #999; }

.post-content { padding: 0px; }


.post-content h1, .post-content h2, .post-content h3, .post-content h4, .post-content h5, .post-content h6 {
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom:10px;
}
.post-content h1::before, .post-content h2::before, .post-content h3::before, .post-content h4::before, .post-content h5::before, .post-content h6::before {
    content: '';
    display: block;
    background: #28a745;
    width: 5px;
    height: 22px;
    border-radius: 2.5px;
}

.ad-tag {
    position: absolute;
    top: 0;
    right: 0;
    background: #ff0000;  /* fallback for old browsers */
background: -webkit-linear-gradient(to right, #fdcf58, #ff0000);  /* Chrome 10-25, Safari 5.1-6 */
background: linear-gradient(to right, #fdcf58, #ff0000); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
      z-index: 2;

    color: #fff;
    font-size: 10px;
    padding: 1px 1px;
    border-bottom-left-radius: 5px;
    font-weight: bold;
}

/* --- 页脚 --- */
.footer { background: #2c3e50; color: #bdc3c7; text-align: center; padding: 30px 0; font-size: 14px; margin-top: 0px; }



/* 分类筛选标签 */
        .category-filter { max-width: 1200px; margin:auto; padding: 0px; }
        .filter-tags { display: flex; flex-wrap: wrap; gap: 10px; }
        .tag { padding: 6px 15px; background: #fff; border: 1px solid #eee; border-radius: 20px; font-size: 14px; cursor: pointer; transition: 0.3s; }
        .tag:hover, .tag.active { background: #409eff; color: #fff; border-color: #409eff; }
        
        
        
      /* 1. 默认状态下，分类筛选区是隐藏的（同时适用于PC和移动端） */
#category-filter {
    display: none;
}

/* 2. 当分类筛选区拥有 .show 类名时，显示出来 */
#category-filter.show {
    display: block;
}

/* 3. 给标题加一点鼠标悬停效果，提示用户可点击 */
.section-header h2 {
    cursor: pointer;
    transition: color 0.3s;
}
.section-header h2:hover {
    color: #409eff; /* 你主题的主色调 */
}
        
        
        
        
        
/* ================= 悬浮视图切换按钮样式 ================= */
.floating-switcher {
    position: fixed; /* 核心：固定定位 */
    bottom: 30px;    /* 距离底部 30px */
    right: 30px;     /* 距离右侧 30px */
    z-index: 9999;   /* 确保悬浮在所有内容之上 */
    display: flex;
    background: rgba(255, 255, 255, 0.95); /* 半透明白色背景 */
    backdrop-filter: blur(5px); /* 可选：背景毛玻璃效果，更高级 */
    border-radius: 50px; /* 胶囊状圆角 */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15); /* 悬浮阴影 */
    padding: 5px;
}

/* 单个按钮样式 */
.floating-switcher .switch-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 50%; /* 圆形按钮 */
    color: #666;
    transition: all 0.3s;
}

/* 按钮悬停效果 */
.floating-switcher .switch-btn:hover {
    background-color: #f0f0f0;
    color: #409eff;
}

/* 激活状态样式 */
.floating-switcher .switch-btn.active {
    background-color: #409eff;
    color: #fff;
    box-shadow: 0 2px 8px rgba(64, 158, 255, 0.4);
}

/* ================= 1. 网格视图 (Grid View) ================= */
.masonry-grid.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); 
    gap: 15px;
}
/* 网格视图下的图片：固定高度 */
.masonry-grid.grid-view .masonry-item img {
    width: 100%;
    height: 250px; 
    object-fit: cover; 
    display: block;
}


/* ================= 网格视图：手机端 2 列专属样式 ================= */
@media (max-width: 768px) {
    .masonry-grid.grid-view {
        /* 核心：强制改为 2 列 */
        grid-template-columns: repeat(2, 1fr); 
        gap: 10px; /* 手机端间距稍微调小，避免太挤 */
    }
    
    /* 可选：因为列数变少了，图片宽度变大，可以稍微增加固定高度 */
    .masonry-grid.grid-view .masonry-item img {
        height: 200px; 
    }
}


/* ================= 2. 瀑布流视图 (Masonry View) ================= */
.masonry-grid.masonry-view {
    column-count: 4; 
    column-gap: 15px; 
}
/* 瀑布流视图下的图片：高度自适应 */
.masonry-grid.masonry-view .masonry-item {
    break-inside: avoid; /* 防止被截断 */
    margin-bottom: 15px;
    width: 100%;
}
.masonry-grid.masonry-view .masonry-item img {
    width: 100%;
    height: auto; /* 核心：高度自适应 */
    display: block;
}

/* 响应式断点（只针对瀑布流视图生效） */
@media (max-width: 1200px) {
    .masonry-grid.masonry-view { column-count: 3; }/* 平板/窄屏电脑显示 3 列 */
}
@media (max-width: 900px) {
    .masonry-grid.masonry-view { column-count: 2;column-gap: 8px; /* 手机端列间距稍微调小一点，避免太挤 */ }
}
@media (max-width: 600px) {
    .masonry-grid.masonry-view { column-count: 1; }
}


/* 响应式断点（只针对瀑布流视图生效） */
@media (max-width: 1200px) {
    .masonry-grid.masonry-view { 
        column-count: 3; /* 平板/窄屏电脑显示 3 列 */
    }
}
@media (max-width: 768px) {
    .masonry-grid.masonry-view { 
        column-count: 3; /* 核心修改：手机端也强制显示 3 列 */
        column-gap: 8px; /* 手机端列间距稍微调小一点，避免太挤 */
    }
}
@media (max-width: 480px) {
    .masonry-grid.masonry-view { 
        column-count: 2; /* 极小屏幕（如小屏手机）自动降级为 2 列，防止内容看不清 */
        column-gap: 6px; 
    }
}



/* ================= 公共样式（两种视图共用） ================= */
.masonry-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.item-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.9);
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out; 
}
.masonry-item:hover .item-info {
    opacity: 1;
    visibility: visible;
}
.item-title {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.item-meta {
    font-size: 12px;
    display: flex;
    gap: 10px;
}
        
        
        
        
        
        
        

        /* 图片瀑布流布局 (核心 CSS) */
        .gallery-container { max-width: 1200px; margin: 20px auto; padding: 0 0px; }
        .masonry-grid {
            column-count: 4; /* 默认4列 */
            column-gap: 15px;
        }
        .masonry-item {
            break-inside: avoid; /* 防止图片被截断 */
            margin-bottom: 15px;
            background: #fff;
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 10px 10px 20px 5px #a5a5a512;
            transition: transform 0.3s;
        }
        .masonry-item:hover { transform: translateY(-5px); box-shadow: 0 8px 20px rgba(0,0,0,0.1); }


        .item-info { padding: 12px; }
        .item-title { font-size: 15px; font-weight: bold; margin-bottom: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .item-meta { font-size: 12px; color: #999; display: flex; justify-content: space-between; }
        
        
        
        /* 1. 给每个图片项设置相对定位，作为信息层的定位基准 */
.masonry-item {
    position: relative;
    overflow: hidden; /* 防止内容溢出 */
}



/* 2. 信息层默认样式：绝对定位 + 隐藏 */
.item-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.9); /* 半透明白色背景，保证文字清晰 */
    box-sizing: border-box;
    
    /* 核心：默认隐藏 */
    opacity: 0;
    visibility: hidden;
    /* 添加平滑过渡动画 */
    transition: all 0.3s ease-in-out; 
}

/* 3. 鼠标悬停在父容器时，显示信息层 */
.masonry-item:hover .item-info {
    opacity: 1;
    visibility: visible;
}

/* 可选：标题样式微调，防止文字过长溢出 */
.item-title {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 可选：元数据样式微调 */
.item-meta {
    font-size: 12px;
    display: flex;
    gap: 10px;
}
        
        

        /* 分页导航样式 */
        .pagination { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 40px; margin-bottom: 20px; }
        .page-link { 
            display: inline-flex; justify-content: center; align-items: center; 
            min-width: 40px; height: 40px; padding: 0 10px; 
            background: #fff; border: 1px solid #eee; border-radius: 8px; 
            font-size: 14px; transition: 0.3s; cursor: pointer;
        }
        .page-link:hover { background: #f0f9ff; border-color: #409eff; color: #409eff; }
        .page-link.active { background: #409eff; color: #fff; border-color: #409eff; }
        .page-link.disabled { background: #f5f5f5; color: #ccc; cursor: not-allowed; border-color: #eee; }
        .page-ellipsis { padding: 0 5px; color: #999; }

        /* 底部版权 */
        footer { text-align: center; padding: 30px; color: #999; font-size: 14px; margin-top: 40px; border-top: 1px solid #eee; }
        
        
        
        /* 友情链接整体容器 */
.friend-links-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    border-top: 1px solid #f0f0f0; /* 加一条淡淡的顶部分割线 */
}

/* 标题样式 */
.links-title {
    display: inline-block;
    color: #999;
    font-size: 14px;
    margin-right: 10px;
    vertical-align: middle;
}

/* 链接列表容器：使用 Flexbox 布局 */
.links-list {
    display: inline-flex; /* 让链接列表和标题保持在同一行 */
    flex-wrap: wrap;      /* 允许换行 */
    justify-content: center; /* 内容居中 */
    vertical-align: middle;
    gap: 10px; /* 链接之间的间距 */
}

/* 单个链接项样式 */
.link-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #666;
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.3s;
}

/* 鼠标悬停效果 */
.link-item:hover {
    background-color: #f5f7fa;
    color: #409eff; /* 你的主题主色调 */
}

/* 链接 Logo 样式 */
.link-logo {
    width: 18px;
    height: 18px;
    vertical-align: middle;
    margin-right: 4px;
    border-radius: 2px;
}

/* ================= 手机端专属样式 ================= */
@media (max-width: 768px) {
    .friend-links-container {
        padding: 15px 10px;
    }

    .links-title {
        display: block; /* 手机端让标题单独占一行 */
        margin-bottom: 10px;
        margin-right: 0;
    }

    .links-list {
        display: flex;
        width: 100%;
        justify-content: flex-start; /* 靠左对齐 */
        gap: 5px; /* 手机端间距缩小 */
    }

    .link-item {
        /* 核心：宽度设为 20%，刚好一行排 5 个 */
        width: 25%; 
        box-sizing: border-box; /* 确保 padding 不会撑大宽度 */
        font-size: 14px; /* 手机端字体稍微调小 */
        padding: 6px 0; /* 增加上下点击区域 */
    }
    
    .link-name {
        white-space: nowrap; /* 防止名字过长换行 */
        overflow: hidden;
        text-overflow: ellipsis; /* 名字太长显示省略号 */
    }
}
        
        
        
        
        /* 灯箱遮罩层：默认隐藏，全屏覆盖 */
.lightbox-overlay {
    display: none; /* 默认隐藏 */
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.85); /* 半透明黑色背景 */
    z-index: 9999; /* 确保在最顶层 */
    justify-content: center; /* 水平居中 */
    align-items: center; /* 垂直居中 */
    opacity: 0;
    transition: opacity 0.3s ease; /* 添加淡入淡出过渡效果 */
}

/* 激活状态：显示遮罩层 */
.lightbox-overlay.active {
    display: flex;
    opacity: 1;
}

/* 灯箱内的大图容器 */
.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

/* 灯箱内的大图 */
.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain; /* 保持图片比例，防止变形 */
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

/* 关闭按钮 */
.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    font-size: 40px;
    color: #fff;
    cursor: pointer;
    line-height: 1;
}
        
        
        
        
        
        
        
        

        /* 响应式适配 */
        @media (max-width: 1024px) { .masonry-grid { column-count: 3; } }
        @media (max-width: 768px) { .masonry-grid { column-count: 2;column-gap: 8px; /* 手机端适当减小列间距 */ } .nav-links { display: none; } } /* 移动端隐藏导航链接 */
        @media (max-width: 480px) { .masonry-grid { column-count: 2;column-gap: 5px; /* 超小屏间距再缩小一点 */ } }
        



/* --- 响应式适配 --- */
@media (max-width: 768px) { 
    .nav-menu { display: none; }
    .hamburger { display: flex; }
    
    .section-header h2 { font-size: 18px; } 
}
@media (max-width: 480px) { 
    
    .announcement { margin: 15px; font-size: 13px; } 
}