/* ========================
   基础重置
   ======================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #FFF9F5 0%, #FFF5EB 100%);
}

/* ========================
   头部样式
   ======================== */
.site-header {
    text-align: center;
    padding: 60px 20px 40px;
    background: linear-gradient(135deg, #FF9F43 0%, #FFB375 100%);
    border-bottom: none;
    position: relative;
    overflow: hidden;
}

/* 小橘猫logo容器 */
.site-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
}

.site-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.site-title a {
    font-size: 2.5rem;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.site-description {
    margin-top: 10px;
    color: rgba(255,255,255,0.95);
    font-size: 1.1rem;
}

/* 猫爪装饰 */
.cat-paw-decoration {
    position: absolute;
    opacity: 0.15;
    pointer-events: none;
}

.cat-paw-tl {
    top: 10px;
    left: 10px;
    width: 50px;
    height: 50px;
}

.cat-paw-tr {
    top: 10px;
    right: 10px;
    width: 50px;
    height: 50px;
    transform: scaleX(-1);
}

.cat-paw-bl {
    bottom: 10px;
    left: 20px;
    width: 40px;
    height: 40px;
}

.cat-paw-br {
    bottom: 10px;
    right: 20px;
    width: 40px;
    height: 40px;
    transform: scaleX(-1);
}

/* ========================
   瀑布流容器（CSS列）
   ======================== */
.masonry-container {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;

    /* CSS列布局实现瀑布流 */
    column-count: 4;
    column-gap: 20px;
}

/* ========================
   瀑布流项目
   ======================== */
.masonry-item {
    break-inside: avoid;
    margin-bottom: 20px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(255,159,67,0.15);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

.masonry-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(255,159,67,0.25);
}

/* 卡片猫脸装饰 */
.masonry-item::before {
    content: '';
    position: absolute;
    top: -15px;
    right: -15px;
    width: 40px;
    height: 40px;
    background-image: url('cat-face.svg');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 10;
}

.masonry-item:hover::before {
    opacity: 0.6;
}

/* 图片容器 */
.post-image a {
    display: block;
    width: 100%;
    position: relative;
}

.post-image img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* 多图徽章 */
.multi-image-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 159, 67, 0.9);
    color: #fff;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 8px rgba(255,159,67,0.3);
}

.multi-image-badge svg {
    flex-shrink: 0;
}

/* 标题 */
.post-title {
    padding: 15px;
    font-size: 1.1rem;
    font-weight: 600;
}

.post-title a {
    color: #333;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-title a:hover {
    color: #007bff;
}

/* 文章信息区域 */
.post-info {
    padding: 0 15px 15px;
}

/* 发布时间链接 */
.post-time-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s;
}

.post-time-link:hover {
    opacity: 0.8;
}

/* 发布时间 */
.post-time-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    margin-top: 5px;
    background: linear-gradient(135deg, #FFF9F5 0%, #FFE8D1 100%);
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    border: 1px solid rgba(255,159,67,0.2);
}

.post-time-info time {
    color: #FF9F43;
    font-weight: 600;
}

/* 描述 */
.post-desc {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

/* ========================
   分页
   ======================== */
.pagination {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.pagination a {
    display: inline-block;
    padding: 12px 28px;
    background: #fff;
    color: #FF9F43;
    text-decoration: none;
    border-radius: 25px;
    border: 2px solid #FF9F43;
    transition: all 0.3s;
    font-weight: 600;
}

.pagination a:hover {
    background: linear-gradient(135deg, #FF9F43 0%, #FFB375 100%);
    color: #fff;
    border-color: #FF9F43;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255,159,67,0.3);
}

/* ========================
   底部
   ======================== */
.site-footer {
    text-align: center;
    padding: 50px 20px;
    color: #666;
    border-top: 3px solid rgba(255,159,67,0.2);
    background: linear-gradient(to top, #FFF9F5 0%, #fff 100%);
    margin-top: 40px;
    position: relative;
    overflow: hidden;
}

/* 底部猫爪装饰 */
.site-footer::before {
    content: '';
    position: absolute;
    bottom: 10px;
    left: 30px;
    width: 30px;
    height: 30px;
    background-image: url('cat-paw.svg');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.2;
}

.site-footer::after {
    content: '';
    position: absolute;
    bottom: 10px;
    right: 30px;
    width: 30px;
    height: 30px;
    background-image: url('cat-paw.svg');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.2;
    transform: scaleX(-1);
}

/* ========================
   文章详情页
   ======================== */
.post-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

.post-detail {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.post-detail-title {
    padding: 30px 30px 20px;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
}

/* 文章元信息 */
.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 0 30px 20px;
    border-bottom: 1px solid #e0e0e0;
    font-size: 0.9rem;
    color: #666;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.post-meta svg {
    flex-shrink: 0;
    stroke: #666;
    stroke-width: 2;
}

.post-meta a {
    color: #FF9F43;
    text-decoration: none;
    transition: color 0.3s;
}

.post-meta a:hover {
    color: #E68A2E;
    text-decoration: underline;
}

/* 作者名称样式 */
.author-name {
    font-weight: 500;
    color: #333;
}

/* 详情页封面图 */
.post-detail-cover {
    width: 100%;
    overflow: hidden;
}

.post-detail-cover img {
    display: block;
    width: 100%;
    height: auto;
}

/* 文章内容 */
.post-detail-content {
    padding: 30px;
    font-size: 1.05rem;
    line-height: 1.8;
    color: #333;
}

.post-detail-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 20px 0;
}

.post-detail-content p {
    margin: 15px 0;
}

.post-detail-content h2,
.post-detail-content h3,
.post-detail-content h4 {
    margin: 25px 0 15px;
    font-weight: 600;
}

.post-detail-content ul,
.post-detail-content ol {
    padding-left: 30px;
    margin: 15px 0;
}

.post-detail-content blockquote {
    margin: 20px 0;
    padding: 15px 20px;
    background: linear-gradient(135deg, #FFF9F5 0%, #FFE8D1 100%);
    border-left: 4px solid #FF9F43;
    border-radius: 6px;
}

/* 返回首页按钮 */
.post-back {
    padding: 30px;
    text-align: center;
    border-top: 1px solid rgba(255,159,67,0.2);
    position: relative;
}

.post-back a {
    display: inline-block;
    padding: 12px 28px;
    background: linear-gradient(135deg, #FF9F43 0%, #FFB375 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s;
    font-weight: 600;
}

.post-back a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255,159,67,0.3);
}

/* ========================
   响应式布局
   ======================== */
@media (max-width: 1200px) {
    .masonry-container {
        column-count: 3;
    }
}

@media (max-width: 768px) {
    .masonry-container {
        column-count: 2;
        column-gap: 15px;
    }

    .site-title a {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .masonry-container {
        column-count: 1;
    }

    .site-header {
        padding: 40px 20px 30px;
    }

    .site-title a {
        font-size: 1.8rem;
    }

    /* 详情页响应式 */
    .post-detail-title {
        font-size: 1.5rem;
        padding: 20px 20px 15px;
    }

    .post-meta {
        padding: 0 20px 15px;
        gap: 15px;
        font-size: 0.85rem;
    }

    .post-detail-content {
        padding: 20px;
        font-size: 1rem;
    }

    .post-back {
        padding: 20px;
    }
}
