/* --- 基础样式 --- */
:root {
    --primary: #2563eb; /* 核心蓝 */
    --text-main: #1e293b; /* 深灰文本 */
    --text-light: #64748b; /* 浅灰文本 */
    --bg-body: #f8fafc; /* 浅色背景 */
    --border-color: #e2e8f0;
    --card-radius: 16px; /* 统一圆角 */
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: var(--bg-body); color: var(--text-main); }
/*body { font-family: 'Inter', -apple-system, sans-serif; background: var(--bg-body); color: var(--text-main); line-height: 1.5; }*/
a { text-decoration: none; }

/* --- 固定导航与分类栏 --- */
.top-nav {
    position: fixed; top: 0; width: 100%; z-index: 1000;
    background: rgba(255, 255, 255, 0.9); /*稍微透明一点 */
    backdrop-filter: blur(10px); /* 增加整体导航栏的磨砂感 */
    border-bottom: 1px solid #e2e8f0;
}
.menu {
    max-width: 1200px; margin: 0 auto;
    display: flex; justify-content: space-between; align-items: center; padding: 18px 25px;
}
.logo { font-size: 1.6rem; font-weight: 900; color: var(--primary); letter-spacing: -1px; }
.nav-links { list-style: none; display: flex; gap: 20px; }
.nav-links a { text-decoration: none; color: #64748b; font-size: 0.9rem; font-weight: 500; }
.nav-links a:hover { color: var(--primary); }

/* 分类过滤器样式 */
.filter-section {
    background: #fff; padding: 12px 0; border-bottom: 1px solid #e2e8f0;
    text-align: center; overflow-x: auto; white-space: nowrap;
}
.filter-btn {
    display: inline-block; padding: 8px 20px; margin: 0 5px;
    border-radius: 30px; border: none; background: #f8fafc;
    color: #64748b; font-size: 0.85rem; cursor: pointer; transition: 0.3s;
}
.filter-btn.active { background: var(--primary); color: #fff; box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2); }

/* --- 瀑布流容器 --- */
main {
    max-width: 1200px;
    margin: 100px auto 60px; /* 留出导航栏高度 */
    padding: 0 25px;
}
.main-ext {margin-bottom: 200px;}

.waterfall { column-count: 4; column-gap: 20px; }
@media (max-width: 1024px) { .waterfall { column-count: 3; } }
@media (max-width: 768px) { .waterfall { column-count: 2; } }
@media (max-width: 480px) { .waterfall { column-count: 1; } }

/* --- 图片卡片与上方分类标签 --- */
.image-card {
    break-inside: avoid; margin-bottom: 20px;
    background: #fff; border-radius: 12px; overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    position: relative; /* 关键：为了定位内部标签 */
    cursor: pointer; transition: transform 0.3s ease;
}
/*.image-card:hover { transform: translateY(-5px); }*/
.image-card:hover { transform: translateY(-5px); box-shadow: 0 10px 15px rgba(0,0,0,0.1); }
.image-card img { width: 100%; display: block; }

/* 图片上方的分类标签 */
.floating-tag {
    position: absolute;
    top: 12px; left: 12px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(4px);
    padding: 4px 12px; border-radius: 6px;
    font-size: 0.75rem; font-weight: 600; color: var(--primary);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 10; pointer-events: none; /* 防止遮挡点击图片 */
}

/* --- 灯箱 --- */
#lightbox {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.95); z-index: 2000;
    justify-content: center; align-items: center; cursor: zoom-out;
}
#lightbox img { max-width: 90%; max-height: 85%; border-radius: 8px; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5); }

/* --- 页脚与加载器 --- */
#loader { text-align: center; padding: 40px; color: #94a3b8; font-size: 0.9rem; }
footer { background: #1e293b; color: #94a3b8; text-align: center; padding: 50px 0; font-size: 0.85rem; }
.foot-ext {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
}

/* ################ categroy ################  */
.page-header {
    text-align: center; margin-bottom: 50px;
}
.page-title { font-size: 2.2rem; font-weight: 800; color: var(--text-main); margin-bottom: 10px; }
.page-subtitle { color: var(--text-light); font-size: 1.1rem; }

/* --- 4. 分类卡片网格 (CSS Grid) --- */
.category-grid {
    display: grid;
    /* 响应式列：每列至少280px宽，自动填充 */
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

/* 分类卡片样式 */
.cat-card {
    display: block; /* 让A标签变为块级以包裹内容 */
    background: #fff;
    border-radius: var(--card-radius);
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 1px solid transparent;
}

/* 悬停效果：整体上浮，阴影加深，边框变色 */
.cat-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    border-color: rgba(37, 99, 235, 0.2);
}

/* 图片容器 */
.cat-img-wrapper {
    position: relative;
    height: 220px; /* 固定高度确保整齐 */
    overflow: hidden;
}
.cat-img-wrapper img {
    width: 100%; height: 100%;
    object-fit: cover; /* 图片裁切填满 */
    transition: transform 0.6s;
}
/* 悬停时图片微缩放 */
.cat-card:hover .cat-img-wrapper img { transform: scale(1.08); }

/* 核心风格：磨砂玻璃分类标题 (复用并放大了之前的标签风格) */
.cat-floating-header {
    position: absolute;
    top: 20px; left: 20px;
    /* 磨砂玻璃背景 */
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 8px 20px;
    border-radius: 30px;
    /* 文本样式 */
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary);
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    z-index: 2;
}

/* 卡片底部信息 */
.cat-info {
    padding: 20px;
    display: flex; justify-content: space-between; align-items: center;
    border-top: 1px solid #f1f5f9;
}
.cat-desc { font-size: 0.9rem; color: var(--text-light); font-weight: 500; }
.cat-count {
    font-size: 0.85rem;
    color: #fff;
    background: #94a3b8;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
}
.cat-card:hover .cat-count { background: var(--primary); } /* 悬停时计数标签变色 */



/* --- 面包屑导航 (Breadcrumbs) --- */
.breadcrumb-section {
    background: #fff; padding: 12px 0; border-bottom: 1px solid var(--border-color);
    margin-top: 60px; /* 避开固定 header */
}
.breadcrumb-container {
    max-width: 1200px; margin: 0 auto; padding: 0 20px;
}
.breadcrumbs {
    list-style: none; display: flex; align-items: center;
    font-size: 0.85rem; color: var(--text-muted);
}
.breadcrumbs li { display: flex; align-items: center; }
/* 面包屑分隔符 */
.breadcrumbs li:not(:last-child)::after {
    content: "/"; margin: 0 10px; color: #cbd5e1;
}
.breadcrumbs a { text-decoration: none; color: var(--text-muted); transition: color 0.2s; }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs .current { color: var(--text-main); font-weight: 600; }


